Wednesday, December 31, 2008

Happy New Year 2009

Hi, Lets hack the table called Life!

SELECT happiness, prosperity FROM life WHERE year >= 2009

UPDATE life SET failure_flag = 'NO' , success_flag = 'YES';

INSERT INTO life VALUES ('friends','dreams') ;

DELETE sorrows FROM life;

GRANT smile TO all ;

REVOKE enemity FROM all;



Wish You Happy

& Prosperous New Year 2009


F a u z i

Wednesday, December 24, 2008

Ajax website build error : Could not load type 'System.Web.UI.Compatibility.CompareValidator' from assembly 'System.Web.Extensions'


When i try to build solution for a Ajax based web site with Visual studio 2008 using the Framework 2.0, It gave the following error :

Could not load type 'System.Web.UI.Compatibility.CompareValidator' from assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

I was wondering what could be wrong! I tried placing system.web.Extensions in local bin folder. Tried placing in GAC again. There was no luck... when i goggled, found the following articles which was helpful. It seems the validators are removed in recent releases. The solution is to comment the following tags in web.config:

<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="System.Web.UI.Compatibility.CompareValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="System.Web.UI.Compatibility.CustomValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="System.Web.UI.Compatibility.RangeValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="System.Web.UI.Compatibility.RegularExpressionValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="System.Web.UI.Compatibility.RequiredFieldValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="System.Web.UI.Compatibility.ValidationSummary, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>


Resource articles as follows: , Robin's Blog

Hope it helps

Merry X-Mas :) Wish you Happy New Year 2009 :)

Fauzi ~ 4Z

Friday, December 19, 2008

microsoft IE7 security patch


Hope you are aware of the security flaw found in IE7 last week on December 16th.

BBC Link

Microsoft has released a security patch which could be downloaded and installed on the following link.

Security patch

This update addresses the vulnerability discussed in Microsoft Security Bulletin MS08-078 which was regarding the Security issues that has been identified which could allow an attacker to compromise a computer running Microsoft Internet Explorer Version 7 and gain control over it. You can help protect your computer by installing this update from Microsoft. After you install this item, please restart your computer.

Hope it helps

Fauzi ~ 4Z

Wish you Happy New Year 2009

Wednesday, October 29, 2008

Where is Chandrayaan now

Where is chandrayaan now…

Chandrayaan orbit

It’s in the fourth orbit raising manoeuvre of Chandrayaan-1 spacecraft today (October 29, 2008). Chandrayaan-1 entered into a more elliptical orbit whose apogee (farthest point to Earth) lies at 267,000 km while the perigee (nearest point to Earth) lies at 465 km.Now Chandrayaan-1 spacecraft is more than half the way to moon. In this orbit, the spacecraft might take six days to go round the Earth once. And there is one more orbit raising manoeuvre is scheduled to send the spacecraft to the vicinity of the moon at a distance of about 384,000 km from the Earth.

Let’s hope for the best :)

Came to know that there is one more main part of Chandrayaan’s mission, its to explore helium-3 resources from moon. It seems moon has abundant resources of helium-3 from earlier studies; which could be used in Fusion reactors to produce power. Following is an animation to explain how the fusion occurs in DT helium reactor. One atom of deuterium and one atom of tritium combine to form a helium-4 atom and a neutron. Most of the energy released is in the form of the high-energy neutron.


Fusion of Deuterium with Tritium creating helium-4, freeing a neutron, and releasing 3.5 MeV of energy.

Update on 31st August 2009: Couple of days before ISRO lost contact with Chandrayaan. which is not a Good news but scientists say Chandrayaan has made almost 95% of its work so far... This sounds good & let wish all the best for the future endeavours of ISRO.



Fauzi ~ 4z

Monday, October 20, 2008

Chandrayaan mission count down

Mission Objectives:

* To launch and orbit a spacecraft in lunar polar orbit and conduct scientific studies.
* To carry out high resolution mapping of topographic features in 3D, distribution of various minerals and elemental chemical species including radioactive nuclides covering the entire lunar surface using a set of remote sensing payloads. The new set of data would help in unraveling mysteries about the origin and evolution of solar system in general and that of the moon in particular or on its composition and mineralogy.
* Realize the mission goal of harnessing the science payloads, lunar craft and the launch vehicle with suitable ground support system including DSN station, integration and testing, launching and achieving lunar orbit of ~100 km, in-orbit operation of experiments, communication/telecommand, telemetry data reception, quick look data and archival for scientific utilization by identified group of scientists.

Sunday, October 19, 2008

