Spooky Case of the Wem Ghost
Installing Proprietary nVidia Drivers on Ubuntu Linux
Reading Email with PHP and IMAP/POP3
Garmin Edge 205 GPS Cycle Training Tool
Nasa's Space Shuttle Atlantis Transiting the Sun
Javascript Snippets
Spooky Case of the Wem Ghost Tuesday, 18th May 10
compton

There's an interesting story doing the rounds which you may or probably won't have seen recently. The Shropshire Star reports on an old chap who spotted what appears to be a very uncanny resemblance between a 1920s B&W photograph and a famous picture of an alleged local ghost.

See the full story here.

I was intrigued, and decided to compare the two images a bit closer, and there does seem to be a striking resemblance. See what you think using the image below. Click and drag the Fade control to fade from the 1990s image of the so-called Wem ghost to the 1920s image of a very much alive and sulky looking girl. You can use the other slider to zoom in or out on the image for a closer peek.

These images are both taken from the Shropshire Star story, and are untouched except to resize one so that the 'ghost' is the same size as the girl.

Some elements, such as the belt ... ...

Future of Computing: Silent, Capable, Low Power Friday, 13th March 09
compton

In the early days of home PCs, back in the days of the 386 CPU, the machines ran almost completely noiselessly. The processor itself required no fan, and there was no call for case fans. The only fan would be found in the power supply, where it cooled the large step-down transformers.

Not so any more. Start up your home PC and you might as well be transported to the deck of an aircraft carrier. You have a CPU cooling fan, often another fan on your graphics card, and more and more frequently case fans are needed too. A typical PC can easily make enough noise to drown out low volume dialogue in movies and to mask the subtler nuances of the music you listen to.

But there is an alternative - a low spec processor that is able to run without a fan and only a heatsink, something like the VIA C7. It is fully x86 compatible, and can operate at 800 to 1500 MHz. The systems draw very little power in operation - typically around 20W, which is comparable to a modern low-energy lightbulb. ... ...

Installing Proprietary nVidia Drivers on Ubuntu Linux Saturday, 22nd December 07
compton
This article refers to Ubuntu Gutsy Gibbon (7.10, 32-bit), but the upgrade to Hardy Heron (8.4) also messed up my screen resolutions, as I expected it would. At least this time I was prepared, and I was relieved that the script here works just as well with Hardy. It also appears to work on Debian - at least, it worked great for me on Debian amd64.

I had had a load of problems getting the default restricted drivers running when I upgraded to Gutsy, and at the time I'd tried the drivers from nvidia and found it an uphill struggle. During the process I realised that the default option in my Grub boot menu was causing Ubuntu to run with the older Feisty 2.6.20.16 kernel. Once I corrected that, I was able to switch on the restricted drivers (via System > Administration > Restricted Drivers) and enable compiz fusion with no further problems.

Since then Gutsy had been running great, with compiz silky smooth with max effects. World of Warcraft also runs fine, as does steam:- Team ... ...
XML Parsing and Display of GPX data in Java Monday, 26th January 09
compton

With all these GPX recordings of routes I'm collecting, I wanted to view and compare details of past routes in a more user-friendly manner than poring through reams of XML output. The Google Maps API would be great to incorporate somehow, and it is freely available for JavaScript use. However I decided to be awkward and write a desktop application in Java. I'm figuring that I'll find some way around the problem of getting graphical map imagery later.

So far I have a small Java Swing/AWT application which reads an XML file of GPS points from a recording of a cycle ride and displays the route in a JPanel within a JFrame:


There are three primary classes - quickChart which extends JFrame, chartPanel which extends JPanel, and gpxParser which extends ... ...
Reading Email with PHP and IMAP/POP3 Friday, 20th April 07
compton
Sending email is very simple in PHP, thanks to the mail() function. So what about receiving it? Obviously this would be useful for webmail, but my intention is to allow remote control of a PHP app, which is restricted to specific IPs.



The idea is this:
  1. Check at set intervals for email from a specific sender containing a specific phrase
  2. Send an email to that sender containing a unique code and asking for confirmation by reply (this is to guard against emails with false sender info)
  3. Check for a reply from that sender containing the unique code
  4. Allow the user remote access
