Friday, March 20, 2009

World Sleep Day 2009

World Sleep Day is an international annual event, intended to be a celebration of sleep and a call to action on important issues related to sleep, including medicine, education, social aspects and driving. It aims to lessen the burden of sleep problems on society through better prevention and management of sleep disorders. World Sleep Day 2009 is being held on March 20th, under the slogan ‘Drive alert, arrive safe’. This year’s theme is transportation, focussing on safety, travel and driving alertness.

The first World Sleep Day was launched on March 14th 2008. Events involving local groups took place in public settings around the world and online with the unveiling of a declaration, presentation of educational materials, and exhibition of videos.

The World Sleep Day declaration is as follows:

  • Whereas, sleepiness and sleeplessness constitute a global epidemic that threatens health and quality of life,

  • Whereas, much can be done to prevent and treat sleepiness and sleeplessness,

  • Whereas, professional and public awareness are the firsts steps to action,

  • We hereby DECLARE that the disorders of sleep are preventable and treatable medical conditions in every country of the world.

The World Sleep Day Committee would like you to assist in raising awareness of World Sleep Day 2009 by carrying out related activities in your country. World Sleep Day Committee members:
Antonio Culebras, co-chair
Liborio Parrino, co-chair
Richard Allen,
Sudhansu Chokroverty,
Christian Guilleminault,
Mario Terzano,
Robert Thomas,
Claudia Trenkwalder,
Allan O’Bryan, WASM Executive Director.


Thursday, March 5, 2009

How to validate integer in c#

In C#, we often need to validate that the value is an int. So most developers use try catch block as below.
int t = Convert.ToInt32("wrongval");

while the best approach to test must be:

int num = 0;
Int32.TryParse("wrongval", out num); //It will not throw any exception, In case of failure, it set the value of num to zero and also return FALSE.

if you see the performance of above two methods, you will be amazed that the TryParse method is 1000 times faster than Convert.ToInt32.