March 31, 2003
Cold Again Among Other Things

Print | Home

Cold
dog-with-coat.jpgIt was -5°C this morning. There was a brief snow flurry blizzard just before noon. By the time I went outside at 12:30 p.m. the sun was out again with snowy shadows here and there. I went to the store and post office to by a birthday card for my brother in Thailand. I don’t know whether he reads this but you can him a card is on it’s way. I wonder how long it will take to get there? Anyway, I heard on the radio that a cool spring is good: it keeps the fruit trees from blooming too soon. They’ll bloom later when killing frosts are less likely. It could mean a bumper fruit crop this summer perhaps.
Permanent Part Time
My wife got good news. She was offered a permanent part-time position at the private school where she teaches music from PK to Grade 2. The only real condition is that she had to do something extra-curricular like a choir or music club or something. She gladly accepted.
Not a Handyman tonight
My brother-in-law, he of the flooding apartment fame, had his dryer conk out. I suspect the spraying water from the burst hose problem got into the dryer stacked above it. Anyway my wife ordered a new washer/dryer stack from Sears and it was delivered today. Of course, they didn’t connect it so I thought I would have to do this tonight. Fortunately, my brother-in-law and his wife were going out. Good thing as I had library books to return and garbage to put out. The connections will probably be Wednesday’s evening job.
 
Posted by jservice at 10:17 PM
March 30, 2003
Cutest Puppy

Print | Home

My older son and his girlfriend came for a visit and brought their 12 week old Golden Retriever pup, Cricket. Is she ever cute. As I lay on the floor she licked my fuzzy head and bearded chin. Cute! My son said everybody at work commented on her big paws and how she would grow into a big dog. We took her for a walk around the block and met a man with his dog who made the exact same comment. Dog owners all think alike I guess. Did I say our son’s puppy is cute?

Originally they weren’t going to stay for supper but we convinced them that the meal-time didn’t have to be a sit-down-at-the-table affair. We could all watch the puppy and make sure she didn’t sneak off to pee somewhere. She was good dog: no messes today.

Though the temperature was below 0°C this morning I ran my usual weekend spring-summer-fall route — the slush is gone, most of the mud has dried up and the boulevard grass is dry enough to run on once again. My feet and legs appreciated that extra bit of “give''. I didn’t end up fertilizing the lawn as I didn’t have any fertilizer. I thought I did; however, all those pails are full of screened compost waiting to be spread on the gardens and lawns once things start growing again.

 
Posted by jservice at 10:08 PM
SARS in the GTA and elsewhere

Print | Home

Severe Acute Respiratory Syndrome seems to occupy as much news in the GTA as does the U’s–Iraq war. From what I have read, SARS effects are actually less severe (and “less”fatal) than “regular”pneumonia whose symptoms it resembles. However it is the contagious nature of SARS which has the health professionals closing hospitals and issuing voluntary quaratines. One woman in our choir won’t be out to choir practice for two weeks because she works at one of those hospitals — they have been told to be either at work or at home and where a mask at all times. Another choir member is in hospital because the twins she’s expecting are growing at unequal rates: only her husband can visit her. In “normal”times, anyone would be allowed — she’s not ill in any way, her fetuses need constant monitoring and she needs complete bed rest. It must be pretty frustrating for her and her husband.

My nephew in Thailand had a brief bout with pneumonia earlier this year. Perhaps this was something SARS-like. He recovered fully without a hospital stay; however, it did seem unusual for an active three year old to come down with pneumonia. More worrisome for my brother and his wife is that her brother is teaching in Hong Kong, another SARS warning area. Let’s hope they identify the real cause, real soon and thereby devise some tests so that everyone without SARS can carry on with their daily lives.

 
Posted by jservice at 09:20 AM
March 29, 2003
Playing with my WWW Data Script

Print | Home

I have been playing with my WWW Data script trying to get the data looking “just right''. There are now little 24 hour trend charts generated by creating an ASCII ppm file and then using pnmtopng to create a graphics file that is loadable by most browsers. Each trend chart also has the daily min and max values. For awhile I had problems with updating the cache of 24 hourly values/quantity. It seems Perl won’t always automagically create nested references unless there’s an empty one there already. I also added a little bit of intelligence so that these web pages will only be loaded and parsed hourly even though the script may run more often than this. That is, the script keeps track of each web page’s CRC and the time it was accessed. Another 24 hours will go by before the little trend charts will be showing actual data. I had to preload them with bogus values in order to verify things were working. Oh and there’s a little cursor showing the current hour’s value and position in the chart.

 
Posted by jservice at 11:30 PM
March 28, 2003
Found a Fourth

Print | Home

Walking across the “bridge”from our building to the main building I happened to clink my engineer’s “iron”ring on an internal support girder. Then I tapped the next one. I discovered the diagonal and vertical supports are a perfect fourth (do . re . mi . fah) apart in pitch. C’est très intéressant, n’est-ce pas? Well maybe not…

 
Posted by jservice at 10:36 PM
March 27, 2003
The Pope and the Rabbi

Print | Home

