Quantcast
Browsing all 13 articles
Browse latest View live

testing KV-WebME

I’ve been working on my CMS for about 10 years. It’s monstrously huge (41,000 lines, not including external libraries), and for most of those 10 years, I’ve been too busy building it to concentrate on...

View Article


new API for WebME

As I said in the last post, an API would be required to make the system more testable and more consistent. I started straight away and wrote up something quickly. Over the next week, it solidified into...

View Article


Image may be NSFW.
Clik here to view.

jQuery maskImage plugin

I had a need today to write some code which involved masking one image with another, dynamically. There is no simple way to do this in JavaScript. The nearest I came to finding working code online that...

View Article

onchange in ckeditor

I needed to track changes to source in a CKeditor instance, as my recent work uses a lot of “on-the-fly” updating. Using Alfonso’s onChange plugin, it was a simple matter to capture changes when in...

View Article

Image may be NSFW.
Clik here to view.

separating buttons in jquery-ui dialog

By default, the jQuery-UI dialog will place buttons on the right side of the popup: This causes a problem because if you have “OK” right next to “Delete”, and you click the wrong one, well … The...

View Article


Image may be NSFW.
Clik here to view.

first and last saturday of a month

I’m working on an expenses application. In order to do it, I need to display the entire month, with full weeks in each (from Saturday to Friday). To do this, I need to know what date the Saturday in...

View Article

musical intervals trainer, web version

last weekend, I wrote an intervals trainer app for practicing recognising intervals. I want other people to use it, but haven’t got a Google development account yet so can’t upload an app. So, today, I...

View Article

code golf

I came across a new (to me) game yesterday – Code Golf. The game involves coming up with an algorithm to solve a programming problem, and trying to condense the code for the algorithm into the smallest...

View Article


Image may be NSFW.
Clik here to view.

straightening an image of horizontal lines

I’m working on a mobile app for photographing sheet music and then playing it. When I first approached this, I considered using a Hough transform, which is a mathematical tool for finding lines in an...

View Article


Simple geo-ip based links

simple geoip based links, for when you need to link to different files depending on the client’s country. requires PHP, jQuery. in the head of the document, have this:...

View Article

CSRF

CSRF (cross-site request forgery) are hacks where a user on one system is tricked into doing something on that system while browsing another system. Example Let’s say you are logged into...

View Article

Keeping a PHP session alive

I get asked this a lot. When you log into a session-based system, and walk away for half an hour, frequently you’ll come back to find it is no longer logged in. How do you keep the session alive when...

View Article

kbarcode part 1 – JavaScript

Short story: Github repository for kbarcode – the JavaScript part of the solution. You can use it on its own, without needing Cordova at all. Demo of kbarcode finding a barcode and then the barcode...

View Article

Browsing all 13 articles
Browse latest View live