Dec 6, 2007

World Countries Drop Down List Code

I am sure you might need to load world countries drop down list, if you are developing system.

Well, today I found that existing country drop down codes din't have value for each of list items.
First idea in my mind was, start adding codes line by line ... walao !!!

Until added for about 20 lines, I was frustrated and I am not going to do that for the rest of few hundreds line!!

Luckly, my brain still working... I found a easy logic to solve it.

Share with you all, may be you will need it one day. Because this piece of code is wanted & re-usable.


Private Sub LoadCountryDropdownList()

dropCountry.Items.Clear
dropCountry.Items.Add("Afghanistan")
dropCountry.Items.Add("Albania")
dropCountry.Items.Add("Algeria")
dropCountry.Items.Add("American Samoa")
dropCountry.Items.Add("Andorra")
dropCountry.Items.Add("Angola")
dropCountry.Items.Add("Anguilla")
dropCountry.Items.Add("Antarctica")
dropCountry.Items.Add("Antigua and Barbuda")
dropCountry.Items.Add("Argentina")
dropCountry.Items.Add("Armenia")
dropCountry.Items.Add("Aruba")
dropCountry.Items.Add("Australia")
dropCountry.Items.Add("Austria")
dropCountry.Items.Add("Azerbaijan")
dropCountry.Items.Add("Bahamas")
dropCountry.Items.Add("Bahrain")
dropCountry.Items.Add("Bangladesh")
dropCountry.Items.Add("Barbados")
dropCountry.Items.Add("Belarus")
dropCountry.Items.Add("Belgium")
dropCountry.Items.Add("Belize")
dropCountry.Items.Add("Benin")
dropCountry.Items.Add("Bermuda")
dropCountry.Items.Add("Bhutan")
dropCountry.Items.Add("Bolivia")
dropCountry.Items.Add("Bosnia and Herzegovina")
dropCountry.Items.Add("Botswana")
dropCountry.Items.Add("Bouvet Island")
dropCountry.Items.Add("Brazil")
dropCountry.Items.Add("British Indian Ocean Territory")
dropCountry.Items.Add("Brunei")
dropCountry.Items.Add("Bulgaria")
dropCountry.Items.Add("Burkina Faso")
dropCountry.Items.Add("Burundi")
dropCountry.Items.Add("Cambodia")
dropCountry.Items.Add("Cameroon")
dropCountry.Items.Add("Canada")
dropCountry.Items.Add("Cape Verde")
dropCountry.Items.Add("Cayman Islands")
dropCountry.Items.Add("Central African Republic")
dropCountry.Items.Add("Chad")
dropCountry.Items.Add("Chile")
dropCountry.Items.Add("China")
dropCountry.Items.Add("Christmas Island")
dropCountry.Items.Add("Cocos (Keeling) Islands")
dropCountry.Items.Add("Colombia")
dropCountry.Items.Add("Comoros")
dropCountry.Items.Add("Congo")
dropCountry.Items.Add("Cook Islands")
dropCountry.Items.Add("Costa Rica")
dropCountry.Items.Add("C魌e d'Ivoire")
dropCountry.Items.Add("Croatia (Hrvatska)")
dropCountry.Items.Add("Cuba")
dropCountry.Items.Add("Cyprus")
dropCountry.Items.Add("Czech Republic")
dropCountry.Items.Add("Congo (DRC)")
dropCountry.Items.Add("Denmark")
dropCountry.Items.Add("Djibouti")
dropCountry.Items.Add("Dominica")
dropCountry.Items.Add("Dominican Republic")
dropCountry.Items.Add("East Timor")
dropCountry.Items.Add("Ecuador")
dropCountry.Items.Add("Egypt")
dropCountry.Items.Add("El Salvador")
dropCountry.Items.Add("Equatorial Guinea")
dropCountry.Items.Add("Eritrea")
dropCountry.Items.Add("Estonia")
dropCountry.Items.Add("Ethiopia")
dropCountry.Items.Add("Falkland Islands (Islas Malvinas)")
dropCountry.Items.Add("Faroe Islands")
dropCountry.Items.Add("Fiji Islands")
dropCountry.Items.Add("Finland")
dropCountry.Items.Add("France")
dropCountry.Items.Add("French Guiana")
dropCountry.Items.Add("French Polynesia")
dropCountry.Items.Add("French Southern and Antarctic Lands")
dropCountry.Items.Add("Gabon")
dropCountry.Items.Add("Gambia")
dropCountry.Items.Add("Georgia")
dropCountry.Items.Add("Germany")
dropCountry.Items.Add("Ghana")
dropCountry.Items.Add("Gibraltar")
dropCountry.Items.Add("Greece")
dropCountry.Items.Add("Greenland")
dropCountry.Items.Add("Grenada")
dropCountry.Items.Add("Guadeloupe")
dropCountry.Items.Add("Guam")
dropCountry.Items.Add("Guatemala")
dropCountry.Items.Add("Guinea")
dropCountry.Items.Add("GuineaBissau")
dropCountry.Items.Add("Guyana")
dropCountry.Items.Add("Haiti")
dropCountry.Items.Add("Heard Island and McDonald Islands")
dropCountry.Items.Add("Honduras")
dropCountry.Items.Add("Hong Kong SAR")
dropCountry.Items.Add("Hungary")
dropCountry.Items.Add("Iceland")
dropCountry.Items.Add("India")
dropCountry.Items.Add("Indonesia")
dropCountry.Items.Add("Iran")
dropCountry.Items.Add("Iraq")
dropCountry.Items.Add("Ireland")
dropCountry.Items.Add("Israel")
dropCountry.Items.Add("Italy")
dropCountry.Items.Add("Jamaica")
dropCountry.Items.Add("Japan")
dropCountry.Items.Add("Jordan")
dropCountry.Items.Add("Kazakhstan")
dropCountry.Items.Add("Kenya")
dropCountry.Items.Add("Kiribati")
dropCountry.Items.Add("Korea")
dropCountry.Items.Add("Kuwait")
dropCountry.Items.Add("Kyrgyzstan")
dropCountry.Items.Add("Laos")
dropCountry.Items.Add("Latvia")
dropCountry.Items.Add("Lebanon")
dropCountry.Items.Add("Lesotho")
dropCountry.Items.Add("Liberia")
dropCountry.Items.Add("Libya")
dropCountry.Items.Add("Liechtenstein")
dropCountry.Items.Add("Lithuania")
dropCountry.Items.Add("Luxembourg")
dropCountry.Items.Add("Macau SAR")
dropCountry.Items.Add("Macedonia Former Yugoslav Republic of")
dropCountry.Items.Add("Madagascar")
dropCountry.Items.Add("Malawi")
dropCountry.Items.Add("Malaysia")
dropCountry.Items.Add("Maldives")
dropCountry.Items.Add("Mali")
dropCountry.Items.Add("Malta")
dropCountry.Items.Add("Marshall Islands")
dropCountry.Items.Add("Martinique")
dropCountry.Items.Add("Mauritania")
dropCountry.Items.Add("Mauritius")
dropCountry.Items.Add("Mayotte")
dropCountry.Items.Add("Mexico")
dropCountry.Items.Add("Micronesia")
dropCountry.Items.Add("Moldova")
dropCountry.Items.Add("Monaco")
dropCountry.Items.Add("Mongolia")
dropCountry.Items.Add("Montserrat")
dropCountry.Items.Add("Morocco")
dropCountry.Items.Add("Mozambique")
dropCountry.Items.Add("Myanmar")
dropCountry.Items.Add("Namibia")
dropCountry.Items.Add("Nauru")
dropCountry.Items.Add("Nepal")
dropCountry.Items.Add("Netherlands")
dropCountry.Items.Add("Netherlands Antilles")
dropCountry.Items.Add("New Caledonia")
dropCountry.Items.Add("New Zealand")
dropCountry.Items.Add("Nicaragua")
dropCountry.Items.Add("Niger")
dropCountry.Items.Add("Nigeria")
dropCountry.Items.Add("Niue")
dropCountry.Items.Add("Norfolk Island")
dropCountry.Items.Add("North Korea")
dropCountry.Items.Add("Northern Mariana Islands")
dropCountry.Items.Add("Norway")
dropCountry.Items.Add("Oman")
dropCountry.Items.Add("Pakistan")
dropCountry.Items.Add("Palau")
dropCountry.Items.Add("Panama")
dropCountry.Items.Add("Papua New Guinea")
dropCountry.Items.Add("Paraguay")
dropCountry.Items.Add("Peru")
dropCountry.Items.Add("Philippines")
dropCountry.Items.Add("Pitcairn Islands")
dropCountry.Items.Add("Poland")
dropCountry.Items.Add("Portugal")
dropCountry.Items.Add("Puerto Rico")
dropCountry.Items.Add("Qatar")
dropCountry.Items.Add("Reunion")
dropCountry.Items.Add("Romania")
dropCountry.Items.Add("Russia")
dropCountry.Items.Add("Rwanda")
dropCountry.Items.Add("St. Kitts and Nevis")
dropCountry.Items.Add("St. Lucia")
dropCountry.Items.Add("St. Vincent and the Grenadines")
dropCountry.Items.Add("Samoa")
dropCountry.Items.Add("San Marino")
dropCountry.Items.Add("S鉶 Tom?and Pr韓cipe")
dropCountry.Items.Add("Saudi Arabia")
dropCountry.Items.Add("Senegal")
dropCountry.Items.Add("Seychelles")
dropCountry.Items.Add("Sierra Leone")
dropCountry.Items.Add("Singapore")
dropCountry.Items.Add("Slovakia")
dropCountry.Items.Add("Slovenia")
dropCountry.Items.Add("Solomon Islands")
dropCountry.Items.Add("Somalia")
dropCountry.Items.Add("South Africa")
dropCountry.Items.Add("South Georgia and the South Sandwich Islands")
dropCountry.Items.Add("Spain")
dropCountry.Items.Add("Sri Lanka")
dropCountry.Items.Add("St. Helena")
dropCountry.Items.Add("St. Pierre and Miquelon")
dropCountry.Items.Add("Sudan")
dropCountry.Items.Add("Suriname")
dropCountry.Items.Add("Svalbard and Jan Mayen")
dropCountry.Items.Add("Swaziland")
dropCountry.Items.Add("Sweden")
dropCountry.Items.Add("Switzerland")
dropCountry.Items.Add("Syria")
dropCountry.Items.Add("Taiwan")
dropCountry.Items.Add("Tajikistan")
dropCountry.Items.Add("Tanzania")
dropCountry.Items.Add("Thailand")
dropCountry.Items.Add("Togo")
dropCountry.Items.Add("Tokelau")
dropCountry.Items.Add("Tonga")
dropCountry.Items.Add("Trinidad and Tobago")
dropCountry.Items.Add("Tunisia")
dropCountry.Items.Add("Turkey")
dropCountry.Items.Add("Turkmenistan")
dropCountry.Items.Add("Turks and Caicos Islands")
dropCountry.Items.Add("Tuvalu")
dropCountry.Items.Add("Uganda")
dropCountry.Items.Add("Ukraine")
dropCountry.Items.Add("United Arab Emirates")
dropCountry.Items.Add("United Kingdom")
dropCountry.Items.Add("United States")
dropCountry.Items.Add("United States Minor Outlying Islands")
dropCountry.Items.Add("Uruguay")
dropCountry.Items.Add("Uzbekistan")
dropCountry.Items.Add("Vanuatu")
dropCountry.Items.Add("Vatican City")
dropCountry.Items.Add("Venezuela")
dropCountry.Items.Add("Vietnam")
dropCountry.Items.Add("Virgin Islands (British)")
dropCountry.Items.Add("Virgin Islands")
dropCountry.Items.Add("Wallis and Futuna")
dropCountry.Items.Add("Yemen")
dropCountry.Items.Add("Yugoslavia")
dropCountry.Items.Add("Zambia")
dropCountry.Items.Add("Zimbabwe")

