I’ve had a few questions on this, so I figured I’d write a quick tutorial. Loading a java applet through AJAX doesn’t tend to work too well. Processing.js, however, makes this fairly easy, especially when coupled with jQuery. In order to load a sketch through AJAX, you need to include of course,...
Read MoreHi - recently I was trying to utilize the Vimeo Javascript API to do some basic event listening - I wanted to make sure that when one video in a series of videos finished playing, that it would load the next video and play it. Vimeo has 3 different APIs - a simple API which is used primarily to get...
Read MoreI recently had a project in which I needed to draw a sort of graph in which there is a center circle, and wedge shaped pieces that surround that circle. Turns out drawing even drawing an arc is difficult in flash (much less a wedge, much less a wedge that has an inner radius). I went about this all...
Read MoreThis is a quick snippet that often comes in handy - you have a bunch of objects which are being added to an array in no particular order, and you want to sort that array into some logical order, using a common property that all of the objects possess. The code is simple:
Read Morevar array = [(id, name, ...
Recently I had to submit an ISO 8601 timestamp in order to use Amazon’s AWS API - unfortunately there’s no cut and dry method of doing this in javascript like there is in other languages. I finally came across this method, which I figured I’d share.
Read Morefunction ISODateString(d){
function ...
Ever try to post to a web service or access AJAX data from a different domain, and get those annoying access-control origin errors? Often, these result from the remote host’s server configuration being not set up to accommodate requests from your IP. If accessing the remote server is something that...
Read MoreSay you’re building a form in which users can create a person, and assign that person a city to live in. But that city field needs to be populated depending on the state the person lives in, otherwise the city field will be enormously long (and there is more of a chance for user error and...
Read MoreThe company I work for uses an FTP server to post all of its files for client review. In ways, it’s a good solution because all you have to know is how to connect to a server, and how to drag and drop, so anyone can manage what’s posted. The drawback is that apache default directory listings are...
Read MoreRecently I was asked to make a site visible to visitors of only a certain country. There’s several ways to do this, the easiest being to modify the .htaccess file for your site. I found a site which allows you to generate a list of IP ranges by country. From there, it is a simple matter of...
Read MoreFor reasons unknown to me, the HTML5 audio element returns the current time of a song or sound file in a sixty second based format starting from zero, such that one second is reported as 1, 1 minute as 60, one minute and one second as 61, etc. However, most video and audio players we are familiar...
Read More