Random link

| Comment

Let's say that you want to select a random link within a certain div tag which has a given id and then jump to where that link points to. Here's a way to do that.


function random_link(id)
{
    var obj = document.getElementById(id);
    var links = obj.getElementsByTagName("a");
    var offset = Math.floor(Math.random() * links.length);
    document.location = links[offset].href;
}

Stay positive

| Comment
Rumor has it that 2009 is going to be a very difficult year. However, I believe that things will go along much better than people expect. My prediction is that after only three months the world will overcome this dip and recover quickly.

Don't cuss

| Comment
"Als er een vloek valt breekt er iets."

"Whenever a curse is made something breaks."

Bond tegen het vloeken is een organisatie die zich inzet voor respectvol taalgebruik, zonder vloeken en schelden.

Not a number

| Comment
typeof(NaN) == 'number'

NaN stands for 'Not a Number' but as you can see it is a 'number' nonetheless.

null is a value that isn't anything.

undefined is a value that isn't even that.

A variable can be both defined and have a value of undefined at the same time.

boolean("0") = true

boolean("false") = true

+"42" = 42

!! produces a boolean

All of the above have been taken from the following video tutorial.

Fn and Ctrl keys

| Comment
Why would anyone in their right mind want to exchange the Fn and the Ctrl keys on the keyboard? This is confusing and pissing me off.

FnCtrl.jpg
What's wrong with this keyboard?

Long time no see

| Comment
Can't believe that after so many years I've somehow made contact again with my old hometown buddies from days long past.

Thanks to the wonders of the Internet and Facebook, I managed to connect again to the world of the seventies.

Washington Junior High School and Salinas High School.

Mamerto Jorvina, William Wong, Dale Yamashita (born on the exact same day as I was), Don Conant, David Steinbruner and Steve Larson.

How long has it been?

33+ years.

Accidental discovery

| Comment
I happened to make an accidental discovery. If I place my mouse cursor on the right or left edge of the gnome desktop and move the mouse wheel I cycle through the workspaces. This will prove to be quite useful.

Other kiffins

| Comment
I never realized that there were so many other Kiffins out there.

Just for fun I did a search on Facebook for other people also named Kiffin, and I came up with a whole list of folks sharing my first name.

There are even a couple of girls named Kiffin. Never would have expected that but why not?

When I was a kid I always wondered if there was another Kiffin on the planet and hoped and prayed that some day I could happen to meet this person.

Something else that I didn't quite expect is that almost all of them are much younger than I, some still in high school.

I'd be very curious to find out how they got their first name and what life is like for them sharing this unusual name.

Loud crash

| Comment
I was on my way to get a haircut today walking through the shopping mall, when a loud crash startled me.

Over to my left and ten meters behind me, there was this tall toy stand which had tipped over. The few plastic items on display had fallen to the ground and had spread out like a small explosion of boxes, wings, wheels and other things.

Whoever the culprit of this terrible mishap might have been, was more than likely long gone and disappeared around the corner.

People just kept passing by the carnage, minding their own business like nothing had ever happened, sometimes even stepping over one of the smaller boxes, while subtly increasing their speed to move on and out of the way.

If I hadn't had such an important meeting with the hair stylist I could have helped, but I was just as guilty as all the other uncaring egoists speeding on to future appointments.

After twenty minutes overly pleased with my nicely cut blob of hair, I returned in the opposite direction and saw that indeed the carnage had been cleared and restored to produce yet another precariously leaning toy stand.

No one saw the little plastic wheel wedged underneath the far corner of the bakery stand about twenty meters in the other direction.

Dealing with death

| Comment
At the heart of daily existence is the never-ending confrontation with death. While it might not always be actual death, there is still the threat of death as a symbolic gesture in various forms surrounding you.

Most people do not look, nor care, nor perhaps dare to even look. The real heroes are exposed from within, and they are the ones who show us how to deal with these various forms of death.

Information

So far this blog contains no less than 1606 entries together with 1734 comments.