Anda di halaman 1dari 58

AIM:

Design a Resume by using HTML Tags.


Resume.html

<html>

<body bgcolor=lightblue text=navy>

<center><h3 align="left"><i>CURRICULUM VITAE</i></h3> </center>

<hr>

<p><b></b></p>

<table border=0 width=100%>

<tr>

<td width=15%> <img src="Surya.jpg"> </td>

<td width=60%><p><b>UDUGA SURYA KAMESWARI</b></p>

<p>D/o. U. Chandra Rao</p>

<p>H.No : 1-455, </p>

<p>Gandhi Nagar,</p>

<p>Kakinada – 533004</p>

<p>East Godavari Dist.</p>

<p><b>Phone : 9346315036</b></p>

<p><b>E-mail:</b> <a
href="mailto:suryanectar@gmail.com">suryanectar@gmail.com</a></p>

</td>

</table>

<table border="1" bgcolor=peachpuff>

<tr>

<td valign="top" ><p><b>OBJECTIVE </b></p></td>

</tr>

</table>
</tbody>

</table>

<p>Seeking a challenging and responsible position for professional growth and advancement
where initiative and hard work are encouraged and rewarded.</p>

<table border="1" bgcolor=peachpuff>

<tr>

<td valign="top" ><p><b> PROFESSIONAL SUMMARY <b></p></td>

</tr>

</table>

<p>I did Post Graduation in MSc Computers from Andhra University. Proficient in C / C++/
Java / VB / Oracle 10g &amp; Software engineering concepts, Strong analytical skills and
Technical skills, fast learner with good communication skills are few important qualities I
possess.</p>

<table border="1" bgcolor=peachpuff>

<tr> <td valign="top" ><p><b>PERSONAL SKILLS</b></p></td> </tr>

</table>

<p> Good Communication Skills</p>

<p> Ability to work both independently and collectively to achieve objectives</p>

<p> Leadership qualities</p>

<p> Proactive </p>

<table border="1" bgcolor=peachpuff>

<tr> <td valign="top" ><p><b>TECHNICAL AND SOFTWARE SKILLS</b></p></td>


</tr>

</table>

<br>

<table border="0">

<tr>

<td valign="top" > <b> Operating Systems <b> </td>

<td valign="top" ><p>MS-DOS, Windows 98/2000/XP, UNIX</p></td>


</tr>

<tr>

<td valign="top" ><p><b>Programming Languages</b></p></td>

<td valign="top" ><p>C , C++ , Java ,J2EE</p></td>

</tr>

<tr>

<td valign="top" ><p><b>Packages</b></p></td>

<td valign="top" ><p>MS Office (2000&amp;XP)</p></td>

</tr>

<tr>

<td valign="top" ><p><b>DBMS</b></p></td>

<td valign="top" ><p>Oracle 8i</p></td>

</tr>

<tr>

<td valign="top" ><p><b>Front End Tools</b></p></td>

<td valign="top" ><p>VB</p></td>

</tr>

</table>

<br>

<table border="1" bgcolor=peachpuff>

<tr> <td valign="top" ><b> EDUCATIONAL SUMMARY </b></td> </tr>

</table>

<br>

<table border="1" width=100%>

<tr bgcolor=lightyellow>

<th align="center"><p>Degree</p></th>

<th align="center" ><p>School/College</p></th>


<th align="center" ><p>Board/University</p></th>

<th align="center" ><p>Percentage Score</p></th>

</tr>

<tr>

<td valign="top" ><p>MSc Computer Science</p></td>

<td valign="top" ><p>Andhra University College of Engineering Campus,


Vishakapatnam</p></td>

<td valign="top" ><p>Andhra University</p></td>

<td valign="top" ><p>72.52%</b></p></td>

</tr>

<tr>

<td valign="top" ><p>BSc Computer Science</p></td>

<td valign="top" ><p>P. R. Govt. College (Autonomous), Kakinada.</p></td>

<td valign="top" ><p>Andhra University</p></td>

<td valign="top" ><p>74.11%</p></td>

</tr>

<tr>

<td valign="top" ><p>Intermediate </p></td>

<td valign="top" ><p>P. R. College (Boys), Kakinada</p></td>

<td valign="top" ><p>Board of Intermediate Education, A.P</p></td>

<td valign="top" ><p>70.10%</p></td>

</tr>

<tr>

<td valign="top" ><p>Secondary Education, (S.S.C)</p></td>

<td valign="top" ><p>Tagore Convent High School, Kakinada</p></td>

<td valign="top" ><p>Board of Secondary Education,A.P</p></td>

<td valign="top" ><p>75.33%</p></td>


</tr>

</table>

<br>

<table border="1" bgcolor=peachpuff>

<tr>

<td valign="top" align=center><p><b>ACADEMIC PROJECT SUMMARY</b></p></td>

</tr>

</table>

<br>

<br>

<table border="1">

<tr bgcolor=lightyellow>

<td align="center" ><p><b> Project Title</p></b></td>

<td align="center" ><p><b>Project Brief</p></b></td>

</tr>

<tr>

<td valign="top" ><p><b>tappals monitoring system<b></p></td>

<td valign="top" ><p>The project work was done in BSc Final Semester as Academic
project.</p>

<p>The project work entitled “Tappals Monitoring System” is developed to Streamline the
maintenace registers in Treasury office.</p>

<p>This Project is developed under VB / Oracle in BSc final Year as an Academic


project.</p>

<p>This System maintains the details of inward, outward registers and employee’s personal
registers.</p></td>

</tr>

<tr>

<td valign="top"> <p><b>online job portal</p></b></td>


<td valign="top"><p>The project work was done in MSc Final Semester as Academic
project.</p>

<p>This Project is developed under JAVA / Oracle in MSc final Year as an Academic
project.</p>

<p>The project developed has successfully implemented the job provider part, which
includes posting of jobs and updating the job information as well as job seekers part, which
includes searching for jobs, building resume and updating resumes successfully as per the job
seekers requirement and the interfaces designed are very user friendly and attractive
Providers and e-learners.</p></td>

</tr>

</table>

<br>

<table border="1" bgcolor=peachpuff>

<tr> <td valign="top" ><p><b>ACHIEVEMENTS</b></p></td> </tr>

</table>

<p> Participated in <b>MILAN ’09</b> - conducted by Dept of Mathematics, Loyola


College, Vijayawada during 19 Feb 2010</p>

<p> Participated in the National level meet,<b> TECHNOGRAIL’06</b> conducted by


Department of Computer Science and System Engineering, Andhra University,
Visakhapatnam</p>

<p> I won Prize in Computer Quiz competition in <b>TECHBYTES’ 05 </b>conducted by


Department of Computer Science, P.R. Govt. College (A), Kakinada.</p>

<p> Participated in <b>SITEG’ 2004</b> symposium on IT &amp; e – Governance


organized by government of India, ministry of Communication &amp; IT, National
Informatics Center, Yanam.</p>

<p> I did a Paper presentation on DDBMS in <b>TECHFEST’04</b> conducted by


Department of Computer Science, P.R. Govt. College (A), Kakinada.</p>

<br>

<table border="1" bgcolor=peachpuff>

<tr>

<td valign="top" ><p><b>EXTRA CURRICULAM ACTIVITIES</b></p></td>

</tr>
</table>

<p> Participated in elocution and essay writing competitions.</p>

<p> Participated in skits.</p>

<p> Organized many functions at school level and college level as course representative.</p>

<table border="1" bgcolor=peachpuff>

<tr>

<td valign="top" ><p><b>PERSONAL INFORMATION</b></p></td>

</tr>

</table>

<p>Name : U. SURYA KAMESWARI</p>

<p>Father’s Name : U CHANDRA RAO</p>

<p>Date of Birth : 06-05-1983</p>

<p>Sex : female </p>

<p>Nationality : Indian</p>

<p>Languages Known : English, Telugu.</p>

<p>Contact number : 9346315036</p>


AIM:
Design a webpage to illustrate usage of Table tag.
tabledemo.html

<html>