'// This is the piece of code that helps me for the rest of hundres c&p works
For Each countryItem As ListItem In dropCountry.Items
countryItem.Value = countryItem.Text.ToUpper
Next

'//You might need a default country selected.
Dim defaultCountry As String = _
System.Configuration.ConfigurationSettings.AppSettings("defaultCountry").ToString

dropCountry.Items.FindByValue(defaultCountry).Selected = True

End Sub

Dec 5, 2007

FlashSandy Flash 3D Engine



http://www.flashsandy.org/

Really great demo!

Try this! http://www.flashsandy.org/demos/protopop_walk


This 3D engine main features are :

  • Flash player 7 to 9 compatibility.
  • Both MTASC and Macromedia compilers compliant for AS2 and Flash CS3 and FlexBuilder for AS3 versions.
  • Several 3D primitives, allowing fast and parameterized object creation without any 3D modelisation knowledge.
  • Advanced and easy object management allowing some fantastic possibilities during your creations (scaling, rotation, translation, tween, etc.)
  • Advanced camera management ( rotation, motion on linear or bezier-curve path, movements, etc.)
  • Complex object loading thanks to the .ASE and .WRL files parser , but also Collada and 3DS files for AS3, (files generated by several 3D object modeling packages such as 3D Studio Max or Blender)
  • Material system to easily change your objects appearance. Several material are available allowing to create transparent faces, bitmap texture and video texture as webcam video stream.
  • Managment of Flash filters bringing some very nice visual effects
