Full UK Postcode Regular Expression Pattern (incl. London)

This is more a note to myself than anything, but I hope this can be a use of other developers looking to regex validate UK Postcodes. This validates all postcodes including London ones fine. (more…)

2 Comments

Multiple CodeIgniter databases e.g. MSSQL and MySQL

In a web app I’m developing at the moment, the primary database in use is an instance of Microsoft SQL Server 2005 Express. This works OK with the CodeIgniter/PHP front-end. Obviously, if I had the choice, I would be using MySQL but in the real world sometimes this isn’t possible. And MSSQL is working great with simultaneous connections from the PHP app and MS Access.

I hit a point where I also wanted to access a MySQL database as well. This is easier than you think to configure, and worked first time with me without any stress or hair pulling. (more…)

0 Comments

Simple Javascript pause/sleep functionality

One thing that I’ve seen lots of people ask questions about is how to reliably pause or sleep execution of Javascript code. There are a variety of solutions, however none seem to be reliable as Javascript cannot really handle this functionality, except if you use setTimeout, which is no good if you just want to not consider any events, and you just want a bog standard sleep like PHP has. (more…)

0 Comments