As promised during my TechTalk today at Microsoft Denmark, here are the links to all slides and demo code. Unfortunately you'll not be able to download the VPC's as those total around 30GB.
Read the complete 533 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Obtaining the movie height & weidth of a Flash file is an easy task using the swfdump tool that comes as part of the swftools package. Here's an example of how to invoke swfdump from C# and read out the height & width of a given Flash file.
Read the complete 2321 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
As little children we've all been taught that it's better to program defensively than relying on exceptions being thrown. However, sometimes it's preferably to just hope for the best and catch exceptions if they happen.
Read the complete 6088 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
On numerous occations I've had a need for synchronizing directories of files & subdirectories. I've used it for synchronizing work files from my stationary PC to my laptop in the pre-always-on era (today I use SVN for almost all files that needs to be in synch). Recently I needed to implement a very KISS backup solution that simply synchronized two directories once a week for offsite storing of the backup data.
Read the complete 4802 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Writing a calculator is a simple task - just add nine buttons labeled 1-9 and add a plus and minus button and we're almost good to go. In this entry I'm going to write a calculator called SimpleCalc that does not have a GUI, instead it'll take in an arbitrary expression and calculate the results of it. The input I'll use as my immediate goal is the following:
Read the complete 26532 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
A single server has started to sometime leave zombie w3wp.exe processes when trying to recycle. A new process is spawned properly and everything seems to work, except the old processes are still present and take up memory. Task manager reports there's only a single thread left, far from the active ones that have between 40 and 70 threads usually.
Read the complete 6177 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Whenever you concatenate multiple strings into a path, you really ought to be using the System.IO.Path class's Combine method. At times you may be concatenating a number of smaller parts of a path instead of just the two that the Path.Combine() method takes. Nested Path.Combine calls quickly become difficult to read and error prone:
Read the complete 4668 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Logging is an integral part of most applications, whether it's for logging performance metrics or causality data. Avoiding performance hits due to logging can be tricky though as we don't want to spend CPU cycles on the logging infrastructure when logging is disabled, while still keeping the full logging ability when required.
Read the complete 7750 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Once you start distributing your ASP.NET website across multiple webservers, you're going to need a way to share session state. That is, unless your app is stateless, in which case scaling it should be a breeze!
Read the complete 3521 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
I'm finally sitting in the train on my way home from the Airport and an excellent week spent in Nashville, also known as Nash Vegas.
Read the complete 2285 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
When adding sites to IIS7 either by script or by editing the config files directly, you may receive an error in the sites list that says:
Read the complete 4637 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Based on my previous post on how to implement a simple genetic algorithm, I got some great comments pointing out that the algorithm might not be the most pure form of a genetic algorithm. I won't disagree, though I will point out that evolution also does occur due to mutation alone, so genetic algorithms may come in different forms.
Read the complete 6354 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
In this blog post I'll give a quick introduction to what genetic algorithms are and what they can be used for. We'll implement a genetic algorithm that attempts to guess an RGB color by evolving upon a random set of initial guesses, until it at some point evolves into the correct RGB value.
Read the complete 17719 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
I am hastily nearing my third year blogging at improve.dk. Before reinventing my blog, I wrote articles and tutorials at the same address, though in Danish. When I rebooted my blog I completely ditched my old material and started blogging in English. After discussing the concept of blogging a lot recently, I've gathered up my thoughts on the subject.
Read the complete 6769 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Deadlocks in any database can be a hard beast to weed out, especially since they may hide latently in your code, awaiting that specific moment when they explode. An API website, exposing a series of webservices, had been working fine for months, until I decided to run my client app with a lot more threads than usual.
Read the complete 12007 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
SQL Server stores all of it's data in what is basically a large array of "pages". Each page is exactly 8kb and can contain various kinds of data, depending on the page type. In this entry we'll explore how to decipher a data page.
Read the complete 19723 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Yesterday I did an interview with Søren Spelling Lund for ANUG (Aarhus .NET User Group) on SQL Server Optimization, as a followup to my recent talk on that subject. He asked me an interesting question - what is the normal process of determining the need of an optimization, and how to actually do it? This is a case study from today.
Read the complete 12834 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Tonight I held my SQL Server Optimization talk at ANUG. There was an impressive turnout of almost 50 people, and based on the feedback I've received so far, I think it went alright :)
Read the complete 1424 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
One of the best way to improve performance of any website is to reduce the load from clients by allowing them to cache resources. There are various ways to ensure we utilize client side caching to the fullest extent, an often overlooked parameter however, is the actual URL for the resource we want to cache.
Read the complete 6743 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
We're used to using transactions when dealing with the database layer. Transactions ensure we can perform multiple queries as one atomic event, either they all succed or they all fail, obeying the rules of ACIDity. Until Vista, performing transactional file operations haven't been possible.
Read the complete 13572 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
I held a TechTalk on optimizing SQL Server 2005 on the 21st of January. I think it went well so I'm looking forward to the evaluations - please fill them out :)
Read the complete 1130 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
|
|
|