C++: Sorting the Contents of an Array Based on the Contents of Another

I often find while programming that I want to sort the contents of one array based on that of another.  For instance, say I had the arrays int rankings[] = {1,4,2,5,3} string names[] = {"George", "Fred", "Gary", "John", "Bob"} and I wanted to resort both arrays based on ranking.  That is, I would want the [...]

Anamnesis Launched

I have just put up the code for a project I’ve been working on called Anamnesis.  It is a SIMBL-based plugin for Safari on Mac OS X that adds “Reopen Last Closed Tab” functionality.  Please check out the Anamnesis page (see links @ top of page) for more information.

Reading and Parsing USB GPS Data in C (with NmeaLib)

I’m currently working on a project that requires GPS data, and need a way to retrieve data from a USB-based GPS receiver I purchased (a USGlobSat BU-353 USB GPS receiver). Fortunately, most GPS receivers, particularly USB ones, support the NMEA 0183 protocol. NMEA 0183 is a serial-based protocol was developed by the National Marine Electronics [...]

How to Monitor Parallel Port Interrupts in User Space in Linux

DISCLAIMER: A computer is not a cheap device and home-made electronics are not always reliable. I take no responsibility for damage caused by you sticking shit into your parallel port or anywhere else on your computer to see what happens. I also take no responsibility for any side-effects of the following code. That said, if [...]

keep looking »