Feb 21, 2012

All Ayurveda

Almost everyone knows about Ayurveda. Its one of the traditional and effective way of medicine, used to cure any sort of diseases or make your mind and soull healthy in a nautural way. recently i have gone through a website which actually impressed me a lot.

Please visit http://www.allayurveda.com/ for more information

Feb 20, 2012

Java Program without a Main Function

Writing a simple program in JAVA to print "Hello world " is not a big task for you, if you are a programmer in JAVA. But i m going to teach you how to write a program without a main function.
  You may ask me , every program starts with Main Function and how come its possible to do without a main method. Java provides you to use static initialization block to achieve this..

Ex:

public class Sample{
 static{
System.out.println("Hello World !");
 
}


By running this class, you will get an error message stating that "java.lang.NoSuchMethodError: main
Exception in thread "main" " . To avoid this, add System.exit(0); at the end of static initialization block.

public class Sample{

static{
System.out.println("Hello World !");
  System.exit(0);
}
}

Feb 17, 2012

Sangita Travels Review

Last weekend we have been to pondicherry to attend one of our friend/colleague's sister marriage. On the return, he booked ticket for us to Bangalore in sangita travels. The bus starting time is 10.30 PM. We collected our passed by 10.15 PM. We got shocked when we saw the bus, we need to travel. They said its a Volvo bus, bit it looked like a normal bus, which has been painted . Adding to our frustration, the bus tyre is punctured. They arranged a new bus, it was also looking like a old one. The ac was not good.
   The Bus started @ 11.00 PM. At 2.00 am, we reached nearby thirvanamali, the bus engine stopped. The driver repaired it for 15 mins  and we went some 40 kms, the bus engine stopped again. Now the driver couldn't able to fix it. But we though they will fix it again, so we went in and slept..
  When we woke up at 06.30 a.m, we got shocked that the bus is in the same place and surprisingly we have seen the driver is also sleeping. We work up him and he said they were waiting for  a mechanic. The mechanic came and he started repairing. I took my android mobile and opened Google maps. I got frustrated , when i saw we were 175 kms away from Bangalore. Finally the bus started, and after 20 kms the bus stopped again.
  Finally the management declared they will fund the entire money. But what to do only with the money. Many of us who's the bus are office goer's  and its in the Monday morning and the time is 08.30 a.m and we were 150 kms away from Bangalore..
 This is one of the worst  planned journey i have made .

Whom to Blame ?

  •  The Driver
    • Whether he didn't check the condition of the bus , before the journey
  • Travels
    • They can arrange a spare bus @ start of journey, but they cant arrange it when the bus got repair in the mid of journey.
 Comment your views

12 Seconds in a Year

Today i was reading a newspaper, i have read this "12 Seconds in a Year".

Story:
A man died and he went to heaven. The gatekeeper ask his soul two questions and if he answers them, he will allow this man to heaven or he has to goto hell.
Question:

  • What are the two days in a Week, that start with a letter 'T'
  • How many seconds are there in a Year ?
Reply:
  •    Today and Tomorrow
  • 12 Seconds in a Year
After getting this reply from the man, the gatekeeper agree the reply of first question, but he is curious to know why he replied 12 for the second question. The man answered there are only 12 seconds in a year  in the way as  Jan 2nd, Feb 2nd, Mar 2nd, Apr 2nd,..... Dec 2nd.

The gatekeeper is stunned and he opened the gate.

Moral:  Be Smart :)

[This article was picked up from a newspaper, but really appreciate the author of this story, Nice Imagination and funny one as well]


Lucky Bamboo

Lucky BamBoo
Very Attractive Sapling in nature. By looking this plant it self, it makes you lucky and feel the pleasure of relax. This is not a kind of Bamboo variety. This is  from the family of  tropical water lily (Dracaena Sanderiana).
  This Plant needs some water to grow and some gravel to grab and keep it fit in a vase. Water can be replaced once in a week or two . So the maintenance is very easy. But keep it away from you pets and children, because digestion of this leaves is toxic. 
Wanna grow this plant. If anyone who read this blog know, where this sapling will be available , please let me know by commenting this post.


