Archive for the ‘Code’ Category

Using SyntaxHighlighter to Format Code in WordPress

Thursday, August 14th, 2008

Based on a question in the StackOverflow beta site, I did some quick research into what are the best ways to perform syntax highlighting on code that is posted on blogs. Among the methods that were suggested (by myself or others): Hack together your own display logic to format it as ...

Detecting Application Idle State in Windows Forms

Thursday, February 7th, 2008

On a recent project, I had the need to detect whether or not the application is idle, and if so, for how long has the idle state persisted. Idle in my case is defined as no mouse movement or keyboard activity when any of the forms of the application are ...

Mint Popular Posts Release 1.0

Tuesday, December 18th, 2007

I just posted the files for release 1.0 of the Mint Popular Posts plugin. I am calling it 1.0 (instead of 0.97 which had been the next sequential release number) since this is adding some nice, shiny functionality (options panel in admin to control caching and external DB, widget-capable) and since ...

Custom DateTime Format Strings for .Net

Thursday, November 15th, 2007

I have had to look up on DateTime formatting on MSDN so many times, I have lost track. So I am putting the links and some of the key information here for my own future reference.

Repeater Failure and Disappearance on Row 28

Thursday, August 2nd, 2007

I was working on an ASP.net application (1.1) the other day, changing the UI display of a page. This page basically consisted of a Repeater being populated with data from the DB, and binding javascript actions and styling info to the different rows to be output (each overall it was ...

Enumerating a Dictionary<> Object

Sunday, June 3rd, 2007

In C# using .Net 2.0+, there is now built-in support for Generics collections using the System.Collections.Generic namespace. I use the List type most often, as a strongly-typed substitute for the ArrayList. Since it is strongly-typed, you now have design-time type-checking for enumerations like this (no casting necessary): List<int> Foos = new ...