<body bgcolor=lightyellow>

<table bgcolor="#ff0000" border="0" cellpadding="7" cellspacing="0" width=75%


align=center>

<tr>

<th bgcolor="#ff8000"><font color=#804000" size="6"> h <br> t <br> m <br> l


<br> </font> </th>

<th bgcolor="#804000"> <font color=#ff8000" size="5" face="arial">master of


computer applications<br>wt lab</font></th>

<th bgcolor="#ff8000"><pre> </pre></th>

</tr>

</table>

<hr size=2 color=blue>

<table border="8" cellpadding="10" cellspacing="10" bgcolor="peachpuff" align=center


bordercolor=maroon>

<caption align="bottom">acharya nagarjuna</caption> <tr>

<td> <table border="10" cellpadding="10" cellspacing="10" bgcolor=blue


bordercolor=lightblue>

<tr> <td><img src="naglogo2.jpg" alt="anu" width=200 heigth=300></td>

</tr>

</table>

</td>

</tr>

</table>

</body>

</html>
AIM: IntraLinking
intralnk.html

<html>

<head> <title> C Language </title> </head>

<body text=navy>

<h1> <center> C </h1> </center>

<hr>

<a name=home> </a>

<ul>

<li><a href="#intro"> Introduction </a></li>

<li> <a href="#hist">History </a></li>

<li><a href="#why"> why Use C </a></li>

<li><a href="#uses"> Uses of C </a></li>

<li><a href="#dt"> Datatypes </a></li>

</UL>

<hr>

<b><a name="intro">INTRODUCTION </a></b>

<p>

C is a general-purpose programming language. It has been closely associated with the UNIX
operating system where it was developed, since both the system and most of the programs
that run on it are written in C. The language, however, is not tied to any one operating system
or machine; and although it has been called a "system programming language" because it is
useful for writing compilers and operating systems, it has been used equally well to write
major programs in many different domains. </p>

<p>Many of the important ideas of C stem from the language BCPL, developed by Martin
Richards. The influence of BCPL on C proceeded indirectly through the language B, which
was written by Ken Thompson in 1970 for the first UNIX system on the DEC PDP-7.BCPL
and B are "type less" languages. By contrast, C provides a variety of data types. The
fundamental types are characters, and integers and floating-point numbers of several sizes. In
addition, there is a hierarchy of derived data types created with pointers, arrays, structures
and unions. Expressions are formed from operators and operands; any expression, including
an assignment or a function call, can be a statement. Pointers provide for machine
independent address arithmetic.</p>

<p>C is a relatively "low-level" language. This characterization is not pejorative; it simply


means that C deals with the same sort of objects that most computers do, namely characters,
numbers, and addresses. These may be combined and moved about with the arithmetic and
logical operators implemented by real machines.

C provides no operations to deal directly with composite objects such as character strings,
sets, lists or arrays. There are no operations that manipulate an entire array or string, although
structures may be copied as a unit. The language does not define any storage allocation
facility other than static definition and the stack discipline provided by the local variables of
functions; there is no heap or garbage collection. Finally, C itself provides no input/output
facilities; there are no READ or WRITE statements, and no built-in file access methods. All
of these higher-level mechanisms must be provided by explicitly called functions. Most C
implementations have included a reasonably standard collection of such functions. Similarly,
C offers only straightforward, single thread control flow: tests, loops, grouping, and
subprograms, but not multiprogramming, parallel operations, synchronization, or co
routines.</p>

<b>WHAT IS THE ANSI-C STANDARD?</b>

<p>When it became evident that the C programming language was becoming a very popular
language available on a wide range of computers, a group of concerned individuals met to
propose a standard set of rules for the use of the C programming language. The group
represented all sectors of the software industry and after many meetings, and many
preliminary drafts, they finally wrote an acceptable standard for the C language. The
American National Standards Institute (ANSI), and International Standards Organization
(ISO) have accepted it. It is not forced upon any group or user, but since it is so widely
accepted, it would be economic suicide for any compiler writer to refuse to conform to the
standard.

<br> <br> <b> <a href="#home">Top </a></b></p>

<b><a name="hist">HISTORY OF THE C FAMILY OF LANGUAGES:</a></b>

<p>1972 - The precursor to C, the language B, is developed at Bell Labs. The B language is
fast, easy to maintain, and useful for all kinds of development from systems to applications.
The entire team that designed the language is immediately fired for behavior unbefitting a
telephone company employee, and the project is handed to Dennis Ritchie. He alters the
language to be incomprehensible, difficult to maintain, and only useful for systems
development. He also designs in a pointer system guaranteed to give every program over 500
lines a pointer into the operating system.

1984 – The number of operating systems bad pointers can get to have been dramatically
increased.
1985 – A variant of C with object-oriented capabilities, called C With Classes, is ready to go
commercial. However, the name C With Classes is considered too clear and easy for
outsiders to understand, so the commercial version is called C++.

1986 – C becomes so popular that industry analysts recommend writing business applications
in it. They argue that applications written in C will be portable to many different systems.
Many of these industry analysts are suspected of being under the influence of hallucinogens.

1988 – Industry analysts finally run out of LSD. After their hallucinations fade, they notice
that business apps written in C take five times longer to produce, and are still not portable.
They stop recommending that business apps be written in C, except for a minority that switch
to crack cocaine and start recommending business apps be written in C++ because “object
orientation will result in code reuse”.

1990 – By this time, all C compilers have turned into C++ compilers. But, since most C++
programs do not use any of the object oriented features of the language, this means in
practical terms that bloated code structures with pointers into the operating system are now
being compiled with an object-oriented compiler.

1990 – After hiring some industry analysts that switched from crack to sniffing glue, Sun
decides to create a language called Oak to program set-top television boxes. Since all their
programmers have had stilted C syntax imprinted into their DNA by this time, the new
language borrows heavily from C and C++ syntax. However the set-top boxes don’t have an
operating system for bad pointers to get to, so pointers are eliminated from the language.

1994 – Someone at Sun finally realizes what a stupid idea it was to develop a special
language just for set-top television boxes. The language is renamed Java and repositioned as
an “Internet” language that is supposed to be portable to many platforms. This works well as
a marketing campaign, since less than 3% of people in the industry at this time realize what
the Internet is, and since hallucinating industry analysts continue to be suckers for the
mythical idea of "portability to different platforms".

1995 - Sun offers free psychedelic mushrooms to industry analysts, who immediately start
writing articles about how Java is the future of programming because of its portability and
integration with the Internet.

Mid 1996 – 17,468,972 articles appear about how Java is the future of programming. The age
of Java applets in web pages begins.

Late 1996 – Programmers trying to produce actual web pages with applets that really work
commit mass suicide out of frustration and depression. Industry analysts increase their dosage
of hallucinogens to compensate.

1997 – Taking the advice of hallucinating industry analysts, Corel decides to rewrite all their
applications, including WordPerfect, in Java. The end result is the first known word processor
that is slower to use than a typewriter.
1998 – Realizing that the applet thing is fading fast, Sun repositions Java again, this time as a
server language. They steal the design of Microsoft Transaction Server and convince
everyone to pretend they created the design.

1999 – Java 2 Enterprise Edition is introduced to the rave reviews of drunk and stoned
industry analysts. 21,499,512 articles are written about it, but no one actually uses it because
it’s immature and expensive.

2000 – J2EE finally works, sort of. Just about the time all the Java vendors are ready to start
making money on it, Microsoft announces .NET, which includes almost all the features of
J2EE except the outrageous cost. In fact, Microsoft decides to give .NET away free for
Windows users. Scott McNealy is so outraged he files another irrational lawsuit against
Microsoft.

.NET includes a new C-family language, C#, pronounced "C-pound", continuing the tradition
of languages in this family having stupid names.

2001 – Microsoft’s marketing department realizes that no one in marketing has ever talked to
a live Microsoft product developer. They have lunch with one and discover that the
pronunciation is actually supposed to be “C sharp”.

