'coding' Category

  • Feb
    18
    2009

    Be Careful parsing your URL string with Javascript

    …so I know you’ve looked around the net for a good method to parse URL variables with javascript, and I’m sure that you’ve found some elegant method that looks something like:
    function parseLocation() {
    var turl = window.location.search;
    ar = turl.split(’&’);
    var b = {};

    for (var i = 0; i < ar.length; i++) {
    var c = ar[i].split(’=');
    b[c[0]] = c[1];
    }
    return [...]

  • Oct
    20
    2008

    using Javascript to refresh an image without a cache-busting parameter

    …say you’re using Javascript to reload an image periodically, say, every 60 seconds, and the image never refreshes. If you look for help across the webrent a car bulgaria (as undoubtedly you have, since you’re here now, right?) you’ll find a) A bunch of people telling you to tag on a url param that’s a [...]

  • Aug
    06
    2008

    Dear Objective C

    It’s called “dot notation“, and it works really well. You should check it out.

    Share/Save

  • Jul
    02
    2008

    Stupid IE6 and its iframe cookie idiocy needs a throat punch

    …so let’s say you have a site, that has two versions, a.throat-punch.com and b.throat-punch.com. And Apache uses a cookie to determine which version you should be viewing, and sends a 302 redirect if you’re on the wrong domain.
    Now let’s say you want to access a page on this site from an <iframe> from an external [...]

  • May
    16
    2008

    seriously, wordpress, WTF?

    It’s not bad enough that I had to turn off all non-anonymous commenting because of the flood of spam I was getting, but now I get another google-banning for people injecting code into my posts? If I had a nickel for every time this has happened, I’d have like 10 cents by now! Security this [...]

  • Feb
    15
    2008

    Elegant little PHP JSON encoder

    update: Jay Williams has flushed this out to be a lot more useful. Check out his rendition here.
    …so I wrote (what I think is a) clever little function (well, two functions) to take a complex php variable and turn it into a json-ized string, ready to be passed back to javascript. It works on the [...]

  • Jun
    22
    2007

    Dear Flash Web Developers

    I know you like to show off your flash-movie-making skills. I know it’s tons of fun to make images fade in and out, and to make text scroll across the screen. I know this kind of stuff makes your clients pop like 1,000 boners and fall over themselves to give you more work.
    But you know [...]

 
Powered by Wordpress and MySQL. Theme by openark.org