Ads

Wednesday 24 October 2012

image map


PROGRAMS:

MAIN.HTML:
<html>
<head>
<title><b>INTERNET AND WORLD WIDE</b></title>
<center><title>INDIA MAP</title></center>
</head>
<body>
<h1><b><marquee>WELCOME TO INTERNET LAB</marquee></b></h1>
<body bgcolor=yellow text=red>
<p>
<img src="pic.bmp"="center"width="800"height="600"usemap="#INDIA">
<map name="INDIA">
<area shape="circle"ALT="CHENNAI"coords="250,200,10"HREF="chennai.html">
<area shape="circle"ALT="MUMBAI"coords="160,170,10"HREF="mumbai.html">
<area shape="circle"ALT="KOLKATTA"coords="270,140,20"HREF="kolkatta.html">
<area shape="circle"ALT="DELHI"coords="170,100,20"HREF="delhi.html">
</map></p>
</body>
</html>

CHENNAI:
<html>
<head>
</head>
<body bgcolor=red text=white>
<h1><marquee>WELCOME TO MADRASAPATTINAM</marquee></h1>
<A href="imagemap.html"><strong><FONT color=white>homepage</FONT></strong></a><p></p>
<b><font size=4 face=verdana>CHENNAI IS THE CAPITAL OF TAMILNADU</font></b>
</body>
</html>
           
DELHI:
<html>
<head>
</head>
<body bgcolor=red text=white>
<h1><marquee>WELCOME TO NEWDELHI</marquee></h1>
<A href="imagemap.html"><strong><FONT color=white>homepage</FONT></strong></a><p></p>
<b><font size=4 face=verdana>NEW DELHI IS THE CAPITAL OF INDIA</font></b>
</body>
</html>          
KOLKATTA:

<html>
<head>
</head>
<body bgcolor=red text=white>
<h1><marquee>WELCOME TO KOLKATTA</marquee></h1>
<A href="imagemap.html"><strong><FONT color=white>homepage</FONT></strong></a><p></p>
<b><font size=4 face=verdana>KOLKATTA IS THE BIRTHPLACE OF GANGULY</font></b>
</body>
</html>          


MUMBAI:

<html>
<head>
</head>
<body bgcolor=red text=white>
<h1><marquee>WELCOME TO MUMBAI</marquee></h1>
<A href="imagemap.html"><strong><FONT color=white>homepage</FONT></strong></a><p></p><b><font size=4 face=verdana>AN IMPORTANT BUSINESS PLACE IN INDIA</font></b>
</body>
</html>

Tuesday 23 October 2012

CASCADING STYLESHEET


PROGRAM:

home.html

<html>
<head>
<title>PRIST UNIVERSITY</title>
<link rel="stylesheet" href="D:\j2sdk1.4.1_01\main.css" style="text/css">
</head>
<frameset cols="15%,*" noresize="noresize" name="home">
<frame name="link" src="link.html">
<frame name="display" src="sit.html">
</frameset>
</html>
sit.html

<html>
 <head>
<title> PRIST UNIVERSITY </title>
<link rel="stylesheet" href D:\j2sdk1.4.1_01\main.css " type="text/css">
<style>
 p.important{font-family:"Tahoma"; border:solid; border-width:thin; width:100%;color:blue}          </style>
