Before today, I hadn’t really given much thought to the idea of searching MySQL databases and the implications that apostrophes might have upon the returned results. As part of a larger directory project, it was necessary for us to unify the searches containing apostrophes, and so I delved a little deeper into PHP and MySQL, and finally decided that the cleanest and most efficient solution was to let MySQL handle this. In this post, I’ll show you how we achieved it…
Well, it seems that I have managed to do it again – things have been very hectic for me, and I’ve rather let this Blog fall into a state of disrepair. I was able to add a new, minimal theme a couple of days ago, but aside from that, I haven’t been able to find a spare five minutes to Blog. Hopefully now that Christmas is coming, and a lot of my projects at work are coming to an end, I’ll have more time to focus on the Blog, and sharing things with you lovely, lovely people.
Keep checking back for regular updates. I’m pleased to say that the response to my jQuery Mobile Events has been incredible, and the community has really helped to develop the idea. I’ll be pushing the new version to GitHub in the next few weeks, which will include some new events, including pinch. I’m also planning to release another jQuery-based mobile library in the New Year, dealing with gestures.
Thanks for your patience, and stay tuned for more code monkey business.
I am pleased to say that after much procrastinating and beating around the bush, I have finally found time to sit down and completely re-write the jQuery mobile events I mentioned in my earlier post (see here for more information). Details of the events can be found after the jump.
I’ve been really busy this week and will continue to be so, as such I haven’t really got time to formulate full Blog posts unfortunately. As a stop gap, I thought I’d just share one of the most useful tools I have found for a while — Noise Texture Generator v2. More information after the jump!
The main operators of commercial and personal mail in the United Kingdom, Royal Mail, have made it extremely difficult for the average website owner to implement a cheap and clean solution for looking up the address from a postcode alone. The Postcode Address File (PAF) can be purchased for a pretty penny, but generally it is excessive for the requirements of small to medium-sized websites. Luckily, using a combination of search methods in Google’s very own Maps API, we can easily look up a UK postcode to an address with a relatively high accuracy.
The CSS box model has done many things for modern web development and design. The introduction of some great CSS frameworks (such as the 960 Grid System) have also helped to shape the way we rethink web publishing. All of that having been said, there still exists one bane of every web developer’s life – the clearing of floated elements to seemingly expand the container to fit around its child elements. This is typically achieved by adding a ‘clearfix’ element to the DOM, but this workaround isn’t great, and defeats the object of using tidy, uncluttered HTML and CSS structures, as a completely redundant and hidden element is required. I’ll show you after the jump one approach to self-clearing container elements.
It’s been a while since I last posted, but I am working on a few new Articles right now, and will hopefully get them posted before the New Year is upon us. In the meantime, I just wanted to take the opportunity to wish all of my readers and subscribers a very Merry Christmas, and my very best wishes to you all for the New Year!
There’s nothing more frustrating than having to deal with closures in JavaScript. There are numerous workarounds, but the most common one in use by most developers right now is to create an anonymous function and an intermediate anonymous function that handle whatever was intended to be run inside the loop. For the most part, these solutions work great; they do have a drawback though. Since there’s the requirement to create two additional functions per call, the browser is effectively calling three functions per iteration, rather than just a single function we typically use.
Using jQuery’s event.data object, we can easily achieve a closure on any loop which is linked to an event in jQuery. After the jump, I’ll show you how I usually handle closure in jQuery when I need to iterate a loop and apply numerous click() or similar events to that object. Trust me, it’s far cleaner than using the typical anonymous functions so common in web development these days.
Well, it’s been a while since I was last blogging, and that’s largely been down to the sheer amount of work I’ve had on my plate recently. So I thought it was high time that I put together something new for you all.
It’s quite frustrating that the BBC does not release a feed for the Official Top 40 Chart, in any format! I decided that it might be a useful tool for some developers to have, so I have written a simple API that fetches the UK Top 40 Chart from the BBC, and returns it as either an XML file, or a JSON string.
Most web developers use the popular jQuery JavaScript library on a regular basis. I use it every day. For standard web development, it’s a fantastic resource and certainly saves a lot of time. Recently, the team behind the project announced that their mobile plugin for the library (creatively named jQuery Mobile) was in the Release Candidate phase. However, sometimes as a developer you might want to yield the functionality of touch events and other mobile events without having to include the whole plugin. As a result, I decided to set to and write a series of custom plugins for stand-alone jQuery which mimic the events of a mobile device.
Recent Comments