Saturday, 28 May 2016

Create Simple home page contains frames

creatinhg following html pages:

Note:HTML 5 not support frameset tags insted  HTML 5 uses iframe tags  
index.html
top.html
bottum.html
Description.html
menu.html
register.html
login.html




index.html(it is a home page contains frames)

<head>
<title>online student informatin maintain system</title>
</head>

<frameset rows="22%,67%,11%">
    <frame src="top.html" noresize></frame>
   
    <frameset cols="10%,*">
        <frame src="menu.html" scrolling=no noresize>
        <frame name="ContentArea" src="description.html">
    </frameset>
<frame src="botum.html"></frame>
</frameset>




top.html

<html>
<body>
<center>
<table border=0>
<tr>
<td>
<img src="images\log.jpg" width=300 height=100></img>
</td>
   <th>
     <img src="images\make.jpg" width=300 height=100></img>
   </th>
<td>
<img src="images\flw.jpg" width=150 height=100></img>
</td>
</tr>
</table>
</center>
</body>
</html>


bottum.html

<html>

<body>

<center>
<p>All Rights Reserved @Saai Software Technologies</p>
</center></body>

</html>



description.html

<html>
<body text=blue bgcolor=#a0b0c0>
<marquee behavior=alternate>
    <h1 align="center">Welcome To Student Information Maintain System</h1>
</marquee>
<p>
<font face="Calibri" size="4">
    Our Portal is used to collect all students information through online and store in the server database.
</font></p>
<p>
<font face="Calibri" size="4">
 This site is to provide the students to login and to check their details
</font></p>
</body>
</html>



menu.html

<html>
<body>
<a href="registration.html" target="ContentArea">Student Register</a>
<br>
<br>
<a href="login.html" target="ContentArea" >Login Student</a>
<br>
<br>
</body>
</html>


register.html

<html>
<head>
<title>WELCOME TO REGISTRATION PAGE</title>

</head>
<body>
<center>
    <font size=8> Registration Form </font>
</center>
<form>
<table width=100% border=0>
    <tr>
        <th>Name:</th>
        <td>
            <input type="textfield" name="txt">
        </td>
    </tr>
    <tr>
            <th>Password:</th>
            <td>
                <input type="password" name="pas">
            </td>
</tr>
    <tr>
            <th>Address:</th>
            <td>
            <textarea name="txtar" cols=20 rows=6>address</textarea>
            </td>
    </tr>
    <tr>
            <th>Email id:</th>
            <td>
                <input type="textfield" name="txt1">
            </td>
    </tr>
    <tr>
            <th>Phone number:</th>
            <td>
                <input type="textfield" name="txt2" maxlength=10>
            </td>
    </tr>
    <tr>
            <th>Sex:</th>
            <td>
            <input type="radio" name="rdbutton" value="val1">Male 
                  &nbsp;&nbsp;&nbsp;
            <input type="radio" name="rdbutton" value="val2">Female
            </td>
    </tr>
    <tr>
            <th>Date of Birth:</th>
            <td>
                <select name="day">
    <option value="1">1</option>     <option value="2">2</option>
    <option value="3">3</option>     <option value="4">4</option>
    <option value="5">5</option>     <option value="6">6</option>
    <option value="7">7</option>     <option value="8">8</option>
    <option value="9">9</option>     <option value="10">10</option>
    <option value="11">11</option>    <option value="12">12</option>
    <option value="13">13</option>    <option value="14">14</option>
    <option value="15">15</option>    <option value="16">16</option>
    <option value="17">17</option>    <option value="18">18</option>
    <option value="19">19</option>    <option value="20">20</option>
    <option value="21">21</option>    <option value="22">22</option>
    <option value="23">23</option>    <option value="24">24</option>
    <option value="25">25</option>    <option value="26">26</option>
    <option value="27">27</option>    <option value="28">28</option>
    <option value="29">29</option>    <option value="30">30</option>
    <option value="31">31</option>
                </select>
                <select name="month">
                    <option value="jan">Jan</option>
                    <option value="feb">Feb</option>
                    <option value="mar">Mar</option>
                    <option value="apr">Apr</option>
                    <option value="may">May</option>
                    <option value="jun">Jun</option>
                    <option value="jul">Jul</option>
                    <option value="aug">Aug</option>
                    <option value="sep">Sep</option>
                    <option value="oct">Oct</option>
                    <option value="nov">Nov</option>
                    <option value="dec">Dec</option>
