- Wednesday 31st May
All GIFs (both static and dynamic) on my pages are now interlaced, even though
the benefit is slight because of their small sizes. This was courtesy of the
"-interlace LINE" option of the ImageMagick utilities and, of course, meant
I had to flush the GIF cache. Re-arranged the
numerical order page so that the
columns matched the ball colours (i.e. 1-9, 10-19 etc. etc.) and hence allowed
me to add a colour total to each column. Started to add some more navigation
links at the bottom of some of the pages.
Added a new
multiple ticket checker page which allows up to
16 tickets to be simultaneously checked against a particular lottery. It's
also allowed me to extend the returned pages from the
lottery perms to include the ability to check all
the generated tickets against the latest lottery in one fell swoop. Updated the
logo information page with some general notes about
these WWW pages.
- Tuesday 30th May
Uploaded the results for
Finally worked out how all the prize amounts were computed: double-precision
floating point (note that single-precision is not good enough) and round
down to the nearest integer at the very end of the computations. My code now
exactly matches the
prize amounts that Camelot have been
quoting for all the lotteries so far. Re-organised the results table on each
individual lottery page to include the £ with each monetary value and have
also put the ticket sales at the bottom of the table (which now uses bold
for its headings). Fixed cache dir permissions - they weren't correct and
no on-the-fly GIFs were being generated (a good job I have fallback code to
cope with this).
Added a couple of sorted results pages - see the
home page for more details. I also put a link to the
further draw details from the home
Split source files up because optimisation was beginning to drag.
BTW, I've just realised that 19 HTML pages are re-generated when a new set of
lottery results are uploaded !
The page for
Lottery #28 was wrong for most of last
week because I'd been trying to be too clever detecting a rollover and ended
Lottery #27's manual comments on
Lottery #28's page !
ITV teletext page 123 put a "." after the "19.6m" on their pages for
the first time ever, which would have messed up my auto-parsing (not any longer - I've
added code to account for it now)...if it had actually been run.
Eagle-eyed viewers may have noticed that the 180-day expiry boundary in
various tables jumped above
Lottery #3 too early - this problem
has been fixed.
- Saturday 27th May
Discovered that the
Computing Services Department
switched off their teletext system over the holiday weekend, so my mail
requests tumbled through on the following Tuesday morning, meaning there was
no auto-update on Saturday. Sorry about that folks - circumstances beyond my
- Friday 26th May
The WWW disk attached to www.csc.liv.ac.uk filled up yesterday and when I
restored from my SyQuest onto the WWW disk at work, it zeroed 6 or so files
because of the lack of space ! I didn't notice this and duly dumped the pages
back to the SyQuest, took them home, restored them on my home machine and
*bang* I had no personal backup of the zero-length files. Waded through
the Departmental backups to recover the one remaining file I couldn't easily
reconstruct: AutoGen.html (the one which the "Automatically generated" link
points to). I got back the index.html for the
numerical analysis pages by sheer fluke - it was in my netscape cache
This shouldn't happen again because a) I've cleared up a good chunk of space
on the WWW disk (over 50MB) and b) I've put checks for zero-length files in
a SyQuest dump. Ah well, I guess you live and learn - don't restore files
onto a full disk is my lesson of the week. Zeroed GIF cache because some of
the individual ball miff-format images were zeroed during the aforementioned
disaster. Tempting fate somewhat, I've moved the GIF cache limit back up to
8MB again. Narrowed the results table on each of the individual lottery pages.
mosaic 2.6beta1 for X
would handle the <TR>...</TR> tags correctly in a table -
netscape, arena and even PC mosaic does ! I've complained to the mosaic
folks at NCSA that their handling of those table tags is wrong.
- Thursday 25th May
Narrowed the output from the lottery check and added another balance value
(ticket wins vs. losses). I also positioned the "+" and "-" balance symbols
more sensibly. Ran all the pages through
which picked up on a few minor problems, although it sadly doesn't recognise
HTML table code. Decreased GIF cache to 4MB because there simply
isn't enough space on the drive for it (300MB is ridiculously small for a
Departmental Web/FTP server !).
Added the 180-day expiry boundary to the
further draw details page and also in
the page returned from a lottery check. If a freshly generated
frequency GIF is zero length due to
a failure (gnuplot crash or whatever) then it isn't made "live" anymore.
Suddenly realised that the What's New
December 1994 page had the
November 1994 page tacked on the end of it !! It
doesn't any more of course. Went back and finally changed all "pounds"
references to "£" in the individual lottery pages, these What's New
pages and the newsflashes.
I now automatically check that the individual jackpot prize is correct, which
completes the prize checks I can do on the results data. However,
Camelot seems to randomly round up or down the individual jackpot prizes
to the nearest £ (I couldn't find an algorithm to exactly match their
rounding scheme). The check disputed this week's jackpot figure and sure
enough, a phone call to Camelot confirmed that they'd changed the
figure they'd been quoting for this week's jackpot.
BTW, I have to put exceptions
in the jackpot check code for the Super Draws because the two so far
have been applied differently (one was an absolute figure of £10m and the
other was an addition of £4m to the jackpot pool).
- Monday 22nd May
Uploaded results for
Fixed a long-standing bug with the "display 7 winning numbers" option in the
lottery form - the bonus number from the
latest lottery (instead of being from the selected lottery) was always
highlighted in the returned grid. Went back through all the previous
individual lottery pages and made minor edits and fixes. All dates in free-form
HTML (as opposed to tables or <PRE> sections) are now expanded to their full
"English" format - interesting to note that UNIX cannot provide the "nd", "th",
"rd" or "st" suffixes to the date...I had to put those in myself ! The footer
on all automatic pages now includes the time that page was generated. The
footer of all the individual lottery pages now inform the reader how many
jackpot winners were in the next and previous lotteries.
Removed the lottery page from 2 weeks ahead because it's pretty similar to
the one for next week, which is now generated in the same way as the
individual lottery pages (i.e. a program fills it what it can and reads a
manual comments file for the rest). Provisional info on "next week's page"
(which becomes this week's page on Saturday evening of course) is now available
at the same time as the home page is re-generated. The home page re-generation
when provisional info is available no longer has the "Draw Details for next
week's lottery" line (previously, that pointed to the 2 weeks ahead page during
the provisional info period).
Added warning messages to the program that converts the results file into a C
header file to catch any invalid fields - remember that the results are included
in the binary (and hence it must be re-compiled each week), so it's important
that they are range-checked. This includes, amongst many other checks, the
automatic verification of the 4 match, 5 match and 5+bonus match prize amounts,
since these are always a proportion of the ticket sales (after 3 match prizes
have been deducted). In fact, this check detected that I had slightly incorrect
ticket sales for
Lottery #2 and this has been
rectified after a confirmatory phone call to Camelot.
Reduced the width of the
winning number and
further draw details pages by removing
extraneous whitespace. Bought a second ticket for
Lottery #28 because of the rollover.
Added a balance feature to the returned pages when you
check if you've won, which simply deducts the cost
of the tickets from the prizes you have won to end up with a win/loss figure.
A new cron job regenerates the pages at 23.00 each Thursday because
the winning numbers table needs its 180 day expiry boundary changing at that
- Friday 19th May
I was souping up the provisional results page generation during my days off
when I discovered a fatal flaw that would leave the lottery home page blank
over the weekend ! Phoned it through and got someone at work to fix it (I
definitely need a modem for these sorts of emergencies...). Changed the
shell script to be "clever" about failed HTML generation - if it doesn't see
a </HTML> tag at the end of the freshly generated file, it won't use it
to update the existing file - this avoids problems if the code generation
core dumps mid-way through a page.
- Wednesday 17th May
Adjusted first mail request next Saturday to be at 20.10 because the draw is
at 20.13. Fixed newsflash ordering bug. No further updates to these pages will
take place until the automatic Saturday evening updates and the manual Monday
morning update - hey, I want a few days off !
- Tuesday 16th May
numerical order frequencies page
now orders the numbers in vertical columns, rather than horizontal rows.
At long last, the montage command (part of the
suite) correctly supports the creation of transparent GIFs without the presence
of an X server, which means I've removed the separate giftrans step from
the creation of the 7-ball GIFs, resulting in a significant speed-up. Added
yet another lottery perm, this time for 15 tickets.
The remaining perms left to code [and they are tricky] are "at least 1
two-match", "at least 1 three-match if a particular number is drawn" and
"at least 1 three-match". After that, I'm giving that page a well-earned rest !
Increased GIF disk cache to 8MB, because the 6MB cache is only lasting 4 days
would you believe it (i.e. new GIFs are being created at the rate of some
750 a day...gulp).
- Monday 15th May
Restored the lottery system from the copy I have on my home machine
to update the pages for
Lottery #26 using the SyQuest cartridge
disk drive I have. Basically, if I do any changes to the lottery system either
at home or work, I simply dump the whole lot (minus the GIF cache of course)
to cartridge and restore it at the other site. It saves me having to remember
which files I changed ! I've added a new
last appeared page to keep the
stats freaks (i.e. me) happy.
As well as the latest results and the new page, I've also added new options to
the perms page for 9, 12 and 16 ticket perms. I've
fixed some minor HTML errors in some of the comments files (e.g. no closing
</UL> or invalid links) and regenerated all the individual lottery pages
again. Automatically generated pages now use £ instead of pounds.
Revamped both the frequency order
and numerical order
frequencies pages to make them more reader-friendly. The
graphical chart of frequencies now has
a transparent background, assuming your browser inlines GIF URLs of course !
- Friday 12th May
First fruits of the new home workstation - a brand new
perms page. OK, so there's only 2 options at the
moment, but it's a start. When I get round to coding the trickier stuff
(2 match and 3 match guaranteed), then maybe you'll be impressed :-)
Scrunched up home page links because it's getting a bit large. The draw is
on 5 minutes earlier this coming Saturday, so special coding has been added
to generate the correct time (19.58) just for
that draw. Yes, it's the
Eurovision Song Contest that has forced the draw time change and, no,
I'm not adjusting the cron job timing just for that one draw.
Added code to indicate the expiry boundary (180 days) in the
winning numbers page, but you won't see that
Lottery #27 !
- Wednesday 10th May
NCSA httpd 1.4 is now installed on
http://www.csc.liv.ac.uk/, which has dramatically
improved Web performance for these lottery pages.
Spent quite a lot of time at home with my new HP workstation (I now have
the lottery pages at home via a self-serving WWW server) - didn't get to
bed until 2.15am !
- Tuesday 9th May
Uploaded the results for
Lottery #25. Took an HP UNIX workstation
home, so expect some major improvements in these pages in the next few
- Wednesday 3rd May
Got a copy of the
only to discover that the photo in the Lottery feature was of Ian Lathwell's
pages and not mine :-( Tidied up the newsflash code (i.e. stopped it core
dumping...). Did something I'd been meaning to do for ages - extract the
manual comments out as separate files and write extra code to re-generate
any individual lottery page from a combination of the results and the
manual comments files. This allows me to change the layout of all the pages
in one go (the shell script to generate the latest page can now optionally
generate all the pages) - for example, I've added a couple more links for
easier navigation at the footer of each lottery page.
- Tuesday 2nd May
A regularly updated
home page lottery newsflash is now in operation,
with most of the information transcribed and rewritten from ITV's teletext page
123. A newsflash archive page retains
approximately the past month's worth of lottery newsflashes (a darn sight more
than ITV teletext, which trashes them after less than 24 hours !). A special
program reads a directory of newsflash files, choosing the newest one for the
home page and then concatenating them all in reverse date order for the
archive page, deleting expired newsflashes in the process.
Note that this
What's New section will continue to be updated with the
more low level aspects of running these WWW pages, but new features on these
pages will also be advertised via lottery newsflashes.
- Monday 1st May
Uploaded the results for
Lottery #24. I believe that a feature in
the June 1995 edition of the .net magazine included my lottery pages
in the article - I will check this out in W.H. Smith's shortly. Adjusted
weekend cron jobs yet again - Saturday's 21.45 through to 23.45 parsing have
been brought forward to 21.30 through to 23.30. Monday morning's teletext mail
request and parsing has now been removed because the pages never change between
Sunday and Monday.