Monthly Archives: September 2013

Generic Classes in C#

What is a generic class? A generic class is a class that can take template variable. More info on this site The example in the above link uses one Template variable for both integers and floating points. If we had … Continue reading

Posted in Uncategorized | Leave a comment

RewriteRule ASP.NET Tutorial

The RewriteRule in htaccess looks like this in C# RewriteRule ^match-site-url$ redirect-to-this Example RewriteRule ^hammadk.com/d*/d$ /test.php?id=$1&id2=$2 This will match the following patterns hammadk.com/1234/5678 and the page will be send to test.php that is sitting in the root directory. 1234 is … Continue reading

Posted in Tutorials/Tips | Leave a comment

Get computer locale in C#

using System.Globalization; using System.Threading; CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture; currentCulture.Name = “en-US”; /* contains country code */ List of Culture Code (Country Codes) A list of culture codes can be found on this link. First two abbreciation (small) are for language, … Continue reading

Posted in Tutorials/Tips, Uncategorized | Leave a comment

How to drag formula over thousand of empty rows with one click

If rows are empty, double click short cut on extend formula hand will not work. So what can you do? How can you resolve it? The trick Copy cells from left side column into the one that you want to … Continue reading

Posted in Tutorials/Tips | Tagged , | Leave a comment

Copy Cells Conditionally in Excel

How to copy cells conditionally in Excel? You have a huge list, you have highlighted them in colors (using some formula), you want to move over the IDs that are not highlighted. How can you do it? There is really … Continue reading

Posted in Tutorials/Tips | Tagged | Leave a comment

How to open remote desktop on extended monitor – For Mac

Method 1 On remote desktop connection window, there is an option to open remote desktop on secondary screen. Method 2 In preference, displays, in the middle tab, drag the white bar on top of one window to the other window. … Continue reading

Posted in Uncategorized | Leave a comment

Quartz.net Working Example

I could not find a working example for Quarts.net. The examples at Quart.net site, does not compile. Found out they are build against Quartz.net version 1.0. The following is a working Quartz.net example that is built against Quartz.net 2.0 (Latest). … Continue reading

Posted in Software Development, Tutorials/Tips | Tagged , , , , | 16 Comments

Debug C# Application without running code

You can debug/test your code without running the application itself. There is a neat feature in Visual Studio (I am using VS 2012) where you can go to Debug menu -> Windows -> Immediate. In this window, you can type … Continue reading

Posted in Software Development | Tagged , | Leave a comment

Pubs database for SQL Server 2012 (slim down version)

The original pubs database is available for SQL Server 2000. It cannot be attached to SQL Server 2012. The following script produces a slim down version of the database. Esp it uses the Authors table only. It was needed in … Continue reading

Posted in Uncategorized | Leave a comment

Post-build Event Command Line

How to write a command line argument in Post Build event in Visual Studio? To get to the setting, right click on project, select properties, then go to the third entry on left “Build Events”. Mostly like you will need … Continue reading

Posted in Software Development | Leave a comment