Friday, December 24, 2004
Had lunch at Kevin and Elise's place, it was really nice. After lunch dad and Kev went out to try to fly dad's kite -- didn't work. It's a little strange to me that on December 24th there's almost no snow, and the weather is temperate enough to fly a kite.
We're going over to the Erin's folks place this afternoon to have our traditional "Twelve Days of Christmas" meal. Mom and dad, Melinda and Micheal, and Grandpa and Grandma Melchin will be joining us.
I've still got some gifts to wrap for Erin.
Wednesday, December 22, 2004
Saturday, December 18, 2004
Friday, December 17, 2004
Monday, December 13, 2004
Then it happend. She was still sitting on my lap, and out of the corner of my eye, I could see her slightly hunched over, and could feel that her body was stiff. Right away I knew she was throwing up. And I wasn't just a little bit -- it was lots! I could tell how much she had thrown up because I could feel it almost instantly all over my shirt and tie. I didn't look down to assess the damage, instead I looked over at Lara for a cloth, or at a napkin of some sort -- which she didn't have. I looked behind me at Kevin, with that look of desperation that says, "please find me a cloth...". He looked back at me as if to say, "uh, can you see Gracie is vomiting all over you?" Unfortunately he didn't have a cloth either.
So, without any cleaning device, I picked Gracie up (being very carefull not to spill the vomit which was now resting nicely in a pool that I had created with my suit coat), and walked her out of the chapel into the washroom to clean her up. A special thank you to Lara for following me.
After a brief clean up, I took off her dress and stockings and bundeled her little pantied bum up in her coat to take her home. I explained to Erin what had happened, and I wrongly assumed that Grace was done with the vomitting. It continued on and off all evening. We gave her two tablespoons of water every 15 mintues, and invariably it came back up. I called the Calgary Health Region Health Link number and spoke to a nurse. The nurse advised me to continue with our fluid regimen, and said that it wasn't necessary to bring her in to the hospital. Fortunaley at about 8:30 the vomiting stoped (save one last episode at about 1:30 AM -- which thankfully wasn't a very big deal). Unfortunately for Erin, her sickness was just begining.
At about 9:30 I called Jeff Shipley (our home teacher, who had co-incidently come over this morning to visit us) and asked him to assist me in giving Gracie a blessing. Gracie was very accomodating, even though she was in such pain. I explained to her what we were going to do, and she sat still, and was very quiet. After we administered to her, she said thank you to Jeff, which was the first thing she had said other than "my tummy hurts" all evening. I took that as her first sign of getting better.
Shortly after Jeff came over, we put Gracie to sleep. I slept in Gracie's bed, and made sure she got a little bit of water every few hours. Erin slept in her own bed and tried to keep down what little dinner she had eaten. So far today, Erin has been the worst.
It's now 2:30 (almost exactly 24 hours after Gracies first episode). I typing this entry and Gracie is once again sitting on my lap -- this time a much happier girl. Erin has just woken up from an hour nap, and she's starting to fell better too (sort of).
Thursday, December 09, 2004
The format of the meeting was nice and short -- they did a very good job of keeping it to one hour. At the end of the presentation they gave away some prizes, Karl didn't put his name on his entry form, and they drew his form (or at least they drew a form with no name -- which we're pretty sure was Karl's). Too bad.
Monday, November 29, 2004
Saturday, November 27, 2004
The Royal Oak ward held it's Christmas party last night -- I was very impressed. It was fun for the parents and the kids. It started out with a visit by Santa. Gracie went up and and sat on Santa's lap for a picture. Dinner was served shortly after, and for once the table I was sitting at was called relatively near to the top of the dinning list. We sat with Kevin and Elise, the Freibergs and the Haslams. After dinner I chatted with Kelly McTighe about his real estate website, and how well it works for him (yesterday I spent part of the morning with Rick helping him with a strategy for the Crawford Ranch website, so having some time with Kelly was quite informative). I quite like Kelly. If it works for him, I'll likely share what I'm doing for Rick with Kelly, maybe it works, maybe it doesn't.
There was a brief program after dinner. Jeff Scott was the emcee, and started the program by announcing that a "special visitor" had arrived to greet the kids one more time, and with that introduction CJ Burton came out dressed as a pilgrim (our ward Christmas party coincided with American Thanksgiving). It was worth a decent laugh. Bishop Jones played two Scottish numbers on his bagpipe -- yup bagpipe, then Laurel Lawlor and Rachel Ruggles sang a satirical version of the "Twelve Days of Christmas". CJ sang Elvis Prestley's "Blue Christmas" and a fun version of Jingle Bells (which all the kids sang along to). That was the end of the program - short and sweet.
After the program we had a dance, mostly kids dancing, but lots of adutls too. Oh, and the deserts were spectacular. Shortbread cookies, pastries, eclaires, Nanimo bars etc... lots of deserts and all very well done. The whole night was excellent.
I took a short break while writting this to take Gracie outside to play in the snow. She's definately an "outdoor girl". Hopefully she'll stay that way.
Thursday, November 25, 2004
On my way down the driveway, I thought to myself how slippery it likely was, and noted that I should be careful. While in the thougt -- I slipped and fell forward ontop of my left leg, and twisted my knee in a most unatural way. I heard/felt a poping sound, and I thought I may have broken my leg. My first thought after that was about possibly missing hockey.
After 15 minutes of icing, and a few Advil, my leg still really hurts. I'm going in to work, but I'll likey see the doctor sometime today.
Saturday, November 20, 2004
Future shop was crazy -- there must have been as many in Future Shop as there was in the rest of the mall combined. I was hoping to find a Bluetooth headset for my new phone. No luck on that either. I've taken a few pictures with my new phone -- I've traditionally been pretty indifferent about cell phone cameras, but I can see now that it won't take me too long to get hooked. I've really got to get working on my weblog application -- I've got so many digital photos to post. Maybe I'll work on a "mobile" section for my mobile pics.
We're going over to Derek and Julie Kearl's place tonight to play cards -- we haven't been over to thier place since they've moved.
The ant works hard in the withering heat all summer long, building his house and laying up supplies for the winter. The grasshopper thinks he's a fool and laughs and dances and plays the summer away.
Come winter, the ant is warm and well fed. The grasshopper has no food or shelter, so he dies out in the cold.
The ant works hard in the withering heat all summer long, building his house and laying up supplies for the winter. The grasshopper thinks he's a fool, and laughs and dances and plays the summer away. Come winter, the shivering grasshopper calls a press conference and demands to know why the ants should be allowed to be warm and well fed while others less fortunate are cold and starving.
The CBC shows up to provide pictures of the shivering grasshopper next to a video of the ant in his comfortable home with a table filled with food.
Canadians are stunned by the sharp contrast. How can this be, that in a country of such wealth, this poor grasshopper is allowed to suffer so?
The NDP and the CAW stage a demonstration in front of the ant's house, where the news stations film the group singing "We Shall overcome."
Svend Robinson rants in an interview with Pamela Wallin that the ant has got rich off the backs of grasshoppers, and calls for an immediate tax hike on the ant to make him pay his "fair share." Finally, the Liberal Government drafts the Economic Equity and Anti-Grasshopper Act, retroactive to the beginning of the summer. The ant, fined for failing to hire green bugs for help and, having nothing left to pay his retroactive taxes, his home is confiscated by the government.
The story ends as we see the grasshopper finishing up the last bits of the ant's food while the government house he is in, which just happens to be the ant's old house, crumbles around him because he doesn't maintain it. The ant has disappeared in the snow. The grasshopper is found dead in a drug related incident and the house, now abandoned, is taken over by a gang of spiders who terrorize the once peaceful neighborhood.
Thursday, November 18, 2004
Here are the configuration settings:
- Create a New Connection called "Rogers HTTP Connection"
- Add the connection settings
- Connects to: The Internet
- Access Point: internet.com
- Username: wapuser1
- Password: wap
- Primary DNS: 22.214.171.124
- Secondary DNS: 126.96.36.199
- Explicitly set the Internet connection to the name of the connection configured above.
- Specify the Internet connection the browser should use
- open Internet Explorer
- press the "menu" button and choose "options"
- choose "connections" from the list of available options
- make sure "Automatically detect settings is not checked
- set Select network to: The Internet
Monday, November 15, 2004
Erin had a great time in California. She was really sad to leave Keri all alone. Keri is having a hard time without Cade. Poor girl -- it's hard to be without your spouse. I can't imagine doing it for a whole month...twice.
Gracie participated in her first ever primary presentation. She was so cute. During the opening hymn, she and two other girls (Madelyn Low and Makena Kwasney) had to make an emergency trip to the washroom. It was so cute too see these three litte girls rush down off the rostorum. The whole congreation watched and chuckled.
Gracie's line was, "I can help by washing the dishes and playing train with my little brother", which line she delivered confidently and flawlessly. I was so pleased -- I even welled up a little bit.
Saturday, November 13, 2004
The Province of Alberta is named after Princess Louise Caroline Alberta, the fourth daughter of Queen Victoria and wife of the Marquis of Lorne, Canada’s Governor General from 1878-1883.
In 1881, the Governor General and Princess Louise visited Canada’s North-West Territories, which had been ceded to Canada by the Hudson’s Bay Company in 1870.
In 1882, the North-West Territories was divided into four districts: Assiniboia, Athabasca, Saskatchewan and Alberta.
The District of Alberta was named by the Marquis of Lorne. The inspiration for the name is found in a verse the Marquis dedicated to his wife.
"In token for the love which thou has Shown
For this wild land of freedom, I have Named
A Province vast, and for its beauty Famed,
By thy dear name to be hereafter Known.
Alberta shall it be!"
In 1905, the newly formed Canadian Province of Alberta formally assumed the name of the former District of Alberta.
Alberta’s world-famous Lake Louise, Alberta is also named after Princess Louise Caroline Alberta.
We're going to go to zoo later this afternoon. That should kill at least 3 hours.
I had lunch with Ryan Taylor yesterday. He's recently moved to Kelowna to pursue a job oppotunity. He's going through a bit of a tough time -- poor guy. I invited him to come to church with me on Sunday, he may very well come.
Last night I joined the Melchin clan for dinner at the Keg to celebrate Lara's birthday. We had a rousing dicussion about politics. I learned that Gerald Melchin ran for public office as a Social Credit candidate some years ago.
We also talked briefly about Rememberance Day and I mentioned that I had seen Saving Private Ryan when it aired on TV two nights ago.
What a tough movie. I've seen it three times now (one of which was in the theater). That night after having seen it in the theater I couldn't speak for several hours. We bought the movie when it was release to video (not with the intent of watching it again, but rather to support the film), and it sat unopened in the cabinet for a couple of years. We pulled it out one night last year and watched it again, Erin couldn't bear to watch it all the way through, so she went to bed ealry. I watched it the third time just the other night (Rememberance Day).
Each time I've viewed the movie, I've been particularly touched by the closing seen where Private Ryan, now an old man, has returned with his family to France. He kneels at the edge of one of the white crosses on what I'm sure was once a battle field, and tries to convince himself that he's lived worthy of the sacrifice that was made on his behalf. When his wife approaches, he holds her by the arm and pleads with her to confirm that he's been a good man, and that he's lead a good life. That scene really touches me -- I can't watch it without welling up. Each time I've found myself asking the same question, and feel ashamed for taking all the blessings of my life for granted.
Thursday, November 11, 2004
Today is also "day one" of Erin's trip to San Francisco. I droped her off at the airport earlier this evening (we waited an impossibly long time at the ticket counter), and then I went to pick up the kids for my first real taste of what Erin does all day. Erin was sad to leave the kids, Gracie cried for a couple of minutes -- Matthew was oblivious. I'm feelling a little hollow myself.
This morning I decided to write an email to one of the blogers I like to read. He's a fairly widely read blogger who works as an "evangelist" for Microsoft. His name is Robert Scoble. I decided to try my luck and see if I could get him to send me some Microsoft developer promotional material for me and the guys at the office. His writting style depicts him as a very personable, approchable fellow, so I wasn't surprised when he replied to my message within only a few hours.
Here's the entirety of our dialog...
From: Scott Wolff
Sent: Thursday, November 11,
2004 6:46 AM
To: Robert Scoble
Subject: "Nine Guys" in Canada
Mr. Scoble, I’m looking for some “Channel 9” motivation for my
development team? How can nine of us here in Canada, each get a hold of a
“Channel 9 Guy”?
Where should I send them?
Sweet eh? Looks like I'll be getting some promo material from Redmond. Nice!
Wednesday, November 10, 2004
People are generally pleasantly surprised that a government official would come out to meet them personally. They're pretty impressed to see him running from house to house, introducing himself. He's very friendly, and obviously well liked.
Erin leaves for San Fransisco to visit Keri tomorrow. She's got mixed feelings about leaving the kids. On one hand she hasn't had a single day away from the kids since Gracie was born almost four years ago; on the other, hand it's precicely because she hasn't been away that she's feeling a little hesistant to leave. I'm really glad for her that she'll have a chance to have some genuine, un-interrupted personal time.
Thank goodness that Lara, Cathy and mom are willing to help out a little bit on Friday and Monday.
Monday, November 08, 2004
As far as I can recall, there's only been two Wolff family reunions. I don't recall the first reunion at all (I was very young), and the second was held near Waterton in the late 1980's. I was just old enough to feel uncomfortable around the all of the extended cousins, and therefore didn't really feel, or try to be included.
I belive it was at that reunion that the Harvey and Isabella Wolff clan sang, "Swing Me In the Moonlight", and "Is Your Mother Home Molly Maloney". It was at this reunion that I recited "The Jaberwocky". It's odd to me that I would have done that. As I recall, I wasn't very excited to recite a poem that I percieved no one around me had any interest in. But for some reason, (which reason I still don't understand to this day), they thought people would enjoy it. I really don't know if they did or not -- but mom liked it.
It was at this reunion that a large group of the Wolff's (including Kev, dad and I) climbed Old Chief Mountain. Most of the hike up the mountain was un-remarkable. There was a section of shale that I recall was difficult to manage, but generally speaking ther was nothing noteworthy. Clearly the most vivid memory I have of climbing Old Chief was approaching the top. The last 20 minutes of the hike brings you up around the west side of the sheer rock face. Once you get to the plateau at the top, you're not quite done. The highest point of the mountain is about in the middle of the plateau.
Everyone in the group (save dad and I) walked along the ridge to the highest point on the mountain. Dad and I stayed on the west side of the mountian, fearing to walk over the narrow ridge (about 6-8 feet in diameter, less than 5 feet in some places) . Kevin in what has become his charateristic style, bounded carelessly over the ridge to the highest point of the mountain. Dad, likely as scared as he's ever been in his life, found a small perch two or three feet from the edge of the mountian, and prmptly fell asleep. I sat beside dad trying to convince myself that he wasn't going to fall to his death off the side of the mountain. Needless to say, the hike down the mountain was much more relaxing. It's odd -- even to this day I'm terribly afraid of heights while climbing a mountain (Old Chief, or any other), but at the same height -- pointed donw the mountain, I'm fine.
Sunday, November 07, 2004
Thursday, October 28, 2004
There was a full lunar eclipse last night -- Erin and I observed the last few minutes of it.
Monday, October 25, 2004
Judy Taylor and her mother (Cathy's sister) Joanne are in town for the next ten days. We all had dinner at the Melchin's last evening. I had been out home teaching, so I arrived a bit late. We had a rousing discussion about the upcoming U.S. election between George Bush and John Kerry. Most of the discussion was centered around the candidates position on the various issues. We had lots of talk on abortion, stem cell research, foreign policy relating to the war in Iraq. I quite enjoy having a couple of bona fide U.S. residents in town to debate the issues with. I have a tendancy to get pretty involved/passionate in these sorts of discussions - Judy whacked me once or twice.
On a somewhat related note, Ralph Klien called a provincial election today (set for November 22). Won't be much of a race, the Conservative party is pretty strong.
Saturday, October 23, 2004
Erin and I went to the ward Halloween party last night, held at Pat and Brian Morrison's place (they have a beautiful house). The party was well attended and a lot of fun. Erin and I went as Little Red Riding Hood and the Big Bad Wolfe. Sean and Lara went as vampires, complete with veneer fangs. CJ and Jessica Burton went as Yoda and Pricess Lea (CJ was painted green, had the pointy ears, bald head everything...). Sean Haslam came as a cheesy 70's police officer -- his moustace was brilliant. Kelly McTighe won the best male costume for coming as an LDS missionary. Richard Young performed a little magic show.
Thursday, October 21, 2004
I'm Working late tonight, there's got lot's going on at work. Today, the CEO of the Calgary Health Region announced that it would be authorizing 250 extended-stay surgical procedures to be performed at HRC. It's been a really big deal here at the office ... we've been waiting for this for the past seven years.
Most of the guys have been spending a considerable amount of time at HRC. Approximately 30 - 40 % of my time has been devoted to working at, or on HRC related projects. The first floor development is coming along nicely. We'll be getting ready to pull the voice and data wire in the next week or so (I've got Mike Gedlaman helping with that).
Erin is off tonight at the cannery doing some "dry-pack" -ing. Lara is watching the kids until I get home. Erin has done a good job as the Relief Society food storage specialist.
We had a terrible time getting Gracie to bed last night. She was so tired, but couldn't sleep. Erin turned on a wind-up music box to distract her, which eventually proved to be trouble. Each time the wind up toy ended, Gracie would wake up and cry out. She didn't fall asleep until I hooked up an MP3 player to some computer speakers and put some music on for her. Erin went and bought a small CD player for her; hopefull bedtime won't be so tough tonight.
Matthew on the other hand, reaches out for his crib when we put him to bed. He goes down gleefully. He's been really easy lately, mostly because he's started to communicate over the past few weeks. He has a vocabulary of about five or six words, and three or four hand gestures. Erin and I have been amazed at what a different child he's been since being able to communicate with us -- even in a small way. As it turns out, he's actually kind of loveable when he's not screaming.
Thursday, October 14, 2004
I've also written a custom user control for displaying data to the page. The control is called DisplayEntry.ascx and it has a single property of type Entry_DS (a dataset) named resultset. Resultset simply receives the entry result set as requested by the application and formats it. This is nice because it basically turns my whole blog application into about three pages: an admin page, a posting page and a display page. And it does all this without compromising flexibility.
I'm hoping to have version one the application working sometime next week -- but computer time is a rare, precious gift -- so I'm not sure when V1 will go up.
Sunday, October 10, 2004
After dinner Kevin and I chatted about computers, programing, "A Short History of Nearly Everyting" (a book I'm reading that Kev and dad have already read), and dad joined for the political discussion.
I made reference to the U.S. electoral college system, and remarked that Americans don't actually vote for the president, but rather that they vote for electors who elect the president. By this time Kevin was asleep on the couch (I suspect he wasn't actually asleep, but that he was disinterested enough in the conversation that mock-sleeping was a better alternative. Dad questioned me on the electoral college system, and I didn't have a strong enough knowelge of the convention/electoral college system to speak authoritatively on it -- but I was quite sure of the generalities.
Here's a quote from the U.S. Federal Election Commision's website:
"On the Tuesday following the first Monday of November in years divisible by
four, the people in each State cast their ballots for the party slate of
Electors representing their choice for president and vice president (although as
a matter of practice, general election ballots normally say "Electors for" each
set of candidates rather than list the individual Electors on each slate)."
Here's another, more clear explanation from infoplease.com:
"In the November election, the voters cast their votes for electors, not for
president. In some states, the ballots include only the names of the
presidential and vice-presidential candidates; in others, they include only
names of the electors...
"On the first Monday after the second Wednesday in December, the electors cast their votes in their respective state capitols. Constitutionally they may vote for someone other than the party candidate but usually they do not since they are pledged to one party and its candidate on the ballot...
"The votes of the electors, certified by the states, are sent to Congress, where the president of the Senate opens the certificates and has them counted in the presence of both houses on Jan. 6. The new president is inaugurated at noon on Jan. 20."
So there you have it. A little refresher on the American electoral college. By the way, the electors are chosen from state delegates at the parties national convention in the summer before the November election. And, though highly unlikely, it is technically possible, and more importantly it's legal for the electors to cast thier ballot for someone other than the candidate they're pledged to vote for. Now that's odd if you ask me.
I came across this coding guideliness whitepaper while trying to learn how to query a DataSet (more than just setting the rowFilter property equal to some expression). I never did find out how to query a DataSet.
Thursday, October 07, 2004
I hope I'm wrong. Frankly, I think Farenheit 9/11 is an exceedingly manipulative film, targeted to the little-educated, mid-western undecided American voter. I think many viewers of the film will not have thought critically about Moore's tactics, and the formulation and subsequent presentation of his argument. If you ask me he's really only got one arrow in his quiver: shock value -- on which he relied too heavily, and I think it got him into trouble (ie: he tried to make out as if he was uncovering a smoking gun almost every ten minutes in the film, hoping that viewers would be stunned by the revelation, and wouldn't think about it for themselves). He took a lot of short cuts-- connected some dots that can't be connected. Cheap.
Farenheith 9/11 begs a rebut; someone should produce something that holds Moore accountable for his assertions.
I could go on.. but it's late. I'm off to bed.
I'm also using this post as a test of the very cool C# code formatting tool written by Jean-Claude Manoli. The formatting tool and the C# project code can be found here. To view the code more easily, copy it out of the scrolling widget below, and paste it into VS.NET.
public ArrayList GetAllDecendantCategories(int category_ID)
//initialize the counter
int i = 0;
// read the datasource property from the app.config file
this.appSettingsReader = new AppSettingsReader();
string connectionString = (string)appSettingsReader.GetValue("datasource", typeof(string));
//create an ArrayList to hold the category_ID's
ArrayList ar = new ArrayList();
//add the parent category ID
//opent the connection to the database
SqlConnection Connection = new SqlConnection(connectionString);
while (i < class="rem">//database logic...
string commandtext = "SELECT category_ID FROM Category WHERE category_parent = " + ar[i];
SqlCommand command = new SqlCommand(commandtext, Connection);
SqlDataAdapter adapter = new SqlDataAdapter(command);
//create a datatable to hold the categories
DataTable dt = new DataTable("category");
//clear and fill the categories DataTable
catch (Exception ex)
string message = ex.Message;
//loop over the resultset and add the child elements to the ArrayList
foreach (DataRow dr in dt.Rows)
//make sure the parent element is not being added as a child element
if (Convert.ToInt32(ar[i]) != Convert.ToInt32(dr["category_ID"]))
//increment the counter
Note to self: whenever a very data centric problem presents, always consider the a set logic solution before a procedural solution.
Richard keeps drilling this into my head -- but today, magically, a small iota actually registered in my brain, and perhaps found a permanent resting place. Set logic is not the traditional way to solve data-centric application problems. "Most developers", as Rich would say, "will consider a procedural approach first." Our brain is accustomed to solving problems as a series of steps, not as chunks, or groups.
For instance, how would you count the number of people in a hospital bed at a give period of time. Most developers (myself included) would do some variation of the following: Find out what time it is, loop over the beds and determine if there is a patient there -- count it if there is a patient ther, don't count it if there isn't. This is a procedure, therfore procedural logic is used to solve the problem.
The alternative... is going to have to wait until tomorrow.
I'm tired (having worked until almost 1:00 AM developing a set logic solution to the hospital bed count probem.
Tuesday, October 05, 2004
I learned some pretty cool SQL stuff today -- I still don't completely understand it, but Richard showed me some very crazy joins. I'll post more when I understand it better. I also wrote a SQL user function that takes a coma separated list of values as a parameter to stored procedure and turns it into a table of integers that can be used as the IN condition of a WHERE clause -- more on this later too.
Monday, October 04, 2004
Over the lunch hour I found myself at Toys R Us staring a "Baby Chou Chou" right in the price tag. I succumed and bought it for Gracie (she's been desperate to play with Sommers Chou Chou doll for the last few weeks).
When I came home and gave her the doll, Gracie was ecstatic. I confess I was excited to bring it home to her too-- I knew she'd be surprised.
This evening before going to bed, on her own without any prompting from Erin, she came into my office and said "thank you for bringing me a baby Chou Chou", and gave me a hug and a kiss. I'm so pleased that she recognized that something nice was done for her, and I'm more pleased that she had the presence of mind (even as a three year-old) to give thanks.
I've used classic recursion (a funtion that calls itself until some condition is met) in the past to traverse up and down parent-child relationships. Recursion is especially nice when you don't know at the beginning how many decendants or progenators there will end up being at the end. The classic example is something like this: return all decendants of a given category where each category has x number of children (and x can be greater than or equal to zero).
I asked Karl about recursion in C# this morning, and he basically confirmed to me that it works the same way as I have been used to in ColdFusion, then with a smirk -- he offered an alternative. An alternative? There's an alternative to recursion? I was quite eager.
Here's how it works: a for loop is set up that loops over the contents of an ArrayList. Inside the loop you add to the ArrayList the child elements of the parent in the current iteration of the loop. If a child is found (and subsequently added to the ArrayList), then the ArrayList grows by x number of children elements. Now here's the rub:
In other words... if a child is found, this of course means the for loop will execute at least one more time, which itself returns the immediate children of the new parent (the current itteration of the loop)... et cetera, et cetera, until there are no children and the index of the for loop finally catches up with the count of the ArrayList, and the for loop exit condition is met.
The exit test on the for loop is always testing to see if the index is less than the count of the ArrayList.
As long as at least one child is found, the index will never be as great as the count of the ArrayList, and the loop continues. Beautifull!
So simple. So elegant. So.. je ne sais quoi!
Sunday, October 03, 2004
I used my first pratical application of a bona-fide software design pattern today however: The Singleton. From what I gather, it's likely to simplest to understand and implement -- so... uh, it's nothing fancy.
The Singleton design pattern is used to ensure that only one instance, a "single instance" is ever instantiated during the life of an application. It can (and from what I understand, should) be used in place of a class composed entirely of static methods. The Singleton ensures that a single instance of the class is instantiated the first time a method in that class is requested, and then the same instance is accessed many times during the life of the application.
Implementaion of the Singleton requires applying three basic concepts:
- a protected constructor;
- a private static variable of the class type;
- and a public static method (typically named "instance") that controls the instantiation of new classes
Here's how it works:
- To instantiate a new class, the application calls the instance method rather than the typical "new class()" syntax.
- The intance method checks the private variable for null (meaning the class hasn't already been instantiated).
- If the protected variable is null, then the intance method calls the protected constructor which instatiates the class and returns the instance;
- if the protected variable is not null (ie: an instance already exists), then the instance method simply returns the already instantiated class.
Voila! Only one instance of a Singleton class can ever exists. It's really quite simple and elegant -- which I guess is what makes it really cool.
Saturday, October 02, 2004
Friday, October 01, 2004
Both the dinner and movie turned out to be good -- I sat beside Kelly McTighe at dinner (he's quite a nice guy -- kept me laughing througout dinner). We had fun going out with Larry and Liana, we've really missed being thier next-door-neighbours.
The error was: "The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content and then restart the service. "
As it turned out, my user ID had changed, and I no longer had permission to run the report. The text of the SQLJunkies is as follows:
Did you change the account that the reporting services windows service runsunder? Or did that accounts password get reset?If you changed the account, you can fix this problem by:
- Change the account back to the original
- Run rskeymgmt -e to save the encryption key
- Change the account to the new one
- Run rskeymgmt -a to resave the key for the new user.
If the password was reset and you have not previously made a backup of the encryption key, there is no way to recover the data. You will need to runrskeymgmt -d to delete the encrypted content. Besure to restart IIS afterdoing that.
Thursday, September 30, 2004
If you want to access the value of a control, say a drop down list or multiple select box, that is embeded within a .NET Web User Control, here's what to do:
- build the user conrol (.ascx page) and add the webcontrol -- select box -- you're interested in to the user control;
- add two properties -- to get the selectedItem.value, and one to get the selectedItem.text
- add the newly created user control to a ASP.NET page;
- IMPORTANT: if you keep all your user controls in one directory within your web project, you must add that directory with the dot notation syntax ie: "using project_name.custom_control_directory;"
- initialize the user control in the code behind page (aspx.cs) of the page that consumes the user control. This step is not done for you by Visual Studio, the user control must be added manually ie: "protected custom_control_ID custom_control_variable";
- the user control properties are now available
Wednesday, September 29, 2004
I heard K.D.'s version of Neil Young's "Helpless" while driving the convertible from Cardston to Hillspring for this year's First of July celebration -- it may have been the open blue sky or the grain fields, or the wind blowing across my face, or all of them combined -- but I was hooked from the first stanza.
I think I've listened to the album at least a dozen times in the last two days...