Month: March 2008

  • SetFBML invalid parameter exception – Facebook API

    In developing Easy Export, I created a cron script that updates the user’s fbml on their profile page periodically. It worked great, but after some time I started getting the following execption thrown:  ‘Invalid parameter’, on line 1520 in facebookapi_php5_restlib.php After looking into it, I realized it’s because I was trying to set the fbml on a…

  • Calculating age from unix timestamps in PHP

    I couldn’t find a function already created for PHP that calculates someone’s age based on their birthdate and the current date (in unix timestamp format – seconds since 1970). First I tried this: $age = date(“Y”,$endtime) – date(“Y”,$starttime); But then I realized that this might not be completely accurate, base on the calendar, leap year,…

  • Facebook application – Easy Export – download your photos

    I created a facebook application several weeks ago, but never got to write about it. It was actually pretty painless. I wanted copies of all the pics I had been tagged in on my own computer. It was taking me forever to click through all of them individually. So I made this app – which…

  • Substitute for onLoad with WebParts

    I’ve got a project where I’m using google maps within an ASP.NET web part in an update panel. The google maps code requires you to run some javascript as soon as the page loads. Usually people put this in <body onload=x> or use javascript: window.onload=x, but when I did those either the method wouldn’t run,…

  • Google maps: is null or not an object error

    I’ve got a google maps application on an ASP.NET ajax enabled page through an update panel. I had used setInterval to run a javscript function periodically and update the markers on the map. Over time, I noticed that when the map was updated through ajax while the javascript code was executing, i got the one…

  • Dundas Gauge – Setting pointer values

    I was having trouble getting Dundas Gauge for ASP.NET to reflect the value that I was assigning it. For some reason, the needle always pointed to the default 0. I was using this code: //create circular gauge GaugeContainer gauge = new GaugeContainer(); CircularGauge circleGauge = new CircularGauge(); gauge.CircularGauges.Add(circleGauge); //scale CircularScale scale = new CircularScale(); scale.Minimum…