17 May 2009

Google's new features : Wonder wheel


Hey, Did anyone noticed Google's new feature when you search something. It gives you more control over your search query. You can see the hyperlink came up when you search something called Show options.... You click on it and magic happens.... well you will say what is new with that options panel. But as you can notice it allows you to filter your result with regards to the time articles published, if you want to see only videos or forums or reviews and there is something very special called wonder wheel. You click on it and it gives you the options to further refine your result. It is really cool.!!!



For example you search for car dealers in sydney and click on the wonder wheel and it automatically refine your search result and allow you to pick up options to go for particular area in sydney and when you choose something it further gives you the options to choose type of car you want. I find it really cool and I am sure you will also enjoy it. Though it is a good option for end users it is a pain in ass for Search Engine Optimization (SEO) guys as they have to take into account this new feature and try to rank their websites for all possible keywords. It will certainly take time for people to get used to with this new feature and use it more frequently and by that time SEO guys needs to come up with solutions to fool this wonder wheel. I hope they will find out something very soon otherwise they are in trouble.
By the time enjoy coffee... and think of ideas.....

10 May 2009

Serialization in .NET

This article is about serialization facility in .NET framework and particularly Object Serialization. So lets start from scratch and define first what is serialization ?

Serialization is the process of storing objects to the file or isolated file and later use it in the same application or same process or in another application on remote machine. It is just like you store data to a file and later use it in another application or same application. The difference here is you are storing objects not some random data and later recreate same object via deserialization.

This process is made simple via .NET frameworks serialization classes. The namespace we are looking here is System.Runtime.Serialization. Serialization save a lot of development time. There are three different kind of serialization provided by .NET framework.

1. Object Serialization
2. XML Serialization
3. Custom Serialization

In this article we will look at Object Serialization.

To serialize an object is very simple process.
1. Create a stream object that can hold the serialized object.
2. Create a BinaryFormatter object (namespace System.Runtime.Serialization.Formatters.Binary).
3. Call BinaryFormatter.Serialize method to serialize the object and output it to a stream.

Lets see it in example. I use C# as a programming language here.

// string object data that is to be serialized.
string data = "This data is to be serialized";

// Create a file stream to save data.
FileStream fs = new FileStream("mySerialiedData.dat",FileMode.Create);

//Create BinaryFormatter object
BinaryFormatter bf = new BinaryFormatter();

// use bf object to serialize data.
bf.Serialize(fs,data);

//close file stream
fs.Close();


That's it the data object is serialized and stored in file mySerializedData.dat.

You can deserialize it using BinaryFormatter's Deserialize method. You need to cast the object back to proper data type.

FileStream fs = new FileStream("mySerializedData.dat",FileMode.Open);
BinaryFormatter bf = new BinaryFormatter();
string data = (string) bf.Deserialize(fs); // cast it back to string object
fs.close();

You can serialize and deserialize any object using same technique.

You can make the custom class Serializable and Deserializable by using [Serializable] attribute.

For example:

[serializable]
class Product
{
public int id;
public string name;
public float price;
public double tax;
}

If tax is calculated using value of price than there is no need to serialize it to reduce the size of serialized object. To do this declare it as a [NonSerialized] attribute and implement IDeserializationCallback interface to calculate it when deserializing the object.


For example:

[serializable]
class Product : IDeSerializationCallback
{
public int id;
public string name;
public float price;
[NonSerialized]public double tax;

void IDeserializationCallback.OnDeserialization(object sender)
{
tax = price*0.1;
}
}

Now the value of tax will be available to the application that deserialize the object of Product class via OnDeserializing callback method.

This is how the serialization works in .NET environment. Isn't it really simple? So enjoy serializing. And by the way the closest resemblance to serialization is the teleportation in science fiction !

06 May 2009

Windows 7 Release Candidate

Hi All,

Watch out !!! Windows 7 is on its way. Release Candidate is available for download now. Though its not final version yet RC is more close to the final version. Those who may have used beta or wants to check whats new can download it from Microsoft Windows 7 official website. Have a look at the systems requirements.


A PC for testing that meets these minimum system requirements (specific to Windows 7 RC and subject to change in the final version of Windows 7):

*1 GHz or faster 32-bit (x86) or 64-bit (x64) processor
*1 GB RAM (32-bit) / 2 GB RAM (64-bit)
*16 GB available disk space (32-bit) / 20 GB (64-bit)
*DirectX 9 graphics processor with WDDM 1.0 or higher driver

One thing is sure it is going to be the big installation. So those who are using XP on old systems might be disappointed. And one advise those who are buying PC or Notebook at the moment. Wait for a while or ask your dealer if you can get the free upgrade to Windows 7 in future.

21 April 2009

Oracle to buyout Sun Microsystems

Yesterday Oracle Corporation formally announced its intention to buy Sun Microsystems. This is bit of a shock news for me and sure for lot of those who follow Sun closely. Hey my concern is not about dog eat dog situation here. The big question that concern me is that Is it the end of open source era? I hope certainly not. As Sun Microsystems is the biggest Open Source solutions and products provider and lots of penetration in the market this potential take our will create big concern in the market. Lets See how this goes as the Oracle still have to overcome stakeholders approval of this big transaction. Can Oracle really be the Oracle (the one that can see in future) and snatch the deal? You can read the story on Oracle Press release.

