Saturday, January 21, 2006
by Nik Kalyani
Saturday, January 21, 2006 12:54:51 PM (Pacific Standard Time, UTC-08:00)

Frequently, you will have a situation where you store the string representation of an enumerated value in a file or database, and when it is retrieved you have to re-assign it to a variable that is of the enumerated type. You can do this as follows:

public enum MyEnumeratedType
{
     Foo = 0, Bar = 1
}

MyEnumeratedType enumVariable = (MyEnumeratedType) Enum.Parse(typeof(MyEnumeratedType), “Bar”, true);

With all due respect to Anders, this is NUTS!!! I wish there was a simpler way…

#    Comments [0] - Trackback    

by Nik Kalyani
Saturday, January 21, 2006 12:38:25 PM (Pacific Standard Time, UTC-08:00)

The DotNetNuke Newsletter goes out to over 150,000 email addresses each month. For any given edition, we get a few thousand “out of office” responses, a few hundred spam traps and a few “unknown addresses.” (The last category is small because we pro-actively eliminate bad addresses before sending out the newsletter.)

Now, about those “out of office” responses. Most of them are pretty standard — I’m out from X date to Y date and call Debbie or Stephen or Bob at this number. I don’t sit and read all of these, but I will occasionally click on a few.

It’s fun to see these written in different languages —

– Ich bin vom 21. Dezember 2005 bis 2. Januar 2006  nicht im Büro.
– Grazie per il vostro messaggio. Sarò fuori ufficio per ferie fino al 1 Gennaio 2006 incluso e non avrò accesso alla posta.
– Onze kantoren zijn gesloten van 24 december tot 1 januari. U kan ons terug bereiken op maandag 2 januari.
– Je serai absent(e) du  12-23-2005 au 01-03-2006. Je répondrai à votre message dès mon retour le 3 janvier 2006.
– Tack för ditt mail. Jag är åter på kontoret 2005-12-27 och läser ditt mail då.

Most of the time the reason given is “vacation,” but there’s always people sharing just a wee bit more information. Here are a few or the more interesting reasons:

– I’m going to be a new dad. (congrats!)
– I have been fired. (oops)
– I will be going for therapy. (wonder what it was for and how it turned out)
– I will be sun-bathing on a cruise ship. (hope you had a good time)
– I have a sudden and severe back problem. (hope it’s better now)
– I am handling a crisis in the Middle East. (hmmmm…)  
– I am getting married. (congrats!)
– I am absent due to commitments in the Swiss Military. (ah..good old conscription)
– Our company is going out of business. (wonder why the mail server is still up?)

#    Comments [0] - Trackback    

by Nik Kalyani
Saturday, January 21, 2006 11:48:48 AM (Pacific Standard Time, UTC-08:00)

Multi-column CSS layouts are always challenging thanks to the many browser quirks and variations in adherence to standards. Most designers who venture into this territory inevitably spend hours if not days trying to get an element to position just right. I have done the same and when time is short (when is it not?), I usually fall back on good old tables.

Today I discovered the CSS Source Ordered Variable Border 1-3 Columned Page Maker. I have been playing with it for only a few minutes and found it to be an impressive piece of work. It makes creating multi-column CSS layouts a breeze. Check it out.

#    Comments [0] - Trackback    

 Sunday, January 15, 2006
by Nik Kalyani
Sunday, January 15, 2006 9:08:03 PM (Pacific Standard Time, UTC-08:00)

Discovered something quite by accident today. If you use an embedded file in a VS.Net project and have the filename in the format [basename].[locale].[extension] (example: MyInfo.en-US.xml), VS.Net automatically presumes that this is a culture-specific resource, puts it in a separate assembly and drops it into a subfolder of the main “bin” folder. The subfolder has the same name as the locale.

I am not sure if there’s an easy way around it, but for now, I simply removed the locale from the filename and it works as expected.

 

 Friday, December 30, 2005
by Nik Kalyani
Friday, December 30, 2005 8:28:59 PM (Pacific Standard Time, UTC-08:00)

What a difference 1Gb makes! I finally got around to upgrading the memory on my notebook to 2Gb and things sure are faster. Now I can finally start using virtual machines to do more of my testing.

#    Comments [0] - Trackback    

RSS feed
Search and Links
Bling

View Nik Kalyani's profile on LinkedIn

Contact me: nik*kalyani.com (replace "*")

TechBubble
www.flickr.com
This is a Flickr badge showing public photos from techbubble. Make your own badge here.
Statistics
Total Posts: 213
This Year: 31
This Month: 8
This Week: 0
Comments: 235
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008
Nik Kalyani
Sign In
All Content © 2008, Nik Kalyani