This back-and-forth palava is overkill for most operations but for my situation it provides sufficient security to prevent a reasonably determined hacker exploiting it to gain remote access (even if they did manage to fool it, they would still need the user's loginname and password to get in).
Favourite Wallpapers and Desktop Themes Sunday, 17th May 09
compton
Here are some wallpaper images that I've found around the place.
Finally Fixing the Broken Spoke on my Bicycle 6 Apr 07
compton

Since early last week, my pushbike has had a broken spoke: the first spoke to break on this bike. My previous bike was always getting broken spokes - for normal people, this is apparently unheard of. I put it down to a combination of the facts that I rode that bike regularly - daily to work pretty much every day for 2 years, plus pretty much everywhere else: swimming pool, pub, shops... It had done well over 1000 miles of pretty tough urban riding. Also, I weigh somewhere around 15 stone, and ... ...

Joomla Templates 23 Nov 06
compton

The Joomla Template system is very powerful and seemingly elegant. It will be essential for our graphic designers to be able to create templates that give the required professional, and unique, look and feel to our clients' sites. Part of this will necessitate an awareness of exactly how the templates work, so that new ones can be built and deployed smoothly.

There are actually two sets of templates on a site - the public ones which determine how the public pages appear, and the admin ones, ... ...

Restoring My Old Classic Honda CX-500 26 Jan 08
compton

For the last few years, my 1981 Honda CX Custom has been sitting unused in my garage. It developed a fault with the transmission, which meant that although the engine was still running fine, no power was getting to the back wheel. Fortunately, I was only a few hundred yards from home, so I was able to push it back fairly easily. It was then left in my garden under a tarpaulin, as I had no garage at the time, and when the time came to move it, the front brakes had seized forcing me to disconnect ... ...

Garmin Edge 205 GPS Cycle Training Tool 20 Dec 08
compton

The Garmin Edge (image stolen from www.tramsoft.ch) is a pretty cool little bicycle gadget. It is basically a cycle-mounted GPS receiver. It has no maps - you can't use it to plot a route along the public roads like you can with a car sat nav.

You can however program it with a route which you've planned elsewhere ... ...

Nasa's Space Shuttle Atlantis Transiting the Sun 16 May 09
compton

The following image shows the space shuttle Atlantis in transit across the sun. It was taken on Tuesday, 12th May 2009, by some froggy-sounding geezer called Thierry Legault, about 100 Km south of the Kennedy Space Center in Florida, USA:



Here's another image from the sequence, which lasted 4 seconds in total, the shutter firing four times every second with an exposure ... ...

Taking a Dump with MySQL 1 Dec 08
compton

The mysqldump command is widely documented because it really can be very useful, and also because it offers a blistering array of options. It's most obvious use is for dumping databases for backup or relocation purposes:

mysqldump [options] [database [tables]]

It can either dump a whole database in one go, or you can specify a list of specific tables to be dumped.

Dumps are simply SQL statements which when executed will recreate the database. This makes the command potentially ... ...

Move home Folder from its own Partition to the System Partition 29 Nov 08
compton

There's a lot of articles on the web explaining how to move a Linux home folder (containing all the user accounts) from the system partition onto its own partition.

I wanted to do the reverse procedure, and move my separate home partition to a regular home folder on the system partition. The only problem is that home can contain a variety of files and symlinks that wouldn't all get copied correctly with the mv command. The cpio archiving utility, available on a default Linux ... ...

Making Joomla Modules 4 Dec 06
compton

There are two essential files: one the XML descriptor, and two the PHP code. Both filenames begin mod_, then are followed by the name of the module, and the appropriate file extension of course.

So, to make a new featured items module (or really a special offers module) is fairly straightforward. The problem is how to mark products for display in this module. It would require some new field in the database, say an extra column in the #__{vm}_product table. A way to mark products, ... ...

Convert GPX to OpenGIS® KML Encoding Standard (OGC KML) 21 Dec 08
compton

There are a myriad of XML formats for encoding GPS data. Google has a preference for Keyhole Markup Language (KML) and its zipped form, KMZ. gpsbabel, an open source tool for interacting with GPS devices that is compatible with Linux, Windows and Mac OS-X, has GPX (GPS eXchange Format, an XML schema designed for the transfer of GPS ... ...

Javascript Snippets 5 Sep 08
compton

Trimming Whitespace with Javascript

Here is a quick Javascript trim() function. Pass text to the function and it returns the text with leading and trailing whitespace removed. Spaces, tabs, and line-breaks before and after the text are stripped out. Click the HTML View button in the top-right corner of the code view below to try it out:

<script> <!-- function trim(text) { for (var first_nonwhite = 0; first_nonwhite < text.length && (text[first_nonwhite] == ' '
 ... ...
A Simple Terrain Model 5 Jun 07
compton

I now want to look into how terrain can be modelled in a 3D game. My feeling is that the terrain model must support a couple of functions, as a minimum. These are elevation(x,y,z), which returns the height of terrain below the co-ordinates passed in, and slope(x,y,z), which returns the slope of the terrain at the specified point.

If we consider a simple single-level terrain, then we can say y = elevation(x,z). In other words the elevation function returns the ... ...

xorg.conf Settings for a 5-button Mouse in Linux 23 Dec 07
compton

Replace the existing entry for your mouse in /etc/X11/xorg.conf with the following and restart X:

Section "InputDevice"
   Identifier   "Configured Mouse"
   Driver      "mouse"
   Option      "CorePointer"
   Option      "Device"   "/dev/input/mice"
   Option      "Protocol"   "ExplorerPS/2"
   Option      "Emulate3Buttons"   "false"
   Option      "Buttons"   "7"
   Option      "ZAxisMapping"   "4 5"
   Option      "ButtonMapping"   "1 2 3 6 ... ...

Minor Prang 24 Apr 07
compton

Returning from Redditch in the Carisma, along the main road to Birmingham (the A441 or A411 I think), I came round a corner and noticed a guy walking on the pavement. He was just coming up to a drive way, with some kind of round sign, perhaps No Entry. He was holding the red plates of the trade plater, so I decided to stop and offer him a lift. I checked mirrors, indicated, and pulled in.

The car behind me appeared to have no difficulty stopping, it certainly didn't appear to be ... ...

Tank Wars in G3D 2 Aug 06
compton

This little game will be a simple two player effort, where each player controls a tank within a restricted environment. The environment is a simple rectangle, where the players' tanks can only move within that rectangle. Also within the rectangle would be various static obstacles. The obstacles would be implemented as an array of Wall instances, à la space-station interior in my first OpenGL game.

The player controls their tank in Battlezone style - each side's tread can be moved ... ...

Compiling and Installing Freespace 2 on Ubuntu Linux 30 Dec 07
compton

The first thing to do is install Freespace 2 under WINE (you will need WINE already installed and configured for this step). If you have the retail CDs, insert the first disk, browse to it in nautilus and double click the setup.exe file. As a Windows executable, it should start up using WINE. If you don't own the retail disks, read up on the open freespace wiki and forums for other methods of getting hold of the necessary data files for the game.

Proceed through the setup as if on ... ...

World Cup 27 Jun 06
compton

Quarter finals now. Germany against Argentina - Germany won all their Group games, and won 2-0 against Sweden. Should win surely? Odds on them are 2.76, pretty good. 3.05 for a draw. I could see Germany doing it 2-1 or 1-0.

Also up are Italy vs Ukraine. From the odds, Italy are the clear favourites. 1.63 on them to win, 7.6 on Ukraine to win. 3.75 for a draw.

Brazil vs France - Brazil favourites, 1.94 and 4.8 on France. Draw 3.5

England are playing Portugal. ... ...

Formating the Category Listing 11 Dec 06
compton

The category listing is displayed on the VirtueMart 'home page', ie option=com_virtuemart on the URL, but no page or other parameter.

Going into the /templates/soinnovate/index.php file, and uncommenting the call to mosMainBody(), reveals that the content of the page I'm looking at is built by this function.

Searching for function mosMainBody in Windows Explorer locates the code in /includes/frontend.php. I know I've looked at this a few ... ...