2002 – C# is introduced as part of the release version of Microsoft .NET. C++ developers on
the Microsoft platform rejoice over the concept of "managed code", which means they finally
receive the same automatic memory management features that Visual Basic has had since
1991 and Java has had since 1995.

<br> <br> <b> <a href="#home">Top </a></b></p> </p>

<b><a name="why">WHY USE C?</a></b>

<p>C has been used successfully for every type of programming problem imaginable from
operating systems to spreadsheets to expert systems - and efficient compilers are available for
machines ranging in power from the Apple Macintosh to the Cray supercomputers. The
largest measure of C's success seems to be based on purely practical considerations:</p>

<ul>

<li> the portability of the compiler; </li>

<li> the standard library concept; </li>

<li> a powerful and varied repertoire of operators; </li>

<li> an elegant syntax; </li>

<li> ready access to the hardware when needed and </li>

<li> the ease with which applications can be optimized by hand-coding isolated procedures
</li>
</ul>

</p>

<p>C is often called a "Middle Level" programming language. This is not a reflection on its
lack of programming power but more a reflection on its capability to access the system's low
level functions. Most high-level languages (e.g. Fortran) provide everything the programmer
might want to do already built into the language. A low level language (e.g. assembler)
provides nothing other than access to the machines basic instruction set. A middle level
language, such as C, probably doesn't supply all the constructs found in high-languages - but
it provides you with all the building blocks that you will need to produce the results you
want!

<br> <br> <b> <a href="#home">Top </a></b></p>

<b><a name="uses">USES OF C </a></b>

<p>C was initially used for system development work, in particular the programs that make-
up the operating system. Why use C? Mainly because it produces code that runs nearly as fast
as code written in assembly language. Some examples of the use of C might be:

<ul>

<li> Operating Systems </li>

<li> Language Compilers</li>

<li> Assemblers </li>

<li> Text Editors </li>

<li> Print Spoolers </li>

<li> Network Drivers </li>

<li> Modern Programs</li>

<li> Data Bases </li>

<li> Language Interpreters </li>

<li> Utilities </li>

</ul>

In recent years C has been used as a general-purpose language because of its popularity with
programmers. It is not the world's easiest language to learn and you will certainly benefit if
you are not learning C as your first programming language! C is trendy - many well
established programmers are switching to C for all sorts of reasons, but mainly because of the
portability that writing standard C programs can offer.
<br> <br> <b> <a href="#home">Top </a></b></p> </font>

</p>

<b><a name="dt"> DATATYPES </a></b>

<p> The type of a variable determines what kinds of values it may take on. An operator
computes new values out of old ones. An expression consists of variables, constants, and
operators combined to perform some useful computation. In this chapter, we'll learn about C's
basic types, how to write constants and declare variables of these types, and what the basic
operators are. </p>

<p>As Kernighan and Ritchie say, "The type of an object determines the set of values it can
have and what operations can be performed on it.'' This is a fairly formal, mathematical
definition of what a type is, but it is traditional (and meaningful). There are several
implications to remember: </p>

<p>The "set of values'' is finite. C's int type can not represent all of the integers; its float type
can not represent all floating-point numbers.

When you're using an object (that is, a variable) of some type, you may have to remember
what values it can take on and what operations you can perform on it. For example, there are
several operators which play with the binary (bit-level) representation of integers, but these
operators are not meaningful for and may not be applied to floating-point operands.

When declaring a new variable and picking a type for it, you have to keep in mind the values
and operations you'll be needing. </p>

</font>

<br> <br> <b> <a href="#home">Top </a></b></p>

</body>

</html>
AIM
Illustrate the creation of clickable images in HTML.

CODE:
imglnkdemo.html

<html>

<body>

<img src="planets.jpg" alt="Planets" usemap="#planetmap" width=600 height=400 >

<map name="planetmap">

<area shape="circle" coords="70,58,55" href="ganymede.html" target="_blank"


alt="Ganymede" />

<area shape ="circle" coords ="200,58,8" href ="Titan.html" target ="_blank" alt="Venus" />

</map>

</body>

</html>

ganymede.html

<html>

<head> <title> Ganymede </title> </head>

<body bgcolor=blue text=white>

<b>

<center><h1> Ganymede </h1> </center>

<hr>

<p>Ganymede is a satellite of Jupiter and the largest satellite in the Solar System. It is the
seventh moon and third Galilean satellite outward from Jupiter. Completing an orbit in
roughly seven days, Ganymede participates in a 1:2:4 orbital resonance with the moons
Europa and Io, respectively. It has a diameter of 5,268 km (3270 miles), 8% larger than that
of the planet Mercury, but has only 45% of the latter's mass.Its diameter is 2% larger than
that of Titan, the second largest moon. It also has the highest mass of all planetary satellites,
with 2.02 times the mass of the Earth's moon.</p>

<p>Ganymede is composed of approximately equal amounts of silicate rock and water ice. It
is a fully differentiated body with an iron-rich, liquid core. A saltwater ocean is believed to
exist nearly 200 km below Ganymede's surface, sandwiched between layers of ice. Its surface
is composed of two main types of terrain. Dark regions, saturated with impact craters and
dated to four billion years ago, cover about a third of the satellite. Lighter regions, crosscut
by extensive grooves and ridges and only slightly less ancient, cover the remainder. The
cause of the light terrain's disrupted geology is not fully known, but was likely the result of
tectonic activity brought about by tidal heating.</p>

<p>Ganymede is the only satellite in the Solar System known to possess a magnetosphere,
likely created through convection within the liquid iron core. The meager magnetosphere is
buried within Jupiter's much larger magnetic field and connected to it through open field
lines. The satellite has a thin oxygen atmosphere that includes O, O2, and possibly O3
(ozone).Atomic hydrogen is a minor atmospheric constituent. Whether the satellite has an
ionosphere associated with its atmosphere is unresolved.</p>

<p>Ganymede's discovery is credited to Galileo Galilei, who was the first to observe it on
January 7, 1610. The satellite's name was soon suggested by astronomer Simon Marius, for
the mythological Ganymede, cupbearer of the Greek gods and Zeus's lover.Beginning with
Pioneer 10, spacecraft have been able to examine Ganymede closely.[20] The Voyager
probes refined measurements of its size, while the Galileo craft discovered its underground
ocean and magnetic field. A new mission to Jupiter's icy moons, the Europa Jupiter System
Mission (EJSM), is proposed for a launch in 2020.</p>

<p>The radiation level at the surface of Ganymede is equivalent to a dose of about 8 rem (80
mSv) per day.</p>

</b>

</body>

</html>

titan.html

<html>

<head> <title> Titan </title> </head>

<body bgcolor=blue text=white>

<b>

<center><h1> Titan </h1> </center>


<hr>

<p> Titan or Saturn VI, is the largest moon of Saturn, the only natural satellite known to have
a dense atmosphere,and the only object other than Earth for which clear evidence of stable
bodies of surface liquid has been found.</p>

<p> Titan is the sixth ellipsoidal moon from Saturn. Frequently described as a planet-like
moon, Titan has a diameter roughly 50% larger than Earth's moon and is 80% more massive.
It is the second-largest moon in the Solar System, after Jupiter's moon Ganymede, and it is
larger by volume than the smallest planet, Mercury, although only half as massive. Titan was
the first known moon of Saturn, discovered in 1655 by the Dutch astronomer Christiaan
Huygens.</p>

<p> The moon itself is primarily composed of water ice and rocky material. Much as with
Venus prior to the Space Age, the dense, opaque atmosphere prevented understanding of
Titan's surface until new information accumulated with the arrival of the Cassini–Huygens
mission in 2004, including the discovery of liquid hydrocarbon lakes in the satellite's polar
regions. These are the only large, stable bodies of surface liquid known to exist anywhere
other than Earth. The surface is geologically young; although mountains and several possible
cryovolcanoes have been discovered, it is smooth and few impact craters have been
discovered.</p>

