Welcome to weblogs.com.pk Sign in | Join | Help

Aziz ur Rahman

Random Thoughts


  • The WeatherPixie
    Listed on BlogShares

    Counter : simple hit counter
System.Net.HttpWebRequest - Arabic Data

Few days back, there was a task that I have to get/parse data from html pages on a site. I first tried to use System.Net.HttpWebRequest class to make the request, get the data.

Dim objRequest As System.Net.HttpWebRequest = System.Net.WebRequest.Create(Url)
Dim result As String
objRequest.Method = "GET"

Dim objResponse As System.Net.HttpWebResponse = objRequest.GetResponse()
Dim sr As System.IO.StreamReader
sr = New System.IO.StreamReader(objResponse.GetResponseStream())
result = sr.ReadToEnd()
Return result


It worked fine but I was getting corrupt Arabic data (the site was in Arabic). I played with the stream classes and found the solution. One have to include the encoding while streaming response.

sr = New System.IO.StreamReader(objResponse.GetResponseStream(), System.Text.Encoding.UTF8)

After getting the data in correct format, I tried to use XmlDocument to load the result but again there was a problem. XmlDocument was unable to load the result throwing exceptions. After some checking I found out the XmlDocument was doing thsi due to the html tags that do not have ending tags. e.g. <br>, <hr>, nowrap, <Img> etc. Then I applied some formatting on the result like

strMatter = strMatter.Replace("<BR>", "")
strMatter = strMatter.Replace("nowrap", "")
strMatter = strMatter.Replace("pointer;"">", "pointer;""></IMG>")
strMatter = strMatter.Replace("pointer;"" >", "pointer;""></IMG>")

Then I successfully parsed and saved the data in database. Is there any corresponding class for Html like for Xml we have XmlDocument that can easily load html and parse it???

DotNetNuke vs. SharePoint
Great detailed post comparing the two
http://weblogs.asp.net/bsimser/archive/2006/01/31/437023.aspx http://aspadvice.com/blogs/rjdudley/archive/2006/01/18/14755.aspx
Back from Vacations (Riyadh - Karachi - Riyadh)
Vacations are over. I am back to Riyadh. It was a short vacation of just 20 days but a good one. This was my first vacation so I was waiting for it a lot. There were some changes in Karachi e.g.

  • Roads are in a process of rebuilding. It was very difficult to drive as there were traffic jams all over Karachi due to huge re-constructions. There were a lot of development. Now we have the first subway in Karachi near Shown Circle, Clifton.
  • Cars, Cars and Cars. The number of new cars has raised exponentially. I hardly see old FX, Mahran, alto. Banks have made it easy to buy cars. Unfortunately the number and capacity of roads has not been increased causing traffic jams.

Meeting with family and friends was the main part. Altogether it was an excellent trip.

Happy New Year + Eid in Pakistan

Happy New Year to all Pakistan. Allah ham sab k lia is naay saal ko pichlay saal say bahtar banaay. May Allah give us the vision to choose the right path.

Today is 379 th day of my job in Riyadh, Saudia. I am coming to Pakistan this weekend. You cannot guess guys, days are soooooooooo long to pass. I am literally counting day by day, putting cross on the calender everyday. :). Finally I am going to Pakistan on 20 days vacation. InshaAllah I will celeberate Eid with my family....


Outsourced opportunity – SMS / MMS application

A Saudi Arabia based e-news/stock company wants to outsource an application dealing with SMS/MMS. The bird's eye view of the application is like.


1) User can subscribe to the SMS/MMS service through the website or by sending SMS with a given code to a given number

          E.g. SMS 195 BN i.e. user wants to subscribe to BN (breaking news)


2) SMS can be scheduled to send according to subscriptions.


3) User can ask something using SMS and get reply like

          E.g. SMS 195 SR 1010 i.e. user want the SR (stock rate) of the company (no 1010). He should be instantly replied back with the current stock value.