My Two Cents
woooooow.... this will take my time way , I am sure will look into this API !!!
May be one day will revamp my final year 3D game project in flash :)
with my Final Year Project team mate Rayden!!!

Visual 2005 Website Published An Empty Folder

Just now I was publishing my .NET 2.0 website. What a shock! Visual Studio 2005 shown published completed and successful. However, my target published folder was empty!!

Then I Google out, and try out several solution, and I got this solved my issue:

In that case, you should try to precompile you site manually. To do so, Click Start -> Programs -> Microsoft Visual Studio 2005 -> Visual Studio Tools -> Visual Studio 2005 Command Prompt
At command prompt type Aspnet_compiler -v /WebApplication1 -p "c:\CompiledSite " -errorstack -errorstack Specifies that the tool should include stack trace information if it fails to compile the application. For more see http://msdn2.microsoft.com/en-us/library/ms229863(VS.80).aspx If You see some thing like [HttpParseException]: Unexpected end of file looking for tag. Correct the error(s) and run again. Till the time you finish it with no error.
Yeah! Finally I found one of my aspx file containing some invalid xhtml codes.
You can always turn on the validation when you build your web projects.



And you got your error and get it solved before you publish it.

Dec 4, 2007

Add HTML Signature to Outlook 2007

Add HTML signature to Outlook 2007

