Archive for the ‘programming’ Category

Intial Divine Guardian Tests

I been wanting to look in the effectiveness of the 20% raid wall granted by Divine Guardian (4th tier talent in a Paladin’s protection tree). To do this I wrote a very simple Python program to read the combat log, detect with DG goes up and then record all the damage that was taken while [...]

Posted by Matthew on February 3rd, 2010

Filed under games, programming, python | No Comments »

javascript; sending me insane

>>> [] [] >>> [] == true false >>> [] == false true >>> [] == [] false >>> false == false true

Posted by Matthew on January 19th, 2010

Filed under javascript, programming | 1 Comment »

total mysql rows

Turns out our Mysql server at work is a little bigger than I thought: Databases 75 Tables    1,549 Rows      1,018,085,348 However over the last couple of months, we’ve only averaged 130 queries/second Hacked up PHP to gather stats: class MysqlCounter {     public function __construct($host, $username, $password)     {   [...]

Posted by Matthew on September 9th, 2009

Filed under mysql, php, programming | No Comments »

WoW Combat Log Splitter

Something quick I whipped up last night, after noticing that after my log file was > 4GB the WorldOfLogs parser will no longer do real time logging. Edit: Turns out that the WoW client itself stopped logging, even though the log file was a little over expected limit (4,334,806,196 bytes) Note: The code is just [...]

Posted by Matthew on September 4th, 2009

Filed under games, programming, python | 2 Comments »

array_unique javascript snippet

function array_unique(a) {     return a.reduce(function(u, e)     {         if(!(e in u))             u.push(e);         return u;     }, []); }

Posted by Matthew on February 23rd, 2009

Filed under javascript, programming | No Comments »

Javascript map-sort

I’m sure sorting method has a real name, but I’ve had no luck searching for it. function mapSort(array, mapFunction, sortFunction) {     // Store both original value, and transformed value     var mapData = array.map(function(e)     {         return [e, mapFunction(e)];     });         // [...]

Posted by Matthew on January 20th, 2009

Filed under javascript, programming | No Comments »