Several centuries ago, the Pope decreed that all the Jews had to convert or leave Italy. There was a huge outcry from the Jewish community, so the Pope offered a deal. He would have a religious debate with the leader of the Jewish community. If the Jews won, they could stay in Italy, if the Pope won, they would have to leave.

The Jewish people met and picked an aged but wise Rabbi, Moishe, to represent them in the debate. However, as Moishe spoke no Italian and the Pope spoke no Yiddish, they all agreed that it would be a “silent”debate.

On the chosen day, the Pope and Rabbi Moishe sat opposite each other for a full minute before the Pope raised his hand and showed three fingers. Rabbi Moishe looked back and raised one finger.

Next the Pope waved his finger around his head. Rabbi Moishe pointed to the ground where he sat.

The Pope then brought out a communion wafer and a chalice of wine. Rabbi Moishe pulled out an apple.

With that, the Pope stood up and declared that he was beaten, that Rabbi Moishe was too clever and that the Jews could stay. Later, the Cardinals met with the Pope, asking what had happened. The Pope said, “First I held up three fingers to represent the Trinity. He responded by holding up one finger to remind me that there is still only one God common to both our beliefs. Then, I waved my finger to show him that God was all around us. He responded by pointing to the ground to show that God was also right here with us. I pulled out the wine and wafer to show that God absolves us of all our sins. He pulled out an apple to remind me of the original sin. He had me beaten and I could not continue.”

Meanwhile the Jewish community were gathered around Rabbi Moishe. “What happened?”they asked.

“Well,”said Moishe, “First he said to me that we had three days to get out of Italy, so I said to him, Up yours! Then he tells me that the whole country would be cleared of Jews and I said to him, Mr Pope, we’re staying right here.”

“And then what,”asked a woman.

“Who knows?”said Moishe, “He took out his lunch so I took out mine.''

 
Posted by jservice at 09:57 PM
March 26, 2003
The Install Go Round

Print | Home

I decided to copy a data CD tonight and the software said it couldn’t find a CD burner. Well, I’ve read warnings that a Win2k upgrade from Me might have some bumps. “Repairing”the CD burner software didn’t work. I had to remove it and then re-install again plus at least a couple of re-boots in there. Finally a hour or two later I copied that CD. Windows™ is so much fun sometimes — like an evening of my life wasted watching install dialogs and screens.

My TEXlike text formatter seems to be working except for nuisance messages such as MT::App::CMS=HASH(0×836ed14) Use of uninitialized value in concatenation (.) or string at /usr/home/jservice/public_html/blog/mt/extlib/jrrs/TeXlike.pm line 78. In fact I have initialized everything so I suspect that somewhere in MT::App::CMS.pm there’s something uninitialized. Some day I’ll waste some more time looking for it.

 
Posted by jservice at 10:21 PM
March 25, 2003
Learning by Paying

Print | Home

STOP SIGN.png

Some people learn by reading, some by taking courses, some by “osmosis”and others by paying. A young person I know seems to want to learn using this last method. He was told he was following too closely and using his brakes too much. “I know what I’m doing”he said. Until the day he ran into the back of another car. No noticeable damage to the van he was driving but a $1,000 repair bill for the other car’s rear bumper. I presume he doesn’t follow too closely anymore. He was told he should stop at STOP signs rather than just slowing down. Well, you guessed it, on a quiet Sunday afternoon on a quiet side street he was caught. This time it’s a $110 fine and a couple of demerit points. The police officer’s comment: “Where does it mention ‘rolling stop’ in the Highway Traffic Act?''. I predict that this young man will be stopping more often at STOP signs. I do. In the neighbourhood where I grew up and got my driver’s licence the powers that be decided to put a STOP sign on pretty near every corner. And, of course, police it for awhile. It was easier to just stop.

 
Posted by jservice at 12:42 PM
March 24, 2003
Another Op'nin'

Print | Home

