Imre - imre.com - imre.com
General Information:
Latest News:
A Simple CSS Parser 22 Aug 2013 | 05:00 am
I recently encountered a question on stackoverflow about parsing CSS. Although I've written a bunch of parsing routines, I'd never thought to parse CSS. I've never had a reason to do so. Still, I had ...
Displaying Randomly Selected Images 27 Oct 2012 | 05:00 am
Here's a web user control that will randomly display a single image from a list of image files. Each image file in the list can be flagged as active or inactive and the control will only display image...
A Tic-Tac-Toe Game Engine 20 Oct 2012 | 05:00 am
Here's a fun C# project I put together that allows you to play Tic Tac Toe with the computer. Tic Tac Toe is a very simple game but I still found this project interesting, and I found there are actual...
Creating a User-Friendly TimeSpan String 9 Oct 2012 | 05:00 am
The .NET TimeSpan class is great for keeping track of the difference between two instances of DateTime. However, while TimeSpan has a lot of formatting options, none of them produce a very user-friend...
A Case-Insensitive Version of String.Replace() 26 Sep 2012 | 05:00 am
The String.Replace() method is useful for easily replacing all occurrences of a substring with another substring. However, this method is always case-sensitive. Here is an extension method that implem...
Extending LINQ with Random Operations 22 Sep 2012 | 05:00 am
You can create extension methods to extend LINQ. Here's some code I came up with for extending LINQ to return random list items and shuffle lists.
Implementing Word Wrap in Email Messages 4 Jul 2012 | 08:00 am
In this article, the author presents code to implement word wrap in emails sent using C# on the .NET platform.
Programmatically Resizing an Image 25 May 2012 | 12:00 pm
The .NET frameworks make it easy to resize an image programmatically. Here are some routines I used on a website to process avatars uploaded by users.
Controlling JPEG Compression 18 May 2012 | 12:00 pm
The JPG graphics format supports varying level of compression and quality. Although it isn't readily visible, the Image.Save() method allows you to control this level. Here's a sample C# method that d...
Get Google PageRank Programatically 30 Apr 2012 | 12:00 pm
Google's PageRank has become a popular way to gauge the popularity of a web page. Here's how you can programatically find the PageRank for a particular URL.