</select>
                <select name="year">
                    <option value="1991">1991</option>
                    <option value="1992">1992</option>
                    <option value="1993">1993</option>
                    <option value="1994">1994</option>
                    <option value="1995">1995</option>
                    <option value="1996">1996</option>
                    <option value="1997">1997</option>
                    <option value="1998">1998</option>
                    <option value="1999">1999</option>
                    <option value="2001">2001</option>
                    <option value="2002">2002</option>
                    <option value="2003">2003</option>
                    <option value="2004">2004</option>
                    <option value="2005">2005</option>
                    <option value="2006">2006</option>
                    <option value="2007">2007</option>
                    <option value="2008">2008</option>
                    <option value="2009">2009</option>
                    <option value="2010">2010</option>
                    <option value="2011">2011</option>
                    <option value=2012>2012</option>
                </select>
    <tr>
            <th>Languages known:</th>
           
<td>
                <font size=4>
        English : <input type="checkbox" name="c1" value="c1"><br>
        Telugu :  <input type="checkbox" name="c2" value="c2"><br>
        Hindi :   <input type="checkbox" name="c3" value="c3"><br>
        Tamil :   <input type="checkbox" name="c4" value="c4"><br>
                </font>
            </td>
    </tr>
    <tr>
            <th>
                <input type="submit" value="Submit">
            </th>
            <td>
                <input type="reset" value="Reset"></td>
            </tr>
</table>
</form>
</body>
</html>


 
login.html

<html>

<head>
<title>Login Form</title>
</head>

<body text=blue bgcolor=#a0b0c0>
<form>
<center>
<table border=0>
<tr>
<th colspan=2>LOGIN FORM</th>
</tr>
<tr></tr>
<tr>
<td>  <font size=4>User Name:</font>  </td>
<td><input type="text" name="txtfld"></td>
</tr>
<tr></tr>
<tr>
<td><font size=4>Password:</font></td>
<td><input type="password" name=passfld></td>
</tr>
<tr></tr>
<tr>
<td align=center> <input type=submit  value="Submit"> </td>
<td align=center> <input type=reset value="Reset"> </td>
</tr>
</table>
</center>
</form>
</body>
</html>







output: 
 
 
 
 
 











Create Droup Down Menus /Sub Menus in Main Menu

<html>
<head>
<title> Menu Example</title>
<style type="text/css" media="screen">
#horizontalmenu ul
{
padding:1; margin:1; list-style:none;
}
#horizontalmenu li
{
float:left; position:relative; padding-right:100; display:block;
border:4px solid #CC55FF;
border-style:inset;
}
#horizontalmenu li ul
{
    display:none;
position:absolute;
}
#horizontalmenu li:hover ul
{
    display:block;
    background:red;
height:auto; width:8em;
}
#horizontalmenu li ul li
{
    clear:both;
border-style:none;
}
</style>

</head>
<body>
<div id="horizontalmenu">

<ul> <li><a href="#">News</a>
 <ul> <li><a href="#">National</a></li> <li><a href="#">International</a></li> <li><a href="#">Sport</a></li> <li><a href="#">Hollybood</a></li> </ul>
            </li>
            <li>
            <a href="#">Technology</a>
        <ul> <li><a href="#">IT/Software</a></li> <li><a href="#">Hardware</a></li> <li><a href="#">Iphone</a></li> <li><a href="#">Neuro-Science</a></li> </ul>
               
            </li>
            <li>
            <a href="#">Sports</a>
                <ul> <li><a href="#">Cricket</a></li> <li><a href="#">Tenis</a></li> <li><a href="#">Badminton</a></li> <li><a href="#">Hockey</a></li> </ul>
            </li>
            <li>
            <a href="#">Country</a>
                <ul> <li><a href="#">India</a></li> <li><a href="#">America</a></li> <li><a href="#">France</a></li> <li><a href="#">Pakistaan</a></li> </ul>
       
            </li>
        </ul>
