Archive for March, 2005

a photo of us

this is actually not so new. it’s taken at andy’s brother’s wedding Sept, 2004. we never got a copy tho >< i had to reproduce it with my digitcal cam from the copy andy’s mom has so it looks weird. haha..
a photo of us
hrm that lobster feast was fun. does andy look drunk by any chance?!

javascript unescape like php function

when you start dealing with languages (i.e. chinese) that require 8 bit encoding or more, you will learn about all the wonderful jazz of utf8, unicode, ISO etc. i was looking all over for a php function that does what javascript unescape does. normally rawurldecode would work, but…
More >

bubo’s 1 year birthday

we celebrated bubo’s one year birthday yesterday along with easter. we got bubo when he was 8 weeks old. aww those baby photos … i can’t believe he’s already ONE YEAR OLD. where did time go? he’s so cute with his birthday hat :)

it's my birthday!

and misty was so happy for him too
misty is sooo happy!
click here for a few more

simple flip image javascript

sometimes you want an image to change when you select a different option in a dropdown, i used to do it the hard way:
function flip() { document.images.x.src="themes/x/"+ document.reg.thememem.options[document.reg.thememem.selectedIndex].value+".gif"; }

i had to write a new js function for every new dropdown i use. so i looked for an easier way and wrote something:
function flip(image_id, select_name) { document.getElementById(image_id).src = select_name.options[select_name.selectedIndex].value }

to use it, do something like:
<select name="myselect" onchange="flip('myImage', this)"> <option value="images/candle.gif">candle</option> <option value="images/coin.gif">coin</option> <option value="images/earth.gif">earth</option> </select> <img id="myImage" src="images/balloons.gif">

obviously if you want to call it a second time, just pass a different image_id to it and make sure it matches the id attribute of your second img tag :)

the mystery of querying

if i know (or remember) more from my database class, i may have an answer for this. i was just coding my new board and was curious about which of the following query is faster:

SELECT m.regdate, m2.postnum FROM dmb_members m, dmb_members_post m2 WHERE m.uid=m2.uid AND m.uid = '".$userid."' LIMIT 1

or

SELECT m.regdate, m2.postnum FROM dmb_members m, dmb_members_post m2 WHERE m2.uid = '".$userid."' AND m.uid = '".$userid."' LIMIT 1

m.uid is a primary index while m2.uid is an index. what would be your guess?
More >

pretty form with css

this is pretty cool :) tho it does take a bit more time to config your forms. maybe i will do it sometimes just for the hack of its cool trick.

awww just learned another trick.. all these nifty mozilla only css tricks :)

muddy puppies

sunday was such a beautiful day. if you live in iowa city, you jump at every nice weekend coz it doesn’t happen often. we took the dogs for a walk at a trail. much to my surprise, most of the trail is extremely muddy with the smelting snow. we turned out to be a muddy family when we returned. sunday was also misty’s FIRST day walking with a leash. she did really good although at first she refused to walk. (click on the thumbnails to view larger versions)
nope, i won't walk
misty refusing to walk. it’s just like you put a leash on a cat. you have to drag her.

brother is walking fine
brother is walking fine. see?

fine i will walk a little bit
misty: fine i will walk a little bit

aww i got so muddy!
i got so muddy

time to wipe it all on daddy
time to wipe muddy paws all over daddy

what a tiring day
bubo: what a tiring day (bubo in andy’s arms while he’s driving)

puppies: the morning after

contrary to common belief, they actually cuddle up in one bed very often. not because they are cold tho coz they like to snuggle up together.

misty is ferocious
misty: mom! don’t take photos of us when we make out!!
see how bubo has his arm around her? ^_________^

don't look at us. we are hiding!
don’t look at us, we are hiding!

how puppies sleep

before i went to sleep last night i took a picture of them
at night

this is how they are this morning when i woke up
in the morning
eek the photo is a bit blurry. hopefully i can take one in better quality tomorrow :)