</head>
<body>
<marquee> <h3>Welcome to PRIST UNIVERSITY </h3> </marquee>    
<p><span class=highlight>Prof.P.Murugesan</span> founded RICST(Ram Institute of Computer Science & Technology) in 1985, way ahead of the IT-wave of the 90′s. This pioneering effort in the agricultural district of Thanjavur gained quick recognition by its affiliation to the Bharathidasan University in 1989 for PGDCA course.
<p>This led to the establishment of Ponnaiyah Ramajayam College in 1994. Since it is Managed by an academician, its PHILOSOPHYalong with its derivatives - VISION, MISSION and GOAL - were predetermined under the umbrella of QUALITY and DISCIPLINE. Rest isHISTORY.</p>
<p><b>PHILOSOPHY</b>
<ul>To receive the students in reverence.</ul>
<ul>To educate them qualitatively.</ul>
<ul>To inculcate in them a sense of self-discipline.</ul>
<ul>To let them go forth with Virtues, Wisdom & Maturity.</ul>
<b>Vision</b>
</p>
<p>To create an aptitude amongst the students towards education as a life long process of formal and practical learning on the platform of assimilation of experiences for ongoing knowledge and skill to be of value to oneself and therefore to the society.</p>
<b>Mission</b>
<p>To create and sustain an educational environment in which each student is taught to believe in himself/herself, to create his/her own opportunities and to be a team player so that he/she creates in himself/herself an unending thirst for knowledge and skill.</p>
<b>Goal</b>
<p>To encourage, nurture and develop inborn capabilities of each student into a belief that nothing is impossible including permanent faith in positive attitude to learning and effectively applying what is learnt, so that they are prepared to make their career a successful one, their life a satisfying one and contribute to the benefit of the society by their Virtues, Wisdom and Maturity.</p>
<b>Quality Commitment</b>
<ul>Inculcating Discipline</ul>
<ul>Employing Committed & skilled Personnel</ul>
<ul>Promoting clear systems and procedures</ul>
<ul>Continuous improvement in teaching skills</ul>
<ul>Continuous upgrading in infrastructure</ul>
<ul>planned Operation.</ul>  
<p><span class=underline><b>Growth of the Institution:</b></span><br>
<ul>•   1986 Ram Institute of Computer Science & Technology blossoms.</ul>
<ul>•   1994 Establishment of Ponnaiyah Ramajayam College.</ul>
<ul>•   2000 Establishment of PR Engineering College.</ul>
<ul>•   2003 Upgradation of Ponnaiyah Ramajayam College as Research Institution.</ul>
<ul>•   2004 Establishment of Colleges of Education.</ul>
<ul>•   2005 Establishment of Ponnaiyah Ramajayam Polytechnic College, Thanjavur.</ul>
<ul>•   2005 DSIR Recognition for Ponnaiyah Ramajayam College.</ul>
<ul>•   2006 Establishment of Ponnaiyah Ramajayam College of Engineering & Technology.</ul>
<ul>•   2006 Establishment of Ponnaiyah Ramajayam Polytechnic College, Kumbakonam.</ul>
<ul>•   2008 Deemed University status conferred for PRIST.</ul>
<ul>•   2008 PRIST Chennai Campus blossoms.</ul>
<ul>•   2008 Establishment of Centre for Research and Development in PRIST.</ul>
<ul>•   2008 Establishment of Centre for Distance Education in PRIST.</ul>
<ul>•   2009 PRIST Campuses at Pondicherry, Tiruchirappalli and Kumbakonam blossom.</ul>
<ul>•   2012 Establishment of PRIST – Madurai Campus</ul>
</p></body>
</html>   

link.html

<html>
<link rel="stylesheet" href D:\j2sdk1.4.1_01\main.css ">
<body>
 <ul>
<li><bullet><a href="sit.html" target="display">Home Page</a></bullet></li>
<li><a href="department.html" target="display">Departments</a></li>
<li><a href="course.html" target="display">Courses</a></li></ul>
</body>
</html>
main.css

BODY{FONT-SIZE: 1em;
MARGIN-LEFT: 5%;
COLOR: #099669;
TEXT-INDENT: 3em;
MARGIN-RIGHT: 5%;
FONT-STYLE: italic;
FONT-FAMILY: verdana, sans serif}
H1{COLOR: #000099;
FONT-FAMILY: tahoma}
H2{COLOR: #000099;
 FONT-FAMILY: tahoma}
H3{
COLOR: #000099;
FONT-FAMILY: tahoma}
H4
{COLOR: #000099;
FONT-FAMILY: tahoma}
H5
{COLOR: #000099;
FONT-FAMILY: tahoma}
H6
{COLOR: #000099;
FONT-FAMILY: tahoma}
TH#1{
FONT-SIZE: 2em;
TEXT-TRANSFORM: uppercase;
COLOR: maroon;
FONT-FAMILY: Arial, 'Arial Black', 'Arial Greek';
TEXT-ALIGN: center}
SPAN.underline{
TEXT-DECORATION: underline}
SPAN.highlight
{
COLOR: white;
 BACKGROUND-COLOR: transparent}

servlet