Microsoft's Theory of IT Evolution

Hi Folks,

MS has scheduled IT evolution event this November in Middle East.

Technology is moving into the next era. Are you ready to take the leap with us?

At IT Evolution 08, join us as we unveil the latest technologies that could help change the very DNA of your IT department.

Get a front row seat as we unveil technologies like Hyper-V, App-V and Virtual Machine Manager that will help you ride the hottest trend in IT today - Virtualization. Learn how the new SQL Server 2008 will help you manage any data, any place, any time. See how Visual Studio 2008 provides the most productive developer experience and learn how you can deliver the next generation of rich interactive applications with Silverlight.



Abu Dhabi

Tue Nov 4th


Sun Nov 9th


Sat Nov 15th


Wed Nov 19th


Sun Nov 23rd


Wed Nov 26th

Following are the highlights of the event:

* Server Virtualization-Get Virtual Now!
* Sliverlight 2.0-Light up the Web
* Hardware Virtualization
* Visual Studio Team System 2008
* App-V - Next Generation Client with Application Virtualization
* Windows Presentation Foundation
* SQL Server 2008 - Your Data, Any Place, Any Time - Should be interesting...
* SQL Server 2008 Database Development

If it is in your location register and enjoy learning new stuffs else may be happening soon...


Fauzi ~ 4Z

Friday, October 10, 2008

Sample to Read & Write XML File through C#


Here is the sample to read and write xml file through C# code. In order to explain the process in a simple fashion, I made use of a xml file called SomeName.xml (The contents of the xml file are shown below in Section #1). Through C# code i am reading the nodes and attribute values which any one would prefer to do in their application. Then to explain the process of writing a xml file into file system, I am making use of the values I read from input xml file. I create a XmlDocument Object in memory, create nodes and with the read values append them inside and write them to a new XML file in file system called WrittenFile.xml.

Section #1 has the content of input xml file, Section #2 contains the c# code to be placed in pageload event & section #3 has the content of generated output xml file.

Section #1:

Input XML file: ~\XML\SomeFolder\SomeName.xml

<?xml version="1.0" standalone="yes" ?>




<column name="Attribute1" />

<column name="Attribute2" />



<row Attribute1="6693" Attribute2="655" />

<row Attribute1="432" Attribute2="364" />

<row Attribute1="34" Attribute2="766" />

<row Attribute1="665493" Attribute2="134" />

<row Attribute1="56783" Attribute2="656" />




Section #2:

C# Code written in page load event:

protected void Page_Load(object sender, EventArgs e)




//Creating XmlDocument Class object:

XmlDocument oXmlDocument = new XmlDocument();

//Loading the XML file from File System:


//1.To Read a Single Node

//Giving the Xpath of the Node: eg: //report/table/rows/row

//Assigning the returned XmlNoded from SelectSingleNode Method:

XmlNode oXmlElementCampaignName = oXmlDocument.DocumentElement.SelectSingleNode("//report/table/rows/row");

//2.To Read Collection of Nodes

//Giving the Xpath to method SelectNodes eg: SelectNodes("//report/table/rows/row");

//Assigning the returned XmlNoded from SelectSingleNode Method:

XmlNodeList oXmlNodeList = oXmlDocument.DocumentElement.SelectNodes("//report/table/rows/row");

// Create a XmlDocument object to write a file:

XmlDocument xmlDocument = new XmlDocument();

// Create a XmlElement which represents an Element : Root Element

XmlElement Items = xmlDocument.CreateElement("Items");

//Iterate through every nodes in oXmlNodeList which is a collection of Nodes

foreach (XmlNode objNode in oXmlNodeList)


// Create a XmlElement which represents an Element : Node

XmlElement Item = xmlDocument.CreateElement("Item");

// Create Child Node XmlElement1

XmlElement xmlelement1 = xmlDocument.CreateElement("XmlElement1");

// Sets value for Child Node

XmlText xmlelement1_text = xmlDocument.CreateTextNode(objNode.Attributes["Attribute1"].


// Placed inside Child Node


XmlElement xmlelement2 = xmlDocument.CreateElement("XmlElement2");

XmlText xmlelement2_text = xmlDocument.CreateTextNode(objNode.Attributes["Attribute2"].



// Placing under Node


// Placing under Node


// Placing under Root



// Placing under XML document


// Writing the XML file into file system



catch (Exception ex)


//Exception block here



Section #3:

Output XML file: ~\XML\SomeFolder\WrittenFile.xml























Hope this should be helpful for people who are looking to samples to read or write xml file.

Mohammed Fauzi