Above listed are some of the features that the company wants to have in the application. Please contact if your company has experience of developing these kinds of applications OR you have any out of the box solution. Urgent replies will be appreciated.

Microsoft Products 2005 Launch in Riyadh
The Microsoft Products 2005 Launch Event in Riyadh was on 5th of this month i.e. last Monday. The banner says Microsoft SQL Server, Visual Studio and BizTalk but there was not a single event for BizTalk. The quality of presentations was poor (as far as technical point of view). I actually slept in two sessions, 10 min each. First the presentation was more towards marketing, covering the licensing packages, secondly the technical stuff was toooooo basic.

In VS. Net session, the guy was doing stuff like drag drop of grid and was happy with it. Man, show something new. The SQL Server guy said that the first prototype of SQL Server 2005 was developed in Jan 2001.hmmm thats new. He said that his presentation will cover business aspcets of SQL Server and he did :(.   Team System presentation by Ammar (one of the main guys in Microsoft Saudia) was good. He kept the audience involved all the time.

I have read the blog by Fahad saying that the administration in Pakistan for this event was not so good. Here nearly all of the Microsoft events like GDC, DevChat etc were organized by a third party MarcomArabia. They are good.

Last but not the least, I got my ticket confirmed for 7th Jan. I am coming home on this Eid inshAllah. I really want to pass this month as quickly as possible. It is only 20 days vacation but at least it is. Now may be I will join the coffee meeting :). Is it done? I do not think so. I did not read any news regarding the meeting.


JavaScript debugging + Dragging

Nice and easy method for JavaScript debugging, No more alterts; jsTrace.
One more good utility; DOM-Drag is a lightweight, easy to use, dragging API for modern DHTML browsers. Check the examples here   

Default sa password in SQL Server Express

Referring to Khurram's Post , @Khurram ,Can you explain a little more on the "Installing SQL Express on Domain" problem. Do you want to install SQL Express on machine having the active directory and access using some other machine? Or
You want to install SQL express on a machine that is a part of a domain?

One question from my side. If you install web express, SQL express will be installed automatically without asking you anything :( . What will the default password for "sa" user? I have tried hard to change authentication mode of default instance ".\sqlexpress" to SqlServer mode but no success. Finally I installed another instance with the "Hide advance settings" unchecked so that I can select SQL Server mode and enter a desirable password. Is there any way around to change it?

SQL express is not much stable. There was no problems during installation but it is throwing exceptions here and there.

Deleting Comments/ Coffee

If you delete some comments from one of your posts, it will not be shown on the page now but it will come in the statistics of your bloglist page. http://weblogs.com.pk/admin/blogs/postlist.aspx?App=YOURBLOGNAME.  I don't know how guys are putting images in your blog so I am pasting the html here. Is there any good place to upload images so that I can link it?

Title PubDate Comments Actions
Oracle - Problematic Wish List November 21, 2005 8:57 AM 8 Edit Delete
Deployed as a .Net Consultant. Funny isn't it???? November 19, 2005 8:46 AM 3 Edit Delete

I have 8 comments on one of my post and I deleted 4 but it is still showing 8. No No they are not actual comments, just some test comments, I know that we are not use to comments each other post :), we just read like reading a newspaper kind of thing, better go to some newspaper site. Guys.. comments on each other blogs, do DISAGREE or at least agree. Make it a blog site not a news site.

What happened to your coffee, guys? I am still waiting to smell it here from Riyadh. :). FK, Mr.Geek, Khurram, and more.?? Ok let me think, khurram is too busy in handling his personal as well technical life. (I really appreciate him and i will try to be like him after I get married ..if i.... hope so :) ). Fahad is too busy in his photography, driving, new projects etc etc. Nothing to say about the fakegeek as he is already a geek :).

Current Activities 23Nov2005

Doing THE .Net Consultancy job from 7 to 3. Believe me guys, it is tough to wake so early if you normally sleep after 1 or 2. Then sometimes have to go to my original office to resolve issues like vacations, salary or sometimes to support previous projects I was working on. A trend of quitting job has been set in my office. One fellow has gone to Singapore, other is going to Ireland in few days. Last but not the least, doing some zaate kaaam as well to earn some extra roopya.

