Friday, November 1, 2013

Creating simple Bat files

1)
javac *.java
java Main

and save it as Name.bat

2)
start tomcat6.exe
start http://localhost:8080/ApplicationFolderName/
start  C:\TEMP


Tuesday, October 15, 2013

How to extract a Jar file ?

Just go to the path where the jar file is located in command prompt,

1)go to start
2)type cmd
3)type d: if the jar is in d : or c:pathName1\pathName2\Folder Name
4)Just type jar xvf fileName.jar

and your class file is generated
 

Monday, October 7, 2013

Wednesday, September 11, 2013

How to add time in mysql ?

SELECT ADDTIME('1984-05-31 23:59:59', '0 0:15:01');

Here you can see 23 Hrs 59 Minutes and 59 Seconds is added with 0 Hrs, 15 Minutes and 01 Seconds

The Result is '1984-06-01 00:15:00'

Oops My Birthday....

Thursday, August 29, 2013

How to make Time ?

Hi,

Sorry If you have been misguided into this blog, well its technical and nothing Out of the world

I found this site very useful,
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html

The site has all the Time/Date related API's, There are a lots of FUN things available there
like

a)How to make time ?

SELECT MAKETIME(9,45,45);

SELECT MAKETIME(9,45,61); --------------WILL GIVE YOU NULL VALUE !!!

b)How to make date ?


How to get Present Time difference between two times / two dates in mysql

SELECT NOW(), SLEEP(3), SYSDATE();


I found this site very useful,
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html

The site has all the Time/Date related API's, There are a lots of FUN things available there
like

a)How to make time ?
b)How to make date ?
and etc.............




How to get the difference between two dates / time in mysql

CREATE TABLE users (
  users_name varchar(20) NOT NULL,
  users_starttime datetime DEFAULT '00-00-0000 00:00:00' NOT NULL,
  users_endtime datetime DEFAULT '00-00-0000 00:00:00' NOT NULL
);

insert into users (users_name, users_starttime) values('Balaji', NOW());

update users set users_endtime = NOW();

select * from users;

SELECT TIMEDIFF(users_endtime,users_starttime) FROM users;
SELECT TIMESTAMPDIFF(SECOND,users_starttime,users_endtime) FROM users;

Sunday, June 23, 2013

Wednesday, May 22, 2013

Latest Train Updates - http://railradar.trainenquiry.com/

http://railradar.trainenquiry.com/

I found this site very useful for trains running in India, normally we got to a lot of places in net and over phone to get the latest update on the trains, but this site just solves the probelm......Go and have a peek in youself.

Happy Rides.

Tuesday, May 21, 2013

how to convert an int to string in java

Say int i = 10;

and String compare = "10";----Value from the Program

You can use either of these

1) Integer.toString(i)

                or

2)String.valueOf(i)

(i.e)

String convertedValue = Integer.toString(i);


if(convertedValue.equals(compare)){
----------Which turns out to be true
}
 

Friday, May 10, 2013

body onLoad not working in IE

Even though you may use
<body onnload="javascript:functionX;">      
to call the functionX, we have to give window.onload = functionX;
inside <script language="javascript"></script>



<script language="javascript">
window.onload = functionX;

functionX() {
             --------
             --------
}
</script>

For chrome and firefox window.onload is not needed........

I am using IE 9.0.8.112, (i.e) IE 9