PROGRAM:
Servlet Code:
import java.io.*;
import java.util.*;
import javax.servlet.*;
public class PostParam extends GenericServlet
{
public void service(ServletRequest request,ServletResponse response) throws ServletException,IOException
{
PrintWriter pw = response.getWriter();
Enumeration e = request.getParameterNames();
while(e.hasMoreElements())
{
String pname = (String)e.nextElement();
pw.print(pname + " = ");
String pvalue = request.getParameter(pname);
pw.println(pvalue);
}
pw.close();
}}
HTML CODE:
<HTML>
<head>
 <TITLE>INVOKING SERVLET FROM HTML</TITLE>
</head>
<BODY>
<CENTER>
<FORM name = "PostParam" method = "Post" action="http://localhost:8080/servlets-examples/servlet/PostParam">
<TABLE>
<tr>
<td><B>Employee </B> </td>
<td><input type = "textbox" name="ename" size="25"
value=""></td>
</tr>
<tr>
<td><B>Phone </B> </td>
<td><input type = "textbox" name="phoneno" size="25"
value=""></td>
</tr>
</TABLE>
<INPUT type = "submit" value="Submit">
</FORM>
</CENTER>
</body>
</html>

CHAT APPLICATION


PROGRAM

Server Side
import java.io.*;
import java.net.*;
class Server
{
public static DatagramSocket serversocket;
public static DatagramPacket dp;
public static BufferedReader dis;
public static InetAddress ia;
public static byte buf[]=new byte[1024];
public static int cport=789,sport=790;
public static void main(String a[])throws IOException
{
serversocket=new DatagramSocket(sport);
dp=new DatagramPacket(buf,buf.length);
dis=new BufferedReader(new InputStreamReader(System.in));
ia=InetAddress.getLocalHost();
System.out.println("Server is waiting for data from client");
while(true){
serversocket.receive(dp);
String s=new String(dp.getData(),0,dp.getLength());
System.out.println(s);
}}}

Client Side
import java.io.*;
import java.net.*;
class Client{
public static DatagramSocket clientsocket;
public static BufferedReader dis;
public static InetAddress ia;
public static byte buf[]=new byte[1024];
public static int cport=789,sport=790;
public static void main(String a[])throws IOException{
clientsocket = new DatagramSocket(cport);
dis=new BufferedReader(new InputStreamReader(System.in));
ia=InetAddress.getLocalHost();
System.out.println("Client is sending data to Server ");
while(true){                            
String str=dis.readLine();
buf=str.getBytes();
clientsocket.send(new DatagramPacket(buf,str.length(),ia,sport));
}}}

COLOR PALETTE


PROGRAM:

COLOR PALETTE:

import java.awt.*;
import java.applet.*;
import java.awt.event.*;
//<applet code="color1.class" height=400 width=450></applet>
public class color1 extends Applet implements ItemListener
{         
int currcolor=5;
int flag=1;
String text="check any of the button";
Button buttons[]=new Button[5];
String colors[]={"Red","Blue","Green","Yellow","Orange"};
Image img;
CheckboxGroup cbg=new CheckboxGroup();
Checkbox box1=new Checkbox("Background Color",cbg,true);
Checkbox box2=new Checkbox("Text Color" ,cbg,false);
Checkbox box3=new Checkbox("Loading Image",cbg,false);
public void init(){
for(int i=0;i<5;i++){
buttons[i]=new Button(" ");
add(buttons[i]);}
buttons[0].setBackground(Color.red);
buttons[1].setBackground(Color.blue);
buttons[2].setBackground(Color.green);
buttons[3].setBackground(Color.yellow);
buttons[4].setBackground(Color.orange);
add(box1);
add(box2);
add(box3);
box1.addItemListener(this);
box2.addItemListener(this);
box3.addItemListener(this);}
public void itemStateChanged(ItemEvent e){
if(box1.getState()==true)
flag=1;
else if(box2.getState()==true){
text="defalult color is black";
flag=2;}
else if(box3.getState()==true){
img=getImage(getDocumentBase(),"purple-flowers.jpg");
flag=3;}
repaint();}
public void paint(Graphics g){
if(flag==2){
g.drawString(text,30,100);
switch(currcolor){
case 0:g.setColor(Color.red);
break;
case 1:g.setColor(Color.blue);
break;
case 2:g.setColor(Color.green);
break;
case 3:g.setColor(Color.yellow);
break;
case 4:g.setColor(Color.orange);
break;}
g.drawString(text,30,100);}
else if(flag==1){
g.drawString(text,30,100);
switch(currcolor){
case 0:setBackground(Color.red);
break;
case 1:setBackground(Color.blue);
break;
case 2:setBackground(Color.green);
break;
case 3:setBackground(Color.yellow);
break;
case 4:setBackground(Color.orange);
break;}}
else if(flag==3){
g.drawImage(img,20,90,this);}}
public boolean action(Event e, Object o){
for(int i=0;i<5;i++){
if(e.target==buttons[i]){
currcolor=i;
text="you have chosen "+colors[i];
repaint();
return true;}}
return false;}}

