UNIQLOCK
June 8th, 2008Japan is weird.
This is a art / dance / time / music / advertising / dance thing called UNIQLOCK. It features
- A clock
- Cute dancing Japanese girls
- Catchy music
- Little fuzzy monsters
- Randomness
Oh, and cute dancing Japanese girls. Did I already mention that?
Click below for the full screen version (which is much more impressive!)
Dehydrated Babies
June 5th, 2008I couldn’t agree more with this.
Thank you, John McCain, for finally representing the interests of the littlest, driest, cutest voting bloc: dehydrated babies.
Theremin + Cat = WIN
May 25th, 2008The other night I spent a few hours watching cats playing theremins on YouTube.
I know — I live a very exciting life, full of adventure and intrigue.
For those who don’t know, a theremin is a musical instrument that you can play without touching. It detects the position of your hands using Science and emits a corresponding frequency.
As an added bonus, some of them have antennas that cats love to swat at. For those who don’t know, a cat is a small domesticated mammal of the feline order. They are oftentimes ridiculously adorable.
WATCH A CAT PLAY A THEREMIN!!!
This one is pretty good, too — there are multiple cats and war breaks out at the end.
I want a kitty. I want a theremin. Both would be ideal.
A test, if you will.
May 23rd, 2008At the moment I am writing a new feature in OneStop that will make certain channels automatically refresh at set intervals. Since my blog has an RSS feed, this is a test post to see if my RSS feed gets updated in OneStop without me refreshing the page.
Updating my blog? WOAH…
May 17th, 2008Babelfish is a LOL machine
April 17th, 2008Babelfish, the famed online translator, can take any paragraph of text and turn it into a laugh riot. Simply take the text, translate it from English to German to French to Dutch to Japanese and back to English. The result? Comedy gold. For example, take the first few paragraphs of this lovely prose by Bill O’Reilly and run it through the laugh machine. Here’s what you end up with:
In first class of the school of Long Island St. Brigid, the Catholic church is established and is high in either one he “the stone” being to be, including me in 60 boys, sisters which is made is praying to St. Peter. I me was 6 years old, but being the recall to do, liking St. Peter who the naturally, makes good sisters happy greatly it cannot remember many from that. Now, 50 years or more after the praying my first class, in the St. Peter’s successor America there is here, I possess complicated frame of mind concerning that. Like the American of some 1000000 Catholic follower, I was disappointed deeply with the Vatican to the scandal of pedophilia of the priest response. It was overturned with respect to the crime whose slow pope two world really is large due to the new England priest, fact of the easy work of Rome that almost was inexcusable it gave remuneration to the basic law of Bernard.
Duganz (of duganzat23.blogspot.com), Karf and I had many-a-chuckle over this. We just may be easily amused.
WARNING: Immaturity ahead.
April 11th, 2008There is absolutely no reason that this clip from the Daily Show should be so fantastically hilarious. Actually, there is. Pure, unadulterated immaturity. This is, by far, one of the most stupid, immature sketches that TDS has ever done, but it’s also one of the funniest.
Yeah, I know. I need to grow up.
Obamamentathon ‘08
April 5th, 2008Everybody in Missoula got a taste of big-time politics today as Barack Obama came to town. My mom, the Karf and I went to the Obama rally this morning. The line was long, the speech was great, and I took a bunch of pictures. I’ve got to say, it was quite surreal to see Obama standing in Missoula of all places, after following him on the televisions and the internets for such a long time.
I’ve been an Obama fan since seeing him on Conan a long while back. And yes, while I realize that this is a great superficial reason to start liking a political figure, it’s when I first really heard the man speak. Conan asked him a question about his family and if their view of him had changed because of his recent rise to political stardom. He said something about how his family keeps him grounded, and said that they still gather around the dinner table like any other family — except he addresses his family as “My fellow Obamas….” It made me lol and then I realized… woah… did a politician just make a witty joke that wasn’t lame? It blew my mind.
Since then I’ve learned a lot more about Obama’s policies and got myself all good and informed. Two things really stuck out for me: Obama’s knowledge of and stance on tech issues and his refusal to accept PAC and lobbyist campaign contributions. I could go into more detail… but I want to show some photos!
PHP and MySQLi — destroyer of souls
March 30th, 2008MySQL 5 has support for stored procedures, which makes me happy. I’d much prefer keeping the database and SQL wrapped up nicely than to have a bunch of SQL queries vomited all over my PHP code. In order to use these handy stored procedures, you have to use PHP’s MySQLi (improved) extension instead of the normal php_mysql.
Well, everything was going great with this PHP stored procedure-y goodness until I tried to write a page that made use of two stored procedures. I used to do this all of the time in PHP using inline SQL statements — I would just assign a different $results variable for each statement. But when I tried to do this with mysqli and stored procedures, something went horribly wrong.
Here’s what my code looked like:
$query1 = "CALL sp_SampleStoredProc($input_param)";
$results1 = mysqli_query($link, $query1);
$row = $results1->fetch_assoc();
$query2 = "CALL sp_AnotherSampleStoredProc()";
$results2 = mysqli_query($link, $query2);
$num_rows = mysqli_num_rows($results2);
Yes, yes… I am mixing procedural and object oriented PHP. Phphpthphtpt.
Anyway, when I tried to run this, I wouldn’t get the results of the second query. I stuck in a
mysqli_error($link)
to see what was going on. Here’s what it said:
Commands out of sync; you can’t run this command now
Oh, gee. Thanks MySQL. Really helpful. I started digging around in the internets for this error message, and everything I read pointed to this example in the PHP documentation:
/* Select queries return a resultset */
if ($result = mysqli_query($link, "SELECT Name FROM City LIMIT 10")) {
printf("Select returned %d rows.\n", mysqli_num_rows($result));
/* free result set */
mysqli_free_result($result);
}
The mysqli_free_result($result) was supposed to be the key. The command should do some black voodoo magic in MySQL to prepare it for another query. HOWEVER — it doesn’t work with stored procedures. You have to do a different command with stored procs: mysqli_next_result($link). It took me THREE HOURS to figure this out. There was much banging my head against the wall. Maybe I just didn’t know what to search for, but Google wasn’t very helpful.
So, hopefully somebody else can benefit from my insanity. I’ll write it one more time.
If you’re using stored procedures with MySQL and PHP — use mysqli_next_result($link) in between calls if you are going to make more than one.