and yeah one more thing... listening to Dr. Israr Ahmed and Zakir Naik lectures. Currently I am going through lectures of Dr. Israr regarding to the tashreeh and tafseer of the whole Holy Quran. Learned so many basic things about religion, also the history of Christians, Jews and Islam because Dr. Israr goes into each and every detail.

If you are too busy in your daily activities, don't have time to read understand the Holy Quran, you should go for this option. It is too easy for guys like us who are sitting in front of their so called wife "the computer" most part of the day. (My mamoon used to say "He does not need to get married, he has his wife "computer"). Just play the audio for half an hour. Best part is you can do the work in parallel as well although it is not recommended. If you want to download the audio/video, you can go to http://aswatulislam.net/, a site with a huge audio/video collection of different scholars.

and.... :( trying to get my vacation application approved by both the client and office. See.. if you are deployed then you are like a step child. Client will say that you are not his employee and the office will say that your issues will be solved according to client point of interest. Pray for me guys. Dec 14 is going to be the anniversary of my arrival here in Saudia. I am trying to be in Pakistan on Eid.

Oracle - Problematic Wish List
This is not a wish list like khurram use to post about different things. This is not a list of problems fahad use to post about oracle. This is a problematic wish list. Some solved, some left, some in searching phase, and some waiting for your comments so do comments the solution or add a problematic wish.
No bool datatype
Currently I am handling it in Business Objects by converting integer into boolean in properties
Auto generated column
I have to make one sequence for every table that have auto generated primary key.
CamelCase Naming convention
Oracle saves the table names in UPPER CASE. Initially I was having name like this LONGCONTRACTPAYMENTS :). The normal convention I have found is LONG_CONTRACT_PAYMENTS. Now I am following the same convention.
Long/Big Names
I cannot name a table like LONG_CONTRACT_PAYMENTS_DETAILS. I have to do it like LC_PAY_DETAILS. Cannot have big names.
Drag Drop ERD Diagrams
After some searching and going through the tools, I came to know that Toad 8.5 provide this but with limited functionality not like SqlServer Database designer. Toad has a model view as well to generate queries as we have in SqlServer.
Changing order of columns
What if I want to change the order of columns in a table. I cannot find a simple way. Same Toad8.5 comes for the rescue. It uses a little trick by making a new table with the changed order and transferring the data, renaming the old and new tables. You may be thinking why the hell I want to change the order of columns. Bottom line is : Put the mostly selected columns first. The select query will be faster. I have read it somewhere, do not remember the link now.
After some searching I found that Oracle has its own globalization client/server architecture i.e. you have to specify character sets for both database and the clients who will access it. I put UTF-8 for both. Now I can save/view Arabic data through my application as well the Oracle Enterprise Manager but SQL-PLUS and Toad is showing corrupted data. I do not know the remedy now but happy that now Arabic data can be handled in my app.

May be for you guys this is a small issue but here in Saudi Arab, this is THE MOST critical issue. You know globalization, you can understand arabization but you might be thinking what is Saudization. The term is used when we are using pure Saudi Arabi's Arabic :). May be you people can call it urduization in general and pakistanization or better pakization :).

Bottom Line
Now I know why oracle guys are paid more because oracle is difficult because it is difficult to do small things in oracle easily. :). My tip is: after trying different clients tools, I think Toad is far better than others.
Deployed as a .Net Consultant. Funny isn't it????

I have been deployed (sold/given on rent. [:O] yeah yeah I actually got a chance to see my Purchase Order) to the SEC (Saudi Electric). It is a huge company covering all the electrical aspects of the Kingdom. Guys working in Saudi know about it. Timings are good. Straight 7 to 3 no lunch break. It is a 6 months contract. I had to cancel my Eid ul Fitar Holidays [:(] but InshaAllah I will be going Pakistan on Eid ul Zuha [:)].