<p> The atmosphere of Titan is largely composed of nitrogen; minor components lead to the
formation of methane and ethane clouds and nitrogen-rich organic smog. The climate—
including wind and rain—creates surface features similar to those of Earth, such as sand
dunes, rivers, lakes and seas (probably of liquid methane or ethane) and shorelines, and, like
on Earth, is dominated by seasonal weather patterns. With its liquids (both surface and
subsurface) and robust nitrogen atmosphere, Titan is viewed as analogous to the early Earth,
although at a much lower temperature. The satellite has thus been cited as a possible host for
microbial extraterrestrial life or, at least, as a prebiotic environment rich in complex organic
chemistry. Researchers have suggested a possible underground liquid ocean might serve as a
biotic environment. It has also been suggested that a form of life may exist on the surface,
using liquid methane as a medium instead of water; and anomalies in atmospheric
composition have been reported which are consistent with the presence of such a life-form,
but which could also be due to an exotic non-living chemistry. </p>

</b>

</body>

</html>
AIM :
Create a form with the following specifications:

a) Our form uses frames, one to hold the links bar at the right side of the
browser window.
b) Other is a larger frame that provides the main view.
The links bar should contain 5 links, which when clicked, should
display the appropriate HTML file in the larger frame

Code:
framedemo.html

<frameset rows="25%,75%">

<frame src=logo.html scrolling=no noresize frameborder=0>

<frameset cols="10%,90%">

<frame src=lang.html noresize frameborder=0>

<frame src=aboutme.html name=f frameborder=0>

</frameset>

</frameset>

aboutme.html

<html>

<body background="bkgnd2.jpg" text=blue>

<table border=0 background=bkgnd1.jpg width=40% color=white align=center>

<tr>

<td colspan=2><h1> <center> <font color=yellow> About Me </h1></center> </font> </td>

</tr>

<tr>

<td width=16%> <img src="naglogo2.jpg"></td>

<td><font color=white> <b>UDUGA SURYA KAMESWARI <br>


Assistant Professor<br>

Department of Computer Science and Engineering,<br>

Acharya Nagarjuna University,<br>

Nagarjuna Nagar, Guntur.<br>

Phone : 9346315036<br>

E-mail: suryanectar@gmail.com <br></b> </font>

</td>

</tr>

</table>

</body>

</html>

logo.html

<html>

<body bgcolor=#8080ff>

<table border=0 width=100%>

<tr>

<td rowspan=2 width=8%><img src="sun.jpg" width=150 height=150></td>

<td><font size=8 color=navy> <b><center>Sri Surya InfoTech</font></b><br>

<font color=darkred size=5><b> A Complete reference of Technology </font>


</b></td>

</tr>

<tr>

<td><marquee behavior=alternate direction=left><h2> <font color=yellow>The


inexhaustible vessel </font></h2></marquee><br></center></td>

</tr>

</table>

</body>

</html>
lang.html

<html>

<head>

<title> Welcome </title>

</head>

<body bgcolor=peachpuff text=maroon>

<h3> <a href="c.html" target=f> C </a></h3>

<h3><a href="cpp.html" target=f> C++</a> </h3>

<h3><a href="java.html" target=f> JAVA </a></h3>

<h3> <a href="ht.html" target=f>HTML </a></h3>

<h3> <a href="jsct.html" target=f>JavaScript </a></h3>

<h3> <a href="aboutme.html" target=f>Home </a></h3>

</body>

</html

c.html

<html>

<head>

<title> Welcome </title>

</head>

<body bgcolor=lightgreen text=blue>

<font face=verdana size=2>

<h1><center>C</h1></center>

<p>

C is a general-purpose programming language. It has been closely associated with the UNIX
operating system where it was developed, since both the system and most of the programs
that run on it are written in C. The language, however, is not tied to any one operating system
or machine; and although it has been called a "system programming language" because it is
useful for writing compilers and operating systems, it has been used equally well to write
major programs in many different domains. </p>
<p>Many of the important ideas of C stem from the language BCPL, developed by Martin
Richards. The influence of BCPL on C proceeded indirectly through the language B, which
was written by Ken Thompson in 1970 for the first UNIX system on the DEC PDP-7.BCPL
and B are "type less" languages. By contrast, C provides a variety of data types. The
fundamental types are characters, and integers and floating-point numbers of several sizes. In
addition, there is a hierarchy of derived data types created with pointers, arrays, structures
and unions. Expressions are formed from operators and operands; any expression, including
an assignment or a function call, can be a statement. Pointers provide for machine
independent address arithmetic.</p>

<p>C is a relatively "low-level" language. This characterization is not pejorative; it simply


means that C deals with the same sort of objects that most computers do, namely characters,
numbers, and addresses. These may be combined and moved about with the arithmetic and
logical operators implemented by real machines.

C provides no operations to deal directly with composite objects such as character strings,
sets, lists or arrays. There are no operations that manipulate an entire array or string, although
structures may be copied as a unit. The language does not define any storage allocation
facility other than static definition and the stack discipline provided by the local variables of
functions; there is no heap or garbage collection. Finally, C itself provides no input/output
facilities; there are no READ or WRITE statements, and no built-in file access methods. All
of these higher-level mechanisms must be provided by explicitly called functions. Most C
implementations have included a reasonably standard collection of such functions. Similarly,
C offers only straightforward, single thread control flow: tests, loops, grouping, and
subprograms, but not multiprogramming, parallel operations, synchronization, or co
routines.</p>

<b>WHAT IS THE ANSI-C STANDARD?</b>

<p>When it became evident that the C programming language was becoming a very popular
language available on a wide range of computers, a group of concerned individuals met to
propose a standard set of rules for the use of the C programming language. The group
represented all sectors of the software industry and after many meetings, and many
preliminary drafts, they finally wrote an acceptable standard for the C language. The
American National Standards Institute (ANSI), and International Standards Organization
(ISO) have accepted it. It is not forced upon any group or user, but since it is so widely
accepted, it would be economic suicide for any compiler writer to refuse to conform to the
standard.</p>

<b>HISTORY OF THE C FAMILY OF LANGUAGES:</b>

<p>1972 - The precursor to C, the language B, is developed at Bell Labs. The B language is
fast, easy to maintain, and useful for all kinds of development from systems to applications.
The entire team that designed the language is immediately fired for behavior unbefitting a
telephone company employee, and the project is handed to Dennis Ritchie. He alters the
language to be incomprehensible, difficult to maintain, and only useful for systems
development. He also designs in a pointer system guaranteed to give every program over 500
lines a pointer into the operating system.

</p>

<b>WHY USE C?</b>

<p>C has been used successfully for every type of programming problem imaginable from
operating systems to spreadsheets to expert systems - and efficient compilers are available for
machines ranging in power from the Apple Macintosh to the Cray supercomputers. The
largest measure of C's success seems to be based on purely practical considerations:</p>

<ul>

<li> the portability of the compiler; </li>

<li> the standard library concept; </li>

<li> a powerful and varied repertoire of operators; </li>

<li> an elegant syntax; </li>

<li> ready access to the hardware when needed and </li>

<li> the ease with which applications can be optimized by hand-coding isolated procedures
</li>

</ul>

</p>

<p>C is often called a "Middle Level" programming language. This is not a reflection on its
lack of programming power but more a reflection on its capability to access the system's low
level functions. Most high-level languages (e.g. Fortran) provide everything the programmer
might want to do already built into the language. A low level language (e.g. assembler)
provides nothing other than access to the machines basic instruction set. A middle level
language, such as C, probably doesn't supply all the constructs found in high-languages - but
it provides you with all the building blocks that you will need to produce the results you
want!</p>

<b>USES OF C </b>

<p>C was initially used for system development work, in particular the programs that make-
up the operating system. Why use C? Mainly because it produces code that runs nearly as fast
as code written in assembly language. Some examples of the use of C might be:

<ul>

<li> Operating Systems </li>


<li> Language Compilers</li>

<li> Assemblers </li>

<li> Text Editors </li>

<li> Print Spoolers </li>

<li> Network Drivers </li>

<li> Modern Programs</li>

<li> Data Bases </li>

<li> Language Interpreters </li>

