1. LOL, Virgin Media…

    April 27, 2008 by Callum Haywood

    Indeed. LOL. You couldn’t get more incorrect than some of the information on their website.

    Basically where I live, on a private road, cable services aren’t available. Which is why I use ADSL (and it bet my connections faster than most people on cable), and have always used ADSL for about 8 years.

    The point I’m trying to make is that on this page I enter my postcode, and on the next page it returns a list of the 4 houses on my street (which share the same post code) saying that we CAN get Virgin Media cable services – when we physically can’t.

    I dread to think of the many more silly errors there are in their database.


  2. Faster internet…

    April 26, 2008 by Callum Haywood

    Well done Orange. No sarcasm there.

    They’ve just upgraded me so now I’m getting a speed of about 5Mbps – which is good compared to what I used to get; a somewhat dull 1.7Mbps average, which is like what I’d get a school – but no compaints about that, its as fast as most schools and a very capable network from my experiences.

    This is the result from speedtest.net:

    Now I’m really happy! Its just going to be non-stop downloading now :P


  3. Windows Vista SP1 Video

    April 17, 2008 by Callum Haywood

    I actually find this video quite funny, like most computer-related music videos (i.e. It’s All About The Pentiums by Weird Al). Anyway, take a look at this one:

    If you can’t see it, click here to check it out directly from YouTube.


  4. Getting Akismet statistics really simply…

    April 15, 2008 by Callum Haywood

    I now love Akismet, its an amazing little plugin and has already blocked 45 comments within the first 24 hours, all spam comments, of course!

    Anyway, I was experimenting with the akismet_stats(); function, it’s useful but for some people it might be a little over the top, so thats where I come in – I’ve wrote an insanely small function to just display the raw number of spam comments that Akismet has blocked, probably been done before but I thought I’d offer you my take on it.

    In the plugins/akismet.php file, right near the bottom outside any other Akismet functions, just put

    function akismet_ministats() {
    $count = number_format(get_option('akismet_spam_count'));
    echo $count;
    }

    And save it. Then in your sites footer for example, just call the akismet_ministats() function by using this code:

    <?php akismet_ministats(); ?>

    Which will output the raw number of comments that Akismet has blocked, best used inside a sentence of some sort, like this:

    <p>Akismet has blocked <?php akismet_ministats(); ?> from my blog!</p>

    I hope someone finds this useful, I know I did, that’s the reason I wrote it!

    UPDATE: I’ve just learned that after updating Akismet, where you used this function, it will display a PHP error about undeclared function – this is normal and just means you need to add the first bit of code in this post to the plugins/akismet.php file. Sorry for any problems caused!


  5. Me on WordPress 2.5

    April 14, 2008 by Callum Haywood

    Well to be fair, I really like it. It’s different, and when the developers say more than just a fresh coat of paint, they really mean that. The administrative interface, it’s been redesigned, and I really like it, saying that, I liked the old one too, but I prefer this one, but with their “classic” colour scheme, not the default “fresh” one, for me, the colours aren’t contrasted enough.

    The admin dashboard, this time its more about me and my blog, rather than WordPress and wordpress.org, which I like. The Comments tab doesn’t have any startling new features except maybe for the little clickable flag with a number on it that shows beside the word Comments when there are comments in moderation, which is cool and useful. One thing I really like is their use of lightboxes, because I generally really like any sort of lightbox, as they are useful and add interactivity to any web page, at least in my opinion.

    If your unsure whether to upgrade, I’d recommend it, after all, it (rather embarrasingly) was the first WordPress Upgrade I’ve ever done, with simply not having the time to upgrade previous versions, but this one was worth it.


  6. Pythagoras’ Theorem PHP Function

    April 12, 2008 by Callum Haywood

    I’ve been not so busy working on a really quick function for PHP that does pythagoras’ theorem. It works on the sum B2+C2=A2, but this can easily be changed, its just the way I was taught.

    Heres the code:

    <?php

    // PYTHAGORAS’ THEOREM FUNCTION FOR PHP
    // by Callum Haywood [callum@network467.co.uk]
    // Copyright 2008. All rights reserved.

    // This works on the calculation B² + C² = A², which
    // is what I’ve always been taught. Of course its
    // possible to change this, and its easy too.

    function pythagoras($b, $c)
    {
    $b1 = $b*$b; // Square value B
    $c1 = $c*$c; // Square value C
    $a1 = $b1+$c1; // Add them together
    $a2 = sqrt($a1); // Find the square root
    $a = round($a2, 1); // Round it to 1 DP

    echo “Side <b>B</b> is <b>$b</b>, and side <b>C</b> is <b>$c</b>. The computer has worked out that side <b>A</b> is <b>$a</b>!”;
    }

    pythagoras(“1″, “2″);

    ?>

    See, it’s simple, just change where it says 1 to the length of side B of your triangle, and where it says 2 to the length of side C of your triangle. Remeber that Pythagoras’ Theorem only works for right-angled triangles. You don’t have to be in KS3, but there is some more info here, that I stumbled across while revising.

    Hope someone finds this useful!