Dec
04
2010
As the subject suggests, an update is required not only for new posts but my WordPress version is pre-auto-updating which makes updating it slightly more tricky but it’s not string theory so I should just get on with it - if the site goes down in the next day, it’s probably because I’ve failed!
To give this update a little substance I’m going to share a recent discovery that everyone should be aware of, it’s Bucket:
Bucket is an IRC (on a side note I just noticed <acronym> tag is deprecated in html5) bot that you can users can teach to respond to phrases and information. More information about Bucket and how to play with him can be found on the xkcd wiki page along with a link to the (open) source. Some of the quotes are well worth reading, one of my favourite quotes is:
<Aranittara> why did you decide not to make Bucket's database public?
<Randall> A variety of vague reasons. Letting people duplicate and play with his database makes him less of an entity and more just a collection of channel logs.
<Aranittara> ah
<Aranittara> sure
<Randall> Call me sentimental, but I think it makes it more fun when we anthropomorphize Bucket a bit.
<Aranittara> I understand
<Bucket> YOU'LL NEVER UNDERSTAND ME
Enjoy.
Sep
30
2009
Three Peaks
On Friday 9th October 2009, I will be attempting the Three Peaks Challenge with three friends. The aim is to climb the highest peaks in Scotland, England and Wales (Ben Nevis, Scafell Pike & Snowdon) over a three day period. We’ll be climbing Ben Nevis on the Friday, Scafell on the Saturday and Snowdon on the Sunday. I have decided to do this to raise money for a charity called The Friends of Michael Sobell House.
Michael Sobell House is the hospice and specialist palliative care centre based at Mount Vernon Hospital, enhancing without discrimination, the care of patients with life limiting illnesses and providing support for their families and carers. Funding from charitable donations must reach an annual target of £1,200,000 to maintain patient care at its current level from the In-patient unit, Day Therapies Centre, Outreach Team and Education Program. Many services at Michael Sobell House would not exist without Fundraising and Voluntary contributions from individuals, community groups, companies, charitable trusts and legacies. It is thanks to a dedicated team of staff, generous and skilled volunteers and with the boundless energy and enthusiasm of all its supporters that Michael Sobell House can keep ‘Sharing the Caring’.
Please visit my JustGiving page: http://www.justgiving.com/andrewgoodricke/ if you’d like to sponsor me. Donating through JustGiving is simple, fast and totally secure. Your details are safe with JustGiving – they’ll never sell them on or send unwanted emails. Once you donate, they’ll send your money directly to the charity and make sure Gift Aid is reclaimed on every eligible donation by a UK taxpayer. So it’s the most efficient way to donate - I raise more, whilst saving time and cutting costs for the charity.
So please dig deep and donate now.
Here’s a few facts and figures about the Three Peaks:
Ben Nevis
1344m high
Expected time to reach summit and return - 7 hours
Scafell Pike
978m high
Expected time to reach summit and return - 5.5 hours
Snowdon
1085m high
Expected time to reach summit and return - 4.5 hours
You can also track our progress at: http://purplefundraising.co.uk/
Dec
07
2008
Here’s one for you Sukie…
The php function date_add ( DateTime $object , DateInterval $interval ) is an experimental function and shouldn’t really be used in a production site. The way to get around this is to use strtotime ( string $time [, int $now ] ).
If you’re trying to add a week to today’s date you can simply do the following:
$new_date = strtotime("+1 week");
but if need to add a week to a time stamp of your own you can do:
$my_date = strtotime('05-Dec-2008');
$new_date = strtotime("+1 week", $my_date);
Note: The second parameter needs to be a valid date, when I’m getting data from a database I will usually get the date in to a dd-mmm-yyyy format as this explicitly defines the date. If it were written ‘05-12-2008′ it potentially could be interpreted as ‘12-May-2008′ which could then cause other issues to your data further down the line.
You could condense the code to be one line:
$new_date = strtotime("+1 week", strtotime('05-Dec-2008'));
For outputting the $new_date I’d use php’s date ( string $format [, int $timestamp ] ) function:
$new_date = strtotime("+1 week", strtotime('05-Dec-2008'));
echo date('d M Y', $new_date)
Have a look at php’s strtodate function and php’s date function for information on how to use.
Sep
09
2008
Over the weekend I took some friends to Wembury as they were down visiting, I’d not been before but I’d heard it was a nice spot so gave me a great oportunity to head over there to have a look around. Here’s a selection of the pictures I took using a Canon 400D, Sigma 17-70mm and a Gorrila-pod (a great piece of kit) where required.
Aug
21
2008
I’ve been working with Ajax recently, I’ve been particularly impressed with how potentially powerful Ajax is. Having a good knowledge of PHP and HTML myself has helped when it came to learning this amalgamation of technologies. If you’re not aware what Ajax is, It stands for Asynchronous JavaScript And XML (eXtensible Markup Language).
A good introduction to it can be found on Harry Maugans in tutorial AJAX Made Easy, in addition to that the SAMS Teach Yourself in 10 Minutes have got a great little book on Ajax which explains it all really well from beginner to intermediate.
Back to the point in hand, I wanted an animated gif to display while I was collecting data from the server. That is precisely what I got when I came upon the Ajax Loading gif Generator. You can customise the gifs produced from the type of animation to the fore and background colours - A great little tool!