<li> Utilities </li>

</ul>

In recent years C has been used as a general-purpose language because of its popularity with
programmers. It is not the world's easiest language to learn and you will certainly benefit if
you are not learning C as your first programming language! C is trendy - many well
established programmers are switching to C for all sorts of reasons, but mainly because of the
portability that writing standard C programs can offer.

</p>

</font>

</body>

</html>

cpp.html

<html>

<head>

<title> Welcome </title>

</head>

<body bgcolor=#8080ff text=blue>

<font face=verdana size=2>

<h1><center>C++</h1></center>

<p>
Computer technology has evolved at an amazing rate during the last few decades. Today a
laptop computer can compute faster and store more information than the mainframe
computers of thirty years ago. (Quite a few programmers can recall bearing offerings of
decks of punched cards to be submitted to a mighty, room-filling computer system with a
majestic 100KB of memory—not enough memory to run a good personal computer game
today.) Computer languages have evolved, too. The changes may not be as dramatic, but they
are important. Bigger, more powerful computers spawn bigger, more complex programs
which, in turn, raise new problems in program management and maintenance.

</p><p>

In the 1970s, languages like C and Pascal helped usher in an era of structured programming, a
philosophy that brought some order and discipline to a field badly in need of these qualities.
Besides providing the tools for structured programming, C also produced compact, fast-
running programs along with the ability to address hardware matters, such as managing
communication ports and disk drives. These gifts helped make C the dominant programming
language in the 1980s. Meanwhile, the 1980s witnessed the growth of a new programming
paradigm: object-oriented programming, or OOP, as embodied in languages such as
SmallTalk and C++. Let's examine these two developments (C and OOP) a bit more closely.

</p>

<h2>Object-Oriented Programming</h2>

<p>

Although the principles of structured programming improved the clarity, reliability, and ease
of maintenance of programs, large-scale programming still remains a challenge. Object-
oriented programming (OOP) brings a new approach to that challenge. Unlike procedural
programming, which emphasizes algorithms, OOP emphasizes the data. Rather than trying to
fit a problem to the procedural approach of a language, OOP attempts to fit the language to
the problem. The idea is to design data forms that correspond to the essential features of a
problem.<p>

<p>

In C++, a class is a specification describing such a new data form, and an object is a
particular data structure constructed according to that plan. For example, a class could
describe the general properties of a corporation executive (name, title, salary, unusual
abilities, for example), while an object would represent a specific executive (Guilford
Sheepblat, vice president, $325,000, knows how to use a CONFIG.SYS file). In general, a
class defines what data are used to represent an object and the operations that can be
performed upon that data. </p>

<p>
The OOP approach to program design is to first design classes that accurately represent those
things with which the program deals. A drawing program, for example, might define classes
to represent rectangles, lines, circles, brushes, pens, and the like. The class definitions, recall,
include a description of permissible operations for each class, such as moving a circle or
rotating a line. Then you proceed to design a program using objects of those classes. The
process of going from a lower level of organization, such as classes, to a higher level, such as
program design, is called bottom-up programming.</p>

<p>

There's more to OOP programming than the binding of data and methods into a class
definition. OOP, for example, facilitates creating reusable code, and that eventually can save
a lot of work. Information hiding safeguards data from improper access. Polymorphism lets
you create multiple definitions for operators and functions, with the programming context
determining which definition is used. Inheritance lets you derive new classes from old ones.
As you can see, object-oriented programming introduces many new ideas and involves a
different approach to programming than does procedural programming. Instead of
concentrating on tasks, you concentrate on representing concepts. Instead of taking a top-
down programming approach, you sometimes take a bottom-up approach. This book will
guide you through all these points with plenty of easily grasped examples.</p>

<p>

Designing a useful, reliable class can be a difficult task. Fortunately, OOP languages make it
simple to incorporate existing classes into your own programming. Vendors provide a variety
of useful class libraries, including libraries of classes designed to simplify creating programs
for environments such as Windows or the Macintosh. One of the real benefits of C++ is that
it lets you easily reuse and adapt existing, well-tested code.

<p>

</body>

</html>

ht.html

<html>

<head>

<body bgcolor=#00ffff text=blue>

<center><h1> HTML</h1></center>

<p>
<p>HTML stands for "Hyper Text Mark-up Language"

<p>HTML is the bricks and mortar of the WWW. Without HTML the

<p>World Wide Web could not have become as important as it is today.

<p>HTML is a document formatting language common the all computerson the WWW. html
permits cross platform communication between Macs, Apples, SUNs, PCs and others to view
a document in a similar way.

<p>Every webpage that you visit uses HTML in some way, you can view the HTML code
behind a website in Internet Explorer by selecting: View > Source

<p>HTML has two sections, the "Head" section and the "Body" section.

<p>The head section is where the information about the web page is put for thebrowser. This
has nothing to do with the heading that you want to see on yourweb page.

Things that can be stored in the head section include Keywords for search engines or the title
of your webpage.

The body section is where the web page is coded. This is where you put the information for
your web page.

</b>

</body>

</html>

java.html

<html>

<head>

<title> Welcome </title> </head>

<body bgcolor=lightgreen text=blue>

<font face=verdana>

<center><h1> JAVA </h1></center>

<p>

<b>Basics of Java Technology</b>

<p>This section provides an overview of Java technology as programming language and a


platform. Java technology is a simple, secure, robust, complete object oriented and platform
independent high level programming language. It is also portable, high performance;
multithreaded and network-savvy that enables it in constructing software that can run along
in small machines. The whole technology is based on the concept of Java Virtual Machine
(JVM) that acts as translators of byte code into machine language. In other words JVM
converts the java byte codes into platform specific machine language. </p>

<b>Understanding the Java Technology</b>

<p>Java technology is high-level, object-oriented, very robust programming language. Java


is platform independent programming language and you can run your compiled code on any
operating system without recompiling your source code. Java technology is based on the
concept of a single Java virtual machine (JVM) -- a translator between the language and the
underlying software and hardware. All implementations of the programming language must
emulate the JVM, enabling Java programs to run on any system that has a version of the
JVM.

If you want to start java programming then you need to use a text editor to create and edit the
source code. By using the Java complier, you can change the source code into byte code. The
byte code can be run on any platform having Java interpreter that can convert the byte code
into codes suitable for the operating system.

<p><b>Why Java Technology is so important?</b></p>

<p>This high-level powerful programming language provides a powerful software platform


as the JVM installed on different platform understand the same byte code. This is ideal for
server side web programming and runs in a secured manner over internet. It enhances the
computing power of the users by taking merely from desktop to the resource of the web. It
contains JVM and Java Application Programming Interface (API) that are kinds of
readymade software components, and for using any component; the need is just to import a
related package in your program use the functionality. It offers development tools that can be
used in compiling, running, debugging and documenting the application, making the Java
programming fun and easy. The automatic garbage collection mechanism helps in avoiding
memory leaks and its coding takes less development time than other programming languages
like C++.

</p>

<b>Different Editions of Java Technology</b>

<p>

<ol type=a><li>

Java SE - Java SE or Java Standard Edition provides tools and API's that you can use to
create server applications, desktop applications, and even applets. These programs developed
using Java SE can be run on almost every popular operating system, including Linux,
Macintosh, Solaris, and Windows.</li>
<li> JEE - Based on the foundation framework of the standard edition, Java Enterprise
Edition helps in web application service, component model and enterprise class service
oriented architecture (SOA). </li>

<li>

JME - Java Micro Edition or JME for short is an accumulation of Java APIs that are used for
the development of software for devices like mobile phones, PDAs, TV set-top boxes, game
programming. The platform of micro edition generally consists of an easy user interface, a
robust security model and a wide variety of built-in networks for running Java based
application.

</li>

</p>

<h3>Components of each edition</h3><br>

<b>JSE Components</b><br>

<u>JavaBeans</u> - It is the component architecture for J2SE platform and one can develop
and assemble these software programs for better web application. It is a reusable software
component that can be manipulated visually in a builder tool. This software assists visual
builder tools in using reflection, introspection, and also analyze and customize JavaBeans.

