How do you sense if a BufferedReader in Java has reached the end of file? Like so many "things Java" it's easy enough to do ... once you find that vital method in the lists of thousands of calls!
There's no "eof"; there's no checking the input to see if you got nothing back after a read as that h ....
It's one of those days where I'm posting short, at the end of a long day. Well - actually I've had a couple of long days ...
But I do want to record a bif THANK YOU to Mr and Mrs x for the lift from Chippenham Station after I missed the one and only evening train that comes down our way. They hea ....
We welcome search engines to our site - to index our content and point their visitors back to us where appropriate, but such search engines are a means to an end and not an end in themselves. How much traffic to our web site is true visitor traffic, and how much is automata? An interesting pointer ....
Are you used to writing long sections of code to validate user input? Perhaps you are, or perhaps you have shortened such code over the years using Regular Expressions where you can specify a pattern to be matched. One regular expression can replace 30 lines of other code.
But in Python, Java an ....
Oracle's in_char function lets you convert numbers into a text string, but it's an unusual facility to have as as built-in; there's no such facility (as far as I know) in MySQL but you can get around this easily enough within your controlling application - the Nums2Words module on the CPAN (in Perl ....
It's been a long week - a course in Brugge at the begining of the week, and a f-u-l-l day in London yesterday where I was presenting Python as a series of six one-hour lectures to a somewhat larger group, rather than the traditional course with plenty of time for practicals which do give me a bit of ....
When I updated the Horse's Mouth archive the other week, I found that I had a lack of appropriate horse pictures to use for illustration - I guess there are just so MANY things around that we think of as being quite common and yet ... look in a picture library ... and you'll find them lacki ....
I wrote a few days ago about the bathtub effect. Shorten code and it becomes easier to read. Shorten it too much and it becomes silly. Here's a Perl script that I wrote to report on all lines in a log file from host computer "seal" with a status code (next to last field) over 399:
open (FH, ....
I'm in Brugges, in Belgium, for a few days. [[And wrote this on Monday ...]]
A busy weekend at the hotel. A quick conversion of BR4 from twin to double on Saturday, followed by sporadic checkins and we had every bed taken that night. And a sporadic (or, rather, spread) breakfast on Sunday left us ....
The x modifier on the end of a Perl regular expression causes all spaces in the regular expression to be treated as comments (rather than matching exactly). This means that you can lay out your regular expressions much more cleanly.
And wherever you're allowed white space, you can add comments fro ....