Friday, July 31, 2009

Add MP3 support in Fedora

Unfortunately Fedora cannot include support for MP3 or DVD video playback or recording. MP3 formats are patented, and the patent holders have not provided the necessary licenses. Fedora also excludes other multimedia software due to patent, copyright, or license restrictions, such as Adobe Flash Player and RealNetworks RealPlayer.
Adding MP3 support to your fedora installation is a simple process. The steps are as below:
(a) Launch terminal and issue command "su" and enter the root password.
(b) copy and paste the following command and press enter:
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
(c) once the above command finishes, issue the following command:
rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
(d) Now, Install all other plug ins..
yum -y install gstreamer-plugins-bad gstreamer-plugins-ugly xine-lib-extras-nonfree

Installing Glassfish server adapter for Eclipse

Installing and running the Sun Glassfish server on a windows machine on any port number is simple out of the box. The installer from Sun allows you to configure the HTTP port number as well as the Admin port number. Yes, the port numbers for the Admin console and HTTP server are different compared to Tomcat or Apache Geronimo or IBM Websphere Community Edition.
Once the server is installed developers will need the Glassfish server adapter for Eclipse, which can be installed using any of the following ways: 
(a) using the "Download Additional Server Adapters" from within Eclipse IDE for which instructions can be found at
    https://glassfishplugins.dev.java.net/eclipse34/
(b) download the jars and install the plugin manually. jars to download can be found at
    https://glassfishplugins.dev.java.net/download/index.html
You will need to download 2 jar files: Plugin jar and the Feature jar, you will need to extract then into the plugins and the features directory respectively. Also, note that these jars have to be extracted in a folder named with the same name as the jar files.
Using one out of the above two steps you should be able to install the Glassfish server adapter in Eclipse with WTP plugins.
However, if for any reasons you do not find the option to add the Glassfish server after following the above steps, you can follow the steps below:
1. Click on Help -> Software Updates
2. Click on the "Available Software" tab and then click on "Add site"
3. Enter the location 
          https://ajax.dev.java.net/eclipse
and click on OK.
4. Once the location is added into the "Available Software" list you can expand it and select the plugins to install.
5. You will need to accept the security certificate to complete the installation.
6. Restart Eclipse and you will find the Glassfish server adapter in the list to add a new server.

How to remove GRUB from Vista patition

If you simply remove the Linux partition, GRUB (Linux boot loader) will still be on your PC (in control if it was installed on the first partition / default location). 
So you need to restore your Master Boot Record (MBR) for Vista (so that Vista will handle the booting, not GRUB).
Here is how to repair/restore your Master Boot Record (MBR)
1. Put the Windows Vista installation disc in the disc drive, and then start the computer.
2. Press a key when you are prompted.
3. Select a language, a time, a currency, a keyboard or an input method, and then click Next.
4. Click Repair your computer.
5. Click the operating system that you want to repair, and then click Next.
6. In the System Recovery Options dialog box, click Command Prompt.
7. Type Bootrec.exe /FixMbr, and then press ENTER.
That's it. Now when you reboot your PC, Vista will load automatically.

Tuesday, July 28, 2009

Events and Event Handlers - HTML Form Elements

What are events?

Events allow you to write JavaScript code that reacts to certain situations. Examples of events include:
  • The user clicking the mouse button
  • The Web page loading
  • A form field being changed

Event handlers

To allow you to run your bits of code when these events occur, JavaScript provides us with event handlers. All the event handlers in JavaScript start with the word on, and each event handler deals with a certain type of event. Here's a list of all the event handlers in JavaScript, along with the objects they apply to and the events that trigger them

Event handler
Applies to: Triggered when:
onAbort Image The loading of the image is cancelled.
onBlur Button, Checkbox, FileUpload, Layer, Password, Radio, Reset, Select, Submit, Text, TextArea, Window The object in question loses focus (e.g. by clicking outside it or pressing the TAB key).
onChange FileUpload, Select, Text, TextArea The data in the form element is changed by the user.
onClick Button, Document, Checkbox, Link, Radio, Reset, Submit The object is clicked on.
onDblClick Document, Link The object is double-clicked on.
onDragDrop Window An icon is dragged and dropped into the browser.
onError Image, Window A JavaScript error occurs.
onFocus Button, Checkbox, FileUpload, Layer, Password, Radio, Reset, Select, Submit, Text, TextArea, Window The object in question gains focus (e.g. by clicking on it or pressing the TAB key).
onKeyDown Document, Image, Link, TextArea The user presses a key.
onKeyPress Document, Image, Link, TextArea The user presses or holds down a key.
onKeyUp Document, Image, Link, TextArea The user releases a key.
onLoad Image, Window The whole page has finished loading.
onMouseDown Button, Document, Link The user presses a mouse button.
onMouseMove None The user moves the mouse.
onMouseOut Image, Link The user moves the mouse away from the object.
onMouseOver Image, Link The user moves the mouse over the object.
onMouseUp Button, Document, Link The user releases a mouse button.
onMove Window The user moves the browser window or frame.
onReset Form The user clicks the form's Reset button.
onResize Window The user resizes the browser window or frame.
onSelect Text, Textarea The user selects text within the field.
onSubmit Form The user clicks the form's Submit button.
onUnload Window The user leaves the page.

Monday, July 27, 2009

How To Fix Your Own Neck, Upper Back, and Shoulder Pain

This is for all the programmers and people who have to work extensively on the computer and suffer from pain in neck, shoulder and upper back. The article on the web site is very useful and hope will be useful for anyone reading this.
        http://www.drbookspan.com/NeckPainArticle.html