Software Development

Create An iPhone Icon

One of the first things that I wanted to do when I got my brand new iPod Touch was create a webclip icon.  It really annoys my that a lot of mainstream sites like Digg.com, Weather.com, etc. haven't bothered to create one.  So, here we go. First, start off with a 128x128 image.  One of the things to keep in mind is that your iPhone is going to automatically apply some 'glossiness' to your image, so a nice flat image is ok.  The other thing to keep in mind is that because it does that, you should make sure that your...

posted @ Friday, April 11, 2008 9:07 PM | Feedback (0)

C#: Enums and String Values

One of the biggest things that I've had a problem with C# is its complete, utter lack of string value enumerations.  Enums provide strongly typed domain values that make programming easier to manage.  However, since you can't include characters like wildcards, spaces, etc., this means that making a human readable enum a nearly impossible task.  Until now.  This takes a little more heavy lifting than I come to expect with the .Net framework, but is a relatively easy fix for what you get in return.  This is broken into two parts: Create the String value for the...

posted @ Friday, October 05, 2007 7:32 PM | Feedback (4)

ASP.NET: Download Files From A Website

Many times, dynamic documents, images, zip files etc are created in memory. Rather than save them to the server's disk and provide a link, that dynamic file can be directly saved to the user's computer. By using MIME encoding and a little C# magic, downloading dynamic files is a snap!

posted @ Sunday, April 15, 2007 9:55 PM | Feedback (0)

Guide To Regular Expressions

If you're like me, debugging Regular Expressions can be a pain. There are an infinite amount of resources on the 'Net, but testing a home brew RegEx can be a pain. A little while ago I found this site that will not only guide you in making them, but help make sure that it does what you want it to validate.

posted @ Tuesday, January 23, 2007 10:12 PM | Feedback (0)

Return Primary Key After Insert Into Database

There have been a few times that it has been necessary to return an auto-generated primary key after an insert into a database. This is a tidbit of MS SQL Server code that will do just that.

posted @ Saturday, December 30, 2006 11:31 PM | Feedback (0)

Reset SQL Server Identity Fields

A lot of times after doing extensive testing with a website and its corresponding database, I find it annoying that the identity fields (those commonly called the auto-increment or autonumber fields) have run up their increment to a pretty high number, even though I have deleted all the rows out of them. So, after some research, I stumbled upon a way to reset it back to zero without dropping the table. As a side note, this method is valid for both SQL Server 2000 and 2005.

posted @ Monday, December 18, 2006 7:54 AM | Feedback (0)