<br><u>Java Foundation Classes (JFC)</u> - It is a part of Java class libraries based on the
Java platform used for developing graphical user interface (GUI). JFC helps in 2D graphics,
imaging, text formatting and printing with the help of Abstract Window Toolkit (AWT),
Swing and Java2D. With the help of input method framework, the JFC technology assists in
preparing application that can be accessible to all users around the world in different
languages. Drag and Drop is another feature of JFC that supports data transfers between
different Java applications. <br>

<u>JavaHelp</u> - It is a platform independent and a feature oriented software system that


offers developer an automated help component. JavaHelp 2.0 API is useful while building
online documentation and presenting online information to the application users.

<u>Java Web Start</u> - It is framework in the Java platform that assists in starting
Application software directly from the internet by using a web browser. As we know Java
applet can run in a browser but in case of Java Web Start, it doesn't run inside and solve
many complex problems associated with Java plugins and JVM. It also provide many classes
that in turn provides various services and allow better access to resources. Version 1.0 was
introduced in the year 2001. Now with the release of J2SE 1.4, Java Web Start is included
with Java Runtime Environment and does need any separate installation.

<br>
<u>Java Database Connectivity (JDBC) </u>- JDBC API is a part of Java Standard Edition
that helps in accessing data from a SQL based database. Besides, it also process the result and
allows in using the programming language with "Write Once, Run Anywhere" feature. Some
of its key features are like full access to metadata, no special installation and database
identification. <br>

<u>Java Media Framework (JMF)</u> - Its an advanced API that allows Java developers to
process and add audio-video source to Java application and applets. It is useful for
multimedia developers to capture, playback, transcode different media formats.

<p>

<b>JEE - Components:</b><br>

<u>Enterprise JavaBeans (EJB) </u>- This technology is a server side component of Java
platform used for the construction of enterprise application. It is one of the Java APIs
attached with the enterprise edition. By using Java technology, EJB helps in quick
development of small, distributed, transactional and secure application.

JavaMail - This JavaMail API technology allows to build mails and messaging application in
a platform independent and protocol independent framework. It is both a part of JSE and JEE
platform. Thus, JavaMail uses an extensible platform for transferring all kinds of Multimedia
Internet Mail Extension (MIME). <br>

<u>Java Message Service (JMS) </u>- Developed under Java community process, JMS
technology is used for sending messages between users. Basically, it is an enterprising
messaging tool used for building enterprising application. The JMS API is a combination of
Java technology and enterprising messaging that provides facilities for building small
message based application. It functions under two models: Point-to-Point and Publishing &
Subscribing model. <br>

<u> JavaServer Pages (JSP) </u>- The JSP technology enables web developers in developing
and maintaining web content pages in formats like HTML and XML. With the help of JSP, it
becomes very easy to build server and platform independent web based application. This uses
HTML and XML tags that offers logical solution for the content. This separately user
interface and content development from each other, which allows the designer to change page
layout without changing the content. <br>

<u>Java Servlets - </u>This enables a developer in adding content to a web server by using
Java platform. This provides the mechanism for enhancing the functionality of web server. In
short, servlets provides platform independent and component based web based application
without the performance limiting of CGI program.

</p>

<b>JME - Components:</b> <br>


<u>Connected Limited Device Configuration (CLDC) </u>- It is one of the configurations of
Java Micro Edition. 'Configuration' describes minimal features of a complete Java. The
CLDC specifies the capabilities of JVM, the base set of API for resource limited devices like
pager and mobile phones. There are two version of CLDC: version 1.0 was released in 2000
and came to be known as Java Specification Request (JSR)30. Later version 1.1 or JSR 139
but 1.0 is more widely used. The Connected Limited Device Configuration and the Mobile
Information Device Profile (MIDP) together provides solid Java platform for developing
application to run on less processing power devices. <br>

<u>Mobile Information Device Profile (MIDP)</u> - This is another configuration of Java


Micro Edition and coupled with CLDC, it provides a farm Java Runtime Environment for
various mobile devices and other personal digital assistance (PDA). With the help of MIDP,
developers can develop application once and then redistribute them into various mobile
information devices in a very small period of time. Its principal functions include the user
interface, network connectivity data storage and overall application process management.
There are two versions of MIDP: one is MIDP 2.0 or JSR 118 and the second one is the
MIDP 1.0 or JSR 37. <br>

<u>Connected Device Configuration (CDC) </u>- Developed under the Java Community
Process (JCP), it is a standard framework of Java technology used for building and delivering
application that can be shared in a wide range of networks and devices ranging from pagers,
mobile phones, set top box and other PDA devices. It is in two versions: the JSR 36 (CDC
1.0) and the latest one is the JSR 218 (CDC 1.1).

Java is great programming language for the development of enterprise grade applications.
This programming Language is evolved from a language named Oak. Oak was developed in
the early nineties at Sun Microsystems as a platform-independent language aimed at allowing
entertainment appliances such as video game consoles and VCRs to communicate. Oak was
first slated to appear in television set-top boxes designed to provide video-on-demand
services. Oak was unsuccessful so in 1995 Sun changed the name to Java and modified the
language to take advantage of the burgeoning World Wide Web.

Java is an object-oriented language, and this is very similar to C++. Java Programming
Language is simplified to eliminate language features that cause common programming
errors. Java source code files are compiled into a format called bytecode, which can then be
executed by a Java interpreter

</pre>

</body>

</html>
jsct.html

<html>

<body bgcolor=lightgreen text=navy>

<h1> <center> Java Script</Center></h1>

<p>JavaScript is a popular general-purpose scripting language used to put energy and pizzaz
into otherwise dead Web pages by allowing a static page to interact with users and respond to
events that occur on the page. JavaScript has been described as the glue that holds Web pages
together. It would be a hard task to find a commercial Web page, or almost any Web page,
that does not contain some JavaScript code.

</p> <p>

JavaScript, originally called LiveScript, was developed by Brendan Eich at Netscape in 1995
and was shipped with Netscape Navigator 2.0 beta releases. JavaScript is a scripting language
that gives life, hence LiveScript, to otherwise static HTML pages. It runs on most platforms
and is hardware independent. JavaScript is built directly into the browser (although not
restricted to browsers), Netscape and Microsoft Internet Explorer being the most common
browsers. In syntax, JavaScript is similar to C, Perl, and Java; e.g., if statements and while
and for loops, are almost identical. Like Perl, it is an object-oriented, interpreted language,
not a compiled language.</p>

<p>

Because JavaScript is associated with a browser, it is tightly integrated with HTML. While
HTML is handled by its own networking library and graphics renderer, JavaScript programs
are executed by a JavaScript interpreter normally built right into the browser. When the
browser requests such a page, the server sends the full content of the document, including
HTML and JavaScript statements, over the network to the client. When the page loads,
HTML content is read and rendered line by line until a JavaScript opening tag is read, at
which time the JavaScript interpreter takes over. When the closing JavaScript tag is reached,
the HTML processing continues.</p>

<p>

JavaScript handled by a browser is called client-side JavaScript. Although JavaScript is used


mainly as a client-side scripting language, it can also be used in contexts other than a Web
browser. Netscape created server-side JavaScript to be programmed as a CGI language, such
as Perl or ASP, but this book will address JavaScript as it is most commonly used—running
on the client side. </p>

</body>

</html>
JavaScript Programs
Program 1: Array Duplication
arydup2.html

<script type="text/javascript">

function f1()

var n=document.frm.num.value;

var X=new Array(n);

var i;

for(i=0;i<n;i++)

X[i]=parseInt(prompt("Enter a number: "));

document.write("<h1> Elements in the Array are: </h1><br>");

for(i=0;i<n;i++)

document.write("<h3>"+X[i]+"</h3><br>");

if ( arrHasDupes( X ) )

document.write( "<H2>Duplicate elements existed</H2>");

else

document.write( "<H2>No Duplicate Elements</H2>");

function arrHasDupes( A )

var i, j, n;

