Skip to main content

Posts

Showing posts from November, 2012

Failed to connect to remote VM. Connection refused.

Encountered this error while trying to debug my project. IDE: Eclipse Server: Jboss Error:  Failed to connect to remote VM. Connection refused. Reason : When we install JBoss server the debug option is disabled by default. Solution : Go to ur jboss directory “<directory>/bin” and edit run.bat. Search for: rem set JAVA_OPTS = -Xdebug -Xrunjdwp:transport=dt_socket, address=8787, server=y, suspend=y %JAVA_OPTS% ‘rem’ in above statement shows that this line is comments. So remove ‘rem’ and set suspend=n.

Carnivorous Island from "Life of PI"

Yann Martel described about an floating carnivorous Island for symbolizing that something seemingly good in life can turn out to be harmful, so we should keep going with our journey of life... About the carnivorous Island from movie. In the movie 'Life of PI' after PI struggles to live in the pacific with the Bengal tiger suddenly one morning Pi  found himself at a Island. After spending so many days in the middle of the sea he found himself very lucky to find a Island. After spending some time he thought might be this was the end of his suffering and he can spend rest of his life at that island. He makes h is bed on a tree and sleeps there, in the middle of the night he wakes up and find that there were dead fish in the fresh water where he took swim in the day time. While trying to understand the mystery he plucks a fruit from the same tree and peel it off and finds a human tooth inside that fruit and then he realize that it was an carnivorous Island. The fresh water tur

How to add custom theme to new blogger?

Even though blogger come with many themes they don't seems satisfying but luckily we don't have to rely on these themes you can add one of your own either by creating it by yourself or just download it from any site. There are many such sites which will provide you free templates for blogger. Just Google for "Free blogger templates". So below are the steps to set up a custom theme for blogger. Step I Go to your blogger dashboard as shown in Fig.1. Fig. 1 Select 'Template' option from the panel to the left hand side of the dashboard. The option is circled in the Fig. 1. Step II Clicking on template will bring the Template page (Refer Fig.2). If you scroll down on this page you will find different basic templates provided by blogger.They are quite beautiful in-fact but we are talking about adding a custom theme so we won't go in detail of this :) . Method 1 ) The one way of creating a custom theme is by clicking on "Customi

Check if the browser is safari using javascript

For checking if the browser is safari or not you can use below javascript function. function isSafari() {      var is_safari = navigator.userAgent.toLowerCase().indexOf('safari/') > -1;      if(is_safari)     {          return true;     }     else     {         return false;     } } The above method will return true or false depending on the browser. i.e.  if the browser is safari then the above method will return true and if it's not then the method will return false. Hope this will help :)

Get Selected value from Listbox Javascript

Since there is no direct way to get the selected value in the listbox you have to get it by iterating over the list.For same the code is given below. Below code will print all values in the listbox which were selected but you can modifiy the code as per your requirement. HTML code : <select id="listboxName"> <option value="1">One</option> <option value="2">Two</option> <option value="3">Three</option> </select> Javascript code : var mySelect = document.getElementById("listboxName"); for ( var i = 0 ; i < mySelect . options . length ; i ++) { if ( mySelect . options [ i ]. selected ) document . write ( " mySelect.options[i].text\n" ) } Hope this helps :)

Pac-Man Google Doodle

One my Favorites 'The Pac-Man' google doodle :) everyone of us have memories related to this game, when the colored creatures use to come near the Pac-Man are we were so scared and excited at the same time that this might kill our Pac-Man. Everything was just amazing about this game. Simple graphics and great fun and when google released the Google doodle pac-man all those amazing memories were back. Thank you google for giving our pac man back to us.

Enabling/Disabling Textbox using JavaScript

Below is the example for enabling or disabling of the text box whose id is "testTextbox". HTML code of the text box <p>   <input type="text" id="testTextbox" ></input> </p> Javascript code for enabling the text box document.getElementById("testTextbox").disabled = false; Javascript code for disabling the text box document.getElementById("testTextbox").disabled = true; you can add the above javascript code in any of the javascript function you want and call it on some event or you can keep them disabled by keeping the input tags attribute to disabled like this they will always remain disabled and then you can enable them on some event