Convert Fractional Odds to Decimal

Simple function to convert fractional odds to decimal.
Read the rest of this entry »

Output a DataSet to an XML file

Simple procedure to output a DataSet to a XML file in VB.Net.

Read the rest of this entry »

Validate an IP Address Against Regex Rule Table

The function below is designed for validating IP addresses against a regex rule table. The idea is that it will only return valid providing it matches one of the Allowed regex strings. Alternatively it will return invalid if it matches one of the Deny strings. More in the extended…

Read the rest of this entry »

Auto Format DataGrid

I can’t remember where I found this but it’s a handy sub to automatically set the width of a datagrid. I’ve modified it to set the default null text as well to get rid of those annoying (null)’s. You simply pass in the datagrid and the number of rows you would like to consider. It will set the column widths based on the maximum length of data found or to the header size, whichever is greater. Then it’ll center and replace the nulls. Use sparingly though as it’s a little intensive.
Read the rest of this entry »

I’m in your house stealing your electromagnetic radiation

It’s honestly fascinating what smart people can do nowadays.  This is an interesting, but sadly brief, article on certain new sniffing technology.  I shall have to find some time to look into this more.  Anyone know any good links?

Validate UK Postcodes

There is no sure way to validate a UK postcode unless you subscribe to a postal address validation service but there is simple validation rules you can apply to check they’re at least in the right format. My memory is bad when it comes to the rules, especially when using regex, so I thought it best to document a simple function in the main languages I use.

In the extended is a basic UK postcode validation function written in VB.NET, PHP, VBA, VFP and JavaScript.
Read the rest of this entry »

Move Fields Left

The function in the extended, written in VB .NET, will convert a one-dimensional string array into a datatable.  It will only populate the datatable with fields that are not blank.  I had a need for this to tidy some address fields ready for printing, as roughly demonstrated in the example usage.
Read the rest of this entry »

Infringing your own copyright

Here’s some interesting news from torrentfreak that reports how a site was reprtedly pulled by it’s hosting company due to copyright infringement.  Oddly enough the offending material actually belonged to the site owner.   The host was certainly being pro-active…

Flying Cars

It’s good to see that people are working towards the flying cars that sci-fi has long been promising us.  A Massachusetts based company Terrafugia have been working on a car-airplane hybrid for a while now.  They’re predicting the price tag to be about £114,000, which is good for an entry level aircraft.

jQuery with VS2008

I completely missed this announcement but I’m so glad to read it.  jQuery is by far my most favourite javascript library and it’s simply fantastic to hear that MS will be supporting it in the new versions of VS.  It seems almost too good to be true.