n=A.length;

for (i=0; i<n; i++)

for (j=i+1; j<n; j++)

if (A[i]==A[j])

return true;
return false;

</script>

<body>

<form name=frm>

Enter no. of elements: <input type=text size=3 name=num>

<input type=button value="Click here" onClick="f1();">

</form>

</body>

Program 2: Drag Drop

dragdrop.html

<html>

<body>

<script language="JavaScript">

function dragDropFunc()

var isDragged = document.all.source.dragDrop();

</script>

<div style onMouseUp="dragDropFunc();">

<p align="center">&nbsp;</p>

<div style="background: #cf2255; width:'100%';" align="center">

<font color="#ffffcc" size="12pt">

<b>Drag Drop Example</b></font></div>

<center>

<div style="background: #ffffcc; width:'100%';" align="center">


<p>&nbsp;</p>

<table border="0" cellpadding="0" cellspacing="0"

width="510" height="104">

<tr>

<td width="151" >

<textarea cols="20" id="source" rows="10">

C++

JAVA

HTML

Visual Basic

Oracle

.NET

Unix

MS-Office

Testing Tools

Multimedia

Linux

</textarea>

</td>

<td width="185" height="104" valign="middle"

align="center">Drag <==> Drop</td>

<td width="174" height="104">

<textarea cols="20" id="destination" rows="15"></textarea>

</td>

</tr>

</table>
&nbsp;

<p>

</div>

</center>

</div>

</body>

</html>

Program 3: Form Validation

formvalid.html

<html>

<head>

<script type="text/javascript">

function formValidator()

// Make quick references to our fields

var na = document.getElementById('sname');

var rno = document.getElementById('regno');

var gen = document.getElementById('s');

var d = document.getElementById('dd');

var y=document.getElementById('yy');

var em = document.getElementById('email');

// Check each input in the order that it appears in the form!

if(notEmpty(na, "Please enter your name"))

if(isAlphabet(na, "Please enter only letters for your name"))

if(isNumeric(rno, "Please enter a valid Registerno"))


if(madeSelection(mm, "Please Choose a Month"))

if(emailValidator(email, "Please enter a valid email address"))

return true;

return false;

function notEmpty(elem, helperMsg)

if(elem.value.length == 0)

alert(helperMsg);

elem.focus(); // set the focus to this input

return false;

return true;

function isNumeric(elem, helperMsg)

var numericExpression = /^[0-9]+$/;

if(elem.value.match(numericExpression))

return true;

else

alert(helperMsg);

elem.focus();

return false;

}
function isAlphabet(elem, helperMsg)

var alphaExp = /^[a-zA-Z]+$/;

if(elem.value.match(alphaExp))

return true;

else

alert(helperMsg);

elem.focus();

return false;

function isAlphanumeric(elem, helperMsg)

var alphaExp = /^[0-9a-zA-Z]+$/;

if(elem.value.match(alphaExp))

return true;

else

alert(helperMsg);

elem.focus();

return false;

function lengthRestriction(elem, min, max)

