Thursday 28 June 2012

how to create php online compiler


 This is the code on index.php then run it on your server


<?php if(isset($_POST['online']))
{
    $File = "output.php";
 $Handle = fopen($File, 'w');
 $Data = $_POST['code'];
 fwrite($Handle, $Data);
 fclose($Handle);
 }

?>

<script type="text/javascript" >



function getOutput()
{

  var strURL="output.php";
 
//  var req = getXMLHTTP();
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
}
  else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 xmlhttp.onreadystatechange = function()
 {

      if (xmlhttp.readyState == 4 && xmlhttp.status==200) // only if "OK"
      {
      //alert('k');
      document.getElementById('output').innerHTML=xmlhttp.responseText;
    }
    /*else {
          alert("There was a problem while using XMLHTTP:\n" + xmlhttp.statusText);
        }*/
     
 }  
    xmlhttp.open("GET", strURL, true);
    xmlhttp.send(null);

}


</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<form id="form1" name="form1" method="post">
  <label>
  <textarea name="code" rows="10" cols="80" ></textarea>
  </label>
  <input type="submit" value="Compile" name="online"/>
<input type="button" value="Output" onClick="getOutput()" />
</form>

<div id="output">

 </div>
</body>
</html>


Monday 5 December 2011

How to convert jar file as a executable file (.exe) on java page

first you want to create on batch file, by using .bat extension then that batch easily converted into .exe file by using bat to exe converter & installers  it is available on net at free of cost

http://download.cnet.com/Bat-To-Exe-Converter/3000-2069_4-10555897.html 

that bat file must contains following path variables:

1.you must add java_home path for executing .jar and .java extensions
 and here after java_home you have a system _root,system_32 path these are used for executing our common MS-dos commands.
 
set path=C:\Program Files\Java\jdk1.6.0_11\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;

2. if it is related with jdbc concept then we want to add classpath here:
this is must end with ';' and '.' like this.


set classpath=C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar;C:\folder\your_jar.jar;.



3.then extract jar file and copy that into specific location. and delete all the extract information on current directory.





jar xf  your_jar.jar                                     //extracting jar file
xcopy %cd%  c:\folder /E /i                     //copy information current directory to specific directory.
rd /s /q                                                  //removing extract information


4. save above code by using .bat extension like:

"simple.bat"               //saving bat file

5. By using above converter you can change this into .exe file in you have interest to add icon to .exe file and company name then it is provide automatically

Wednesday 16 November 2011

Java Swing Tutorial

how to learn java Swings?

if any one new to java then go this site bcoz. this site gives concept and related examples

 clik here:  Java Swing Tutorial

import dump file to oracle

How to Import dump file to Oracle ?

this is command for importing data to oracle. here filename.dmp means it is dump file that contains all the details about ur schema structure and ur's tables data
systax:  
imp username/password file=filename.dmp full=Y rows=Y( whenever u r specifying full=Y then rows=Y is optional)

how to export your specified tables on oracle

Exporting data from oracle to file? 
hi friends this is the command for exporting specified tables on oracle database. it is very useful command on oracle software
where it is useful?

if you want to transfer data and that table structures then it is very useful to you

exp userid=username/password FILE=urname.dmp tables=table1,table2,table3................

here urname.dmp means it is dump file that contains all the details about that particular schema

Tuesday 15 November 2011

The inventions of java

Why the oak is change as JAVA ?
JAVA is a name of an island in Indonesia south of Borneo; one of the world's most densely populated regions.


it is the group photo of james gosling and team