Brilliant Chunking of IEnumerables
I recently needed to chunk a *huge* IEnumerable into manageable chunks (SqlServer only allows _so_ many parameters in a single query (update x where y in *huge ienumerable*) ) So I came across this...
View ArticleÅpent brev til de som vedlikeholder nettbank.handelsbanken.no
Jeg er særdeles lite imponert over passordkravene til Handelsbankens nettbank. Ved å hindre meg i å bruke “spesialtegn” så legger dere opp til at entropien i passordet blir langt mindre enn den kunne...
View ArticleSql Server In Recovery
So, you just did something potentially stupid. You became impatient while Sql Server was churning away at something and took forever to do a simple small little thing which should take no time at all....
View ArticleIt’s been a year (almost) what’s up?
Last blogpost is from april 2013, what have I been doing in the meantime? Well I’ve mostly been busy working on the same relatively huge and ugly codebase gradually prettifying it and in the process...
View ArticleEasily check process ID of IIS app pool
Here’s a trick I learned from http://martinnormark.com/iisapp-equivalent-in-iis-7-and-beyond/ create a .bat file called iisapp.bat containing the following: %SystemRoot%\System32\inetsrv\appcmd list wp...
View Articleset up a new dev machine IIS sites through script
here’s a powershellscript you can use to script IIS web sites (we update it whenever we add new web sites to the project so everyone is running their sites on the same ports and visual studio doesn’t...
View ArticleTruncate a string without truncating/cutting words (if possible)
heres a small snippets we’ve used to try and cut a string at a certain position, but accepting up to N extra letters if that means that we will not truncate in the middle of a word public static string...
View Articlemaking C# compare two strings the same way SQL server will
This snippet has served us well public static bool LooksLike(this string value, string other) { if (value == null) { return other == null; } return other != null &&...
View ArticleWorking with Enums
Enums are like the small tokens you can use instead of real coins in shopping carts, lockers etc. They really have a very limited use, can always be replaced by something more valuable which also gets...
View ArticleDisplay control hierarchy in winforms application
I recently changed projects and suddenly found myself in a MASSIVE winforms application… Now normally I have no problem navigating massive codebases, after all all you have to do is to right click and...
View Article
More Pages to Explore .....