Monday, November 05, 2012
Apple Shake-Up Could Lead to Design Shift
Wednesday, October 31, 2012
XML Parser using XmlReader from an XML string in C#
Byte[] pBytes = encoding.GetBytes(strXML);
MemoryStream pMem = new MemoryStream(pBytes, 0, pBytes.Length, true, true);
XmlReader reader = XmlReader.Create(pMem);
string s = Encoding.UTF8.GetString(pMem.GetBuffer(), 0, (int)pMem.Position);
XmlElement element;
XmlDocument xmlDoc = new XmlDocument();
pMem.Seek(0, SeekOrigin.Begin);
while (reader.Read())
{
XmlNode node = null;
switch (reader.NodeType)
{
case XmlNodeType.Element:
bool fEmptyElement = reader.IsEmptyElement;
element = xmlDoc.CreateElement(reader.Prefix, reader.LocalName, reader.NamespaceURI);
//element.IsEmpty = fEmptyElement;
//ReadAttributes(reader, element);
//if (!fEmptyElement) {
//parent.AppendChild(element);
//parent = element;
//continue;
//}
//node = element;
break;
case XmlNodeType.EndElement:
//if (parent.ParentNode == null)
//{
// syntax error in document.
// IXmlLineInfo li = (IXmlLineInfo)reader;
// throw new XmlException(string.Format(SR.UnexpectedToken,""+reader.LocalName+">", li.LineNumber, li.LinePosition), null, li.LineNumber, li.LinePosition);
// }
//parent = parent.ParentNode;
continue;
case XmlNodeType.EntityReference:
if (reader.CanResolveEntity)
{
reader.ResolveEntity();
}
continue;
case XmlNodeType.EndEntity:
continue;
case XmlNodeType.Attribute:
//node = LoadAttributeNode(parent);
break;
case XmlNodeType.Text:
node = xmlDoc.CreateTextNode(reader.Value);
break;
case XmlNodeType.SignificantWhitespace:
node = xmlDoc.CreateSignificantWhitespace(reader.Value);
break;
case XmlNodeType.Whitespace:
//if (preserveWhitespace) {
// node = xmlDoc.CreateWhitespace(reader.Value);
// break;
//}
//else {
//continue;
//}
continue;
case XmlNodeType.CDATA:
node = xmlDoc.CreateCDataSection(reader.Value);
break;
case XmlNodeType.XmlDeclaration:
break;
case XmlNodeType.ProcessingInstruction:
node = xmlDoc.CreateProcessingInstruction(reader.Name, reader.Value);
break;
case XmlNodeType.Comment:
node = xmlDoc.CreateComment(reader.Value);
break;
case XmlNodeType.DocumentType:
string pubid = r.GetAttribute("PUBLIC");
string sysid = r.GetAttribute("SYSTEM");
node = xmlDoc.CreateDocumentType(reader.Name, pubid, sysid, reader.Value);
break;
default:
//UnexpectedNodeType(reader.NodeType);
break;
}
}
Wednesday, October 17, 2012
How To Prevent Visual Studio 2012 ALL CAPS Menus!
Before
After
Saturday, September 15, 2012
Thursday, September 13, 2012
Convert JAVA to C#
Monday, August 06, 2012
IIS Windows 7 Ultimate
In this article we will explain you how to install The Microsoft IIS Webserver on your computer. The IIS Server is NOT available for Microsoft Windows 7 Home edition as they say the Home edition was not meant for networking. So you must have the Proffessional edition or the Ultimate edition of Windows 7 installed on your computer for installing the IIS Webserver. You will also be needing the Windows 7 DVD during this install. Now, Follow the steps below:
1. Place the Windows 7 Ultimate or Windows 7 Proffessional DVD into your DVD-Rom Drive.
2. Goto Start > Control Panel > Programs
3. From the dialog box that opens, click on Turn Windows features on or off. You can check this detailed guide on how to add or remove Windows features in Windows 7.
4. This brings another dialog box that contains a list of many Windows related services
5. Check the box for 'Internet Information Services (IIS)' leaving all the default installation settings intact. If you would like to install additional services, then expand each option and select them.
6. Once IIS is installed on your machine you can view your home page in a web browser by typing 'http://localhost' (you can substitute 'localhost' for the name of your computer) into the address bar of your web browser. If you have not placed your web site into the default directory you should now be looking at the IIS documentation.
7. Service and Configuration management for your IIS web server
8. You might like to install IIS Tuner in order to configure your IIS server installation for optimum performance.
9. Now, Install the Web development options for Visual Studio 2012 RC
Wednesday, August 01, 2012
The cost of connectivity
Rank | City | ISP | Download Speed | Upload Speed | Price (USD/PPP) | Network Technology | Data Cap (GB) |
1 | Riga | Balti-Com | 20 | 5 | 25.43 | Cable | None |
2 | Seoul | KT | 50 | 50 | 32.74 | Fiber | None |
3 | Paris | Free | 100 | 50 | 34.47 | Fiber | None |
4 | Seoul | LGplus | 100 | 100 | 35.78† | Fiber | None |
5 | Paris | SFR | 25 | -- | 36.67† | ADSL | None |
6 | Paris | Bouygues Telecom | 20 | 0.512 | 36.67 | ADSL | None |
7 | Paris | Orange | 20 | -- | 37.53 | ADSL | None |
8 | Copenhagen | Telia | 20 | 1 | 40.36† | DSL | None |
9 | London | Virgin | 30 | -- | 43.03† | Fiber | None |
10 | Paris | Darty | 100 | 5 | 43.56† | Fiber | None |
11 | Amsterdam | T-Mobile | 20 | 1 | 44.64† | DSL | -- |
12 | Berlin | TeleColumbus | 16 | 1 | 44.93 | Cable | None |
13 | London | BT | 16 | -- | 45.45 | DSL | None |
14 | Riga | Lattelecom | 20 | 20 | 45.66 | Fiber | None |
15 | Hong Kong | City Telecom Limited | 500 | 20 | 46.72 | Fiber | None |
… | … | … | … | … | … | … | … |
30 | Lafayette | AT&T* | 6 | 1 | 65.60 | DSL | 250 |
32 | Chattanooga | AT&T* | 6 | 1 | 68.44 | DSL | 250 |
33 | San Francisco | AT&T* | 6 | 1 | 73.94 | DSL | 250 |
34 | Los Angeles | Verizon* | 7 | -- | 79.99† | DSL | None |
38 | San Francisco | Comcast | 20 | 4 | 89.97 | Cable | 300 |
39(t) | New York | RCN | 25 | 2 | 89.99† | Cable | None |
39(t) | Washington DC | RCN | 25 | 2 | 89.99† | Cable | None |
41 | Washington DC | Verizon* | 15 | 5 | 89.99† | DSL | None |
43 | Los Angeles | TimeWarner | 10 | 1 | 89.99 | Cable | None |
46 | Bristol | BVU | 16 | 3 | 96.40 | Fiber | None |
47 | Washington DC | Comcast | 20 | -- | 99.00 | Cable | 300 |
48 | Bristol | Charter | 15 | 3 | 99.97† | Cable | 100 |
49 | Chattanooga | Comcast | 20 | 4 | 99.99 | Cable | 300 |
50 | Lafayette | LUS | 15 | 15 | 103.89 | Fiber | 1024 |
51 | Bristol | CenturyLink* | 10 | 0.7 | 107.26† | DSL | 250 |
52 | New York | Time Warner | 15 | 0.78 | 112.69 | Cable | None |
53 | San Francisco | Astound | 10 | 1 | 124.00 | Fiber | 100 |
55 | Chattanooga | EPB | 30 | 30 | 129.51 | Fiber | None** |
56 | Lafayette | Cox | 15 | 1.5 | 133.96 | Cable | 200 |
57 | New York | Verizon | 10 | 2 | 154.98† | Fiber | None |