</div>
</body>
</html>

output:



Wednesday, 18 May 2016

control statements in java

difference between while loop and dowhile loop example

 do while loop example program:
public class DoTest {

   public static void main(String args[]){
      int x =20;
   do
      {
         System.out.print("value of x : " + x );
         x++;
         System.out.print("\n");
      }

while( x < 20 );
}
}

output :


while loop example program:

public class WhileTest {

   public static void main(String args[]){
      int x =20;
   while( x < 20 )
      {
         System.out.print("value of x : " + x );
         x++;
         System.out.print("\n");
      }


}
}

output:
 


Monday, 16 May 2016

what are the ways to download youtube videos without software



1)
You just replace youtube as ssyoutube on the youtube video link which you want to download and then press enter. You will see a download button with lots of other video quality options like 720p , 1080p or 360p  
       
                https://www.ssyoutube.com/watch?v=PCkob0FCzW8

2)
You just replace youtube as youmagictube on the youtube video link which you want to download and then press enter. You will see a download button with lots of other video quality options like 720p , 1080p or 360p .https://www.ssyoutube.com/watch?v=PCkob0FCzW8
 using magic  in between you and tube before y letter in youtube and press enter    button
           

             https://www.youmagictube.com/watch?v=PCkob0FCzW8


Saturday, 14 May 2016

Exception handling in java


file handling in java

how to create a backup file 
import java.io.*;
class BakFileCreator
{
 
   public static void main(String args[]) throws FileNotFoundException,IOException
    {
    FileInputStream fis=new FileInputStream(args[0]);
  
    FileOutputStream fos=new FileOutputStream(args[0]+".bak");
  
  
   
   int data;
  while((data=fis.read())!=-1)
{
   fos.write(data);
}
System.out.println("backup file is success fully created");

 
}//main
}//class

output

 

file handling in java

Program to copy file content into another file
for example
create two text files
file1.txt content is copied into file2.txt


import java.io.*;
class Filedemo
{
  public static void main(String args[]) throws FileNotFoundException,IOException
  {
   FileInputStream fis=new FileInputStream("file1.txt");
  
    FileOutputStream fos=new FileOutputStream("file2.txt");
  
  
   
   int data;
  while((data=fis.read())!=-1)
{
   fos.write(data);

 System.out.println("successfully file1 is copied into file2");
 

}

 
}//main
}//class

output
 

Saturday, 7 May 2016

how to add Servlet-api.jar file to eclipse

Steps to add Servlet-api.jar  file to eclipse

step1:Right Click on project -> Build Path and click on Configure Build Path.




step2:Click on Library tab and then click on Add External JARs…



step3:Select Servlet-api.jar file and click on Open(it is located in tomcat installation location under lib folder)




step4: Click OK. Once you click on OK, Servlet-api.jar  will be added to eclipse project.

step5:now we see Servlet-api.jar file in libraris folder(left side)

how to install apache tomcat server and add TomcatServer to Eclipse IDE

steps to install apache tomcat server and add TomcatServer to Eclipse IDE
step1:
Download Apache Tomcat from this link. I’m using version 7.0.69.
my computer is windows 64 bit then i am downloading



step2:
open download folder extract it to document folder

                     

step3:open eclipse environment,in bottum we find servers tab and  right click on new servers under new->server click on server


                      


step4:  select apache tomcat 7 and click on next

step5:select tomcat7 extract folder and click finish

step6:now  right click on server click on start 
then tomcat server will started

how to install eclipse Neon


how to install and compile ,run java program using EditPlus


how to install and compile ,run java program using eclipse


how to compile and run Java Program using command Prompt


how to set class Path for java using command prompt


how to set class Path for java using environment variables


how to install JDK in your system


Java Basic Concepts


JDK(Java Development Kit):

