| Subcribe via RSS

Sort by Date in XSLT

November 17th, 2009 | Comments Off | Posted in XSL

Sometimes the simple things are more difficult than they should be. Take sorting XML records by date through an XSLT stylesheet. Nothing is built in to handle this basic function. So when left to our own devices, we have to break up the date into substrings and compare each piece of the puzzle. In the code below, we are sifting through a date formatted like ’11/17/2009′. To get the year, we start with the 7th character then take the next 4. We evaluate our year, our month then the day and this sorts the dates in ascending order. If we wanted to have these in descending, we’d add the order=”descending” parameter to the xsl:sort.

Keep DOS Window from Closing on Console Applications

November 3rd, 2009 | Comments Off | Posted in C#
For those of you who develop console apps for automating day-to-day activities, it can be annoying when you are trying to see what happened in your execution block. One solution is to pull up a DOS prompt, navigate to the given folder, then trigger it to run. A second option is to add the line Console.WriteLine(); to the end of your code processing block. This basically tells your program that it can’t close up shop until you give the ok.

Photoshop CS2 Stuck on Hand Tool

November 1st, 2009 | Comments Off | Posted in Photoshop
So you’re trucking along all ready to make your edits to a new image and lo and behold no matter what editing option you click on, Photoshop never changes from the hand tool. Very annoying. Well it seems you’ve been hard at work and sucked up all the memory reserve resources Photoshop has allocated. You need to free these up. Go to Edi > Preferences > Memory & Image Cache then set the cache levels to 4 and 75%. Next, we need to clear out the existing memory cache by going to Edit > Purge > All. This wipes out all of the Photoshop memory and starts you anew. If you keep running into this issue, you might want to think about a memory upgrade for your computer.