Getting a “pure” date in MS SQL (without the time)
You probably know the situation: You want to get all records grouped by day, but you stored their creation date using getdate(), so now they all contain time as well as the date.
The solution until MS SQL 2008 was not pretty, however with MS SQL 2008 we finally have a “pure” date datatype.
Trouble reading registry key from C#
Reading from registry in C# is very simple, so I was quite stumped when my code didn’t work.
The reason however, was very simple once found: The Wow6432Node…
Getting rid of invisible space used on harddrive
One of my harddrives recently started filling up real fast, yet I’ve put no files onto it for a long time…
Windows Backup and the Shadow Copy Provider turned out to be the explanation.
“eval” in C#, yes it’s possible
Ever wanted something similar to javascript’s eval statement in C# ? Here’s how to do it.
Serverside paging with Ms SQL 2005 / 2008
If you’ve done any amount of website development, you know the issues with paging your data.
With MS SQL 2005 and newer there’s an easy way to do it in your SQL queries. And it even performs better to boot!
Here I’ll sum up how to write proper paging queries with superb performance.
Accessing session in HttpHandlers
In ASP.Net HttpHandlers cannot access the session state by default, in order to enable them to do so, you need to implement an interface.
However this is rather simple, since the interface is just a “marker interface” as MSDN calls it. Here’s how to do it.
Dårlige vaner ved brug af “lock”
lock keywordet i C# er en enkel måde at håndtere tråd sikkerhed på, og i mange tilfælde også den bedste måde.
Desværre bruger en del udviklere keywordet “forkert”, så her er et oprids, af hvad man bør gøre.