Java Developer Kit contains tools needed to develop the Java programs, and JRE to run the programs. The tools include compiler (javac.exe), Java application launcher (java.exe), Appletviewer, etc…
Compiler converts java code into byte code. Java application launcher opens a JRE, loads the class, and invokes its main method.
You need JDK, if at all you want to write your own programs, and to compile them. For running java programs, JRE is sufficient.
JRE is targeted for execution of Java files
i.e. JRE = JVM + Java Packages Classes(like util, math, lang, awt,swing etc)+runtime libraries.
JDK is mainly targeted for java development. I.e. You can create a Java file (with the help of Java packages), compile a Java file and run a java file.

JRE(Java Runtime Environment):
Java Runtime Environment contains JVM, class libraries, and other supporting files. It does not contain any development tools such as compiler, debugger, etc. Actually JVM runs the program, and it uses the class libraries, and other supporting files provided in JRE. If you want to run any java program, you need to have JRE installed in the system
The Java Virtual Machine provides a platform-independent way of executing code; That mean compile once in any machine and run it any where(any machine).

JVM(Java Virtual Machine):


The JVM interprets the byte code into the machine code depending upon the underlying operating system and hardware combination. It is responsible for all the things like garbage collection, array bounds checking, etc… Java Virtual Machine provides a platform-independent way of executing code.

What is JIT Compiler:

In Java you have to write and compile a program only once. The Java on any platform will interpret the compiled bytecode into instructions understandable by the particular processor. However java virtual machine handles only one bytecode instruction at a time that makes execution slow. But Using the Java just-in-time compiler at the particular system platform compiles the bytecode into the particular system code. After the code has been recompiled by the JIT compiler, it will usually run more quickly on the computer.

what is Class Loader:

how many memory areas allocated by JVM:

what is platform independent and Platform dependent:

Exception Handling:

what is an Exception
An Exception can be anything which interrupts the normal flow of the program. When an exception occurs program processing gets terminated and doesn’t continue further. In such cases we get a system generated error message. The good thing about exceptions is that they can be handled


How to handling Exception:

To handle Eceptions java suports five keywords
1)throw
2)throws
3)try
4)catch
5)finally

                              Example Program to generate Excepton 
 This Example generate following posible 3 exceptions
1)ArrayIndexOutOfBoundsException------------------------
2)NumberFormatException ---------------------------------
3)ArithmeticException --------------------------------------
class Edivision
{
public static void main(String args[])
{

int a=Integer.parseInt(args[0]);
int b=Integer.parseInt(args[1]);
int c=a/b;
System.out.println("'result"+c);

}

}
output: 

                         Example Program to handling the Exception

To handle Exception by using try and catch block

 class Edivision
{
public static void main(String args[])
{
try
{

int a=Integer.parseInt(args[0]);
int b=Integer.parseInt(args[1]);

int c=a/b;
System.out.println("'result"+c);

}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.println("please give two values");
}

catch(NumberFormatException e)
{
System.out.println("please enter only numbers");
}
catch(ArithmeticException e)
{
System.out.println("please do not enter second value is zero");
}


}
}

 output:

Thursday, 5 May 2016

To create a Login Form using Html

To Create a Login Form Using HTML
<html>

<head>
<title>Login Form</title>
</head>

<body text=blue bgcolor=#a0b0c0>
<form>
<center>
<table border=0>
<tr>
<th colspan=2>LOGIN FORM</th>
</tr>
<tr></tr>
<tr>
<td>  <font size=4>User Name:</font>  </td>
<td><input type="text" name="txtfld"></td>
</tr>
<tr></tr>
<tr>
<td><font size=4>Password:</font></td>
<td><input type="password" name=passfld></td>
</tr>
<tr></tr>
<tr>
<td align=center> <input type=submit  value="Submit"> </td>
<td align=center> <input type=reset value="Reset"> </td>
</tr>
</table>
</center>
</form>
</body>
</html>
 
OutPut 
 
 

Sunday, 1 May 2016

To Create Registration Form Using Html

To Create Registration Form Using Html
<html>
<head>
<title>WELCOME TO REGISTRATION PAGE</title>

