Regular Expression

I just whipped up a regex checker which is entirely AJAX (I hate that term) driven.
Dynamic regex Checker

Check it out, and let me know what you think!

Data Hierarchy

If you're ever needing to properly sort a data set by parent/child nodes into a simple 1,2,3,4,5,6. Here's a bit of code to help out you:

$data[] = array('id' => 1, 'parent' => 1);
$data[] = array('id' => 2, 'parent' => 1);
$data[] = array('id' => 3, 'parent' => 1);
$data[] = array('id' => 4, 'parent' => 2);
$data[] = array('id' => 5, 'parent' => 3);
$data[] = array('id' => 6, 'parent' => 2);
$data[] = array('id' => 7, 'parent' => 6);
$data[] = array('id' => 8, 'parent' => 3);
$data[] = array('id' => 9, 'parent' => 3);
$data[] = array('id' => 10, 'parent' => 10);

$tree = array();
$pointers = array();

foreach ($data as $child) {
extract($child);

if (!isset($pointers[$id]))
$pointers[$id] = array();

if ($parent != $id) {
if (!isset($pointers[$parent]))
$pointers[$parent] = array();
$pointers[$parent][$id] = &$pointers[$id];
}
else
$tree[$id] = &$pointers[$id];
}

function multiArrayKeys($arr)
{
$keys = array();

foreach ($arr ...
Continue Reading »

Epic Fail

Fail Blog -- Simply Hilarious

100 Push Up Training

I came across a very cool training program called the "one hundred push ups," which I found through Sean Bonner's blog.

It's a pretty simple program, six weeks of nothing but pure and simple push ups. It breaks you down into levels by taking an initial push up test which basically tells you exactly where you are and where to begin....

Continue Reading »

Mac GPS

There seems to be no good navigation/GPS software for the Mac. The best I've found so far is RouteBuddy. But even it's not good enough for my taste.

My problem also spawns from trying to use the GPS integrated into my data card (Novatel Merlin EX720). Maybe I'll get around to writing some sort of script that pulls the NMEA data and implement it somewhere.