SQLBITS XI, Nottingham

0
Second day here, and it’s going well (despite having a cold). Highlights were yesterday’s training on SSDT, courtesy of Jamie Thomson and an interesting session today on Hadoop and Microsoft’s HDInsight offering.

Ranking Functions in Linq

1
My starting point for this exercise was to apply a simple racing-rank to a list of integer values. Here’s my list… 8, 4, 5, 6, 6, 3, 5, 9, 10, 1, 0, 6. And this is my expectation… 0 = 1st 1 = 2nd 3 = 3rd 4 = 4th 5 = 5th (there are two items in 5th place) 6 = 7th (there are three items in 7th [...]
IMG_9686s

Deleting problem folder

0
Annoyingly, Microsoft updates dumped the the software pack files for one of its updates on my removeable drive recently. Subsequently, I was having all sorts of issues trying to delete (take ownership) of the file. Command-line did the trick… takeown /f <foldername> /r /d y icacls <foldername> [...]
IMG_9686s

Unravelling TargetInvocationException

0
I use Moq for testing. This framework (along with others) uses Castle.Core to create it’s proxy instances. A problem you run into is trying to assert for specific exceptions thrown from the proxy’s constructor, as Castle likes to wrap these in a Reflection.TargetInvocationException. In order to get [...]
IMG_9612s

Mapping Dictionary Values to Class Properties

0
Here is some code that I wrote to map values Dictionary to properties on a class. I have since realised that the JavaScriptSerializer provides a ConvertToType<T> method that achieves the same thing. As I was already working with Json serialization making the change was trivial.
IMG_7634s

Keeping it simple with Trello

2
I’ve adopted Trello at work as a general purpose organisational tool for our team, and we’ve been using it for a little over 1 week now. It’s a beautifully simple execution of the ‘list’, and has all the features you’d want from a basic online organisational [...]
IMG_6625s

Friends don’t let friends … Use IE6

0
I loved this official Microsoft site when it appeared earlier this year. I am still being regularly asked to build web applications that are backwards compatible with IE6… please… for the love of all you hold sacred… stop using IE6!
IMG_6491s

Automate GhostScript in C#

1
This example demonstrates how to send source to GhostScript on the stdin stream, and capture the result on the stdout stream. Test Program In this basic test example we start with a simple “Hello World” PostScript document, call the PostscriptToPdf function, and get the resulting PDF document in a [...]
IMG_6207s

Delimited Lists within Groups using Linq

0
WARNING: It turns out that although functional, this example does not scale well, performance is O(n²)… as the list size doubles, execution time quadruples… back to the drawing board! For detail read the Performance section at the bottom of the post. Given a basic set of values (in this case some [...]
IMG_6171s

Plugin Architecture with Configuration Support

0
For an upcoming project I want to make use of a simple plugin architecture. The application I’m working on processes data for several different clients. Each client will have different rules, and I’m aiming for a data processing plugin for each client. From a deployment perspective I want to load [...]
Go to Top