Pretending that Javascript is XSL, part 3: hCard to vCard December 20th, 2007

In previous posts (part 1, part 2) I established the possibility that there were advantages to making Javascript more functional, to bring it in line with CSS and XSL. I didn’t say what these were, particularly, but I then provided a few bits and pieces on top of jQuery to make Javascript just that: functional [...]

Pretending that Javascript is XSL, part 2: jQuery++ December 19th, 2007

If you’re here, then you probably came from here, and you want to make Javascript more functional. If you didn’t come from there—and this is getting a bit like a Choose-Your-Own-Adventure book, isn’t it?—then you might want to go there first, to see if you want to be here.
So: functional Javascript. Not just functional, but [...]

Pretending that Javascript is XSL, part 1: XSL, CSS and JS side by side December 18th, 2007

There are three main technologies that your browser employs to present HTML for you: XSL, CSS and Javascript. The first two of these are functional: that is, they turn your incoming (X)HTML documents into a set of functions, or behaviours if you like. Because CSS isn’t generally considered a language, let alone a functional one, [...]

SQL Server error: sqlboot.dll December 17th, 2007

After several administrative steps over a few months, we suddenly found the following error coming from an instance of SQL Server on a virtual machine:

Your SQL Server installation is either corrupt or has been tampered with (unable to load SQLBOOT.DLL). Please uninstall them re-run setup to correct this problem.

Nobody had been keeping an eye [...]

Insert any Javascript bookmarklet December 10th, 2007

As the natural extension of Gareth Rushgrove’s bookmarklets for inserting the Dojo or YUI Javascript toolkits mentioned by Simon, here’s a tidying-up of a bookmarklet I’ve been using to bring in any Javascript using user input via a popup prompt:
Insert-JS bookmarklet

javascript:void(function(){
  var%20s=document.createElement("script");
  s.src=prompt("Full%20URL:");
  document.getElementsByTagName("head")[0].appendChild(s);
}())

I was originally appending it to the body as an invisible div, making use of [...]

Checking the changes for many svn versions, one version at a time October 30th, 2007

Say you want to see both the log and diff of a given svn version, just the differences between it and the previous version, plus log message (i.e. what was committed, and why, for version NUM) The following will work at a bash command prompt:
$ r=NUM; rr=-r`expr $r - 1`:$r; svn log -r$r; svn diff [...]

Whatever I might have $_REQUESTed, I didn’t ask for that October 13th, 2007

Imagine you have a Drupal site: I have several, so that’s easy for me. Say you’ve got an index aggregating lots of your content in a listing, and it spans lots of pages. It’s probably a view created with the views module, slicing through your content in a special way.
Drupal has a core paging module [...]

A complex CCK module in Drupal September 20th, 2007

CCK is Drupal’s way of making rich content. It means that nodes of any content type can have any kind of data attached to them, so you can have e.g. a directory of superstore outlets, where the outlet records have their longitude and latitude (editable by a Google Map widget) whereas the contact records (e.g. [...]

There seems no pirate because it be all pirate September 18th, 2007

I hope you all realise what day it is tomorrow. Kevin Reynen writes on the drupal.org development list:
It’s one thing to change your blog. It’s another to change all the sites of your coworkers browse!
http://greasemonkey.makedatamakesense.com/browse_like_a_pirate/

Rumour has it that this is how one of the original on-the-web site piratizers worked: it would translate your webpage [...]

If random is secure, pseudorandom is pseudosecure September 15th, 2007

Do you bank online? How are you asked for your secret code? Three randomly placed digits of it, hmm? The reason for the randomness is that any malicious keylogging software can’t see your screen, just your keyboard: so even if it logged every time you banked online, the fraudster it reported back to could never [...]