Xbox Live script

If you’re not a member of the XCDP, the only way to access gamertag information is via the public “gamercard”, here.  Microsoft, being Microsoft, hasn’t really left the information in a particularly useful format, so here’s a small script that boils all the HTML down to the bare stats and facts. Continue reading

Posted in PHP and web | 2 Comments

PHP syntax highlighter

Here’s a basic PHP “syntax highlighter” function: Continue reading

Posted in PHP and web | Leave a comment

PHP: empty(), is_null() and isset() comparison

The subtle differences between empty(), is_null() and isset() are common source of confusion and uncertainty.  So in this post I’ll try and clarify how these three (boolean) functions work. Continue reading

Posted in PHP and web | Leave a comment

2011 F1 Quotes

Each race of the 2011 season I’ll be picking out the Quote of the Weekend (or two) from the BBC’s coverage.

Continue reading

Posted in Formula 1 | Leave a comment

Get ‘The Chain’ to Number 1

Get Fleetwood Mac’s, The Chain, to Number 1 for the start of the 2011 F1 season!

Continue reading

Posted in Formula 1 | Leave a comment

BF:BC2 and MOH stats API

I’ve put together a small API that provides basic statistics for Battlefield: Bad Company 2, and Medal of Honor in XML form.  The stats are sourced from StatsVerse.com and not direct from EA.  Feel free to use the API as you see fit, but bear in mind that the API is reliant on a third-party (Stats Verse), so I cannot guarantee its reliability. Continue reading

Posted in PHP and web | Leave a comment

C: Maths

Virtually any program you write from now on will need use maths of some sort, so it’s probably going to be useful to know how to do it.  And it’s really simple. Continue reading

Posted in C programming | Leave a comment

Logic gate simulation

To compliment yesterday’s post of logic gates, I’ve put together a series of super-simple little functions that simulates the output of the gates.  This is not so much a post on programming, since the functions are so small and basic, but it may help you understand exactly how these gates work. Continue reading

Posted in C programming, Electrical engineering, PHP and web | Leave a comment

Logic gates

A and B are input logic variables, so they have two possible values 0 (false) or 1 (true).  F is the output variable.  In theory, logic gates (with the exception of the NOT gate) can have any number of inputs, but in reality they only ever have one or two. Continue reading

Posted in Electrical engineering | Leave a comment

UPDATED: Standard deviation function

Updated (original from 25/02/11): now includes a C version of the function.

Here’s a really simple PHP function for calculating the standard deviation of a set: Continue reading

Posted in C programming, PHP and web | 1 Comment