Regex – “The” searching
Say you have a list of movie titles, and you want to either sort them, or search through them, and some of them have “The ” at the start, for…
A bunch of ramblings about PHP programming, JQuery, MySQL and other 'stuff'
Say you have a list of movie titles, and you want to either sort them, or search through them, and some of them have “The ” at the start, for…
Ever wanted to sort a resultset of data, by value, but I wanted a couple of exceptions to appear at the top? SELECT country, population, CASE country WHEN 'United Kingdom'…
On a project I am working on, I need to enable language translation. Thinking about it, turned into something quite complicated. But then I found the Google Language API which…
MySQL Incorrect String value replication error. We use ANT for releasing versions of our PHP applications. Its very smart and takes a lot of the problems related to releases out…
Help in using Ubuntu Terminal Console Remote connection To ssh to another Lunix terminal, use this command: ssh username@host -p port The default SSH port is 21, but you could…
Console commands in Ubuntu for use with subversion Checkout a branch: svn checkout url@revision path To update your local source: svn up And to commit a single file: svn ci…
Removing letters from a string using Regular Expressions. Very simple. but brain bending – All I wanted to do was remove a prefix from a string. The prefix was always…
TabIndex is an attribute to HTML elements that tells the browser which control takes focus next when TAB is pressed. <input id="one" tabindex="3" /> <input id="two" tabindex="1" /> <input id="three"…
Dependency Injections When creating PHP classes, particulary when utilising Unit tests, its a good idea to use dependancy injections. This enables us to use a robust reliable class which is…
I’d not come across REPLACE as a MySQL function before. I’d always used a combination of concatination of LEFTs and RIGHTs and the occasional MID. Unbelievable that I’d not found…