Archive for the ‘Code’ Category

Router scripting

Another thing that’s been bugging me for a while on the tech side of things at home is my router. It’s a Zyxel 2602 and while the interface is shiny and the setup is fairly easy, the damn thing has a tendency to atrophy and die after some days of uptime … if there’s been [...]

Read the rest of this entry »

Alarms in Ubuntu: update

In Alarms in Ubuntu, I published a script that lets you set an alarm from the command line, nice and easy. One thing was lacking though: visual notification of the alarm, so if you happen to be away from the computer when the alarm sounds you’ll still see the dialog box. To achieve that I’ve [...]

Read the rest of this entry »

Sorting algorithms: Merge sort

The next sorting algorithm in this series is the Merge Sort. Of the algorithms covered so far, this algorithm comes closest to the Shell Sort algorithm. The reason for this lies in how the comparisons are done in both algorithms: instead of working on the entire array, both the shell sort and the merge sort [...]

Read the rest of this entry »

Sorting algorithms: Selection sort

1000 elements to sort. Sanity check. PHP native sort() algorithm took: 0.002461 seconds. Memory used: 48264 bytes Running SelectionSort sort. Algorithm took: 0.273260 seconds. Memory used: 48272 bytes 1000 elements to sort.Sanity check. PHP native sort() algorithm took: 0.002461 seconds. Memory used: 48264 bytesRunning SelectionSort sort. Algorithm took: 0.273260 seconds. Memory used: 48272 bytesNext in [...]

Read the rest of this entry »

Alarms in Ubuntu

I’ve been looking for a while for a good, easy to use, easy to install, no fuss alarm clock. Just something I can set to go off in 10 minutes. Or at 2 o’clock. Or tomorrow. I haven’t found any apps that did that in a nice and easy fashion. I have found several that [...]

Read the rest of this entry »