</head>
<body>
<center>
    <font size=8> Registration Form </font>
</center>
<form>
<table width=100% border=0>
    <tr>
        <th>Name:</th>
        <td>
            <input type="textfield" name="txt">
        </td>
    </tr>
    <tr>
            <th>Password:</th>
            <td>
                <input type="password" name="pas">
            </td>
</tr>
    <tr>
            <th>Address:</th>
            <td>
            <textarea name="txtar" cols=20 rows=6>address</textarea>
            </td>
    </tr>
    <tr>
            <th>Email id:</th>
            <td>
                <input type="textfield" name="txt1">
            </td>
    </tr>
    <tr>
            <th>Phone number:</th>
            <td>
                <input type="textfield" name="txt2" maxlength=10>
            </td>
    </tr>
    <tr>
            <th>Sex:</th>
            <td>
            <input type="radio" name="rdbutton" value="val1">Male 
                  &nbsp;&nbsp;&nbsp;
            <input type="radio" name="rdbutton" value="val2">Female
            </td>
    </tr>
    <tr>
            <th>Date of Birth:</th>
            <td>
                <select name="day">
    <option value="1">1</option>     <option value="2">2</option>
    <option value="3">3</option>     <option value="4">4</option>
    <option value="5">5</option>     <option value="6">6</option>
    <option value="7">7</option>     <option value="8">8</option>
    <option value="9">9</option>     <option value="10">10</option>
    <option value="11">11</option>    <option value="12">12</option>
    <option value="13">13</option>    <option value="14">14</option>
    <option value="15">15</option>    <option value="16">16</option>
    <option value="17">17</option>    <option value="18">18</option>
    <option value="19">19</option>    <option value="20">20</option>
    <option value="21">21</option>    <option value="22">22</option>
    <option value="23">23</option>    <option value="24">24</option>
    <option value="25">25</option>    <option value="26">26</option>
    <option value="27">27</option>    <option value="28">28</option>
    <option value="29">29</option>    <option value="30">30</option>
    <option value="31">31</option>
                </select>
                <select name="month">
                    <option value="jan">Jan</option>
                    <option value="feb">Feb</option>
                    <option value="mar">Mar</option>
                    <option value="apr">Apr</option>
                    <option value="may">May</option>
                    <option value="jun">Jun</option>
                    <option value="jul">Jul</option>
                    <option value="aug">Aug</option>
                    <option value="sep">Sep</option>
                    <option value="oct">Oct</option>
                    <option value="nov">Nov</option>
                    <option value="dec">Dec</option>
</select>
                <select name="year">
                    <option value="1991">1991</option>
                    <option value="1992">1992</option>
                    <option value="1993">1993</option>
                    <option value="1994">1994</option>
                    <option value="1995">1995</option>
                    <option value="1996">1996</option>
                    <option value="1997">1997</option>
                    <option value="1998">1998</option>
                    <option value="1999">1999</option>
                    <option value="2001">2001</option>
                    <option value="2002">2002</option>
                    <option value="2003">2003</option>
                    <option value="2004">2004</option>
                    <option value="2005">2005</option>
                    <option value="2006">2006</option>
                    <option value="2007">2007</option>
                    <option value="2008">2008</option>
                    <option value="2009">2009</option>
                    <option value="2010">2010</option>
                    <option value="2011">2011</option>
                    <option value=2012>2012</option>
                </select>
    <tr>
            <th>Languages known:</th>
           
<td>
                <font size=4>
        English : <input type="checkbox" name="c1" value="c1"><br>
        Telugu :  <input type="checkbox" name="c2" value="c2"><br>
        Hindi :   <input type="checkbox" name="c3" value="c3"><br>
        Tamil :   <input type="checkbox" name="c4" value="c4"><br>
                </font>
            </td>
    </tr>
    <tr>
            <th>
                <input type="submit" value="Submit">
            </th>
            <td>
                <input type="reset" value="Reset"></td>
            </tr>
</table>
</form>
</body>
</html>

OUTPUT: