Monday, July 02, 2007

D-Link Releases Wireless Router with Integrated Display

Today, D-Link announced its new Limited Edition Xtreme N Gigabit Router (DIR-660) featuring an integrated OLED display to monitor network activity.

# The built-in display
# An industry first for a wireless router
# Relays network information on-demand


letting you monitor your network's health and check configuration settings right on the router. D-Link claims that its Xtreme N technology is up to 14 times faster with six times the range of 802.11g routers. The DIR-660 is also backward- compatible with legacy 802.11b and 802.11g devices, including some game consoles and digital media players.

In addition, the DIR-660 improves web surfing efficiency with its intelligent wireless prioritization technology. Xtreme N's Intelligent QaS adapts to your web surfing habits, allocating speed as necessary. For instance, it knows to give streaming movies or music priority over traditional file downloads for the smoothest wireless Internet experience possible.

Sunday, July 01, 2007

XML Validation



using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Xml.Schema;
namespace XMLVAlidation
{
class Program
{
private static bool isValid = true; // if validtation error happens set this flag false
static void Main(string[] args)
{
//XmlTextReader r = new XmlTextReader("C:\\XML\\ProductWithDTD.xml"); //to load product with DTD -validation type
//XmlTextReader r = new XmlTextReader("C:\\XML\\ProductWithXDR.xml"); ////to load product with XDR - vali type
XmlTextReader r = new XmlTextReader("C:\\XML\\Header.ascx.en-US.resx");
//XmlTextReader r = new XmlTextReader("C:\\XML\\ProductWithXSD.xml"); // validation type schema
XmlValidatingReader v = new XmlValidatingReader(r);
//v.ValidationType = ValidationType.DTD; //validation type for DTD
v.ValidationType = ValidationType.Schema; ////validation type for XDR
v.ValidationEventHandler += new ValidationEventHandler(MyValidationEventHandler);
while (v.Read())
{
// Can add code here to process the content.
}
v.Close();
// Check whether the document is valid or invalid.
if (isValid)
Console.WriteLine("Document is valid");
else
Console.WriteLine("Document is invalid");

Console.ReadLine();
}
public static void MyValidationEventHandler(object sender,ValidationEventArgs args)
{
isValid = false;
Console.WriteLine("Validation event\n" + args.Message);
}
}
}


Needed resources

Product.xml

< Product ProductID = "123" >
< ProductName > Rugby jersey < / ProductName >
< / Product >


ProductWithDTD.xml

< ? xml version = "1.0" ? >
< ! DOCTYPE Product SYSTEM "Product.dtd" >
< Product ProductID = "123" >
< ProductName > Rugby jersey< / ProductName >
< ProductID > 123 < / ProductID >
< / Product >


Product.dtd


< ! ELEMENT Product ( ProductName ) >
< ! ATTLIST Product ProductID CDATA #REQUIRED >
< ! ELEMENT ProductName ( # PCDATA ) >


ProductWithXSD.xml

< ? xml version = "1.0" ? >
< Product ProductID = "123"
xmlns : xsi="http: // www.w3.org/2001/XMLSchema-instance"
xsi : noNamespaceSchemaLocation="Product.xsd">
< ProductName > Rugby jersey < / ProductName >
< / Product >



Product.xsd

< ? xml version= "1.0" ? >
< xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
< xsd:element name="Product" >
< xsd:complexType >
< xsd:sequence >
< xsd:element name="ProductName" type="xsd:string" / >
< / xsd:sequence>
< xsd:attribute name="ProductID" use="required" type="xsd:int" / >
< / xsd:complexType >
< / xsd:element >
< / xsd:schema >


ProductWithXDR.xml

< ? xml version="1.0" ? >
< Product ProductID="123" xmlns="x-schema:Product.xdr" >
< ProductName > Rugby jersey < / ProductName >

< / Product >


Product.xdr

< ? xml version="1.0" ? >
< Schema name="ProductSchema"
xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:dt="urn:schemas-microsoft-com:datatypes" >

< ElementType name="Product" content="eltOnly" >
< attribute type="ProductID" required="yes" / >
< element type="ProductName" / >
< / ElementType >

< AttributeType name="ProductID" dt:type="int" / >
< ElementType name="ProductName" dt:type="string" / >
< / Schema >

XML Node count




count.xml




#
#
#
#
#
#
#
#
Program.cs - This is a console application

using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace CountXMLNodes
{
class Program
{
static void Main(string[] args)
{
int countBooks = 0;
int countDVD = 0;
int countGames = 0;
int countOther = 0;
XmlDocument doc = new XmlDocument();
doc.Load("C:\\XML\\count.xml");
foreach (XmlNode node in doc.DocumentElement.ChildNodes)
{
switch (node.Name)
{
case "Books":
countBooks++;
break;
case "DVD":
//something.
countDVD++;
break;
case "Games":
//something.
countGames++;
break;
default:
//something.
countOther++;
break;
}
}
Console.WriteLine("Books = " + countBooks);
Console.WriteLine("DVD = " + countDVD);
Console.WriteLine("Games = " + countGames);
Console.WriteLine("Other = "+ countOther);
Console.ReadLine();
}

}
}
Microsoft to Sell Complete PCs In India


By Reuters
NEW DELHI (Reuters) - Microsoft Corp. said on Wednesday it would introduce a low-cost personal computer in India in partnership with Advanced Micro Devices Inc. and Zenith Computers Ltd.

The computer will be built on AMD hardware and manufactured by Zenith Computers, and will include Microsoft software.

The computers, priced at 21,000 rupees, would be sold in 10 retail outlets each in Bangalore and Pune from July on a test basis for three months and will be expanded later on the basis of response.

"We don't see any gain in the short term. Our perspective is long term," Microsoft India chairman Ravi Venkatesan told reporters.


In 2006/07 the total installed base of PCs in India was 22 million, that is, a PC for about every 50 Indians, industry tracking body IDC said in a recent report.

The company said its online portal www.msn.com will provide educational content to students. It also plans to launch a job search service this year for the country's nearly 400,000 engineers graduating every year.

Microsoft said it was in talks with partners in government and industry for the job search portal.

Microsoft's job portal will compete with Info Edge (India) Ltd.'s www.naukri.com and Monster Worldwide Inc.'s www.monsterindia.com, among others.

That's where today India is so where are we?????????