How to embed a Google Video in SMF

About a year ago I wrote a post on how to embed a YouTube video in a Simple Machines Forum post. Well, as it works out today I needed to embed a Google Video in a post so I went through and did almost the same process to get it to work.

Debug function for FireBug

If you do much JavaScript coding and have FireBug odds are good you know that you can call console.info() to output to the FireBug console. But what happens if you leave your console.info() call in your code and a visitor looks with IE? It'll throw an error. So here's a quick, little [...]

isApache() and isIIS() functions for PHP

A couple quick little functions for when you need to know if you're running on Apache or IIS.
PLAIN TEXT
PHP:

function isApache()

    {

    return ((bool) preg_match('/Apache/i', $_SERVER['SERVER_SOFTWARE']));

    }

function isIIS()

    {

    return ((bool) preg_match('/IIS/i', $_SERVER['SERVER_SOFTWARE']));

    }

isApache() will return true if it's running on an Apache server and false if not. [...]

Java code practice on JavaBat

Looking for a place to polish up your Java skills?  Try JavaBat.  It's a library of short Java projects that you fill in the code and it'll check if for you.

Trimming array elements in PHP

Several times I've had a user setting that was separated by commas that I needed to split out into an array. People, correctly, put a space after commas. But for the array the space shouldn't be there. Here's a quick tip to strip out those leading spaces.
PLAIN TEXT
PHP:

$array = array_map('trim', $array);

array_map [...]