Category Archives: Programming

Repeatable random numbers in JavaScript

Ever since programming BASIC on the Spectrum I’d wondered why it was possible to seed a “random” number generator. But then I found I wanted to do something that would produce repeatable results, but look like a random sequence. Strangely, … Continue reading

Posted in JavaScript, Programming | 1 Comment

Firing JavaScript functions after a .Net AJAX request

I wanted to have a function called after data was returned to the page from a .Net AJAX call. (The idea was to fade out when you pressed “submit” and then redraw when data came back.) It turns out there … Continue reading

Posted in JavaScript, Programming | Leave a comment

The Code to Ruin

From The Daily WTF

Posted in Programming | Leave a comment

Moritz Stefaner is a genius

I was thinking about how to best represent connections between people in my Six Degrees of Separation Facebook application and Paul Crabtree recommend I get in touch with Moritz Stefaner as he had something that would fit very nicely indeed. … Continue reading

Posted in Programming | Leave a comment

Identifying slow blocking queries on SQL Server

This piece of SQL is perfect for finding which query is running at any particular time, especially if you want to find what it is that’s running very slowly. sp_who2 This should return a list of what’s running, including process … Continue reading

Posted in Programming | Leave a comment

Facebook’s new ‘Invite friends’ tag

Everyone’s been either copying and pasting or writing from scratch some code to add “Invite friends” to their Facebook apps, but now there’s a simple tag that they’ve provided. It’s currently in beta and, knowing Facebook, is bound to change … Continue reading

Posted in Programming | 2 Comments

SQL Server backup and ‘operating system error 5′

Whilst trying to backup a SQL Server 2005 database on Windows 2003 I was given an error which said, amongst other things operating system error 5. That didn’t help a great deal, but the resolution was relatively simple: give the … Continue reading

Posted in Programming | Leave a comment

‘Object reference not set to instance of an object’

The “Object reference not set to instance of an object” error in ASP.Net has to be one of the most annoying of all error messages giving, as it does, almost no clues as to what the error can be about. … Continue reading

Posted in Programming | Leave a comment

FCKEditor and 500 server image browser error in asp.net

The apparently XML derived “500 server error” problem with FCKEditor’s image upload tool and asp.net seems very common, and there seem to be half a million different confusing solutions on the web. In my case, it turned out the problem … Continue reading

Posted in Programming | Leave a comment

Events and postback with dynamic ASP.Net user controls

I’ve been trying to build an editable organisation chart for an intranet project and have built up a structure of nested dynamic user controls. This was all working well for displaying the information but wasn’t working so well for posting … Continue reading

Posted in Programming | Leave a comment