Yesterday, we visited Alfred the Great, who sits cast in stone in the centre of Wantage in Berkshire.
OK - the visit was really to Oxford, but we passed over the Downs from Marlborough through Axford and Ramsbury, Membury and Lambourn, Wantage and Frilford on the way to give our international visi ....
Here's a sequence of numbers. 3, 7, 7, 4, 2, 6, 4, 1, 5. What are the following three numbers?
Quite an interesting puzzle, but it's a sequence of numbers I came across this morning ... and the following three were 3, 7 and 5 I'll tell you the trick of the sequence at the end of this article!
I h ....
It's 12:30 - that's half an hour after midnight - and I'm at Well House Manor to check in guests who phoned in to book less than an hour ago. I'm always wary about taking bookings this late of an evening as we can anticipate that people are just looking for a bed on which to lay there head, and don ....
We're only a couple of miles from the Kennet and Avon canal - and for each of the last three evenings, in this Indian Summer, I've taken a stroll down there. Trying out my new camera in the half light, I'm going to show you some picture - this one of a heron is mediocre, I know, but some of the oth ....
The "Web Bloopers" book that we have on our shelves is a marvellous inspiration - a "there but for the grace of God go I" reminder when we put a web site - or even just a form - together - of catches to look out for.
My thoughts came back on to this a few minutes ago as I helped Wiltshire Council ....
From this week's Perl course:
opendir(DH, ".");
while ($igot = readdir(DH)) {
next if ($igot =~ /^\.{1,2}$/);
print "igot $igot\n";
}
You'll notice that I have used a regular expression to check for files called dot and dot-dot, which are the current and parent directory, a ....
Do you want "normal" text that's formatted in a fixed width font, with white spaces and tabs and new line characters to have a similar appearance on a browser? The default answer of you generate a page of HTML is "tough luck", as text defaults to a variable width font, lines are squished together ....
It's October - but yesterday was a lovely evening and after the course finished for the day, Mark (one of our delegates) and I went out and spent a brief period looking at some of the local countryside. This is canal side at Caen Hill - about five miles from us.
A handful of miles further on, on ....
I can - very easily - write a Perl program to process every line of an incoming data file - indeed, that's much of where Perl originated as the "Practical Extraction and Reporting Language"
Here's a short example that processes every line of a file and reports each line that includes the string PHP ....
Perl's map function (like array_walk in PHP) allows you to do something to every member of a list - thus it often saves you the need to write a loop into your Perl, saves the Perl runtime going back time and again to the interbal byte code generated by the compiler, and can be very efficient.
There ....