opera mobile

i have to say that, so far, opera mobile (demo/beta mind you) is the best web browser available for my ppc6700 phone. minimo (ppc mozilla port) would win out except its slow (read SLOW) and crashes a lot. opera mobile is quick, responsivee, has tabs, and works with wordpress (how i’m posting this now!) thunderhawk was a promising cpntender but turned out to be a joke (to be fair my pho ne isnt supported)… at this point i’m stuck in IE hell… and it sucks…now… to find a *good* ssh client with dsa public key auth support

A class for normalizing mixed value containers

There are times (like when dealing with simplexml) when you just wish you had an array that you can iterate over for whatever your reasons are (especially when dealing with variable structured multidimensional unpredictable input.) This is also a good example of recursive functions, simplification of difficult specialized problems, and how one might use a class to accomplish large tasks in an encapsulated fashion.
[coolcode]

/**
* A class for [N]ormalizing a [C]ontainer to an array
*
* This will class will take any type of variable container and return a normalized array
* For example this will take the output of simplexml_load_string and render it all into
* a multidimensional array.
*
*
*/

/**
*
*/

class nc2array {

private $original_container;
private $normalized_container;

/*
* Takes a variable, and builds a normalized comtainer out of it
*/
function __construct($container) {
$this->original_container=$container;
if ( is_object($container) ) {
$this->normalized_container=$this->recursive_parse_object($container);
} elseif ( is_array($container) ) {
$this->normalized_container=$this->recursive_parse_array($container);
} else {
$this->normalized_container[]=$container;
}
return($this->normalized_container);
}

/*
* takes an array and parses it recursively, passing objects off to recursive_parse_object
*/
function recursive_parse_array($array) {
foreach ( $array as $idx => $val ) {
if ( is_array($val) ) {
$rval[$idx]=$this->recursive_parse_array($val);
} elseif( is_object($val) ) {
$rval[$idx]=$this->recursive_parse_object($val);
} else {
$rval[$idx]=$val;
}
}
return($rval);
}

/*
* Takes an object and parses it recursively, passing arrays back off to recursive_parse_array
*/
function recursive_parse_object($obj) {
$vals=get_object_vars($obj);
while (list($idx, $val) = each($vals)) {
if ( is_object($val) ) {
$rval[$idx]=$this->recursive_parse_object($val);
} elseif ( is_array($val) ) {
$rval[$idx]=$this->recursive_parse_array($val);
} else {
$rval[$idx]=$val;
}
}
return($rval);
}
}
?>

[/coolcode]

I’ve become a MySQL snob…

I find that, after keeping alive a database whose size I cant comment on specifically, on a budget that I cant comment on specifically (which would shock you if only you knew), I’ve become aloof to a great many people and their MySQL war stories… 300Mb, 1Gb, 100Gb, 1Tb, HAH! HAH I SAY! Here’s a quarter call someone who’ll be impressed.

Next time you have to move your datacenter across the country (literally coast to coast,) and you cant let your application go down, and you have 14 days to plan and execute, alone, oh and you cant cease taking information in on the old coast until you start can taking it in on the new coast, with over 1Tb of data to move, and replication to deal with… Oh, yea, and you dont get to take a break from running the old datacenter to impliment the new one, you have to do both simultaneously… yea… then come knock on my door.

Till then go take your 2Gb “one server is enough but i have a second server for backup purposes” MySQL (or any brand really) database, and be thankful you arent playing with the big boys. I’ve had the potential to lose more data to a power outage than you’ve got total.

Of Nature, Suffering and the Internet

If you live in an area with earthquakes, you might suffer. If you live in an area with a volcano, you might suffer. If you live in an area where it floods, freezes, scorches, has terrible storms, landslides, avalanches, aligators, bears, lions, snakes, spiders, insects… you might suffer. Sounds like suffering is inherent in nature doesnt it?

If you live in a city, you’ll most likely suffer. If you drive a car, you’ll most likely suffer. If you ride a bike, walk dow the street, deal in business, dont deal in business, work too hard, work too little, live in an unstable country, live in a stable one, work in a school, work at a prison, work (hell anywhere), IF YOU DEAL WITH PEOPLE YOU WILL SUFFER.

I don’t understand why it is that when suffering happens, iether because of nature of because of people, we all drop what we’re doing and gawk like a global community of rubberneckers. And I dont understand why we expect that the internet should be without suffering when we’ve taken nature out (the milder of the two) and replaced it with a heaping handful of human. Anonymous human at that. People this is life… Do something unprecedented about it, or learn to live with the fact that something might happen. Because lets face it you could fall for an e-mail scam, or you could trip on a crack in the sidewalk and sustain fatal injuries. Life’s just a bitch sometimes… It’s enough of a bitch without all the bitching going on…

Misc photoblogging

Smile for the camera!

Bravo just cant firgue out why buddy doesnt want to play 🙁 (no buddy isnt young here bravo is just a gigantic Great Dane)

what do you MEAN I’m too dirty to come inside?! BUT DAAAAAAD!

Buddy!

He’s only cute like this when he’s tired!

If I were a little orange man, I’d be thinking “uh oh” right now…


And this is why…

it’s been hot the past few days… time to chill out!

Frisky

This is Frisky. She’s one of the most wonderful puppies in the world. She was found, abandoned, by the Fremont Dog Park and taken in by her new owner (I dont know his name… um… “Frisky’s Dad”) right then and there (he couldnt let a puppy go on without a home.) Soon as we get a place where we can have more than one dog… I’m totally stealing her! She’s wonderful. Playful, energetic, loving… LOVES to rough house and to get pets. She’s about a year old. Totally my favorite dog park buddy!