Friday, June 27, 2008

3 weeks of training

After the A race, it's back to build 1. I borrowed a trainer with power display to see how I am doing power-wise.

The first week I did some test to see what type of power I can sustain.
The second week I did this pacing exercise. I was able to do 10-8-8-8-6-6-4 minutes with average power somewhere between 245 and 255.
The third week I did a 12km time trial test run at Iona. I still think I can pace myself better but the numbers are already way better: 19:32 for 12.4km out and back. Average speed 38.1kph. My previous runs in April and May were about 35kph.

This is the best training phase I have had all year. Let's see what the next 3 weeks can do.

Thursday, June 05, 2008

Westside Classic 2008

I am not too happy with my race and I am not too unhappy about the race as well. Going in I know it will be hard for me to follow the main pack up the hill. Someone said the first two laps will be hard and it was. At lap one there was a gap after the climb but I was able to bridge back with a bit of time to get ready for the second climb. By lap two I have lost sight of the main pack. We formed a group of six (and later seven) that rode together for most of the race - knowing that we can't bridge up. At the last climb there were seven of us - four from the same club. I tried to set the guys up by forcing the tempo and blew up half way up Camosun. Four guys left the pack - three of which are from my club. Yet still the coveted 42nd spot when to the lone enemy. I could have regrouped to try to sprint for 2 more positions but did not try hard enough doing so.

I felt stronger this year than last but unfortunately not strong enough to be in the big group. Looks like climbing up Camosun in the big chainring is a requirement for next year. From a numbers perspective I am about 10 places better than 2007 and time-wise I am about 10 minutes faster as well. I also have improved on my turns, especially the two turns entering and leaving SW Marine drive.

Here are some photos. And here is the official results page.

Wednesday, June 04, 2008

To shut down a computer in .Net

I was testing something and needed to shutdown a computer. Wanted to look for an example and couldn't found one anywhere. So here is what I have written:

ManagementClass MC = new ManagementClass("Win32_OperatingSystem");
ManagementObjectCollection ObjCol = MC.GetInstances();
//there is only one object in the Collection
foreach (ManagementObject MO in ObjCol)
  MO.Scope.Options.EnablePrivileges = true;
  MO.InvokeMethod("Shutdown", null);

Note that if you skip the EnablePrivileges line you will get a exception with the message:
Privilege not held

This assumes the identity of the process has the privilege to shutdown the computer under normal conditions.
Listed on BlogShares