In order to get an existing html signature file added to Outlook 2007 there are several steps to take that are very different from previous versions of Outlook.

1) In Outlook 2007 open Tools > Options > Mail Format and select signatures

2) Create a new signature and give it a meaningful name. Press Ok.

3) Open up an explorer window (win + e) and navigate to C:\Documents and Settings\User name\Application Data\Microsoft\Signatures. If you can not see the Application Data folder you need to show hidden files and folders.

4) Open the html signature file that you just created with notepad,
right click > open with.
Remove the contents of this file and replace it with your html signature code.
Save this file, file > save.

5) While you are in here it wouldn't hurt to make the text version of the signature look like you want it to as well.

Once you have edited the html source of the new signature you should see it in its correct form in the signature area of Outlook 2007

Dec 3, 2007

Hong Kong billionaire takes $60M Facebook stake

Hong Kong billionaire Li Ka-shing has invested $60 million in social networking Web site Facebook, equivalent to a 0.4% stake, and has the option for an additional $60 million investment, according to a report by a technology blog.


Microsoft not too bad invest about
$240 million!

Read more:
http://www.marketwatch.com/news/story/hong-kong-billionaire-takes-60/story.aspx?guid=%7B0A9F4B3F-DB22-4211-9CB9-3707BA2DA109%7D

My Two Cents
Woooow... Facebook really a 'black horse' win over a lot of friendster fans I guest. It's open API concept is really work-able!

I am planning to develop some funs things on FB too.

My Demon in The Golden Compass!



http://www.goldencompassmovie.com/

Watch the trailer, it is good to be watched in cinema :)

Microsoft Office Mobile 6.1 - Upgrade for Office 2007 File formats

Microsoft Office Mobile 6.1
Upgrade for Microsoft Office 2007 file formats

Download here.

Information from LokeUei Blog posted at: http://blogs.msdn.com/lokeuei/archive/2007/11/30/office-2007-formats-for-windows-mobile-5-0-and-6.aspx