Tuesday, 26 May 2015

XML program for student details by using cascading style sheets(CSS)

Program:


 <?xml version ="1.0"?>
          <?xml-style sheet type="text/css"href="student info=css"?>
      <student info>
      <student>
         <name>ABC</name>
         <rno>004</rno>
         <branch>MMT</branch>
        </student>
     

Saturday, 16 May 2015

Employee details by using XML,DTD? XSL

Program:


Read: Visit more c,c++ and java programs

<?xml version="1.0" encoding="iso_88591"?>
<!DOCTYPE empinfo SYSTEM "empinfo.dtd"?>
<?xml-stylesheet type="text\xsl" href="empinfo.xsl">
<empinfo>
<employee>

JSP program for scripting elements

Program:


<%@page language="java" session="false"%>
<%@page info="simple scriplet example"%>
<%@page import="java.util.*"%>
<%! calender cal;
    String months[]={"jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov",dec"};%>

Saturday, 25 April 2015

JSP program using Script code

Program:



<%@page language="java" session="false"%>
<%@page info="demostration of script"%>
<%@page import="java.util.Date"%>

Simple JSP program

Program:



<%@page language="java" contentType="text/html"%>
<%@page import=java.util.*%>
<html>
<body>

Thursday, 2 April 2015

Simple Servlet program with XML file

Program:

import java.io.*;
import javax.servlet.*;
public class simpleservlet extends GenericServlet{

Saturday, 28 March 2015

XML program to display the Book details With Table

Program:

Read: Download free Java Server E-book

<?xml version="1.0" encoding="UTF-8" ?><?xml-stylesheet type="text/xsl" href="catalog_xsl.xsl" ?>
<Catalog>
    <Book>
        <Title>XML Bible</Title>
        <Author>Winston</Author>
        <Publication>Wiely</Publication>
       

XML program to display the book catalogue

Program:


<?xml version="1.0" encoding="UTF-8" ?><?xml-stylesheet type="text/css" href="library.css" ?>
<Catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="catalog.xsd">
    <Book>
        <Title>XML Bible</Title>
       

Friday, 20 March 2015

HTML program for employee details with data

program:


<xml id="movies">
    <?xml version="1.0"?>
    <movies>
        <movie>
            <name>&lt;b&gt;Clark Kent&lt;/b&gt;</name>
            <jobtitle>Superman</jobtitle>
            <born>1966</born>
        </movie>
       

HTML program for employee details table

program:


<html>
<body>
<h1 style="background-color:blue;color:white;text-align:center">Employee Details</h1>
<xml id="emp records" src="employee.xml">
</xml>
<table id=etable name=emp width=100% border=2 bordercolor=red bg=cyan cellpaddding=0
       datasrc=#emprecords>
    <thead>
    <tr>
     

Friday, 13 March 2015

Javascript validation for registration form

Program:


<html>
<head>
<title>Registration form</title>
<script language="javascript">
function validate()
{
   var name=document.forms[0].elements[0].value;
   var pwd=document.forms[0].elements[1].value;
   var email=document.forms[0].elements[2].value;
   var phno=document.forms[0].elements[3].value;
   

Javascript program for payment validation page

Program:


<html>
<head>
<script language="javascript">
function validate()
{
    var amt=document.forms[0].elements[2].value;
    var card=document.forms[0].elements[3].value;
   
    var amt_re=new RegExp("^[0-9][0-9]+$","g");
    var card_re=new RegExp("^[0-9][0-9]+$","g");
   if(!amt.match(amt_re))
 

Monday, 9 March 2015

Javascript program to validate the Login page

Program:


<html>
<head>
<title>Login Form</title>
<script language="Javascript">
function validate()
{
name=document.forms[0].elements[0].value;

Monday, 2 March 2015

HTML program for order confirmation page

program:

<html>
<head><title>Order confirmation</title></head>
<body background="redflower.jpg">
<h1 align="center">order confirmation page</h1>
<table name="confirm" padding="10%" cellpadding="30%">
<tr>
<th>order confirmation no</th>
<td>:</td>
<td>:</td>
</tr>
<tr>
<th>total number of books</th>
<td>:</td>
<td>4</td>
</tr>
<tr>
<th align="left"> Total Cost</th>
<td>:</td>
<td>2500.0</td>
</tr>
<tr>

Saturday, 14 February 2015

HTML code for user profile page

program:



<html>
<head>
<title>User profile</title>
</head>
<body bgcolor="#abcdef">
<h3 align="center">User profile</h3>
<form name="profile-form" method="post">
NAME
<input type="text" name="uname" value="ganesh venkata" size="30" maxlength="20"><br>
PASSWORD
<input type="password" name="pwd" value="******" size="15"<br>
EMAIL
<input type="text" name="email" value="ganeshmuppallasv@gmail.com" size="20"<br>
PHONE NUMBER
<input type="text" name="phno" value="1234567890" size="15" maxlength="10"><br>
<pre>
GENDER
male<input type="radio" name="gender" value="male" checked>
female<input type="radio" name="gender" value="female">
</pre>
<br>
DATE OF BIRTH &nbsp;&nbsp;

Sunday, 8 February 2015

Create a table using HTML

Program:




<html>
<head>
<title> To create a table model</title>
</head>
<body>

Wednesday, 14 January 2015

PL/SQL program to create employe table and insert employment number, name, salary. If it is above 30000 don't perform update operation

Create employee table

     Sql>create table employee(empno varchar2(20),ename varchar2(20),sal number(8,2));

Insert data into employee table
     
     Sql>insert into employee('1001','bcd',10000);

     Sql>insert into employee('1002','abc','1000);

     Sql>insert into employee('1003','xyz',5000);

     Sql>insert into employee('1004','gani',5000);

Program 


    Declare
    emp_no varchar2(20);
    upd_sal number(5);
    total_sal number(8,2);
    begin
    emp_no:='&emp_no';
    upd_sal:='&upd_sal';
    Insert into employee values('1005','ganesh', 2000);
    savepoint no_update;
    update employee set_sal=sal+upd_sal where empno=emp_no;
    select sum(sal) into total_sal from employee;
    if total_sal>30000 then
    rollback to savepoint no_update;
    dbms_output.put_line('no update, we are exceeding the total salary 30000) ;
    else
    dbms_output.put_line('salary updated successfully to the account:'|| emp_no) ;
    end if;
    end;
    /
   
 
 Create your own website

        Click here 

    

Friday, 9 January 2015

Pl/sql program to debit the amount and check the minimum bal 500 while debiting the account

Sql>Create table account(name varchar2(20),anumber varchar2(15),bal number(8,2));

Output: Table created

Sql>insert into account values('abc','101',5000);

Output: row inserted

Sql>insert into account values('abcd','102',500);

Output: row inserted

Sql>insert into account values('ganesh','103',3000);

Output: row inserted.

Sql>insert into account values('raju','104',1000);

Output: row inserted

Sql>insert into account values('gani','105',9000);

Output: row inserted.

Program:

 
declare
acct _bal number(8,2);
acct_no varchar2(15);
debit_amt number(5);
min_bal Number(5);=500;
begin
acct_no:=&acct_no;
debit_amt:=&debit_amt;
select bal into acct_bal from account
      where anumber=acct_no;
acct_bal:=acct_bal-debit_amt;
if  acct_bal>=min_bal then
update account set bal=bal-debit_
     amt where anumber:=acct_no;
else
dbms_output.put_line('insufficient
     bal in the output ');
end if;
end;
/

Sunday, 4 January 2015

PL/SQL program to display the numbers in recursive order

Program:

      Declare 
          a number(4);
          rev number(4);
          d number(4);
      begin 
          a:=&a;
          rev:=a;
      while a>0
      Loop
          d:=mod(a,10);
          rev=(rev*10)+d;
          a:=trunc(a/10);
     end loop;
     dbms. output. put_line('rev ='¦¦rev) ;
     end;
     /