Yet more wow

Progress

+834 Fire (+845 With Arcane Intellect) with one Metagem slot to fill and without Major Spellpower on my weapon. Though, it did cost a bit of Int and Stam.

  1. Enchant Enchant Weapon – Major Spellpower on my Greatsword of Horrid Dreams
  2. Actually start running Karazhan :)
  3. Craft Spellfire Robe to finish the Wrath of Spellfire set
  4. Karazhan AttunementDone
  5. Level tailoring to 375Done

Posted on

More WoW

+783 Fire Damage

While only a small change I’ve now a new necklace + ring + boots, each giving more +int and +crit, so overall a nice improvement.

Progress – Day 1

  1. Flying mountDone
  2. Karazhan Attunement. 1 Key down.
  3. Purchase Bracers of Havok
  4. Enchant Enchant Weapon – Major Spellpower on my The Bringer of Death
  5. Level tailoring to 375
  6. Craft Spellfire Robe to finish the Wrath of Spellfire set

Progress – Day 2

I need a new metric for measuring progress, I’m now at +756 Fire damage (+767 with Arcane Intellect), but with a higher +stam and +int.

  1. Karazhan Attunement. All keys down, off to CoT now
  2. Purchase Bracers of Havok
  3. Enchant Enchant Weapon – Major Spellpower on my The Bringer of Death
  4. Level tailoring to 375
  5. Craft Spellfire Robe to finish the Wrath of Spellfire set

Progress – Day n

+811 Fire (+822 With Arcane Intellect) with one Metagem slot to fill. Also now have 8516 mana, 17.03% crit chance unbuffed

  1. Karazhan Attunement. All keys down, off to CoT now
  2. Purchase Bracers of HavokDone
  3. Enchant Enchant Weapon – Major Spellpower on my The Bringer of DeathDone
  4. Level tailoring to 375
  5. Craft Spellfire Robe to finish the Wrath of Spellfire set

Posted on

Not enough hours in a day

+777 Damage now

Next up

  1. Flying mount
  2. Enchant Enchant Weapon – Major Spellpower on my The Bringer of Death
  3. Level tailoring to 375
  4. Craft Spellfire Robe to finish the Wrath of Spellfire set

… Just wish I had more time to play WoW :-)

Posted on

Internet Connection

Yay, about time too

Though the speed is pretty similar to what I had with Internode on ADSL1 :-(

Upstream:         990500
Downstream:       8362800

Downstream
SNR Margin        6.0 dB
Line Attenuation  35.0 dB

Upstream
SNR Margin        6.0 dB
Line Attenuation  21.0 dB

Posted on

The Start...

Today I received the keys to my new home, and, not unsurprisingly, I’m quite happy.

It’s a moderate sized two bedroom standalone unit, located in Dandenong (though quite close to the Yarraman train station). It’s in a relatively quiet area and located off the road (the driveway into the block of 8 units is on a standard house block). It’s was great value (atleast, so far :)) too. I’m really looking forward to moving in out of my tiny rented flat (even if it is much closer to work).

I’m moving some of my junk from Dalyston over the weekend so I’ll grab some pictures then.

On a completly unrelated note… Yesterday, after over 17 ingame days, my Human Mage has hit level 70 and after a quick respec + new belt, now has > 8500 mana and +672 fire damage…. Guess I haven’t really grown up at all :-)

Posted on

VIM Autocompletion for MySql Table Columns

Even after working with a database schema for over a year now, I still have to think hard about (and sometimes just guess) some column names (e.g. record.idInteractionRecent vs record.idRecentInteraction, and moduleInfo.valueShort vs moduleInfo.nameShort). The below PHP script will generate a list of column names that can be used in VIM for autocompletion.

<?php

    //  This script outputs a complete list of fully qualified database
    //  columns (ie. table.column) for the specified MySQL database suitable for
    //  VIM's autocompletion feature.
    //
    //  To add to Vim's complete list:
    //  set complete+=k/path/to/dictionary isk+=.,
    //
    //  - Matthew  (buzzard@project-2501.net)


    $usage = <<<EOT

Usage:
php {$_SERVER['argv'][0]} username:password@host/database
php {$_SERVER['argv'][0]} username@host/database
php {$_SERVER['argv'][0]} host/database


