Archive for January, 2008

Comparing MySQL search speed for different column types

Starting work on a new website I wanted to know which type of MySQL column was the fastest to search on. I assume it’s a numeric column, but I really want to know how much of a difference it makes. What I’m working on right now is an options table and it would [...]

Debug window for Javascript

I wrote this short little function when I got tired of debugging JavaScript by using the alert() function. It pops up a new window and outputs whatever you send to the function along with the UTC date.
PLAIN TEXT
JavaScript:

function logOutput(message)

    {

    debugWindow = window.open(”, ‘dbgWindow’, ‘height=300,width=400′);

    var newDate = new Date();

  [...]

Auto updating your copyright year

Since the new year is starting it’s time to make sure your copyright notices are up to date. Since you’re going to be changing it anyway here are 3 snippets of code to automatically insert the current year so you don’t have to worry about it next year.
PHP
PLAIN TEXT
PHP:

<? echo date(‘Y’); ?>

ASP
PLAIN TEXT
ASP:

<%=year(date)%> [...]

More information on Sitemaps from Google

I noticed a few days ago that Google Webmaster Tools is listing more information on sitemaps. Up until now they’ve listed how many pages are in your sitemap but now there is a much better metric - how many of those pages are actually indexed.

addthis_url = 'http%3A%2F%2Fforumsblogswikis.com%2F2008%2F01%2F05%2Fmore-information-on-sitemaps-from-google%2F';
addthis_title [...]