Thursday, October 25, 2012

Google Charts - GeoMap vs GeoChart

GeoMap - The map is rendered in the browser using an embedded Flash player.

GeoChart - Rendered using SVG

I noticed the GeoChart loads faster (at least in Chrome).

Wednesday, October 24, 2012

Monday, October 22, 2012

Friday, October 19, 2012

PHP Date Variables

http://php.about.com/od/learnphp/ss/php_functions_3.htm

That's a helpful post for controlling the output of PHP's date().

Difference Between Echo and Print In PHP

http://stackoverflow.com/questions/3615679/what-is-basic-difference-echo-vs-print

"echo can print more than 1 argument, print can only print 1 argument."

Triple Equals Sign In Php

http://stackoverflow.com/questions/80646/how-do-the-equality-double-equals-and-identity-triple-equals-comparis

Since PHP uses $ to declare variables (and not int, etc), one can run into issues with an if statement being unintentionally true.

For example, 0 == null.

The triple equals sign (===) allows you to prevent these cases by only returning true if the two inputs are not the same type.

So, 0 === null is not true. Also, 0 === "0" is not true either.

Monday, October 15, 2012

SQLSRV30.EXE is not a valid Win32 application

If you want to install the PDO drivers for PHP 5.4, you will need to extract SQLSRV30.EXE with Winrar.

Since I was using EasyPHP, I needed to extract the files into the following directory (there's also another php directory in EasyPHP, not sure why, but it's worth adding the files under "ext" there too): C:\Program Files\EasyPHP-12.1\php\php546x120827090829\ext

You will also need to add the following lines to your PHP.ini file under PHPExt:

extension=php_pdo_sqlsrv_54_ts.dll
extension=php_sqlsrv_54_ts.dll

Friday, October 12, 2012

Managing SQL Server 2008 with Management Studio 2005

When you google "SQL Management Studio", one of the first things that comes up is this (the 2005 version): http://www.microsoft.com/en-us/download/details.aspx?id=8961

I recommend not installing 2005 if you have SQL Server 2008 Express installed! You will not be able to manage your 2008 server, and you will need to uninstall management studio to install the 2008 version here: http://www.microsoft.com/en-us/download/details.aspx?id=22985