There are no BIG projects here. I have been deployed as a .Net Consultant. hahahaha. [:D] Check my designation guys. I am a consultant now. Do not blame me. I know I am not that good[;)] but it is my company who think I am. Currently I am working on their small projects for their office automation.
 Did I mention that I am working on Oracle?????????? :(. Working on oracle after 4 years is a very ... task (Fill in the blanks as I cannot choose a word).
I will post something regarding problems in oracle soon. I think that FK will raise hands for me.

I am wearing all the caps here except the GD (the graphics designer). I am thinking about taking some lessons on Adobe Photoshop as well as to reduce this dependency as well :). May be FK can help on this. Going from all the lifecycle myself alone. Which kind of development is that? Can anyone point?

 I am unable to see the smileys I have added through the editor. Am I the only one who cannot see?? [:@]

Man Made Artificial Earthquakes
 // Please Note
/* This post is being Ctrl+C and Ctrl+V from one of the emails I got. Not sure about its authenticity. Posted it here so that may be someone else who know something about it can comment */

Man Made Earthquakes
Here's a direct quotation from the former U.S. Secretary of Defense, dealing with the very kind of electromagnetic weapons that you thought was a conspiratorial notion. Feel free to check the reference; it's in the official transcript as cited.

"Others [terrorists] are engaging even in an eco-type of terrorism whereby they can alter the climate, set off earthquakes, volcanoes remotely through the use of electromagnetic waves... So there are plenty of ingenious minds out there that are at work finding ways in which they can wreak terror upon other nations...It's real, and that's the reason why we have to intensify our [counterterrorism]  efforts."

Former secretary of Defense William Cohen at an April 1997 counterterrorism conference sponsored by former Senator Sam Nunn. Quoted from department of defense news briefing, Former secretary of Defense William S. Cohen, Q&A at the Conference on Terrorism, Weapons of Mass Destruction, and U.S. Strategy, University of Georgia, Athens, Apr. 28, 1997.

Now two famous scientists have invented something, which could cause serious damage not only to civilization but also to earth itself.

The ionosphere is being manipulated by US govt. scientists using an Alaskan transmitter called HAARP, (High-Frequency Active Auroral Research Program) which sends focused radiated power to heat up sections of the ionosphere, which bounces power down again. ELF waves from HAARP when targeted on areas can weather-engineer and create mood changes affecting millions.

And GWEN (Ground Wave Emergency Network) transmitters placed 200 miles apart across the USA allow specific frequencies to be tailored to the geomagnetic-field strength in each area, allowing the magnetic field to be altered. They operate in the VLF range, with transmissions between VLF 150 and 175 KHz. They also emit UHF waves of 225 - 400 MHz.

Response to these American artifacts, Former Soviet Union (FSU) developed and boasted of weather modification technology during the 1960's and 70's with deployment against the United States coming in 1976 with the audible arrival of the woodpecker grid. These weather operations continue to this date

Invisible enormous rivers of water, consisting of vapors that flow, move towards the poles in the lower atmosphere. They rival the flow of the Amazon River and are 420 to 480 miles wide and up to 4,800 miles long. They are 1.9 miles above the earth and have volumes of 340 lbs of water per second. There are 5 atmospheric rivers in each Hemisphere. A massive flood can be created by damming up one of these massive vapor rivers, causing huge amounts of rainfall to be dumped. The GWEN Towers positioned along the areas north of the Missouri and Mississippi Rivers were turned on for 40 days and 40 nights, probably mocking the Flood of Genesis. (This was in conjunction with HAARP, that creates a river of electricity flowing thousands of miles through the sky and down to the polar ice cap, manipulating the jet stream, like The Woodpecker.) These rivers flooded, causing agricultural losses of $12-15 billion. HAARP produces earthquakes by focusing on the fault lines. GWEN Towers are on the fault lines and volcanic areas of the Pacific Northeast.