Its memory work time again. I think we have to sing these while wandering around the stage or even gasp! dancing or something.
(Added “Puttin' on the Ritz”2003-Apr-13)
Another op’nin', Another show

Cole Porter

An-oth-er op-'nin', an-oth-er show —
In Miss-iss-au-ga or To-ron-to,
A chance for stage folks to say “hel-lo''
An-oth-er op-'nin' of an-oth-er show.
An-oth-er job that you hope at last
Will make your fu-ture for-get your past,
An-oth-er pain where the ul-cers grow,
An-oth-er op-'nin' of an-oth-er show.
Four weeks, you re-hearse and re-hearse,
Three weeks, and it couldn’t be worse.
One week will it ever be right?
Then out o' the hat it’s that big first night!
The o-ver-ture is a-bout to start,
You cross your fing-ers and hold your heart.
It’s cur-tain time and a-way we go!
repeat
An-oth-er op-'nin' of an-oth-er show.
An-oth-er op-'nin', just an-oth-er op-'nin' of an-oth-er show!

   There’s no Business Like Show Business

Irving Berlin

There’s no bus-'ness like show bus-'ness,
Like no bus-'ness I know;
Ev-'ry-thing a-bout it is ap-peal-ing,
Ev-'ry-thing the traf-fic will al-low;
No-where can you get that hap-py feel-ing,
When you are steal-ing that ex-tra bow!
There’s no peo-ple like show peo-ple;
They smile when they are low!
E-ven with a tur-key that you know will fold,
You may be strand-ed out in the cold;
Still, you would-n’t change if for a pot of gold,
1. Let’s go, come on, let’s go! Say it with mu-sic…
2. Let’s go on with the show
Let’s go on with the, show!


Puttin' on the Ritz

Irving Berlin

Have you seen the well to-do
up and down Park Av-e-nue
on that fa-mous thor-ough-fare
with their noses in the air.
High hats and Arrow collars,
White spats and lots of dol-lars
spend-ing ev’-ry dime for a won-der-ful time.
If you’re blue and you don’t know where to go to,
why don’t you go where fash-ion sits,
Put-tin’ On The Ritz.
Diff-’rent types who wear a day coat,
pants with stripes and cut-a-way coat,
per-fect fits, Put-tin’ On The Ritz.
Strol-ling up the Av-e-nue so hap-py,
All dressed up just like an Eng-lish chap-pie,
ver-y snap-py,
Come let’s mix where Rock-e-fel-lers walk with sticks
or “um-ber-el-las”in their mitts
Put-tin’ On The Ritz.
If you’re blue and you don’t know where to go to,
why don’t you go where fash-ion sits,
Put-tin’ On The Ritz.
Diff-’rent types who wear a day coat,
pants with stripes and cut-a-way coat,
per-fect fits, Put-tin’ On The Ritz.
Strol-ling up the Av-e-nue so hap-py,
All dressed up just like an Eng-lish chap-pie,
ver-y snap-py,
Come let’s mix where Rock-e-fel-lers walk with sticks
or “um-ber-el-las”in their mitts
Put-tin’ On The Ritz.
Da doot dot doot dot du dot
Da doot dot doot dot du dot
Da doot dot doot dot, da dot.
Dot dot dot!
Da doot dot doot dot du dot
Da doot dot doot dot du dot
Da doot dot doot dot, da dot.
S-s-s Strol-ling up the Av-e-nue so hap-py,
All dressed up just like an Eng-lish chap-pie,
ver-y snap-py,
Come let’s mix where Rock-e-fel-lers walk with sticks
or “um-ber-el-las”in their mitts
Put - tin' On The Ritz.
Da doot dot du dot!

 
Posted by jservice at 10:15 PM
One Life, one death

Print | Home

It’s a co-incidence, of course, but I learned yesterday a sister-in-law is expecting her second come August — a new life. And today an email arrived at work about the sudden death of a person at work. Probably someone I would have recognized if I saw him but the name wasn’t familiar. A fellow cubicle farm dweller said he had just talked with the guy last Friday. Rumour is that it was some type of aneurysm. My sympathy goes to his family. And my congratulations go to my brother’s family whom I also hear are going to be moving into (larger?) digs soon.

 
Posted by jservice at 08:54 PM
March 22, 2003
The U's attack Iraq

Print | Home

I haven’t weighed in with my thoughts on the U.S and British war on Iraq yet. Today I ran my usual (non-winter) route so I had some time for reflection though there were lots of slushy, puddly and muddy spots to avoid in the woods.

My question has always been: Why? That is, what has the Iraqi régime done to annoy Washington and London so much? None of the media reports I’ve seen have provided much background on the necessity of this war. There’s only been a lot of “hand waving”about Saddam’s weapons of mass destruction (the U.S. has these), his biological weapons (the U.S. has these, too). Libya seems to have (had) a similar type of government and dictator but the U.S. hasn’t sent in the troops. Does the U.S. government care about the Iraqi Kurds' oppression? I don’t think so. There are many examples of oppressed groups around the world where the U.S might have intervened. They didn’t. I was forwarded an email the other day describing another theory: the U.S. needs another oil supplier. Saudi Arabia is becoming a less-willing supplier and wields enormous influence in OPEC. Venezuelan oil supplies are proving unreliable with their domestic problems; so, the U.S. (and the U.K. I guess) require an alternate. The small country of Iraq has mega-barrels of proven reserves. Let’s try and install, once again, a “West-friendly,“ “democratic”government and let BO start a' pumpin'. Again I don’t have enough information to know where the truth lies; though both Bush presidents are persons of BO. I do know that war seldom solves problems: it kills, it maims — mostly innocent civilians. Is Saddam Hussein, your “typical”megalomaniac dictator, trying to achieve world domination like Adolf Hitler as some suggest? It isn’t apparent to me that he’s trying this. He has been obviously hiding a few Scud missiles, but his infrastructure is so poor he can’t seem to destroy more than a few bombs/day for the weapons inspectors.

Well, I’ve rambled on enough and can find no definite conclusion. Prime Minister Chrétien did the right thing by declining to assist the U's (U.S and U.K.) with out some enabling resolution from the third U, U.N. that is. If wars could be fought, without civilian injuries and death and the destruction of every-day infrastructure, on a government to government, military to military basis then, maybe, just maybe, I might approve. But this has never happened!

Perhaps this Non Sequitur cartoon best illustrates the position of those who want war:

non-sequiter-nq030319l.jpg
 
Posted by jservice at 10:16 PM
March 21, 2003
Particular about Wine

Print | Home

When it comes to wine I’m very particular about what I buy. There are two things I look for before making my selection.

First, the word “Wine”must appear somewhere on the label. This is something I insist on.

Second, I look for a sign nearby that says “On Sale.” Follow these two rules and you won’t go far wrong.

 
Posted by jservice at 09:59 PM
March 20, 2003
Speaking French

Print | Home

“I’m learning to speak French by calling my bank and pressing the #2 button.''
—adapted from Paul Alexander
 
Posted by jservice at 09:02 PM
March 19, 2003
TeXLike Moveable Type text_formatter Plugin

Print | Home

jrrs::TeXlike version 1.12. Documentation last updated Tue Sep 29 15:57:23 2009.

The latest version of Moveable Type supports plugins for blog entry formatting. I tried textile; however it wasn’t quite what I wanted but a step in the right direction. Using my favourite editor, which highlights matching {} easily I decided to created a plugin where the html tags resemble TEX macros — only they aren’t really macros. They just exchange the work of typing the second tag by adding a \ and two brace brackets. The regular expressions are pretty simple: they just go through the text and change the \tag{something} into <tag>something</tag>. What follows is a table of some of the patterns and their replacements. Of course this entire note itself was formatted via my TeXlike.pm plugin.

TEX-Like Patterns
PatternResult
\strong{strong content} or strong{strong content}

See note.

strong content or strong content
\div[commentary]{Using the commentary style...} p[align="right"]{This paragraph is right aligned.}
Using the commentary style…

This paragraph is right aligned.

\href[http://www.moveabletype.org]{Moveable Type Link} Moveable Type Link
\div[inner_table] { \table{ \tr{\th[colspan="3"] {A sample table}} \tr{\td{row 1, cell 1} \td{row 1, cell 2} \td{row 1, cell 3}} tr{td{row 2, cell 1} td{row 2, cell 2} td{row 2, cell 3}} \tr{\td{row 3, cell 1} \td{row 3, cell 2} \td{row 3, cell 3}} } }

Note: the leading \ is not required if the “word”proceeding the { is an html tag and it is on a “word boundary'', i.e., it follows whitespace or punctuation (Perl regular expression `\b').

A sample table
row 1, cell 1 row 1, cell 2 row 1, cell 3
row 2, cell 1 row 2, cell 2 row 2, cell 3
row 3, cell 1 row 3, cell 2 row 3, cell 3
\ol{ \li{Item one} \li{Item two} }
  1. Item one
  2. Item two
Include perl code <PerlCode>scalar localtime</PerlCode> or get this if your perl code is wrong: <PerlCode>scalar localtime(</PerlCode> Include perl code Tue Sep 29 15:57:23 2009 or get this if your perl code is wrong: syntax error at (eval 20) line 2, at EOF
\'a \"o \'e \c{c} \^u \~n {\ss}á ö é ç û ñ ß
"This is double quoted". HTML tags are saved then double quotes are alternately set to ``and.'' Using the latter doubled single quotes will only work before a word and before whitespace respectively. Single quotes are somewhat similar: \`like this\' however if you use a single quote before a vowel the module will change it to an accented character so you n\`{}e\'{}ed to do this instead. Other typographic symbols include: ... -- --- \& \< \{\}\[\] “This is double quoted”. HTML tags are saved then double quotes are alternately set to “and.” Using the latter doubled single quotes will only work before a word and before whitespace respectively. Single quotes are somewhat similar: ‘like this’ however if you use a single quote before a vowel the module will change it to an accented character so you n‘e’ed to do this instead. Other typographic symbols include: … – — & < {}[]
\backslash \copyright \cent \registered \trademark\ © ¢ ® ™
10\degreesC -30\Fdegrees 273\degreesK 360 \degree10°C -30F° 273°K 360 °
\plusorminus 2x3 (times) 2\x3 (ecks) 2/3 2\/3 {1/2}, {1/4}, {3/4}± 2×3 (times) 2x3 (ecks) 2÷3 2/3 ½, ¼, ¾
TIACA{This Is A Cool Acronym}TIACA
Line one\\ Line twoLine one
Line two
 
Posted by jservice at 10:30 PM
I'm Saying No to Teeth Whitening

Print | Home

whiter-teeth.jpg

I was reading a flyer the other day issued by a local dentist seeking new patients. One paragraph described the “teeth whitening”process. The kicker was the recommendation to avoid smoking and the drinking of coffee, tea and red wine after the process. Hold on there! I don’t smoke so that isn’t a problem. But now you’re talking about three of my favourite beverages — especially red wine. I have a batch to fill 30 more bottles ready next month! Actually I never thought my slightly off-white teeth were a problem, especially since all those ugly amalgam fillings have been replaced with off-white ones. Not going give up red wine, coffee or tea so I’m not getting my teeth “whitened”either.

 
Posted by jservice at 01:32 PM
March 17, 2003
Bits o' Good News Today

Print | Home

  • It started off when, ah, I took a later train this morning even though I got up at the regular time.
  • My sister dropped by my office. She's back at Kinectrics doing some contract work for a few days. Not only is she meeting her old friends here but the commute is half an hour less. Anyone could use an extra bit of shut-eye or hanging around with the kids, time.
  • The temperature peaked at 17°C during lunch time. Too bad I hadn't brought a pair of shorts with me. I did walk to the local Canadian and bought one of those 12V air compressors on sale for $10: the last time I went to the local gas station the air pump was broken.
  • My younger son got his first conditional university acceptance from Lakehead in Thunder Bay — about as far away from home as he could get, yet still be in Ontario. Apparently he was so elated he hugged and kissed his mom — very unusual for this boy. He has until June 16 to accept and it's conditional on keeping his average above 70.
  • My wife found out from her colleague, whom she job-shares with, that the principal of the school expects to keep the same arrangement for the next school year.
  • Well, not every thing was good this St. Patricks Day:
    - All foreigners including UN staff and arms inspectors are scrambling to leave Iraq.
    - President Bush gives Saddam and his family 48 hours to leave or “face the consequences”.
    - I rolled up the rim but didn't win.
 
Posted by jservice at 10:31 PM
March 16, 2003
Woo Hoo! The Big Melt is Here!

Print | Home

melting-snow.jpg

Finally the temperature got up past 10°C and the snow is melting away. I went for a run this afternoon in shorts and my long sleeve running top — it felt great. However I can't give a forest path report as I figured it would be far too slushy, puddly and muddy. The local streams are now raging-river wannabees. A strange time of year, though, in the sun it is warm but running down through a hollow I felt the snow and shade keeping the air a good 5 C° cooler. I sure am looking forward to the day when I can run my regular grassy route, and find out whether I do run faster than in the fall or just think I do. Of course I had to barbeque something for supper tonight.

  • I've entered 168 items towards my wife's private teaching expense - income data for her 2002 return; still quite a few more receipts to go.
  • The scanner operation is much improved under Windows 2000. Here I thought it was a scanner problem when something would hang every so often. Blame Windows Me again: good riddance.
  • Windows 2000 has an ntp client in the W32Time service though it needs a registry tweak to get it going. I used to use a separate application in the Startup directory.
  • I have secured the DNS on my firewall but it complained about my win2k box trying to update records. Finally I tracked down a checkbox that was checked and shouldn't have been nested way down in the Advanced TCP/IP settings. I much prefer the Unix way with plain old text configuration files.
 
Posted by jservice at 08:44 PM
Added cache to WWW Data

Print | Home

Current HOEP $28.96 per MWh ⇓20.43

In an effort to put off the receipt logging I need to do before I fill in the tax returns I added some caching to my WWW data script. Now there are arrows, ⇑ and ⇓, and a number to indicate the change from last hour to this one. Now I must really get back to the tax return data.

 
Posted by jservice at 09:49 AM
March 15, 2003
Men Know

Print | Home

  • that Mother Nature's best aphrodisiac is still a naked woman.
  • that from time to time, it is absolutely necessary to adjust oneself.
  • that a woman will wear a low-cut dress and expect the man to stare at her cleavage.
  • that the woman will get ticked off when they do, for reasons not totally clear to them.
  • that men are from here, and women are from way the hell over there


… extracted from the t h e . m o u t h p i e c e

 
Posted by jservice at 09:57 AM
March 14, 2003
Changes to the Main Page

Print | Home

I have made a couple changes to the site 1) a navigation bar to the archives and 2) a little table of data in the sidebar. This WWW Data table shows values extracted from the data of a couple of web sites whose data, in turn, change hourly. I also added a refresh meta tag so that the web page in your browser may automatically update, too.

  • Ontario Demand is the average amount of electricity being used by Ontarians for the past hour.
  • HOEP is the average price of “bulk” electricity in Ontario for the past hour. At the moment homeowners and small business have their “bulk” rate capped at 4.3¢ or $43/MWhr. It has been reported that this has cost the taxpayer over $1 billion so far since the rates were capped.
  • Temperature current temperature in Toronto. I work in Toronto but live in Mississauga the next city to the west on the northwest side of Lake Ontario.
  • Wind speed and direction
  • Windchill Environment Canada provides a calculated value if there is wind.
  • Sun rise/set, Daylight hours EC provides the first values and I calculate the second.
  • Forecast I also extract the near-term forecast
  • Datetime, Observed time are extracted from their respective web data. The last updated time is when the table itself was generated.

I run a perl script from cron that generates this table in an html file. Whenever hubbo is accessed this file gets automagically included. The script doesn't use anything fancy except for a hash of hash of hashes (HOHOH) to express what web sites I want to access and what bits of data I would like to extract. Then, a generic loop does the extraction and output by processing this HOHOH. Of course you need an editor which does syntax highlighting of perl code and highlights matching braces, brackets and parentheses. I use emacs for the job. Now that the mechanism is in place, I'll have to look at other changing data nuggets on the web. Here's what the HOHOH looks like that generates the WWW data table:

my %url
  = (weather => 
     {url => 
      'http://weatheroffice.ec.gc.ca/forecast/city_e.html?yyz',
      title => "YYZ (Toronto) Weather",
      # Hash of 'what' values and what was parsed from the web content.
      result => {},
      # Each rendered item is put here.
      output => [],
      # Order of items to be output. If it's not listed it isn't printed.
      order => [qw(datetime temp wind windchill sun_rise_set forecast)],
      data =>
      # Items to parse from web content.
      {temp => 
       { 
        # Regular expression to find some values in the web content.
        re => 'Temp.:.*?(-?\d+)(&deg;C)',
        # List of what will be assigned from parentheses in regular
        # expression. These values should be unique for this url as they
        # will be put in the {result} hash.
        what => ['temp', 'units'],
        # Anonymous sub that returns two strings, a label and a value string
        # which renders the 'what' values.
        render => sub ($) 
        {
          # The value of $url{url_key}{result} is passed to the sub.
          my $ref = shift ;
          ("Temperature", join_or_undef($ref->{temp}, "", 
                                        $ref->{temp}, $ref->{units})) ; 
        },
       },
       windchill => { re => 'WindChill.*?(-?\d+)\s*\<',
                      what => ['windchill'],
                      render => sub ($) 
                      {
                        my $ref = shift ;
                        ($ref->{windchill} ? "Wind chill" : '',
                         join_or_undef($ref->{windchill}, "",
                                       $ref->{windchill}, 
                                       $ref->{units})) ;
                      },
                    },
       datetime => { re => 
                     'Observed on: (\d+)\s+(\w+)\.?\s+(\d+)\s+at\s+(\d+:\d+)',
                     what => ['day', 'month', 'year', 'time'],
                     render => sub ($)
                     {
                       my $ref = shift ;
                       ("Observed time",
                        join_or_undef($ref->{month}, "",
                                      scalar(localtime(str2time(join(" ", 
                                                                     $ref->{month},
                                                                     $ref->{day},
                                                                     $ref->{time},
                                                                     $ref->{year},
                                                                     "GMT")))))) ;
                     },
                   },
       forecast => { re =>
                     'To(day|night) ..<.*?</strong>\s*([^<]+)',
                     what => [qw(ignore forecast)],
                     render => sub ($)
                     {
                       my $ref = shift ;
                       ("Forecast", 
                        join_or_undef($ref->{forecast}, "", 
                                      $ref->{forecast})) ;
                     },
                   },
       sun_rise_set => { re =>
                         'Sunrise:.*?<strong>(\d+):(\d+).*Sunset:.*?<strong>(\d+):(\d+)',
                         what => ['risehr', 'risemin', 'sethr', 'setmin'],
                         render => sub ($)
                         {
                           my $ref = shift ;
                           my ($hr, $min) = ($ref->{sethr}, $ref->{setmin}) ;
                           # Calculate amount of daylight.
                           if ($ref->{setmin} < $ref->{risemin}) {
                             # Borrow from hours value.
                             $min += 60 ;
                             $hr-- ;
                           }
                           $hr -= $ref->{risehr} ;
                           $min -= $ref->{risemin} ;
                           ("Sun rise/set",
                            join_or_undef($ref->{risehr}, "",
                                          $ref->{risehr},
                                          ":", $ref->{risemin},
                                          " - ", $ref->{sethr}, 
                                          ":", $ref->{setmin}),
                            "Daylight hours", 
                            join_or_undef($hr, "", sprintf('%d:%02d',
                                          $hr, $min))) ;
                         },
                       },
       wind => { re =>
                 'Wind:.*<strong>([^<]+)<br>([^<]+)',
                 what => [qw(wind_dir wind_units)],
                 render => sub ($)
                 {
                   my $ref = shift ;
                   ("Wind", join_or_undef($ref->{wind_dir}, " ",
                                          $ref->{wind_dir}, 
                                          $ref->{wind_units})) ;
                 },
               },
      },
     },
     imo =>
     {url => 'http://www.iemo.com/imoweb/marketdata/marketToday.asp',
      title => "Ontario Electricity Market",
      result => {},
      output => [],
      order => [qw(datetime demand hourly_price)],
      data => 
      { demand =>
        {
         re => 'Current Market Demand: .*\>\s*([,\d]+)&nbsp;MW',
         what => ['demand'],
         render => sub ($)
         {
           my $ref = shift ;
           ("Ontario demand", join_or_undef($ref->{demand}, " ", 
                                            $ref->{demand}, "MW")) ;
         },
        },
        hourly_price =>
        {
         re => 'Current Hourly Price \(HOEP\): .*?(\$\d+\.\d+)&nbsp;/(\w+)',
         what => [qw(hourly_price perEunit)],
         render => sub ($)
         {
           my $ref = shift ;
           (qq(Current <acronym title="hourly Ontario energy price">HOEP</acronym>), 
            join_or_undef($ref->{hourly_price}, "", $ref->{hourly_price},
                         " per ", $ref->{perEunit})) ;
         },
        },
        datetime =>
        {
         re => 'at&nbsp;(\d+:\d+)\s*(\w\.\w\.)&nbsp;(\w+)&nbsp;(\w+)&nbsp;(\d+)',
         what => [qw(time a_or_pm tz month day)],
         render => sub ($)
         {
           my $ref = shift ;
           ("Datetime", join_or_undef($ref->{month}, " ", 
                                      $ref->{month}, $ref->{day}, 
                                      $ref->{time}, $ref->{a_or_pm}, 
                                      $ref->{tz})) ;
         },
        },
      },
     },
    ) ;

 
Posted by jservice at 09:55 PM
March 13, 2003
My Wife's Back and Testing Data

Print | Home

My wife is back from her March break vacation at her friend's cottage. Her friend says in all the years she's been winter vacationing there she doesn't remember Lake Huron being completely frozen over.

I'm setting up a new side panel called Data. I'm testing a script which will download the Toronto weather and the current Ontario Electricity market demand and price and create a little html table. Using Apache server side includes, I intend to have this table included whenever you hit this site. It shouldn't slow page loading all that much because it will be a static file updated independently of the blog itself.

 
Posted by jservice at 10:26 PM
March 12, 2003
BAS, OCS, QT2002

Print | Home

Yesterday Robert Fisher interviewed Dr. Lee Willingham yesterday evening on Here and Now on the benefits of singing. Such interviews are short but at least our choir, the Bell'Arte Singers, got a little publicity. Robert mentionned he was associated with the choir, in fact he's a board member!

The Oakville Choral Society had their usual Tuesday night practice. Now that the BAS concert is over with I've had a chance to go over some of the show tunes, especially some of the ones we have to memorize (get's more and more onerous the older I get it seems). The major problem with show tune medleys and arrangements is that the melody bounces around between the voice parts and, without the music in front of you, it's not always obvious when you are or are not supposed be singing the melody. The director said he has been having a careful look at the music and basically said the same thing: if your neighbour (in the same part) is singing different notes it's likely you're wrong because you are singing the melody instead of harmony. It isn't easy to “lift the notes from the page” of show tune arrangements while concentrating on pitch, harmonies, dynamics, rhythms, etc.

In my ongoing Windows Me → 2000 upgrade I found QuickTax 2002 didn't work: it said I had to purchase another authorization key. There must be an OS version signature in there somewhere. I uninstalled it and then re-installed the download. Then I sat on hold for about 30 minutes, explained the problem and obtained a new “activation key”. Guess I'll have to do our taxes now; though, there's a big incentive do so and get that refund. And I do like that Windows 2000: every time I ask for a “Shutdown” it does. In the Windows Me incarnation it rarely did.

 
Posted by jservice at 09:44 PM
March 10, 2003
A Dog in the Family

Print | Home

cricket-the-dog.jpgOn Sunday we visited my older son and his girlfriend to see their golden retriever pup, Cricket. Very cute! Right now she's not much bigger than the two cats but that will change. Just like a baby, she slept most of the time while we visited — this too will change. During her sleep she dreamed, wiggling and yipping a bit. We were wondering just what a little puppy dreams about: her world has been the kennel, my son's second story apartment and she's only just been outside to do her business a few times since my son and daughter-in-law got her. My son is looking forward to the disappearence of the snow so he can take Cricket for walks on the trails near Sixteen Mile Creek which flows through the middle of the farm property.

 
Posted by jservice at 03:18 PM
Upgrade to Win2k

Print | Home

I stayed up a little past my bedtime last night upgrading our “primary” (i.e. fastest) computer from Windows Me™ to Windows 2000™. I figured since my wife is away at her girlfriend's cottage for a few days for the March break holiday this would be as good a time as any. That way any problems would only inconvenience me. The upgrade wasn't quite as routine as our older PC as the video driver, ethernet driver and scanner are all newer than the win2k install disk I had. Before I installed the video driver software it harkened back to the days of Windows 3.1 and VGA mode. And, of course, I had no networking until the ethernet driver was installed. Now its just a matter of some settings' tweaking (e.g. moving Mozilla stuff from /Windows/Profiles/ … to /Documents and Settings/ …) and re-installing some software (e.g. AVG Anti-Virus).

 
Posted by jservice at 08:52 AM
March 08, 2003
What is the correct date?

Print | Home

calendar-popup.jpg

My client wanted a popup calendar instead of typing a date on the command line so I obliged and put a thin wrapper around the MFC “Month Control”. Basically the user selected a date, pressed OK and the little dialog printed a date to stdout . This worked fine on Windows NT™, the OS my client and I use. However, my esteemed project leader tried it on his laptop, using Windows 2000™ and found it gave incorrect dates usually several years in the future. I built the little application at home on my Windows Me™ box and found that it, too, was giving the wrong date. Fortunately I have the MFC sources and the windows SDK installed on my home box so I did a little sleuthing. It turns out that Microsoft's implementation of mktime? doesn't care what you put in the hours, minutes or seconds fields. It converts the lot to a number of seconds and does the same for the year, month and day. So, if a large number gets passed in the hours field then the time value will be rather far off than the date selected. In fact the month control returns a SYSTEMTIME struct each of whose fields (year, month, day, hours, minutes, seconds) is a WORD or two byte (presumably unsigned) integer. So, if the hour value was the largest it could be, i.e. 65536, this is roughly 7½ years! My guess is that Windows NT zeros out the hour, minute and second values; whereas, Windows 2000 and Windows Me do not and random junk values are returned instead. My work around was to use only the year, month and day values returned from the month control. Why didn't I do this in the first place? Well the Visual C++ IDE suggested I could use a CTime variable for the control's return value. And how does this control initialize this value? It uses all the fields of SYSTEMTIME and passes them to mktime to initialize the CTime variable. Now I explicitly pass just the year, month and day from the SYSTEMTIME result and zeros for the hour, minute and second values. Ain't programming fun!

 
Posted by jservice at 10:34 PM
March 07, 2003
Singing is Good for You

Print | Home

choir-toon.jpg

This article in the National Post describes health benefits attributed to (choral) singing. I added choral because I believe being part of that community provides a lot of the benefit. I have performed solo recitals and been part of opera companies but neither of these singing gigs were as enjoyable as being a member of a choir. Though I have moved but a few times in my life, I have never been out a choir for more than a few months — and have been doing so at least since age 10. As for personal health benefits? Well I'm not crazy nor over-stressed and still very much alive. I might also point there's at least two octogenarians and probably a dozen septuagenarians in the community choir.

The only activity I have found as therapeutic as choral singing over the years was a beginner cabinetry course I took many years ago at a high school taught by an older man who'd been “guild”-trained in Europe. I learned to cut dovetails by hand. Just as in making a joyful sound, you forget your worldly troubles for a while and do some right-brain exercise in a far too left-brain centric society.

 
Posted by jservice at 10:22 PM
March 06, 2003
A Homeowner's Life

Print | Home

toilet.jpg
Some evenings you just want to relax and, well, update your blog perhaps. Last night I first had to shovel out the driveway and move the tonnes of snow plow ridge across the front of of the driveway to the other side of the street. I was tired already having run home either on the road way or on the unplowed sidewalks. So, I finished the shovelling and I was pooped. Not pooped enough apparently — there was a clogged toilet to be unplugged and too much toilet paper wasn't the problem. I could swear all I want as I was plunging the plunger but saying shit just doesn't seem to have same impact when you are working over a pool of it. Eventually I was flushed with success. Usually these clogs aren't so stubborn. After that I just went to bed.

 
Posted by jservice at 09:12 PM
March 05, 2003
Snow is Falling ... Again

Print | Home

Before departing this morning I shovelled snow yet again off the walks and half the double driveway. My son can do (or just drive over) the other half. As it turned out I didn't miss my usual GO train this morning because it had been delayed by half an hour due to a freight train blocking the line further up. I can look forward to more snow shovelling tonight as the white precipitation is continuing. I'm certainly glad this snowfall didn't start until just as I was leaving the community choir practice last night. We haven't had any really big snow falls this winter but, because of the cold, any snow we do get justs stays around. Now, the driveway piles are getting to the six foot mark which it makes it tougher for subsequent shovellings.

 
Posted by jservice at 12:54 PM
March 02, 2003
Brahms Concert Report

Print | Home

Update: 2004-11-13

At the request of the webmaster-person I have revised the link to St. Anne's church. That person would rather you go to the home page and poke around until you found the Location.html page yourself.

Saturday, March 1, 2003

Brahms Ein Deutsches Requiem

Bell'Arte Singers and chamber orchestra

8 p.m., St. Anne's Anglican Church, Toronto, ON home page

Concert Though we were perhaps a little “under rehearsed” the choir managed to pull off an excellent performance of the Brahms works: Ein Deustches Requiem, Gesang der Parzen, Schicksalslied, and Nänie. My mom and my in-laws enjoyed it though they found the hard pews bothered them after a couple of hours of sitting. Members of the Talisker Players, who provided the lush Brahms' orchestrations required, complimented the choir on a fine performance, too. There weren't as many in the audience as I thought there could have been but I understand the choir board is working diligently on publicity. Unfortunately many of us had numb feet and stiff legs after standing for two hours, especially the men who stood on a row of narrow plywood boxes about as wide as a size 12 shoe is long. With no major solo-only or long orchestral interludes we had to stand for the entire concert. (It's my blog and I'll cry if I want to. :-)

Soloists Laura, a choir member and soprano soloist, sang her solo part well in the performance of the 5th movement, Ihr habt nun Traurigkeit. I'm sure the baby, to be born in a few months, will know this piece well. I wasn't very fond of the baritone soloist so I won't name him. In high school German dictation I would have lost lots of marks if just I wrote down what he was singing. It seemed to me his timing wasn't always that precise but our ever agile music director kept the orchestra in sync. Perhaps I have been spoiled by my familiarity with Dietrich Fischer-Dieskau's performance of the Requiem.

 
Posted by jservice at 12:34 PM
March 01, 2003
Resting Nicely

Print | Home

Since we have the concert tonight I decided not to do the full workout today — I would survive the night but my mind might wander. A wandering mind keeps one from focussing on timing, dynamics, pitch, watching the conductor: all critical parts of a chorister's attention. Our second dress rehearsal went well but I'll reserve my comments for tomorrow, post-concert.

In other news I put the yeast in for a barolo style Italian wine at the local wine maker's store, Mosto Vinho yesterday afternoon. It will be ready in 6 weeks — just in time for tasting at the Easter dinner family gathering a week later.

 
Posted by jservice at 04:07 PM