Dec 13, 2007

Display XML Tag on HTML

Sometimes you need to show the < & > Tag

You can use:
&lt; xmp &gt; my node &lt; / xmp &gt;


You will get a similiar and valid xml tag.
else you will not get < > tag in the output.

Dec 11, 2007

Photoshop Frequent Used Shortcut Key

Get my Wacom Graphie3 TableTopia installed back! Currently working on new AMD machine.

Will continue back my multimedia venture :)

Photoshop Shortcut Tips (version CS3):

Brush Control
1. Opacity
Num Pad numbering represent the % of opacity
2. Hardness / Flow Control
{ less; } greater
3. Brush Size
[ less; ] greater
4. Brush Selection
, Previous; . Next


Common Tools
1. Brush (B)
2. Move Tool(V)
3. Zoom (Z)
4. Marquee Tool (M)
5. Lasso (L)
6. Crop (C)
7. Slice (K)
8. Healing Brush (J)
9. Clone Stamp (S)
10. Eraser (E)


Selection
1. De-Select ( Ctrl + D)

Zoom
1. Greater ( Ctrl + +)
2. Lesser ( Ctrl + -)
3. Fit On Screen ( Ctrl + 0 zero)
4. Actual Pixel ( Ctrl + Alt + 0 zero)
5.


Extra Tools
1. Extract ( Alt + Ctrl + X )
2. Liquify ( Shift + Crtl + X)

Display
1. Extras Slice Guide ( Ctrl + H )
2. Ruler ( Ctrl + R )
3. Snap ( Ctrl + Shift + ;)

Image
1. Level ( Ctrl + L )
2. Curves ( Ctrl + M)
3. Hue ( Ctrl + U)


Save / Export
1. Save Web ( Ctrl + Alt + Shift + S)

Other
1. Show Shortcut Tips (Ctrl + Alt + Shift + K )

MSN Messenger Error Code 8100378



You can try solution in below:

Open windows host file with Notepad: C:\Windows\System32\Drivers\etc\ho­sts

Add these 2 lines to the bottom:

65.54.239.80 messenger.hotmail.com
65.54.239.80 dp.msnmessenger.akadns.net

Save it and restart msn

Please do remember to remove these lines when the msn service gets back to normal.

MSN Connection Key Port Issue (Error 80048820)



Summary of solution I gathered:

Solution 1
In my case I reinstalled the network card and strangely that seemed to do the trick! If it doesn’t work for you, give the below solutions a try.

Solution 2
Try removing any proxy settings, you can do this by following these steps.
1) Open up Internet explorer
2) Click the tools menu, then Internet options
3) Select the connections tab
4) Click the “LAN Settings” button
5) Ensure “Automatically Detect Settings” checkbox is ticked
6) Untick “Use a proxy server for your LAN …” if checked
7) Click ok, then ok
8) Start up MSN and give it a whirl!

Solution 3
Check your windows System clock and ensure it’s set to the correct time and date.

Solution 4
Has your Norton subscription run out? Some people have reported this will stop MSN from working. (Not sure why … so don’t ask)

Solution 5
You can try resetting your Internet Security properties to defaults.
1) Open up Internet explorer
2) Click the tools menu, then Internet options
3) Select the security tab
4) Click the Restricted sites icon
5) Ensure MSN.com or hotmail.com isn’t on that list. If so, remove it. Click ok.
6) Select the Internet Icon and click the “Default Level” button. This will return your Security settings to the default level.
7) Click ok, close down IE and MSN and then try launching MSN.

Solution 6
Try and isolate the problem, find out whats causing the the error. If you have norton, turn it off. Does the problem still appear? If not, it looks like Norton is blocking it. Read the Norton manual and find out how to allow programs to access the Internet. This applies to Zonealarm, and other firewall programs.

Solution 7
Try to register softpub.dll using regsvr32.exe.

1. Press the Start menu then select Run
2. Type: regsvr32 softpub.dll
3. Press Enter & Restart Messenger.

Solution 8
1. If you have Norton installed, run LiveUpdate, make sure you have most current version.
2. Delete your Quaruntine and Backup files in Norton.
3. Reboot computer

For my self, I tried solution 7, and sometimes it works very well.

Dec 10, 2007

Call Webservice Method Using MS SoapClient

Well, force to use asp to communicate with .NET webservices.
So, I choose the simplest way where I am using Microsoft Soap Client generic object to use my webservice method.

Here is my code:


dim soapclient
'// create SoapClient object
SET soapclient = CreateObject("MSSOAP.SoapClient")

'// set Server HTTP Request to true
SoapClient.ClientProperty("ServerHTTPRequest") = True

'// SOAP init with my webservice URL
Call Soapclient.mssoapinit("http://localhost/Elinkz_TestProject_TestService.asmx?wsdl")

'// GetTestData(xxx) is my webservices with param
response.write soapclient.GetTestData("myParamToMyWebservice")
response.end

-----------------------------------------------------------------------

GoogleSearch(Query, Start, MaxResults, Filter, Restrict, SafeSurf, Lr)
Dim Key
Key = "your key goes here"

Dim SoapClient
set SoapClient = Server.CreateObject("MSSOAP.SoapClient")

Dim NodeList
SoapClient.ClientProperty("ServerHTTPRequest") = True
SoapClient.mssoapinit "http://api.google.com/GoogleSearch.wsdl"
Set NodeList = SoapClient.doGoogleSearch(key, _
Query, Start, MaxResults, Filter,
Restrict, SafeSurf, Lr, "", "")

Set NodeList = Nothing
Set SoapClient = Nothing
End Function

-----------------------------------------------------------------------------

Function PerformGoogleSpellingSuggestion(Words)
Dim Key
Key = "your key goes here"

Dim SoapClient
set SoapClient = Server.CreateObject("MSSOAP.SoapClient")

Dim RetVal
SoapClient.ClientProperty("ServerHTTPRequest") = True
SoapClient.mssoapinit "http://api.google.com/GoogleSearch.wsdl"
RetVal = SoapClient.doSpellingSuggestion(Key, Words)

If RetVal > "" Then
Response.write RetVal
Else
Response.Write "No Suggestions"
End If

Set SoapClient = Nothing
End Function

-------------------------------------------------------------------------------

Function PerformGoogleGetCachedPage(Url)
Dim Key
Key = "your key goes here"

Dim SoapClient
Set SoapClient = Server.CreateObject("MSSOAP.SoapClient")

Dim RetVal
Dim DecodedPage
Dim i
dim NewArray

SoapClient.ClientProperty("ServerHTTPRequest") = True
SoapClient.mssoapinit "http://api.google.com/GoogleSearch.wsdl"
RetVal = SoapClient.doGetCachedPage(Key, Url)
NewArray = RetVal

for i = 1 to ubound(NewArray)
DecodedPage = DecodedPage & chr(ascB(MidB(NewArray, i, 1)))
next

Response.Write DecodedPage
Set SoapClient = Nothing
End Function

-------------------------------------------------------------------------------

You can use Google WS for free :) but only 1000 limit transaction per day!

Dec 7, 2007

ScrewTurn Wiki - Open Source .NET Wiki



ScrewTurn Wiki is a fast, powerful and simple ASP.NET wiki engine, installs in a matter of minutes and it's available in different packages, fitting every need. It's even free and opensource.

visit here.

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