Menu underappreciated

May 28, 2010

One of the most underappreciated jQuery methods has to be .data(). It allows you to associate arbitrary named values with DOM elements. Usage is simple:   $(“body”).data(“x”, 1); $(“body”).data(“y”, someObject);   You can store any data types and expect the same back.   As a web developer, I’m sure some of you have assigned arbitrary… Read more

Hosting Stanford’s Palo Alto Bike Tour

May 22, 2010

Yesterday, we had the pleasure to host the first “Stanford Bike Tour” organized by Ibrahim Elbouchikhi. It is a chance for Stanford students to hop on a bike, and cross over to the neighboring valley!

Opera takes the cake

May 17, 2010

In Firefox, Chrome, and Safari, timeouts passed to setTimeout are subject to signed 32-bit integer arithmetic overflow. For instance, the following code shows an alert immediately, as if zero or a negative value had been supplied. setTimeout(function() { alert(‘hi’) }, 2147483648); Internet Explorer has the same problem, except they use unsigned 32-bit integers. Try this… Read more

Konami kaChing

April 01, 2010

Happy April Fools’ Day from everyone at kaChing! If you’re looking for a treat, try entering a certain code on the kaChing homepage.

Z-Index and Local Stacking Contexts

March 27, 2010

z-index is a CSS property that specifies the order of your elements on the z-axis. The higher the z-index value, the closer the element is to the user. Using z-index is handy to make sure elements like modal dialogs show up above everything else on the page. div#red { z-index: 1; } div#green { z-index:… Read more

select product(value) from mytable

February 12, 2010

A nice tip from Harold Fuchs to calculate the product in Mysql select exp(sum(log(coalesce(value,1))) from mytable The coalesce() function is there to guard against trying to calculate the logarithm of a null value and may be optional depending on your circumstances. Here’s an example +——+——-+ | id | value | +——+——-+ | 1 | 3… Read more