05 April 2009

Windows: Create Naameless Folder and Files

This is a fun!!! Lets Create Nameless Folder or File.

1.Select any file or folder or create new one.
2.Right click on it, press rename or simply press F2.
3.Press and hold the alt key. While holding the Alt key, type numbers 0160 from the numpad.

Note: Type the numbers 0160 from the numpad, that is, the numbers present on the right side of the keyboard. Don't type the numbers which are present on top of the character keys. Notebook users first click on numlock key to use this feature.

4. Press Enter and the nameless file or folder will be created.

What is the rational behind it?

The file or folder that seems nameless is actually named with a single space.

But what if you want to create another nameless file or folder in the same directory?

For this you will have to rename the file with 2 spaces. Just follow these steps below:

1.Select file, press F2.
2.Hold alt key and type 0160 from the numpad.
3.Release the alt key. Now without doing anything else, again hold alt key and press 0160.
4.Press enter and you will have second nameless file in the same directory.
5.Repeat step 3 to create as many nameless files or folders in the same directory.

Windows XP : Some useful and intersting commands

These are some useful and interesting Windows XP commands you may want to use. I compiled a list of commands that you may find interesting. So just go to Start menu and click Run... and type following commands to see yourself what they do....

#SQL Client Configuration - cliconfg
#System Configuration Editor - sysedit
#System Configuration Utility - msconfig
#System File Checker Utility (Scan Immediately)- sfc /scannow
#System File Checker Utility (Scan Once At Next Boot)- sfc /scanonce
#System File Checker Utility (Scan On Every Boot) - sfc /scanboot
#System File Checker Utility (Return to Default Setting)- sfc /revert
#System File Checker Utility (Purge File Cache)- sfc /purgecache
#System File Checker Utility (Set Cache Size to size x)-sfc/cachesize=x
#System Information - msinfo32.
#Task Manager – taskmgr
#System Properties - sysdm.cpl
#Task Manager – taskmgr
#TCP Tester - tcptest
#Telnet Client - telnet
#Tweak UI (if installed) - tweakui
#User Account Management- nusrmgr.cpl
#Utility Manager - utilman
#Windows Address Book - wab
#Windows Address Book Import Utility - wabmig
#Windows Backup Utility (if installed)- ntbackup
#Windows Explorer - explorer
#Windows Firewall- firewall.cpl
#Windows Magnifier- magnify
#Windows Management Infrastructure - wmimgmt.msc
#Windows Media Player - wmplayer
#Windows Messenger - msmsgs
#Windows Picture Import Wizard (need camera connected)- wiaacmgr
#Windows System Security Tool – syskey
#Windows Update Launches - wupdmgr
#Windows Version (to show which version of windows)- winver
#Windows XP Tour Wizard - tourstart
#Wordpad - write
#Password Properties - password.cpl
#Performance Monitor - perfmon.msc
#Phone and Modem Options - telephon.cpl
#Phone Dialer - dialer
#Pinball Game - pinball
#Power Configuration - powercfg.cpl
#Printers and Faxes - control printers
#Printers Folder – printers
#Private Character Editor - eudcedit
#Quicktime (If Installed)- QuickTime.cpl
#Real Player (if installed)- realplay
#Regional Settings - intl.cpl
#Registry Editor - regedit
#Registry Editor - regedit32
#Remote Access Phonebook - rasphone
#Remote Desktop - mstsc
#Removable Storage - ntmsmgr.msc
#Removable Storage Operator Requests - ntmsoprq.msc
#Resultant Set of Policy (XP Prof) - rsop.msc
#Scanners and Cameras - sticpl.cpl
#Scheduled Tasks - control schedtasks
#Security Center - wscui.cpl
#Services - services.msc
#Shared Folders - fsmgmt.msc
#Shuts Down Windows - shutdown
#Sounds and Audio - mmsys.cpl
#Spider Solitare Card Game - spider
#Malicious Software Removal Tool - mrt
#Microsoft Access (if installed) - access.cpl
#Microsoft Chat - winchat
#Microsoft Excel (if installed) - excel
#Microsoft Frontpage (if installed)- frontpg
#Microsoft Movie Maker - moviemk
#Microsoft Paint - mspaint
#Microsoft Powerpoint (if installed)- powerpnt
#Microsoft Word (if installed)- winword
#Microsoft Syncronization Tool - mobsync
#Minesweeper Game - winmine
#Mouse Properties - control mouse
#Mouse Properties - main.cpl
#Nero (if installed)- nero
#Netmeeting - conf
#Network Connections - control netconnections
#Network Connections - ncpa.cpl
#Network Setup Wizard - netsetup.cpl
#Notepad - notepad
#Nview Desktop Manager (If Installed)- nvtuicpl.cpl
#Object Packager - packager
#ODBC Data Source Administrator- odbccp32.cpl
#On Screen Keyboard - osk
#Opens AC3 Filter (If Installed) - ac3filter.cpl
#Outlook Express - msimn
#Paint – pbrush
#Keyboard Properties - control keyboard
#IP Configuration (Display Connection Configuration) - ipconfi/all
#IP Configuration (Display DNS Cache Contents)- ipconfig /displaydns
#IP Configuration (Delete DNS Cache Contents)- ipconfig /flushdns
#IP Configuration (Release All Connections)- ipconfig /release
#IP Configuration (Renew All Connections)- ipconfig /renew
#IP Configuration(RefreshesDHCP&Re-RegistersDNS)-ipconfig/registerdns
#IP Configuration (Display DHCP Class ID)- ipconfig/showclassid
#IP Configuration (Modifies DHCP Class ID)- ipconfig /setclassid
#Java Control Panel (If Installed)- jpicpl32.cpl
#Java Control Panel (If Installed)- javaws
#Local Security Settings - secpol.msc
#Local Users and Groups - lusrmgr.msc
#Logs You Out Of Windows - logoff.....
#Accessibility Controls - access.cpl
#Accessibility Wizard - accwiz
#Add Hardware - Wizardhdwwiz.cpl
#Add/Remove Programs - appwiz.cpl
#Administrative Tools control - admintools
#Adobe Acrobat (if installed) - acrobat
#Adobe Designer (if installed)- acrodist
#Adobe Distiller (if installed)- acrodist
#Adobe ImageReady (if installed)- imageready
#Adobe Photoshop (if installed)- photoshop
#Automatic Updates - wuaucpl.cpl
#Bluetooth Transfer Wizard – fsquirt
#Calculator - calc
#Certificate Manager - certmgr.msc
#Character Map - charmap
#Check Disk Utility - chkdsk
#Clipboard Viewer - clipbrd
#Command Prompt - cmd
#Component Services - dcomcnfg
#Computer Management - compmgmt.msc
#Control Panel - control
#Date and Time Properties - timedate.cpl
#DDE Shares - ddeshare
#Device Manager - devmgmt.msc
#Direct X Control Panel (If Installed)- directx.cpl
#Direct X Troubleshooter- dxdiag
#Disk Cleanup Utility- cleanmgr
#Disk Defragment- dfrg.msc
#Disk Management- diskmgmt.msc
#Disk Partition Manager- diskpart
#Display Properties- control desktop
#Display Properties- desk.cpl
#Display Properties (w/Appearance Tab Preselected)- control color
#Dr. Watson System Troubleshooting Utility- drwtsn32
#Driver Verifier Utility- verifier
#Event Viewer- eventvwr.msc
#Files and Settings Transfer Tool- migwiz
#File Signature Verification Tool- sigverif
#Findfast- findfast.cpl
#Firefox (if installed)- firefox
#Folders Properties- control folders
#Fonts- control fonts
#Fonts Folder- fonts
#Free Cell Card Game- freecell
#Game Controllers- joy.cpl
#Group Policy Editor (XP Prof)- gpedit.msc
#Hearts Card Game- mshearts
#Help and Support- helpctr
#HyperTerminal- hypertrm
#Iexpress Wizard- iexpress
#Indexing Service- ciadv.msc
#Internet Connection Wizard- icwconn1
#Internet Explorer- iexplore
#Internet Setup Wizard- inetwiz
#Internet Properties- inetcpl.cpl