Tsunami, Rita and other natural disasters were not natural disasters, those were man made disasters, basically that all was demonstration of their skills and powers/technologies which they do posses, in case of Pakistan this could be from both the powers, cause Pakistan is neither in the good books of US and nor in USSR's, bottom line is "can any of our scientists could tell us this earthquake was generated by US or USSR"?? We do found number of dead fishes at our coastal areas, and Karachi was also hit by minor earthquakes, similar situation was seen after tsunami at Australia and New Zealand beaches but in their case they do know that seismic test were going on and those fishes might had have died due to the said tests, what about Karachi????? Do we know any thing about seismic test at our beaches??
Nikola Tesla and Tom Bearden, these are the two genius scientists who make the difference in the current scenario.

For more details you can visit these links related to the topics:



Wild and creative ways to use an IBM laptop

Wacky laptop tricks
Wild and creative ways to use an IBM laptop. Pic below is showing just one of them. I bet IBM can use this guy in their advertisements. :)

fahad, why donot you make some pictures like that?? :)

MySQL 5.0 Released

Text copied from http://www.mysql.com/news-and-events/news/article_976.html for people who donot want to click.

Enterprise Platform Vendors Express Enthusiastic Support for World's Most Popular Open Source Database

Major New Version Delivers Advanced SQL Standard-Compliant Features
Such as Stored Procedures, Triggers, Views & New Pluggable Storage Engines

UPPSALA, Sweden & CUPERTINO, Calif. -- October 24, 2005 -- MySQL AB, developer of the world's most popular open source database, today announced the general availability of MySQL 5.0, the most significant product upgrade in the company's ten-year history. Starting today, MySQL 5.0 can be downloaded under the open source GPL license at http:/dev.mysql.com.

"We are quite proud to deliver this new version of MySQL -- as it includes the most-requested features from our users, customers and partners," said Marten Mickos, CEO of MySQL AB. "With their feedback, we have been able to provide important enterprise-class features while staying true to MySQL's renowned heritage of high-performance, reliability and ease-of-use."

MySQL 5.0's Enterprise Database Features

The new MySQL 5.0 combines enterprise-grade reliability and performance with advanced SQL 2003 standard-compliant features, making it the most cost-effective database solution for business-critical applications. The product's new functionality will be especially familiar to database developers and DBAs of proprietary relational database systems -- allowing IT departments to ease the integration and transition of their data, applications and skill-sets.

MySQL 5.0 delivers dozens of new enterprise features, including:

  • Stored Procedures and SQL Functions -- to embed business logic in the database and improve performance;
  • Triggers -- to enforce complex business rules at the database level;
  • Views -- to ensure protection of sensitive information;
  • Cursors -- to allow easier database development and reference of large datasets;
  • Information Schema -- to provide easy access to metadata;
  • XA Distributed Transactions -- supports complex transactions across multiple databases in heterogeneous environments;
  • SQL Mode -- provides server-enforced data integrity for new and existing data;
  • New Federated and Archive Storage Engines -- MySQL's unique pluggable storage engine architecture allows greater flexibility, functionality and performance by making it easy to swap database engines in and out, based on users' application requirements;
  • New Migration Toolkit -- A new graphical toolkit that completely migrates all data and objects from Oracle, Microsoft SQL Server, Microsoft Access and other database platforms to MySQL;
  • Instance Manager -- new management assistant that allows remote starting/stopping of any MySQL Server, as well as remote editing of configuration files, reading of error and query logs, and more;
  • Updated Connectors and Visual Tools -- new high-performance versions of MySQL's ODBC, Java and .NET database drivers are now available, along with updated versions of the MySQL Query Browser and MySQL Administrator.

"MySQL 5.0 represents a huge leap in features and functionality for the MySQL database," said Gunter Rombauts, European IT manager for Chicago Metallic. "As a worldwide leader in metal ceiling systems, it's critical that our database supports heavy-duty enterprise applications with speed and reliability.  We are looking forward to using MySQL 5.0 as a key component of Chicago Metallic's global IT infrastructure."

Read More.............