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 [...]
javascript; sending me insane
>>> [] [] >>> [] == true false >>> [] == false true >>> [] == [] false >>> false == false true
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) { [...]
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 [...]
array_unique javascript snippet
function array_unique(a) { return a.reduce(function(u, e) { if(!(e in u)) u.push(e); return u; }, []); }
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)]; }); // [...]
