Archive for March, 2005
a photo of us
March 30th, 2005
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..

hrm that lobster feast was fun. does andy look drunk by any chance?!
javascript unescape like php function
March 29th, 2005
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
March 28th, 2005
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

and misty was so happy for him too

click here for a few more
simple flip image javascript
March 25th, 2005
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
March 24th, 2005
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
March 24th, 2005
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
March 7th, 2005
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)
![]()
misty refusing to walk. it’s just like you put a leash on a cat. you have to drag her.
![]()
misty: fine i will walk a little bit
![]()
time to wipe muddy paws all over daddy
![]()
bubo: what a tiring day (bubo in andy’s arms while he’s driving)
puppies: the morning after
March 3rd, 2005
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: mom! don’t take photos of us when we make out!!
see how bubo has his arm around her? ^_________^
how puppies sleep
March 2nd, 2005
before i went to sleep last night i took a picture of them

this is how they are this morning when i woke up

eek the photo is a bit blurry. hopefully i can take one in better quality tomorrow 