02 February 2009

Rubic cube 360 : coming soon


Do you folks love Rubic cube ? Some geek will say whats new with that freaking square... It eat half of my time i should have done something else. An interesting bit for someone who don't know anything about Rubic cube!!! The Cube was an instant success when it was first exported from Communist Hungary in 1980, becoming the world’s fastest-selling toy and a must-have accessory in the school playground as well as the home.More than 350 million have been sold worldwide and the Cube retains a cult following, with almost 40,000 entries on YouTube featuring tutorials and video clips of quick solutions. It took Graham Parker a notorious Rubic cube lover 26 years to solve a single puzzle !!! I know now you will scream "What The F***?". Anyways there is a good (and indeed bad for some) news that the puzzle got reincarnation. New version of Rubic Cube is coming soon called Rubic 360. The new puzzle, called Rubik 360, is set for an official unveiling at the German toy industry fair on February 5. Like the original, the premise is simple.Oh no! Another 26 years!!! May be. There are two spheres and inner one contain colored balls and there are only two holes in it and player must get all colored balls to its corresponding outer sphere matching circle. Sounds simple so does the original.

RUBIK’S CUBE FACTS

* It has 43,252,003,274,489,856,000 possible combinations on its six faces

* It has only one solution

* More than 350,000,000 Cubes sold worldwide

* Invented in 1974 but not exported from Hungary until 1980

* A standard 3x3 Rubik’s cube measures 2¼ inches (5.7cm) on each side


* The first international 'speedcubing’ championship was held in Hungary in 1982 and was won by Los Angeles student Minh Thai with a time of 22.95 seconds.

* The current British 'speedcubing’ champion is Breandan McElhill, 16, from Ayrshire with an unofficial personal best time of 7.9 seconds.

* The current world 'speedcubing’ champion is Dutch teenager Eric Akkersdijk with an official time of 7.08 seconds.