Color1.html

<html>
<applet code="color1.class" height=200 width=320>
</applet>
</html>

AWT CONTROL


PROGRAMS

CHECK BOX:
import java.awt.*;
import java.awt.event.*;
class checkbox extends Frame implements ActionListener,ItemListener
{
Checkbox x,y,z;
CheckboxGroup a;
Button b1;
public checkbox()
{
b1=new Button("EXIT");
setLayout(new FlowLayout());
a=new CheckboxGroup();
x=new Checkbox("CSE");
y=new Checkbox("IT");
z=new Checkbox("ECE");
add(x);
add(y);
add(z);
add(b1);
x.addItemListener(this);
y.addItemListener(this);
z.addItemListener(this);
setLocation(100,100);
show();
b1.addActionListener(this);}
public void actionPerformed(ActionEvent e)
{
if(e.getActionCommand().equals("EXIT"))
{
System.exit(1);
}}
public void itemStateChanged(ItemEvent e)
{
System.out.println("CSE"+x.getState());
System.out.println("IT"+y.getState());
System.out.println("ECE"+z.getState());
}
public static void main(String ar[])
{
checkbox c=new checkbox();
} }


CHOICE:

import java.awt.*;
import java.awt.event.*;
class choice extends Frame implements ActionListener,ItemListener{
Button b1;
Choice c;
public choice(){
b1=new Button("EXIT");
c=new Choice();
c.add("Green");
c.add("Red");
c.add("Blue");
c.add("Gray");
add(c);
add(b1);
b1.addActionListener(this);
c.addItemListener(this);}
public void actionPerformed(ActionEvent e){
if(e.getActionCommand().equals("EXIT")){
System.exit(1);
}}
public void itemStateChanged(ItemEvent b1)
{
if(c.getSelectedItem().equals("Green"))
{
setBackground(Color.green);
}
else if(c.getSelectedItem().equals("Red"))
{
setBackground(Color.red);
}
else if(c.getSelectedItem().equals("Blue")){
setBackground(Color.blue);}
else if(c.getSelectedItem().equals("Gray")){
setBackground(Color.gray);
}}
public static void main(String args[]){
choice t=new choice();
t.setLayout(new FlowLayout());
t.setSize(200,200);
t.setLocation(100,100);
t.show();
}}

LIST:

import java.awt.*;
import java.awt.event.*;
class list extends Frame implements ActionListener
{
Button b1;
public list()
{
b1=new Button("EXIT");
add(b1);
List lst=new List(4,false);
lst.add("CSE");
lst.add("IT");
lst.add("ECE");
lst.add("EEE");
lst.add("CHEM");
add(lst);
b1.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
if(e.getActionCommand().equals("EXIT"))
{
System.exit(1);
}
}
public static void main(String args[])
{
list l=new list();
l.setLayout(new FlowLayout());
l.setSize(400,200);
l.setLocation(100,100);
l.show();
}
}

SCROLL:

import java.awt.*;
import java.awt.event.*;
class Demo extends Frame implements ActionListener
{
Scrollbar sc=new Scrollbar();
Button b1;
public Demo()
{
b1=new Button("EXIT");
add(b1);
FlowLayout f1=new FlowLayout();
setLayout(f1);
add(sc);
b1.addActionListener(this);
setSize(500,500);
show();
}
public void actionPerformed(ActionEvent e)
{
if(e.getActionCommand().equals("EXIT"))
{
System.exit(1);
}
}
}

class Scroll
{
public static void main(String args[])
{
Demo s=new Demo();
}
}

TEXT:

