Click on "next"
WEEK1B
Click on install.
Click on next
Now, select the drive where database should be stored and click
next
Click on next
Specify a secure root password, you may want to check the box
Enable root access
from remote machines if you plan on administering your MySQL
server
from your workstation or other servers.
Click on execute
WEEK1C
Aim: Installation Procedure for WAMPP Server on
WINDOWS Machine .
XAMPP INSTALLATION STEPS:
1) To install XAMPP in windows 7, first you need to download the
XAMPP installer for windows. To download the XAMPP installer for
windows, visit the
URL https://www.apachefriends.org/download.html.
2) Now, go to the "Download" section in the page. Here, you will
see XAMPP for Windows, Linux, and Mac OS X. We can easily
download the XAMPP installer for Windows.
3) Click on the Download link to download XAMPP as shown
below.
5) This dialog box below shows that you should avoid installing
XAMPP to C:\Program Files. Click OK.
Click Next.
6) Verify that all the checkboxes are checked, then click Next.
7) You will see the installation progresses. Wait for the process to
complete.
WEEK-3
Aim: Write an HTML program that has one input , which can take
multiline text and submit button. Once the user clicks the submit
button, it should show the number of characters, number of
words and number of lines in the text entered using an alert box.
SOURCE CODE:
<html>
<head>
<title> Count>Characters,Words,Lines </title>
<script>
function count()
{
var d=document.getElementById('data').value;
var lines,words,characters;
characters=d.length;
words=d.split(/\b\S+\b/g).length1;
lines=d.split(/\n/g).length+1;
alert("no.of characters:"+characters+","+"no.of words:"+words+","+"no.of lines"+lines);
}
</script>
</head>
<body>
<H1 align="center"><font color="blue">Counting Program</font></h1>
<center>
<form onSubmit="return count();">
<table align="center">
<tr>
OUTPUT:
WEEK-2
Aim: Write an HTML program including any required javascript
that takes a number from one text field in the range of 0 to 999
and show it in another text field in words
1. If the number is out of range, it should show Out of range
2. If it is not a number then it should say Not a number
SOURCE CODE:
<script language="javascript">
function numToString(x)
{
var r=0;
var txter=x;
var sizer=txter.length;
var numStr="";
if(isNaN(txter))
{
alert(" Not a number");
exit();
}
if(txter>999)
{
alert("Out of range");
exit();
}
var n=parseInt(x);
var places=0;
var str="";
var entry=0;
while(n>=1)
{
r=parseInt(n%10);
if(places<3 && entry==0)
{
numStr=txter.substring(txter.length0,txter.length3) // Checks for 1 to 999.
str=onlyDigit(numStr); //Calls function for last 3 digits of the value.
entry=1;
}
n=parseInt(n/10);
places++;
}
alert(str);
}
function onlyDigit(n)
{
//Arrays to store the string equivalent of the number to convert in words
var units=['','One','Two','Three','Four','Five','Six','Seven','Eight','Nine'];
var
randomer=['','Eleven','Twelve','Thirteen','Fourteen','Fifteen','Sixteen','Seventeen','Eighteen','
Nineteen'];
var tens=['','Ten','Twenty','Thirty','Forty','Fifty','Sixty','Seventy','Eighty','Ninety'];
var r=0;
var num=parseInt(n);
var str="";
var pl="";
var tenser="";
while(num>=1)
{
r=parseInt(num%10);
tenser=r+tenser;
if(tenser<=19 && tenser>10) //Logic for 10 to 19 numbers
{
str=randomer[tenser10];
}
else
{
if(pl==0) //If units place then call units array.
{
str=units[r];
}
else if(pl==1) //If tens place then call tens array.
{
str=tens[r]+" "+str;
}
}
if(pl==2) //If hundreds place then call units array.
{
str=units[r]+" Hundred "+str;
}
num=parseInt(num/10);
pl++;
}
return str;
}
</script>
<form name="fm" id="fm">
<input type="text" name="txtinput" id="txtinput" maxlength="9" />
<input type="button" onclick="numToString(txtinput.value)" id="show" />
</form>
OUTPUT: