Sunday, March 21, 2010

Don't have a DVD drive?, it won't be a problem any more

Most of the Operating Systems are now come in a DVD Rom, then if any one doesn't have a DVD Rom Drive, installing those operating systems will be a problem. Some body may want to barrow a DVD Drive from somebody.

Windows 7 provide a remarkable tool to preparing USB flash drive to install windows 7 in your PC. You don't won't a DVD Drive, and it is much easier to carry a USB thumb drive than a DVD.

The tool which provide this facility in windows 7 is diskpart tool,it's a disk partitioning utility and windows 7 install this tool while installing the operating system. To prepare your USB thumb drive follow these steps.

Open command prompt (hope every body know where to find command prompt in windows :)) and then just type diskpart and hit enter. diskpart tool will open.

Then first you have to select your USB thumb drive. be careful with this otherwise you will lose your data in your own hard disk. type list disk to see all disks available.

select your thumb drive by typing select disk + disk no as display on the tool window, be careful with this.

Then run clean, this will remove file system on your thumb drive.

Then you have to create primary partition on your thumb drive and active it. just type create partition primary and then active.

Then you need to set up the Fat 32 file system by running format fs = fat32 (format fs = fat32 quick if you need a quick format).


Then you can copy everything from the Windows 7 installation DVD onto the USB key (a simple drag and drop will do).

Then restart the computer and select thumb drive from the Boot Menu.

OS will install as normal as when you install it using a DVD.

Saturday, March 20, 2010

Making OpenOffice Add-On go easier

There is a plugin for Netbeans to develop Add-on for OpenOffice, no need to bother about coding a Add-on, only you have to bother is what Add-on do and how to code them. Netbeans provide facility to develop Add-on, test coded add-on in OpenOffice directly and debug them.


But there is one thing you have to install openoffice.org SDK development kit in your system and openoffice too :). http://download.openoffice.org/sdk/index.html.


All setting can be of the add-on can be done while creating it like define user commands.


After you click Finish, the wizard creates two configuration files and a Java class.The AddOns.xcu configuration file includes the add-on parameters, and ProtocolHandler.xcu defines the protocol handler configuration. Protocol handlers are part of OpenOffice.org dispatch framework; they bind user-interface controls, such as menu or toolbar items, to the functionality of penOffice.org. Everything reachable through the user interface is described by a command URL and corresponding parameters.

The structure of the ProtocolHandler.xcu file defines a namespace for the add-on, All commands
defined by the same addon use this namespace.

The dispatch() method is where user code is begin to code. As a example from dispatch() method we can call another class or method.

Following is a example code where insert "Hello World" to the document.