download java
Go to http://java.sun.com/javase/downloads/index.jsp
and clik on Java Platform (JDK)
and install it
Second step:
write you code
Example:
class Example
{
public static void main(String args[])
{
System.out.println("This is Example class");
}
}
Suppose you java installation path is
C:\Program Files\Java
save it C:\Program Files\Java\jdk1.6.0_23\bin\Example.java
Then click start->run
then write cmd or command
Then type cd\ (enter)
c:\> cd Program Files (enter)
c:\Program Files> cd Java (enter)
c:\Program Files\Java> cd jdk1.6.0_23 (enter)
c:\Program Files\Java\jdk1.6.0_23> cd bin (enter)
Now run you java program
c:\Program Files\Java\jdk1.6.0_23\bin> javac Example.java
c:\Program Files\Java\jdk1.6.0_23\bin> java Example
It is simple you face any problem then you can submit cooment
Nanhe Kumar
Tuesday, February 8, 2011
Monday, December 20, 2010
Authorize.Net Direct Post Method (DPM)
you can find more detail of Authorize.Net Direct Post Method (DPM) on http://www.articlesrain.com/tutorial/index.php/2010/12/authorize-net-direct-post-method-dpm/
Wednesday, April 28, 2010
How to add days, weeks, months to any date ?
$date = date("Y-m-d");// current date
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 day");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 week");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +2 week");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 month");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +30 days");
echo date("Y-m-d", $date);//Now your can see added date
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 day");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 week");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +2 week");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 month");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +30 days");
echo date("Y-m-d", $date);//Now your can see added date
Friday, February 12, 2010
how can login in ilias with own page
//you can also use in another way
/////////////////////This concept is used on gradtrain.com////////////////
/////////////////////This concept is used on gradtrain.com////////////////
File upload like gmail
Step1: Create A file name index.php
File Uploading Like Gmail. You can upload multiple files without submitting the whole page. You can upload file like ajax. This is using iframe for file upload
Step2:create a file upload.php
File Uploading Like Gmail. You can upload multiple files without submitting the whole page. You can upload file like ajax. This is using iframe for file upload
Step2:create a file upload.php
Tuesday, January 12, 2010
Check Date Between Two Dates in PHP
function dateBetween( $checkDate )
{
$firstDate1 = strtotime( "15-Jan-2008" );
$firstDate2 = strtotime( "15-Mar-2008" );
$secondDate1 = strtotime( "16-Mar-2008" );
$secondDate2 = strtotime( "15-Jun-2008" );
$checkDate = strtotime( $checkDate );
if( $checkDate > $firstDate1 && $checkDate < $firstDate2 )
{
return "2000";
}
elseif( $checkDate > $secondDate1 && $checkDate < $secondDate2 )
{
return "4000";
}
return "0";
}
echo dateBetween( "25-Sep-2008" );
?>
Thursday, December 10, 2009
How to calculate the date difference between 2 dates using php
$date1 = "2006-03-25";
$date2 = "2009-11-10";
$diff = abs(strtotime($date2) - strtotime($date1));
$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
printf("%d years, %d months, %d days\n", $years, $months, $days);
$date2 = "2009-11-10";
$diff = abs(strtotime($date2) - strtotime($date1));
$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
printf("%d years, %d months, %d days\n", $years, $months, $days);
Subscribe to:
Posts (Atom)