Here is how you can do that:



Prototype design pattern.

August 18, 2006

As we all know what a prototype is and whats the use of it. Moving on to .NET, one of the famous design patterns is the Prototype pattern. This falls under the creational patterns. It helps us to reduce the number of classes in application development. The prototype pattern is used when creating an instance of a class is very time consuming or complex in some way. Then rather than creating more instances, it is possible to make copies of the original instances and modifying them as appropriate.

This is achieved in .NET by using the ICloneable interface. So every prototype class implements the ICloneable interface from which the Clone() method is overriden in our class to provide to functionality to clone the class outside. Clone can be implemented either as a deep copy or a shallow copy. In a deep copy, all objects are duplicated; whereas, in a shallow copy, only the top-level objects are duplicated and the lower levels contain references.

The resulting clone must be of the same type as or a compatible type to the original instance.

System.Object provides a protected method MemberwiseClone which can be used to implement Shallow cloning. This method is marked as protected, so you can access this method in context of a derived class or within that class itself.

.NET defines an interface called IClonable which has to be implemented by classes that need functionality beyond the scope of shallow cloning (for deep cloning). We need to provide a suitable implementation in the Clone method of the interface to do the same. There are various ways to implement deep cloning. One method is to serialize the object into a memory stream and deserialize it back into a new object. We would need to use a Binary formatter or SOAP formatter which do a deep serialization. The problem with this approach is that the class and its members have to be marked as serializable, else the formatter would through an exception.

Reflection may be another method to achieve the same.

The Native API is provided to user-mode programs by the NTDLL.DLL library. NTDLL.DLL, besides containing Native API user-mode entry points, has process startup and module loading code in it. The bulk of it, though, are the Native API stubs that transfer control to kernel mode. This is accomplished by executing a software exception. The list of such undocumented API’s is provided in the attached .doc file.



June 18, 2006

I’ve been given the “TOP 100 POSTERS” title at . Solving others’ problems is really a thing which gives satisfaction and a real good way to enhance own skills.


The Power Of Google!

June 11, 2006

Several of us use Google through out the day for simple stuff, but we’ve never quite grasped the power of this tool.  So, I am pasting some tips from an article that David Pogue published in NY Times. (Pogue is a column writer for NY Times’ weekly Circuits e- magazine.)  Enjoy!

1. .. Download and install the Google toolbar. Not only does it put the Google search box into your browser full-time, but it also blocks pop-up ads and fills in forms for you.
For Windows at .. (Ad blocking, form-filling and Google’s search box are already built into the Apple’s Web browser, Safari.)

2… Phrase your question in the form of an answer.   So instead of typing, “What is the average rainfall in the Amazon basin?”, you might get better results by typing “The average rainfall in the Amazon basin is.”

3… This is an old one, but very important: Put quotes around phrases that must be searched together. If you put quotes around “electric curtains,” Google won’t waste your time finding one set of Web pages containing the word “electric” and another set containing the word “curtains.”

4… Similarly, put a hyphen right before any word you want screened out. If you’re looking up dolphins, for example, you’ll have to wade through a million Miami Dolphins pages unless you search for “dolphins -Miami.”

5… Google is a global White Pages and Yellow Pages. Search for “phonebook: home depot norwalk, ct,” Google instantly produces the address and phone number of the Norwalk Home Depot. This works with names (“phonebook:robert jones las vegas, NV”) as well as businesses. Don’t put any space after “phonebook.” And in all of the following
examples, don’t type the quotes I’m showing you here.

6… Google is a package tracker. Type a FedEx or UPS package number (just the digits); when you click Search, Google offers a link to its tracking information.

7… Google is a calculator. Type in an equation (“32+2345*3-234=”).

8… Google is a units-of-measurement converter. Type “teaspoons in a gallon,” for example, or “centimeters in a foot.”

9… Google is a stock ticker. Type in AAPL or MSFT, for example, to see a link to the current Apple or Microsoft stock price, graphs, financial news and so on.

10… Google is an atlas. Type in an area code, like 212, to see a Mapquest map of the area.

11… Google is Wal-Mart’s computer. Type in a UPC bar code number, such as “036000250015,” to see the description of the product you’ve just “scanned in.” (Thanks to the Google Blog, , for this tip and the next couple.)

12… Google is an aviation buff. Type in a flight number like “United 22” for a link to a map of that flight’s progress in the air. Or type in the tail number you see on an airplane for the full registration form for that plane.

13… Google is the Department of Motor Vehicles. Type in a VIN (vehicle identification number, which is etched onto a plate, usually on the door frame, of every car), like “JH4NA1157MT001832,” to find out the car’s year, make and model.

14… For hours of rainy-day entertainment, visit .. Here, you’ll find links to new, half- finished Google experiments-like Google Voice, in which you call
(650) 623-6706, speak the words you want to search for and then open your browser to view the results. Disclaimer: It wasn’t working when I tried it. (Ditto a lot of these experiments.)

15… Poke around the “Services & Tools” link on the home page and you’ll find some of the better-known lesser-known Google features, if that makes any sense.
For example, there’s Froogle (product search), News, Groups (Internet discussion boards), Google Catalogs (hundreds of scanned- in product catalogs), Images (find graphics and photos from other people’s Web sites), Blogger (publish your own online journal), Google language translation, Google Answers (pay a couple of bucks to have a professional researcher find the answers for you) and much more.



Heres a trick that can get you all the search results to your office mailbox. This is helpful when google is blocked for some stupid reasons.

To all those folks who cannot access internet from the office…there is No need of it… read down. To search and receive Google search results thru email. Try the info given below. Just send an email to and put the text of your query in the "Subject" line. You will receive the search results as email to your mail id.
Once you get the result for the searches… u can get the contents of a URL using the below feature!! To receive the web content of a url, send email to web@pagegetter.comand subject should contain the url whose content has to be fetched.  


Change of plans…

May 25, 2006

I got this as a suggestion that, I should keep this space as a questionnaire. And I would try to solve as many problem as I can regarding .NET (VB,ASP and C#).
Thanks Uncle Ray for the comment and suggestion. I already have space at blogspot where I put up my thoughts.

– Bugs!