EOT;


    if(count($_SERVER['argv']) != 2)
    {
        die($usage);
    }

    if(preg_match("#^(.*):(.*)@(.*)/(.*)$#i", $_SERVER['argv'][1], $matches) == 1)
    {
        list(,$username, $password, $host, $database) = $matches;

        if(($conn = @mysql_connect($host, $username, $password)) === false)
        {
            die("Unable to connect to {$_SERVER['argv'][1]}\n" . mysql_error($conn) . "\n");
        }
    }
    else if(preg_match("#^(.*)@(.*)/(.*)$#i", $_SERVER['argv'][1], $matches) == 1)
    {
        list(, $username, $host, $database) = $matches;

        if(($conn = @mysql_connect($host, $username)) === false)
        {
            die("Unable to connect to {$_SERVER['argv'][1]}\n" . mysql_error($conn) . "\n");
        }
    }
    else if(preg_match("#^(.*)/(.*)$#i", $_SERVER['argv'][1], $matches) == 1)
    {
        list(, $host, $database) = $matches;

        if(($conn = @mysql_connect($host)) === false)
        {
            die("Unable to connect to {$_SERVER['argv'][1]}\n" . mysql_error($conn) . "\n");
        }
    }
    else
    {
        die($usage);
    }


    if(@mysql_select_db($database, $conn) === false)
    {
        die("Unable to select database '$database'\n" . mysql_error($conn) . "\n");
    }


    $tableList = queryGetFirstColumn($conn, 'SHOW TABLES');

    foreach($tableList as $tableName)
    {
        $columnList = queryGetFirstColumn($conn, "DESCRIBE `$tableName`");

        foreach($columnList as $columnName)
        {
            printf("%s.%s\n", $tableName, $columnName);
        }
    }


    function queryGetFirstColumn($conn, $sql)
    {
        if(($query = mysql_query($sql, $conn)) == false)
        {
            die("Unable to execute query '$sql'\n" . mysql_error($conn) . "\n");
        }

        $rows = array();

        while(($row = mysql_fetch_row($query)) !== false)
        {
            $rows[] = $row[0];
        }

        return $rows;
    }

Posted on

MySql: Always learning something new

mysql>  SELECT "50" > 100, 50 > "100", "100" > 50, 100 > "50", "100" > "50", "50" > "100";
+------------+------------+------------+------------+--------------+--------------+
| "50" > 100 | 50 > "100" | "100" > 50 | 100 > "50" | "100" > "50" | "50" > "100" |
+------------+------------+------------+------------+--------------+--------------+
|          0 |          0 |          1 |          1 |            0 |            1 |
+------------+------------+------------+------------+--------------+--------------+
1 row in set (0.01 sec)

mysql>

I guess it does make sense, though I’d rather it was more like PHP (do what I mean, not what I say) or even the other extreme and throw errors (enforcing a correct database schema to start with).

PHP:

"50" > 100    --  false
50 > "100"    --  false
"100" > 50    --  true
100 > "50"    --  true
"100" > "50"  --  true
"50" > "100"  --  false

Posted on

Finally, a real window manager

I’ve recently started using (well, playing with) Ion3 and while I’ve not really got a hang of all the keyboard shortcuts yet, it’s proving to be a very usable (and fast) window manager.

ion3

Posted on

I’m not addicted…

Epic Mount

Bought within minutes of server shutdown so no interesting background :-)

Posted on

Working with MySQL

matthewd@carbonara:~$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2792799
Server version: 5.0.38-log Gentoo Linux mysql-5.0.38

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use b3
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SELECT count(*) FROM interaction WHERE idRecord=3720322;
+----------+
| count(*) |
+----------+
|       30 |
+----------+
1 row in set (0.00 sec)

mysql> SELECT count(*) FROM interaction WHERE idRecord=3720322 ORDER BY `create` DESC, `id` DESC;
+----------+
| count(*) |
+----------+
|       30 |
+----------+
1 row in set (0.00 sec)

mysql> SELECT * FROM interaction WHERE idRecord=3720322;
+---------+---------------------+----------+--------+-----------+
| id      | create              | idRecord | idUser | idOutcome |
+---------+---------------------+----------+--------+-----------+
... snip 30 rows ...
+---------+---------------------+----------+--------+-----------+
30 rows in set (0.01 sec)

mysql> SELECT * FROM interaction WHERE idRecord=3720322 ORDER BY `create` DESC, `id` DESC;
Empty set (0.00 sec)

mysql>

Isn’t MySQL grand?

Posted on