{
var uInput = elem.value;

if(uInput.length >= min && uInput.length <= max)

return true;

else

alert("Please enter between " +min+ " and " +max+ " characters");

elem.focus();

return false;

function madeSelection(elem, helperMsg){

if(elem.value == "Please Choose")

alert(helperMsg);

elem.focus();

return false;

else

return true;

function emailValidator(elem, helperMsg){

var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;

if(elem.value.match(emailExp))

return true;

else

alert(helperMsg);
elem.focus();

return false;

</script>

<title> Formvalid</title>

</head>

<body bgcolor=peachpuff text=blue>

<form name=f1 action="succ.html" onsubmit='return formValidator()'>

<center>

<h1><font color=maroon> Acharya Nagarjuna University </h1>

<h2> Student Registration Form </h2> </font>

<hr> </center>

<br>

<table border=1 align=center bgcolor=#80ffff>

<tr> <td>Name of the Student (in Capital letters): </td>

<td><input type=text name=sname size=20 value=""></td>

</tr>

<tr> <td>Register Number:</td>

<td> <input type=text name=regno size=20 ></td>

</tr>

<tr>

<td> Sex: </td>

<td> <input type=radio name=s> Male <input type=radio name=s> Female </td>

</tr>

<tr>

<td>Date of Birth: </td>


<td> <input type=text name=dd size=2> <select name=mon>

<option>Jan </option> <option>July </option>

<option>Feb </option> <option>Aug </option>

<option>Mar</option> <option>Sep </option>

<option>Apr </option> <option>Oct </option>

<option>May </option> <option>Nov </option>

<option>June </option> <option>Dec </option>

</select>

<input type=text name=yy size=4> </td>

</tr>

<tr> <td>Course:</td>

<td> <select>

<option>Please Choose</option>

<option>M.Sc </option> <option>M.Tech </option>

<option>M.Com </option> <option>M.A</option>

<option>M.Pharm </option> <option>M.Arch </option>

<option>MHRM </option> <option>M.B.A </option>

<option> M.P.Ed</option> <option> M.Ed</option>

<option> PGDAS</option>

</select> </td>

</tr>

<tr>

<td> Email : </td>

<td> <input type=text size=20 name=eid> </td>

</tr>

</table>

<br>
<center> <input type=button name=b1 value="Register here"></center>

</form>

</body>

</html>

Program 4: Mouse Demo

mousedemo.html

<html>

<head>

<SCRIPT LANGUAGE="JavaScript">

<!--

if (document.images)

var pum1 = new Image();

pum1.src = "naglogo1.jpg";

var pum2 = new Image();

pum2.src = "naglogo2.jpg";

function show_rock()

if (document.images)

document["pum"].src = pum2.src;

function hide_rock()

{
if (document.images)

document["pum"].src = pum1.src;

//-->

</SCRIPT>

</head>

<body>

<a href="ram.html" onClick="alert('Move the mouse over the rock to see a magnified view.');

return false" onMouseOver="show_rock(); window.status='description of explosiveness


scale'; return true"

onMouseOut="hide_rock()">

<IMG SRC="naglogo1.jpg" align=right ALT="picture of pumice" WIDTH="220"


HEIGHT="170" hspace=12 vspace=12 name="pum" border=0></a>

</body>

</html>

<-- When the mouse cursor over a link (the default image, in this case black) then changes to
display a second image in this place !-->

Program 5: Popupwindow

popupwin.html

<html>

<head> <title> JavaScript Popup Window </title>

<script language="Javascript">

function popupwin()

{
winpopup=window.open('','popup','height=500,width=400, menubar=no,
scrollbars=no, status=no, toolbar=no, screenX=100, screenY=100,left=100,top=0');

winpopup.document.write('<html>\n<head>\n');

winpopup.document.write('<title> A Dynamic Popup Window </title>\n');

winpopup.document.write('</head>\n');

winpopup.document.write('<body>\n');

winpopup.document.bgColor="#0000ff";

winpopup.document.fgColor="#ffc814";

winpopup.document.write('<h1>Thank you for choosing XYZ Product</h1>');

winpopup.document.write('<h2>'+document.FORM1.yourname.value+'</h2>\n');

winpopup.document.write('<form name="FORM1">\n');

winpopup.document.write('<input type="button" value="Close window"


onClick="window.close();" \n');

winpopup.document.write('</form>\n');

winpopup.document.write('</body>\n</html>\n');

winpopup.document.close();

</script>

<body>

<form name="FORM1">

Please enter your name:<input type=textbox value="" size=20 name=yourname>

<br><input type="button" value="Popup Windows" onclick="popupwin();">

</form>

</body>

</html>
VBScript Programs
Program 1: Arithmetic Operations

arith1.html

<HTML>

<HEAD>

<TITLE>Add two numbers</TITLE>

<SCRIPT LANGUAGE="vbscript">

Sub Add_OnClick

FirstData = CInt(Document.Form1.Num1.Value)

SecondData =CInt(Document.Form1.Num2.Value)

Document.Form1.Res.Value = FirstData + SecondData

End Sub

Sub Sub_OnClick

FirstData = CInt(Document.Form1.Num1.Value)

SecondData =CInt(Document.Form1.Num2.Value)

Document.Form1.Res.Value = FirstData - SecondData

End Sub

Sub Mul_OnClick

FirstData = CInt(Document.Form1.Num1.Value)

SecondData =CInt(Document.Form1.Num2.Value)

Document.Form1.Res.Value = FirstData * SecondData

End Sub

Sub Div_OnClick

FirstData = CInt(Document.Form1.Num1.Value)

SecondData =CInt(Document.Form1.Num2.Value)

Document.Form1.Res.Value = FirstData / SecondData


End Sub

</SCRIPT>

</HEAD>

<BODY BGCOLOR="peachpuff" color=blue>

<CENTER> <h1> Arithmetic Operations </h1>

<hr>

<FORM NAME="Form1">

Enter a Number <INPUT TYPE="text" NAME="Num1"><P>

Enter a Number <INPUT TYPE="text" NAME="Num2"><P>

<INPUT TYPE="button" NAME="Add" VALUE="Addition">

<INPUT TYPE="button" NAME="Sub" VALUE="Subtraction">

<INPUT TYPE="button" NAME="Mul" VALUE="Multiplication">

<INPUT TYPE="button" NAME="Div" VALUE="Division"><p>

The Result is <INPUT TYPE="text" NAME="Res">

</FORM>

</CENTER>

</BODY>

</HTML>
Program 2: Cookie

cookie.html

<html>

<head>

<script type="text/vbscript">

dim cookiename

dim cookietime

dim expires

cookiename="first"

cookietime=Date()

expires="tuesday 05-april-2011 06:18:05 GMT"

document.cookie="cookiename="&cookiename&" "&"creationtime="&cookietime&"
"&"expires on="&expires

sub cmdbutton_onClick

alert(document.cookie)

end sub

</script>

</head>

<body>

<form>

<input type="button" value="click it" name="cmdbutton">

</form>

</body>

</html>
Program 3: Document Demo

docudemo.html

<html>

<!-- IE_and_VBScript.html

Copyright (c) 2008 by Dr. Herong Yang, http://www.herongyang.com/

-->

<head>

<title>VBScript Supports in IE</title>

<script language="vbscript">

dim colorID

colorID = 0

function changeColor()

if colorID = 0 then

document.body.bgColor = "lightgrey"

elseif colorID = 1 then

document.body.bgColor = "lightblue"

elseif colorID = 2 then

document.body.bgColor = "lightgreen"

elseif colorID = 3 then

document.body.bgColor = "lightyellow"

end if

colorID = (colorID+1) mod 4

end function

</script>

</head>

<body>
<p>

<script language="vbscript">

document.write("Hello World!")

</script>

</p>

<form>

<input type="button" value="Click to change background color" onClick="changeColor()"


language="vbscript">

</form>

<p>Want to know the color name?

<a href="vbscript:msgbox(document.body.bgColor)">Click here.</a>

</p>

</body>

</html>
Program 4: Swapping

swapping.html

<html>

<body bgcolor=green text=white>

<font size=5>

<b>

<pre>

<script language="vbscript">

vFirst = "surya"

vSecond = "kameswari"

document.writeln("<u>"+"Test 1: Swapping two variables by value"+"</u><br>")

document.writeln(" Before Sub: " & vFirst & " | " & vSecond)

Call SwapByVal(vFirst, vSecond)

document.writeln(" After Sub: " & vFirst & " | " & vSecond)

document.writeln("")

document.writeln("<u>"+"Test 2: Swapping two variables by reference"+"</u><br>")

document.writeln(" Before Sub: " & vFirst & " | " & vSecond)

Call SwapByRef(vFirst, vSecond)

document.writeln(" After Sub: " & vFirst & " | " & vSecond)

Sub SwapByRef(ByRef vLeft, ByRef vRight)

vTemp = vLeft

vLeft = vRight

vRight = vTemp

document.writeln(" In Sub: " & vLeft & " | " & vRight)

End Sub

Sub SwapByVal(ByVal vLeft, ByVal vRight)


vTemp = vLeft

vLeft = vRight

vRight = vTemp

document.writeln(" In Sub: " & vLeft & " | " & vRight)

End Sub

</script>

</pre>

</font>

</body>

</html>
Program 5: Window Object

windsize.html

<html>

<!-- Window_Object.html

Copyright (c) 2008 by Dr. Herong Yang, http://www.herongyang.com/

-->

<head>

<title>Window Object</title>

<script type="text/vbscript">

dim sizeID

sizeID = 0

function changeSize()

if sizeID = 0 then

window.resizeTo 300,300

elseif sizeID = 1 then

window.resizeTo 400,400

elseif sizeID = 2 then

window.resizeTo 500,500

elseif sizeID = 3 then

window.resizeTo 600,600

end if

sizeID = (sizeID+1) mod 4

end function

</script>

</head>
<body>

<p>Hello World!</p>

<p><form>

<input type="button" value="Change" onClick="changeSize()"/>

</form></p>

</body>

</html>
Servlet
ServletSession.java

import java.io.*;

import java.util.Enumeration;

import java.util.Date;

import javax.servlet.*;

import javax.servlet.http.*;

public class SessionServlet extends HttpServlet

public void doGet (HttpServletRequest request, HttpServletResponse response) throws


ServletException, IOException

HttpSession session= request.getSession(true);

ServletOutputStream out=response.getOutputStream();

response.setContentType("text/html");

out.println("<head> <title> SessionServlet Output </title></head>");

out.println("<h1> The output of the SessionServlet </h1>");

Integer val=(Integer) session.getValue("sessiontest.counter");

if(val==null)

val=new Integer(1);

else

val=new Integer(val.intValue()+1);

}
session.putValue("sessiontest.counter",val);

out.println("you have hit this page <b> "+val+"</b> times.<p>");

out.println("<p>");

out.println("<h3>Session Date:</h3>");

out.println("New Session:"+session.isNew());

out.println("<br> Session ID:"+session.getId());

out.println("<br>Creation Time:"+new Date(session.getCreationTime()));

out.println("<br> Lase Accessed Time:"+new Date(session.getLastAccessedTime()));

out.println("<h3> Session Context Data:</h3>");

HttpSessionContext context=session.getSessionContext();

out.println("<h3>"+context+"=</h3>");

out.println("</body>");

web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app

PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<display-name>Welcome to Tomcat</display-name>

<description>

Welcome to Tomcat

</description>

<servlet>

<servlet-name>Servlet Demo</servlet-name>
<servlet-class>SessionServlet</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>Servlet Demo</servlet-name>

<url-pattern>/session</url-pattern>

</servlet-mapping>

</web-app>
Socket
UDPServer.java

import java.io.*;

import java.net.*;

class UDPServer

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 Running...");

while(true)

serversocket.receive(dp);

String str = new String(dp.getData(), 0,dp.getLength());

if(str.equals("END"))

System.out.println("Server: Signout");
break;

System.out.println("Client: " + str);

String str1 = new String(dis.readLine());

buf = str1.getBytes();

serversocket.send(new DatagramPacket(buf,str1.length(), ia, cport));

UDPClient.java

import java.io.*;

import java.net.*;

class UDPClient

public static DatagramSocket clientsocket;

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

clientsocket = new DatagramSocket(cport);

dp = new DatagramPacket(buf, buf.length);

dis = new BufferedReader(new InputStreamReader(System.in));

ia = InetAddress.getLocalHost();
System.out.println("Client is Running... Type 'END' to Quit");

while(true)

String str = new String(dis.readLine());

buf = str.getBytes();

if(str.equals("END"))

System.out.println("Client: Signout");

clientsocket.send(new DatagramPacket(buf,str.length(),
ia,sport));

break;

clientsocket.send(new DatagramPacket(buf,str.length(), ia, sport));

clientsocket.receive(dp);

String str2 = new String(dp.getData(), 0,dp.getLength());

System.out.println("Server: " + str2);

Anda mungkin juga menyukai