import java.awt.*;
import java.awt.event.*;
class text extends Frame implements ActionListener
{
FlowLayout f=new FlowLayout();
TextField t1=new TextField(10);
TextField t2=new TextField(10);
Button b=new Button("COPY");
Button b1=new Button("EXIT");
public text()
{
setLayout(f);
setSize(600,400);
setLocation(200,200);
add(t1);
add(t2);
b.addActionListener(this);
add(b);
b1.addActionListener(this);
add(b1);
setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
if(e.getActionCommand().equals("COPY"))
{
t2.setText(t1.getText());
}
else if(e.getActionCommand().equals("EXIT"))
{
System.exit(1);
}
}
public static void main(String args[])
{
text t1=new text();
}
}






Wednesday 8 August 2012

Silver medallist Vijay Kumar returns to rousing Army welcome




NEW DELHI: Two days after he had threatened to quit his job for being denied a promotion, London Olympics silver medallist Subedar Vijay Kumar was on Wednesday accorded a rousing welcome by the Indian Army on his arrival at the Indira Gandhi International Airport here.

"It is a really fantastic reception and I am really touched by it. This is the first time I am getting such a welcome," Kumar said after his arrival at the IGI from where he was driven to the Army headquarters on an open Gypsy.

A part of terminal 3 here went green as the Army personnel turned up in full force to receive the shooter who has done the country proud by clinching a silver in 25-m rapid fire pistol event, the lone white metal winner so far.

The place resonated not just with the sounds of drums and the traditional nagaras, the national anthem was also played at the background once the man of the moment's Lufthansa 762 flight touched down early in the morning.

Soon after the shooter won his medal, Kumar had made it clear in London that he was unhappy that he had not got a single promotion in the last six years, despite some major sporting achievements at the national and international level.

Sports Minister Ajay Maken has taken up the shooter's cause and has written to Defence Minister AK Antony, seeking special consideration for the athlete who has done India proud.

"I had done the country proud by winning at major events in 2006, Delhi 2010 (CWG) and London 2012 and was expecting promotion and decorations. As sportspersons we also have expectations," the 2010 Commonwealth Games multiple gold winner said on his return home.

He further said: "Offers have started to pour in from all quarters and the sports minister has openly said that I can be given a job in SAI at the IAS officer's level. I am expecting a similar offer from Army."

Though he started serious shooting only after joining the Army, Kumar said he realised that this was something which he always had it in him.

Kumar may have just won a medal but he is already thinking about the 2016 Olympics at Rio de Janeiro, Brazil.

"I will take a brief break now and then again focus on the 2016 Olympics."

Beside the Army personnel from his 16 Dogra Regiment and Kumar's parents that comprised his father, mother and grandmother, also present with garlands were about 35-40 officials from the National Rifle Association of India (NRAI).

Chants of 'Vijay Kumar zindabad' and 'Indian Army zindabad' were heard all across. And basking in Kumar's glory was his father Banku Ram, a retired Subedar in the Army.

"A lot of hard work has gone into it. He has won a medal because he has spent a lot of time training away from home. He wouldn't have won had he spent those time at home," Ram said.

As far as his son's grievance with promotion was concerned, Ram left it to the shooter.

"That is his decision and I am not going to tell him anything. I am very happy with the Army," the beaming father told reporters.

NRAI advisor Baljeet Sethi said Kumar will from now on be getting all the privileges that an Olympic medallist deserve.

"We will definitely give him all the privileges, whatever is possible. We will take him to the Prime Minister and a felicitation has been planned, it will happen once our president (Raninder Singh) is back from London," Sethi said.

Sethi felt Kumar had it in him to win even a gold medal in London. "He is a quiet type of a person. He is not like the rest, he is always focused on shooting. I had always expected him to win and he could have, in fact, won a gold also."

National coach Sunny Thomas too, was hopeful of Kumar winning a medal, but he was expecting to bag 4-5 medals.

"Realistically, I had expected 4-5 medals. But then it's okay, last time we won one, and two this time. The colour may not be gold but the numbers are more this time," Thomas said.

India had finished their shooting campaign at the Games with a silver won by Kumar and a bronze in the 10m air rifle event clinched by Gagan Narang.

Top medal hopes Abhinav Bindra, who created history four years ago in the Beijing Games with a gold medal in 10m air rifle, and trap shooter Ronjan Sodhi emerged without a podium finish.

Meanwhile, Narang arrived in Mumbai last night according to Thomas, following which he left for Pune where his academy, 'Gun for Glory', is based.