Web Development

Nov 25

Web developer? Want to turn off or disable the cache in Firefox for testing?  Well, by default you can’t – but there is an easy solution!

Continue reading »

May 14

By default, Google Analytics shows you the statistics for a 30 day period up to the previous complete day. For example, today is the 14th of May and Analytics is showing me stats for 14th April -> 13th May. Now, I don’t know about you, but I’m a bit of a stats junky. I like to know what’s going on. As a result, the first thing I do when I load up Google Analytics, is to open the date range picker and change it so that today’s stats are included. This is a somewhat tiresome and repetitive task. Currently, Google offers no way to set a custom date range, so I have developed a Greasemonkey script to automatically change the date range to include today.

Continue reading »

May 12

Recently, I was dealing with a large dataset in ASP.NET.  I was using the GridView control to display the data to the user.  The user was required to scroll down the page and using pagination links to view all of the data.  Paging events are triggered as PostBack’s and if you are using the smart navigation features of ASP.NET, this causes some serious user experience issues.  Here’s how to fix it.

Continue reading »

Feb 12

I had a bit of a brain fail earlier and couldn’t remember how to create a HashTable with generic type arguments. There was a Hashtable and a HashSet<> but neither were what I was looking for.  The answer was a Dictionary:

Dictionary<TKey, TValue>

Hope that saves you some time!
Continue reading »

Jun 19

If you receive the following error when trying to install a CPAN module using Mac OS X Leopard and Perl 5.8.8:

No rule to make target `/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/config.h', needed by `Makefile'.

..then salvation is at hand.

Continue reading »

Jun 6

I recently has a scenario where I had an array of hashes. Each hash represented a row of data for a table and I wanted to sort the whole array by the value of one element of the hash. As you’d expect, Perl has a very nice answer to the problem.

Continue reading »

Apr 18

So, you’re a Perl programmer developing a CGI web application, chances are you’re going to make some mistakes and need to debug your code. By default, when a Perl program fails to compile or encounters a runtime error you will see your servers default HTTP 500 error message.

Continue reading »

Apr 2

Cron is a time-based scheduling service in Unix and Unix-like operating systems (including Linux, FreeBSD and Mac OS X). It makes use of a configuration table called crontab that gives details of the commands to run and the schedule to execute them. This guide covers the basics of using cron to setup cronjobs with crontab.

Continue reading »

Apr 2

Generating a psuedo random number is common programming task. This tutorial will show you how to this in Perl using the rand() function.

Continue reading »

Feb 26

Recently, I have been working on a Movable Type based website for monthly research data. We found that we needed to create a sidebar module displaying monthly entries grouped by year. After some head scratching I came up with the following MT4 code.

Continue reading »