Coffee Order Template

I made this coffee order template for taking orders when doing a coffee run. It’s designed for Costa but should work well at other coffee shops too. Just print it out and then put a tally in each box.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.

MS Office File Shrink Tool

I created some software which reduces the size of Microsoft Office 2007+ files (.xlsx, .docx, etc.) called Office Shrink. It’s written in batch and makes use of 7-Zip, but was mainly an excuse to play with NSIS (Nullsoft Scriptable Install System). You could build this as a compiled application but batch is more flexible and easier to change for simple tasks. You can download the source code if you want to modify/build the installer yourself.

The tool decompresses an Office 2007 file and repacks it smaller. It then optionally zips the resulting file. The compression is lossless and the file will work as normal. This can be done because the default Office compression is optimised for speed and not for size.

Installation:
Run the installer executable from within the zip file
Click Allow at the UAC prompt (if enabled)
Read the introduction
Click OK
Select if start menu shortcuts are not required
Click Next
Change the installation folder if desired
Click Install
Click Close

Two new options are added to the windows explorer right click menu for Office 2007 files: “Shrink” and “Shrink and Zip”.

How to use:
Ensure the Office 2007 file to compress is not open
Right click the Office 2007 file in windows explorer
Click “Shrink” to shrink the file
or click “Shrink and Zip” to shrink the file and also zip the shrunk file

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.

University Final Year Project (CBIR)

I’ve put up my University final year project (Scalable Visual Descriptors for Content Based Image Retrieval) which I wrote in LaTeX. Please keep in mind that this was written in early 2007.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.

Abstract
This project investigated the effects of scaling images with JPEG2000 emulation software on a CBIR system based on MPEG-7. A CBIR system was built that consisted of indexing and retrieval. The performance of the system was evaluated with standard metrics.
Various different versions of images were created with a process that simulates the behaviour of JPEG2000 with a wavelet transform. The resolution and compression quality of a selection of images were reduced and then MPEG-7 descriptors were extracted from them. The descriptors for various resolutions and qualities for the same image were then compared. Three MPEG-7 descriptors were used. They were the colour layout descriptor, scalable colour descriptor and edge histogram descriptor.
It was found that as the resolution and quality decreased, the descriptors became less similar to the originals; a trend which all descriptors were observed to follow. The colour layout descriptor was found to be the least sensitive to changes in resolution and quality.
It was found that not all of the data from an image is required in order to generate descriptors that can be used in image searches. The results of these searches, although not as good as ones done with the original images, provide satisfactory image matching.
Reducing the amount of data could be useful in environments where bandwidth or storage are scarce, such as is the case with mobile devices. Further work, expanding on these findings, has been recommended.

iPhone Tap Counter

I made a very quick iOS app for my iPhone to allow me to measure the frequency of things by recording the time period. Repeatedly tap the big button and it spits out a number.

If you want to measure the instantaneous power consumption of your home by timing the gaps between LED flashes or wheel spins of your electricity meter then you can use this code [NSString stringWithFormat: @"%2.f Watts",(1/([lastTapTime timeIntervalSinceNow]*-1))*360];.

If you want to measure the beats per minute of a song or your pulse then you can use this code [NSString stringWithFormat: @"%2.f b.p.m.",(1/([lastTapTime timeIntervalSinceNow]*-1))*60];.

Download the source code and give it a go yourself. You’ll need Xcode from Apple.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.

Improved London Tube Status

I live in London and cycle most places, mainly to avoid using the tube. Does it ever bother you when they claim to be operating a “good service” when what they really mean is just normal service? I doubt that the London Underground ever offers a truly good service. I have rectified this with a pragmatic tube status page. You can view it at unop.co.uk/tube and it has been designed with mobile browsers in mind. If the service is anything other than bog standard then it links to the detail messages on the TfL mobile site.

If you are interested in how this works, then it is actually fairly easy. The status is pulled in XML format from tubeupdates.com (awesome, thanks) then an XSLT is applied which transforms it into the HTML to display. There is some PHP behind the scenes which retrieves the XML from the API, applies the transform and does some caching so it only updates at maximum once a minute.

Creative Commons Licence
This work is licensed under a Creative Commons Attribution 3.0 Unported License.