Wes' Puzzling Blog

... trying to solve the puzzles of .NET

  • I'm back

    It has been a long christmas break. I have been from Blacksburg to DC to Cincinnati to Detroit back to DC and now finally back to Blacksburg. My wife just graduated in Dec and moved to DC to start her new job. I stayed with her until my last semester at Virginia Tech started which was today.

  • Generic version of string.Join

    Have you ever had a list of something other than strings and wanted to combine the list in someway to get a single string? You could use string.Join if you could get your list into a string[] but that is not always so easy. Usually I end up writing my own join method.

  • Code Htmler

    Code Htmler is a simple program that will translate plain text code into a colorized html version of the code. Currently there exist language definitions for C#, JScript, VB.Net and XML.

    It uses regular expressions to match language structures, such as keywords and literals (strings, integer, real, etc.). The language definitions are stored in xml files and so languages can be customized or new languages can be created rather easily.

  • Storing VS projects on a Network drive

    I have a centralized file server where I store pretty much all of my data. When I got my file server I moved all my data to it including my Visual Studio projects. This was about a year ago. 

  • Outlook macro to permanently delete items in junk email folder

    If you are anything like me you hate using the mouse to right click on your Outlook Junk E-mail Folder to select Empty "Junk E-mail" Folder and then on top of that you have to click Yes when it asks you "Are you sure you want to permanently delete all the items and subfolder in the "Junk E-mail" folder?". I hate doing that and I'm more of a hotkey kind of person so I wanted some way to do this with a hotkey.

  • C++ static variables

    I'm working on a project in C++ and I created a static member function and a static data member in one of my classes. When I tried to compile I kept getting an unresolved external error that was pointing to my static data member and I couldn't figure out what the problem was. Finally after some research (via Google, Msdn, and Stroustrup) I figured out that you have to define the static data member outside the class declaration.

  • Using LinearGradientBrush in C#

    Well during my CSS change over I needed some background images for my headers. I wanted some simple gradient looks, but I only have 2 picture programs installed mspaint and Paint.Net, neither one of those does gradients (at least that I could find). I could download and install some picture program that has gradients but that is too much work and not much fun :)