Feb 16, 2012

Working with Constructors

In Java, When we  are creating a new instance of the class, the constructor of the class will be called. If a class doesn't have a constructor then it will assume there's a default constructor. But constructors are used to assign some initial values  to class fields.
Ex:
public class Employee{


  private int empID;

  private String name;


   public Employee(){
    this.empID = 1
    this.name = "Un-defined"
   }
}
We all know that we cant have two constructor in a class, with the same name and same parameters but a different data-type. But while i m analyzing this limitation, suddenly a doubt arise to me whether we can have two constructors with a single parameter, but the data Type of these parameters are different.

Ex:

public class Employee{


// Constructor 1
   public Employee(int empID){
   }


// Constructor 2

  public Employee(String name){
   }



}

Feb 15, 2012

Immutable Class in Java

A class is immutable, only if when the instance of the class cant modify its content.. This can be achieved by

  • Making a class as Final
  • Make all the fields and methods as private.
Ex:
  • String Class 
    • When you create an instance of String class, say ex: new string(); then you cant modify the content  of String class with this object reference. 

Feb 7, 2012

Experience makes the Man Perfect

Its a quite saying that "Experience will makes the man perfect". Since i bought a bike, i  never fell down and got injured. But recently, i borrowed my friends bike, which's a Scooty Pep to carry some things to my new room, for re-installation of TSky STB Setup.
        After everything got over, i was turning a corner @ a speed of 30 km/hr. The road was so muddy and the back tire of the vehicle got stuck in it and started skating and due to that i fell down .
        My Right hand palm was injured and actually the skin in the palm peeled away, so it was burning sensation to me.
This minor accident taught me to learn to drive more carefully at the corners of the road

Feb 6, 2012

Flush DNS

Sometimes its required to Flush DNS for getting a new Dynamic IP Address for your PC from the server.

To DO:

  • Open Run Command Window
    • Press "Windows + R" key or
    • Click Start and Select Run
  • Now Enter cmd and preess enter to open the Command Prompt Window
  • Type the below commands and press enter after each command
    • ipconfig/flushdns
    • ipconfig/release
    • ipconfig/renew

And for confirmation type ping www.google.com and press Enter . If Flushing DNS was successfully done, you will get an IP Address there. Type exit and press enter to close the window

Jan 3, 2012

Trip to Shivana Samudara

 "Journey will make us feel good always and memorable".This Trip started with Cloudy skies above and cold water below. It Means the water in the waterfall is very cold and the sky is cloudy and the weather is rainy. :) 
This is my first long ride in my bike..

Distance :From Bangalore : 150 kms

Route: Bangalore - Kanakapura - MallaVali -     Shivana Samudara 

Special : Water Falls

We started the trip from Bangalore @ Dec 31st Morning 6.30 am. The Sky was very clear at the time, but when we were riding the bike in Nice Road, it started drizzling. We had breakfast @ Kanakapura and we started our journey, it was raining. So it become difficult for us to race. We were ridding @ a speed of 40- 50 km speed, bcoz the road was damn good, but many hair pin bends are there. We reached the water fall by 11 am . 

First we went on a small boat to the place where the waterfall is there. Since the fall of water is heavy, bathing is prohibited there. So we can enjoy the beauty of water fall from the small boat. For this short trip, you have to pay Rs.50/-  for the boat ride. At max, five people can travel in that boat . That was nice experience.



After that we decided to bath. When we get down into the water, it was so cold. We had a blast time there by sprinkling water and swimming.. One of my friend tried to swim towards the waterfall, but due to the force of water he is swimming in the same place.
We were enjoying the bath for almost  3 hrs , after that we got tired.







When we were starting back the time is 3.00 pm, its sunny and we have decided to race that time . We raced @ average of 80 km/hr speed and we have reached some high speed of 110 km/hr speed. We reached Bangalore @ 5.30 pm in the evening and we got stuck up into new year traffic in banerghatta road.





Priya,Bala,Karthick and Me


Ashok,Bala, Prassanna and Karthick








Overall, its a nice place to visit..
Please take light weight helmets  to avoid neck pain :) 
Please comment your opinion ...