Skip to main content

Posts

Showing posts from April, 2010

Flash: Embedding XML into Flash

var my_xml:XML = new XML(); my_xml.appendChild( my_xml.createElement("ChooseOption") ); my_xml.firstChild.appendChild( my_xml.createElement("ques") ); my_xml.firstChild.firstChild.attributes.id="1"; my_xml.firstChild.firstChild.attributes.agegrp="1"; my_xml.firstChild.firstChild.attributes.level="1"; my_xml.firstChild.firstChild.appendChild( my_xml.createElement("questxt") ); my_xml.firstChild.firstChild.firstChild.attributes.ans="1"; my_xml.firstChild.firstChild.childNodes[0].appendChild( my_xml.createTextNode("Drive Me!")); my_xml.firstChild.firstChild.appendChild( my_xml.createElement("opt1") ); my_xml.firstChild.firstChild.childNodes[1].appendChild( my_xml.createTextNode("Out Patient Department")); my_xml.firstChild.firstChild.appendChild( my_xml.createElement("opt2") ); my_xml.firstChild.firstChild.childNodes[2].appendChild( my_xml.createTextNode("Other Patient Depart...

Windows shortcuts and run commands

Windows XP Home / Pro Run Commands and Short Cuts How To - Click Start, Click Run and enter the command Click OK Run commands Calc - Calculator  Cfgwiz32 - ISDN Configuration Wizard  Charmap - Character Map  Chkdisk - Repair damaged files  Cleanmgr - Cleans up hard drives  Clipbrd - Windows Clipboard viewer  Cmd - Opens a new Command Window (cmd.exe)  Control - Displays Control Panel  Dcomcnfg - DCOM user security  Debug - Assembly language programming tool  Defrag - Defragmentation tool  Drwatson - Records programs crash & snapshots  Dxdiag - DirectX Diagnostic Utility  Explorer - Windows Explorer  Fontview - Graphical font viewer  Ftp - ftp.exe program  Hostname - Returns Computer's name  Ipconfig - Displays IP configuration for all network adapters  Jview - Microsoft Command-line Loader for Java classes  MMC - Microsoft Management Console  Msconfig - Configuration to edit startup files  Msinfo32 - Microsoft System Information Utility  Nbtstat - Displays stats ...

[vb.net] To convert a unicode character to Hexadecimal

Imports System Imports System.Text Imports Microsoft.VisualBasic.Strings Class UnicodeToHex    'The encoding    Dim uni As New UnicodeEncoding()    Public Shared Sub Main()              Dim str As String = "рдо" 'unicode string                 Dim byteArray() As Byte         byteArray = uni.GetBytes(str)         str = GetAsHexaDecimal(byteArray)                  'Show the message         MessageBox.Show(str)     End Sub     Public Function GetAsHexaDecimal(ByVal bytes As Byte()) As String         Try             Dim s As New StringBuilder             Dim length, n As Integer             length = bytes.Length             For n = length - 1 To 0 Step -1                 s.Append(String.Format("{0,2:x}", bytes(n)).Replace(" ", "0"))             Next             Return s.ToString         Catch ex As Exception         End Try     End Function End Class