Implementing a Simple Machine Learning Intelligence to Play Rock-Paper-Scissors in Javascript

Rock-paper-scissors is not a complicated game. However, there are some that not only enjoy the game, but take pride in professing skill at it. But is it possible to have skill at rock-paper-scissors?
In the real world, where a human plays against a human, “cheating” is relatively easy. A player can gain an advantage by subtly [...]

Simple Cross Browser Rounded Corners with Drop Shadow

I found a convenient method for creating elements with rounded corners and a drop shadow. Previously, I had been using Steffen Rusitschka’s ShadedBorder script to accomplish this effect with minimal overhead. While his script is an impressive piece of work, it can be a little slow to render since it accomplishes the effect by creating [...]

How to Make a Generic Javascript Method Closure

The Problem
I recently found myself writing a custom Javascript API to integrate a Flash widget written by an external vendor. I was making the API object oriented, so it could be instantiated and controlled simply like:

var myWidget = new FlashWidget()
myWidget.doStuff()

Things were going well, until I realized I had overlooked a minor detail in the Flash [...]