Professional Documents
Culture Documents
AWP Lab Manual
AWP Lab Manual
AWP Lab Manual
Angular JS Program
1 Design Order Form with a total price updated in real time, 33 CO2
which contains name of five products and their prices. Create a
bill amount for all the products and calculate GST on the billing
amount and display total amount.
2 Implement AngularJs to create your Resume. 37 CO2
3 Use Practical No.01 and initialize prices to 0 ( zero) when form 47 CO2
loads. (use module,controller& directive)
4 Design a webpage which takes one number as an input and 51 CO2
generate its factorial number (use module, controller)
5 Design a webpage which takes inputs product name, product 53 CO2
quantity and price. Generate table of entered values. When user
clicks on table column title , it should sort that column values.
(use filter, array)
6 Design a webpage which display product name and product 57 CO2
price using AngularJS $http Service from database. Display the
content in tabular format.
Node JS Program
1 Write a module of calculator which will perform all the basic 60 CO3
operations like add(),sub(),mul() and div().Use the module in a
program and display the output.
2 Create a program to override function. 61 CO3
3 Create a node js program to perform file operations like create a 62 CO3
file,read a file,write to file and delete a file.
4 Write a program to connect with the database. 64 CO4
5 Write a program to parse URL Parameter. 73 CO4
Reference Books:
1. Angularjs in Action ISBN 9789351198383 Ruebbelke, Wiley Publication
2. Pro AngularJS Freeman Apress publication
3. Node.js in Action ISBN 9789386052049 Alex Young, Bradley Meck, Mike Cantelon, Tim Oxley,
Marc Harter, T.J. Holowaychuk, Nathan Rajlich, Wiley Publication
Website:
1. https://www.w3schools.com/angular/
2. https://www.javatpoint.com/nodejs-tutorial
3. https://nodejs.org/en/download/
4. https://www.mongodb.com/
PRACTICAL1
AIM: Design a web pages of your department with an attractive background color, text
color , an Image , font etc. (use external CSS).
CODE:
<html>
<head>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
</head>
<body class="w3-pale-green" >
<div class="topnav">
<a class="w3-button" href="#home">HOME</a>
<a class="w3-button" href="aboutdept.html">ABOUT US</a>
<a class="w3-button" href="http://syllabus.gtu.ac.in/">SUBJECTS/SYLLABUS</a>
<a class="w3-button" href="faculties.html">FACULTIES</a>
<a class="w3-button" href="facilities.html">FACILITIES</a>
<imgsrc="geclogo3.png" align="right"></img>
</div>
<div class="w3-panel">
<h2 class="w3-bar w3-text-green"align="center"><u><b>INFORMATION TECHNOLOGY
DEPARTMENT</b></u></h2>
</div><br /><hr/>
<p><h2 style="color:seagreen;">This department is running from 1999. The staff has
developed required laboratories in the areas like <br>Computer Hardware, Computer
Networking & Security, Database Management System, Computer Graphics and Internet
Technology in tune with real-time systems.
</h2></p>
</body>
</html>
aboutdept.html
<html>
<head>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
</head>
<body class="w3-pale-green">
<h1 align="center" class="w3-text-green"><u>About Department</u></h1>
<p>This department is running from 1999. The staff has developed required laboratories in
the areas like Computer Hardware, Computer Networking & Security, Database Management
System, Computer Graphics and Internet Technology in tune with real-time systems.</p>
<p>The department has various laboratories in the area of Computer Hardware, Computer
Networking and network security, Data Base management system, Computer Graphics and
internet Technology in tune with the real-time system.</p>
The internet access is provided to the students to update their knowledge in the various
fields.The campus-wide area network is managed through this department. The newly
developed computer center for this department is equipped with more than 250 latest
computer system connected with LAN and loaded with various softwares.
<p>The field of information technology (IT) covers the design, administration and support of
computer and telecommunications systems. Some of the positions in this field include
database and network administrators, computer support specialists, computer scientists,
software programmers and system analysts. The majority of career tracks in IT entail design
and operational tasks related to computer hardware components, networks and software
applications.</p>
<p>Professionals in the IT field work with businesses and organizations to set up and support
viable computer networks that will keep systems efficient and reliable. IT encompasses all
hardware and software used in the storing, creation and accessing of information. Examples
of technologies that professionals work with are firewalls, databases, media storage devices,
networks and the Internet.</p>
facultities.html
<html>
<head>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
</head>
<body class="w3-pale-green">
<h2 class="w3-text-green">Faculties</h2>
<table border="1px" class=" w3-border">
<tr>
<td colspan="2"><img width="100px" height="120px"
src="https://www.w3schools.com/howto/img_avatar.png"/>
<b>HIRENKUMAR
RAMANBHAI PATEL</b></td>
<tr
<td>Date of joining</td>
<td>: 14-12-2009</td>
</tr>
</br>
<tr>
<td>Area of Interest</td>
<td>: WEB DEVELOPMENT, CLOUD computing
</br> DATA MINING</td>
</tr>
</br>
<tr>
<td>Email</td>
<td>: hrpatel@gecmodasa.org</td>
</tr>
</br>
<tr>
<td>Website</td>
<td>: <a href="http://www.renruhak.org/"> http://www.renruhak.org</a>
</td>
</tr>
</br>
</table>
</tr>
</table>
</div>
<table border="3">
<tr
class="imgfac"></td>
Jani</b></th>
DEPARTMENT </td>
<td colspan="2"><img width="100px" height="120px"
src="https://www.w3schools.com/howto/img_avatar.png"/>
<td>
<table border="1">
<thcolspan="2"><b>Kuntesh K
<tr class="trfac">
<td>Designation</td>
<td>: ASSISTANT PROFESSOR IT
</tr>
</br>
<tr>
<td>Qualification</td>
<td>: M.Tech</td>
</tr>
</br>
<tr>
<td>Experience</td>
<td>:10 years</td>
</tr>
</br>
<tr>
<td>Date of joining</td>
<td>: 01-06-2016</td>
</tr>
</br>
<tr>
<td>Area of Interest</td>
<td>: ML</td></tr>
</br>
<tr>
<td>Email</td>
<td>: kkjani@gecmodasa.org</td>
</tr>
</br>
<tr>
<td>Website</td>
<td>: <a> -</a></td></tr></br>
</table>
</tr>
</table>
</body>
</html>
facilities.html
<html>
<head>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
</head>
<body class="w3-pale-green">
<table border="1"class="w3-table" >
<tr>
<td colspan="2" align="center" class="w3-text-green w3-
head"><h2>FACILITIES</h2></td>
</tr>
<tr>
</tr>
<tr>
<td style="font-size:25">Appl. Development Lab</td>
<td style="font-size:25">DBMS Lab</td>
</tr>
<tr>
<td style="font-size:25">DLD Lab</td>
<td style="font-size:25">Operating System Lab</td>
</tr>
</table>
</body>
OUTPUT(home page)
OUTPUT(about page)
OUTPUT(facultities)
OUTPUT(facilities)
PRACTICAL 2
AIM: Create HTML Page with javascript which takes Integer number as input and tells
whether the number is ODD or EVEN.
CODE:
<!doctype html>
<html>
<head>
<script>
function odd_even(){
var no;
no=Number(document.getElementById("no_input").value);
if(no%2==0)
{
alert("Even Number");
}
else
{
alert("Odd Number");
}
}
</script>
</head>
<body>
Enter Any Number:<input id="no_input"><br />
<button onclick="odd_even()">Click me</button>
</body>
</html>
OUTPUT
PRACTICAL 3
OUTPUT: 1
PRACTICAL 4
</style>
</head>
<body>
<h1 class="w3-bar w3-teal w3-center">CALCULATOR</h1>
<table border="1" height="200px" align="center">
<tr>
<td colspan="3"><input class="w3-input" type="text"
id="result"/></td>
<td><input class="w3-button w3-teal w3-bar" type="button"
value="c" onclick="clr()"/></td>
</tr>
<tr>
<td><input type="button" class="w3-button w3-teal w3-bar"
value="1" onclick="dis('1')"/></td>
<td><input type="button" class="w3-button w3-teal w3-bar"
value="2" onclick="dis('2')"/></td>
<td><input type="button" class="w3-button w3-teal w3-bar"
value="3" onclick="dis('3')"/></td>
<td><input type="button" class="w3-button w3-teal w3-bar" value="/"
onclick="dis('/')"/></td>
</tr>
<tr>
<td><input type="button" class="w3-button w3-teal w3-bar"
value="4" onclick="dis('4')"/></td>
<td><input type="button" class="w3-button w3-teal w3-bar"
value="5" onclick="dis('5')"/></td>
<td><input type="button" class="w3-button w3-teal w3-bar"
value="6" onclick="dis('6')"/></td>
<td><input type="button" class="w3-button w3-teal w3-bar" value="-"
onclick="dis('-')"/></td>
</tr>
<tr>
<td><input type="button" class="w3-button w3-teal w3-bar"
value="7" onclick="dis('7')"/></td>
OUTPUT:
PRACTICAL 5
AIM: Create HTML Page that contains form with fields Name, Email, MobileNo,
Gender ,FavoriteColor and a button. write a JavaScript code to combine and display
the information in textbox when the button is clicked.
CODE:
<html>
<head>
<title>form</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
</head>
<body>
<form>
<center>
<fieldset>
<legend class="w3-teal"> Information </legend>
<table class="w3-teal" border="5px" height="400px">
<tr>
<td width="300px"><b> Full Name </b></td>
<td width="300px"><input class="w3-input" type="text" name="fname" id="fname"
/></td>
</tr>
<tr>
<td width="300px"><b> Email </b></td>
<td width="300px"><input class="w3-input" type="email" name="email" id="email"
/></td>
</tr>
<tr>
<td width="300px"><b> Mobile Number </b></td>
<td width="300px"><input class="w3-input" type="Number" name="mobile"
id="mobile" /></td>
</tr>
<tr>
<td width="300px"><b> Gender </b></td>
<td width="300px">
<select class="w3-input" id="myg" name="myg">
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select>
</td>
</tr>
<tr>
<td width="300px"><b>FavoriteColor</b></td>
<td width="300px"><input class="w3-input" type="text" name="fcolor" id="hobby"
/></td>
</tr>
<tr>
<td width="300px"><b> Information Display </b></td>
<td width="300px"><input class="w3-button w3-amber" type="submit"
value="Display" onclick="displayinfo()" name="Display" /></td>
</tr>
</table>
</fieldset>
</form>
</center>
<script type="text/javascript">
function displayinfo(){
var name = document.getElementById('fname').value;
OUTPUT:
PRACTICAL 6
AIM: write a javascript program to create user defined object Car with
carModelName, carColor, carPrice, carSpeed properties and with
displaySpeed(s),increaseSpeed(s) and DescreaseSpeed(s) as methods.
CODE:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Javascript Objects</title>
</head>
<body>
<script language="Javascript" type="text/Javascript">
function car(carmodelname, carcolor, carprice, carspeed){
this.carModelName = carmodelname;
this.carColor = carcolor;
this.carPrice =carprice;
this.speed = new Object();
this.speed.carSpeed = carspee
this.detais = showCar;
this.incSpeed = increasespeed;
this.decSpeed = decreasespeed;
this.showSpeed = showspeed;
}
functionshowCar(){
document.writeln("<br/>Model Name : "+this.carModelName);
document.writeln("<br/>Color Name : "+this.carColor);
document.writeln("<br/>Car Price : "+this.carPrice+" INR");
document.writeln("<br/>Car Speed : " + this.speed.carSpeed + " Km/h "+"<br/><br/>");
}
functionincreasespeed(ispeed){
this.speed.carSpeed = ispeed;
}
functiondecreasespeed(dspeed){
this.speed.carSpeed = dspeed;
}
functionshowspeed(sspeed){
document.writeln("<br/>Car Speed : " + this.speed.carSpeed + " Km/h "+"<br/><br/>");
}
var car1 = new car("BMW 4seris", "wine red", 5000000,250);
car1.detais();
car1.incSpeed(240);
car1.detais();
car1.decSpeed(140);
car1.detais();
car1.showSpeed();
</script>
</body>
</html>
OUTPUT
PRACTICAL 7
AIM: Write a JavaScript to loads and display HTML file on webpage using Asynchronous
Programming.
CODE:
<html>
<body>
<h2>JavaScript Display html file</h2>
<p id="disfile"></p>
<script>
functionmyDisplayer(some) {
document.getElementById("disfile").innerHTML = some;
}
functiongetFile(myCallback) {
letreq = new XMLHttpRequest();
req.open('GET', "html/pg2.html");
req.onload = function() {
if (req.status == 200) {
myCallback(this.responseText);
}
else {
myCallback("Error: " + req.status); }
}
req.send();
}
getFile(myDisplayer);
</script>
</body>
</html>
OUTPUT
PRACTICAL 8
Responsive.
CODE:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Practical-1</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
</head>
<body>
<header>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<div class="container-fluid">
<a class="navbar-brand btnbtn-outline-warning" href="#">Information Technology</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-
target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-
label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav me-auto mb-2 mb-md-0">
<li class="nav-item">
<a class="nav-link active " aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Proffesors</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Photo gallary</a>
</li>
</ul>
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btnbtn-outline-success" type="submit">Search</button>
</form>
</div>
</div>
</nav>
</header>
<div class="card-body">
<p class="card-text">garba event(thanganat)</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" class="btnbtn-smbtn-outline-secondary">View</button>
<button type="button" class="btnbtn-smbtn-outline-secondary">Edit</button>
</div>
<small class="text-muted">9 mins</small>
</div>
</div>
</div>
</div>
<div class="col">
<div class="card shadow-sm">
<img class="bd-placeholder-img card-img-top" width="100%" height="225"
src="hello1.jpg" role="img" aria-label="Placeholder: Thumbnail"
preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect
width="100%" height="100%" fill="#55595c"></rect><text x="50%" y="50%"
fill="#eceeef" dy=".3em"></text>
<div class="card-body">
<div class="card-body">
<p class="card-text">sports week</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" class="btnbtn-smbtn-outline-secondary">View</button>
<button type="button" class="btnbtn-smbtn-outline-secondary">Edit</button>
</div>
<small class="text-muted">9 mins</small>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
OUTPUT(home page)
Angular JS Program
Practical:1
AIM: Design Order Form with a total price updated in real time, which
contains name of five products and their prices. Create a bill amount for all
the products and calculate GST on the billing amount and display total
amount.
CODE:
<!DOCTYPE html>
<html>
<head>
<script data-require="jquery@3.0.0" data-semver="3.0.0"
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script>
<link data-require="bootstrap@3.3.7" data-semver="3.3.7" rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<script data-require="angular.js@1.6.6" data-semver="1.6.6"
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.6/angular.min.js"></script>
<script src="https://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.6.0.js"
type="text/javascript"></script>
<script>
(function() {
angular.module("testApp", ['ui.bootstrap']).controller('billCtrl', ['$scope', '$http',
function($scope, $http) {
console.log("Hello World from bill");
$scope.model = undefined;
$scope.billing = [];
$scope.searchProduct = function(id) {
console.log("search");
/*$http.get('/billing/' + id).success(function(response) {
$scope.billing.push(response[0]);
});*/
$scope.billing =
[{"code":"a1","name":"Fruits","price":100,"gst":0.1},{"code":"a2","name":"Clothes","price":
200,"gst":0.2},{"code":"a3","name":"Electronics","price":300,"gst":0.3},{"code":"a4","name
":"Footwear","price":400,"gst":0.4}];
}
$scope.total = function() {
//console.log($scope.model[0].qty);
var total = 0;
angular.forEach($scope.billing, function(product, index) {
total += product.total;
})
console.log(total);
return total;
}
}]);
}());
</script>
<style></style>
</head>
<body ng-app="testApp">
<div class="container" ng-controller="billCtrl">
<h1>Billing Section</h1>
<input class="form-control" ng-model="search"><br>
<button class="btnbtn-primary" ng-click="searchProduct(search)">Search Product</button>
<table class="table">
<thead>
<tr>
<th>Product Code</th>
<th>Product Name</th>
<th>Product Price</th>
<th>GST(%)</th>
<th>Quantity</th>
<th>Product Total</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="product in billing" ng-init="model = [{qty:1}];">
<td>{{product.code}}</td>
<td>{{product.name}}</td>
<td>{{product.price}}</td>
<td>{{product.gst}}</td>
<td><input type="number" ng-model="model[$index].qty" ng-required class="form-control"
ng-change="product.total =
model[$index].qty?(product.price+(product.gst*product.price/100)) * model[$index].qty:0"
ng-init="product.total =
model[$index].qty?(product.price+(product.gst*product.price/100)) *
model[$index].qty:0"></td>
<td>{{product.total}}</td>
</tr>
<tr>
<td colspan="5" style="text-align:right">Gross Total</td>
<td>{{total()}}</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
OUTPUT :
PRACTICAL 2
CODE:
Main.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Resume </title>
<link rel="icon" type="image/x-icon" href="assets/img/favicon.ico" />
<!-- Font Awesome icons (free version)-->
<script src="https://use.fontawesome.com/releases/v5.15.1/js/all.js"
crossorigin="anonymous"></script>
<!-- Google fonts-->
<link href="https://fonts.googleapis.com/css?family=Saira+Extra+Condensed:500,700"
rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Muli:400,400i,800,800i"
rel="stylesheet" type="text/css" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="css/styles.css" rel="stylesheet" />
</head>
<body id="page-top">
<!-- Navigation-->
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top" id="sideNav">
<a class="navbar-brand js-scroll-trigger" href="#page-top">
<span class="d-block d-lg-none">Krupa Patel</span>
<span class="d-none d-lg-block"><img class="img-fluid img-profile rounded-circle mx-auto
mb-2" src="assets/img/krupi.jpg" alt="" /></span>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-
target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-
expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-
icon"></span></button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link js-scroll-trigger" href="#about">About</a></li>
<li class="nav-item"><a class="nav-link js-scroll-trigger"
href="#experience">Experience</a></li>
<li class="nav-item"><a class="nav-link js-scroll-trigger"
href="#education">Education</a></li>
<li class="nav-item"><a class="nav-link js-scroll-trigger" href="#skills">Skills</a></li>
<li class="nav-item"><a class="nav-link js-scroll-trigger"
href="#interests">Interests</a></li>
<li class="nav-item"><a class="nav-link js-scroll-trigger" href="#awards">Awards</a></li>
</ul>
</div>
</nav>
<!-- Page Content-->
<div class="container-fluid p-0">
<!-- About-->
<section class="resume-section" id="about">
<div class="resume-section-content">
<h1 class="mb-0">
Krupa
<span class="text-primary">Patel</span>
</h1>
<div class="subheading mb-5">
K.K.Street,Sunav,Petlad,Anand· 388470
<a href="mailto:name@email.com">krupsi2508@email.com</a>
</div>
<p>Capitalize on low hanging fruit to identify a ballpark value added activity to beta test.
Override the digital divide with additional clickthroughs from DevOps. Nanotechnology
immersion along the information highway will close the loop on focusing solely on the
bottom line.</p>
</div>
<div class="flex-shrink-0"><span class="text-primary">December 2011 - March
2013</span></div>
</div>
<div class="d-flex flex-column flex-md-row justify-content-between mb-5">
<div class="flex-grow-1">
<h3 class="mb-0">Junior Web Designer</h3>
<div class="subheading mb-3">Shout! Media Productions</div>
<p>Podcasting operational change management inside of workflows to establish a
framework. Taking seamless key performance indicators offline to maximise the long tail.
Keeping your eye on the ball while performing a deep dive on the start-up mentality to derive
convergence on cross-platform integration.</p>
</div>
<div class="flex-shrink-0"><span class="text-primary">July 2010 - December
2011</span></div>
</div>
<div class="d-flex flex-column flex-md-row justify-content-between">
<div class="flex-grow-1">
<h3 class="mb-0">Web Design Intern</h3>
<div class="subheading mb-3">Shout! Media Productions</div>
<p>Collaboratively administrate empowered markets via plug-and-play networks.
Dynamically procrastinate B2C users after installed base benefits. Dramatically visualize
customer directed convergence without revolutionary ROI.</p>
</div>
<div class="flex-shrink-0"><span class="text-primary">September 2008 - June
2010</span></div>
</div>
</div>
</section>
<hr class="m-0" />
<!-- Education-->
<section class="resume-section" id="education">
<div class="resume-section-content">
<h2 class="mb-5">Education</h2>
<div class="d-flex flex-column flex-md-row justify-content-between mb-5">
<div class="flex-grow-1">
<h3 class="mb-0">BBIT</h3>
<div class="subheading mb-3">Diploma</div>
<div>Information Technology</div>
<p>CGPA: 8.69</p>
</div>
<div class="flex-shrink-0"><span class="text-primary">August 2016 - May
2019</span></div>
</div>
<div class="d-flex flex-column flex-md-row justify-content-between">
<div class="flex-grow-1">
<h3 class="mb-0">MBIT</h3>
<div class="subheading mb-3">Bachelor of Engineering</div>
<div>Information Technology</div>
<p>CGPA: 8.25</p>
</div>
<div class="flex-shrink-0"><span class="text-primary">August 2019 - May
2022</span></div>
</div>
</div>
</section>
<hr class="m-0" />
<!-- Skills-->
<section class="resume-section" id="skills">
<div class="resume-section-content">
<h2 class="mb-5">Skills</h2>
<p class="mb-0">When forced indoors, I follow a number of sci-fi and fantasy genre movies
and television shows, I am an aspiring chef, and I spend a large amount of my free time
exploring the latest technology advancements in the front-end web development world.</p>
</div>
</section>
<hr class="m-0" />
<!-- Awards-->
<section class="resume-section" id="awards">
<div class="resume-section-content">
<h2 class="mb-5">Awards & Certifications</h2>
<ul class="fa-ul mb-0">
<li>
<span class="fa-li"><i class="fas fa-trophy text-warning"></i></span>
Google Analytics Certified Developer
</li>
<li>
<span class="fa-li"><i class="fas fa-trophy text-warning"></i></span>
Scripts.js
(function ($) {
"use strict"; // Start of use strict
? target
: $("[name=" + this.hash.slice(1) + "]");
if (target.length) {
$("html, body").animate(
{
scrollTop: target.offset().top,
},
1000,
"easeInOutExpo"
);
return false;
}
}
});
Styles.css
https://startbootstrap.com/previews/resume
OUTPUT:
PRACTICAL 3
AIM: Use Practical No.01 and initialize prices to 0 ( zero) when form loads.
(use module,controller& directive)
CODE:
<!DOCTYPE html>
<html>
<head>
<script data-require="jquery@3.0.0" data-semver="3.0.0"
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script>
<link data-require="bootstrap@3.3.7" data-semver="3.3.7" rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<script data-require="angular.js@1.6.6" data-semver="1.6.6"
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.6/angular.min.js"></script>
<script src="https://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.6.0.js"
type="text/javascript"></script>
<script>
(function() {
angular.module("testApp", ['ui.bootstrap']).controller('billCtrl', ['$scope', '$http',
function($scope, $http) {
console.log("Hello World from bill");
$scope.model = undefined;
$scope.billing = [];
$scope.searchProduct = function(id) {
console.log("search");
/*$http.get('/billing/' + id).success(function(response) {
$scope.billing.push(response[0]);
});*/
$scope.billing =
[{"code":"a1","name":"Fruits","price":100,"gst":0.1},{"code":"a2","name":"Clothes","price":
200,"gst":0.2},{"code":"a3","name":"Electronics","price":300,"gst":0.3},{"code":"a4","name
":"Footwear","price":400,"gst":0.4}];
}
$scope.total = function() {
//console.log($scope.model[0].qty);
var total = 0;
angular.forEach($scope.billing, function(product, index) {
total += product.total;
})
console.log(total);
return total;
}
}]);
}());
</script>
<style></style>
</head>
<body ng-app="testApp">
<div class="container" ng-controller="billCtrl">
<h1>Billing Section</h1>
<input class="form-control" ng-model="search"><br>
<button class="btnbtn-primary" ng-click="searchProduct(search)">Search Product</button>
<table class="table">
<thead>
<tr>
<th>Product Code</th>
<th>Product Name</th>
<th>Product Price</th>
<th>GST(%)</th>
<th>Quantity</th>
<th>Product Total</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="product in billing" ng-init="model = [{qty:1}];">
<td>{{product.code}}</td>
<td>{{product.name}}</td>
<td>{{product.price}}</td>
<td>{{product.gst}}</td>
<td><input type="number" ng-model="model[$index].qty" ng-required class="form-control"
ng-change="product.total =
model[$index].qty?(product.price+(product.gst*product.price/100)) * model[$index].qty:0"
ng-init="product.total =
model[$index].qty?(product.price+(product.gst*product.price/100)) *
model[$index].qty:0"></td>
<td>{{product.total}}</td>
</tr>
<tr>
<td colspan="5" style="text-align:right">Gross Total</td>
<td>{{total()}}</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
OUTPUT :
PRACTICAL 4
AIM: Design a webpage which takes one number as an input and generate
its factorial number (use module, controller)
CODE:
<!DOCTYPE html>
<html ng-app="mainApp">
<head>
<meta charset="utf-8" />
<title>AngularJS Factorial Plunker</title>
<script>
document.write('<base href="' + document.location + '" />');
</script>
<link rel="stylesheet" href="style.css" />
<script data-require="angular.js@1.4.x" src="https://code.angularjs.org/1.4.9/angular.js"
data-semver="1.4.9"></script>
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
<label for="fact">Your value</label>
<input id="fact" ng-model="Value" ng-init="Value=0" /> as a factorial {{Value | factorial}}
</body>
</html>
App.js
angular.module('mainApp', [])
.controller('MainCtrl', function($scope) {
})
.filter('factorial', function() {
return function factorial(n) {
return n === 0 ?1 : n * factorial(n - 1);
}
51 | P a g e SUB: AWP [PRACTICALS –Angular JS Program]
[190630116041] BATCH: [C]
});
OUTPUT :
PRACTICAL 5
Main.html
<!doctype html>
<html ng-app='myApp'>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"
type='text/javascript'></script>
</head>
<body ng-controller="myController">
<table border='1'>
<tr >
</tr>
</tr>
</table>
</body>
</html>
Style.css
*table */
table{
border-collapse: collapse;
padding: 3px;
table th:hover{
cursor: pointer;
.arrow-down:after,.arrow-up:after{
position: relative;
left: 2px;
.arrow-down:after{
top: 10px;
border-top-color: black;
.arrow-up:after{
bottom: 15px;
border-bottom-color: black;
.arrow-down,.arrow-up{
padding-right: 10px;
Controller.js
// Module
// Controller
app.controller('myController',function($scope){
// Object
$scope.friends = [
{sno:1,name:'Shoes',age:2200,gender:'1'},
{sno:2,name:'Shirts',age:1400,gender:'2'},
{sno:3,name:'Watch',age:1800,gender:'2'},
{sno:4,name:'Wallet',age:2000,gender:'3'}
];
// column to sort
$scope.column = 'sno';
$scope.reverse = false;
$scope.sortColumn = function(col){
$scope.column = col;
if($scope.reverse){
$scope.reverse = false;
$scope.reverseclass = 'arrow-up';
}else{
$scope.reverse = true;
$scope.reverseclass = 'arrow-down';
};
$scope.sortClass = function(col){
if($scope.column == col ){
if($scope.reverse){
return 'arrow-down';
}else{
return 'arrow-up';
}else{
return '';
});
OUTPUT :
PRACTICAL 6
AIM :Design a webpage which display product name and product price
using AngularJS $http Service from database. Display the content in
tabular format.
CODE :
Main. Html
<!doctype html>
<html>
<head>
<script src="angular.min.js"></script>
</head>
<body ng-app='myapp'>
<div ng-controller="userCtrl">
<table border="1">
<tr>
<th>Product name</th>
</tr>
<td>{{user.pname}}</td>
<td>{{user.pprice}}</td>
</tr>
</table>
</div>
<script>
$http({
method: 'get',
url: 'getData.php'
}).then(function successCallback(response) {
$scope.users = response.data;
});
}]);
</script>
</body>
</html>
getData.php
<?php
include 'config.php';
$data = array();
$data[] = array("pname"=>$row['pname'],"pprice"=>$row['pprice'];
echo json_encode($data);
?>
Config .php
<?php
// Check connection
if (!$con) {
?>
OUTPUT :
Node JS Program
PRACTICAL 1
AIM: 1.Write a module of calculator which will perform all the basic operations like
add(),sub(),mul() and div().Use the module in a program and display the output.
CODE:
vara=10, b=5;
console.log("Addition : "+calculator.add(a,b));
console.log("Subtraction : "+calculator.subtract(a,b));
console.log("Multiplication : "+calculator.multiply(a,b));
$ node moduleExample.js
Addition : 15
Subtraction : 5
Multiplication : 50
PRACTICAL 2
Open a terminal or command prompt and run this script using node command as
shown in the following.
Output
~/workspace/nodejs$ node node-js-overriding-function-in-module.js
Message from newly added function to the module
sample.txt
PRACTICAL 3
AIM: Create a node js program to perform file operations like create a file,read a
file,write to file and delete a file.
CODE:
The file should be created next to your example node.js program with the content
‘Learn Node FS module’.
varfs = require('fs');
PRACTICAL 4
// if connection is successful
con.query("SELECT * FROM students", function(err, result, fields) {
// if any error while executing above query, throw error
if(err) throwerr;
// if there is no error, you have the result
console.log(result);
});
});
$ node selectFromTable.js
[ RowDataPacket{ name: 'John', rollno: 1, marks: 74 },
RowDataPacket{ name: 'Arjun', rollno: 2, marks: 74 },
RowDataPacket{ name: 'Prasanth', rollno: 3, marks: 77 },
RowDataPacket{ name: 'Adarsh', rollno: 4, marks: 78 },
RowDataPacket{ name: 'Raja', rollno: 5, marks: 94 },
RowDataPacket{ name: 'Sai', rollno: 6, marks: 84 },
RowDataPacket{ name: 'Ross', rollno: 7, marks: 54 },
RowDataPacket{ name: 'Monica', rollno: 8, marks: 86 },
RowDataPacket{ name: 'Lee', rollno: 9, marks: 98 },
RowDataPacket{ name: 'Bruce', rollno: 10, marks: 92 },
RowDataPacket{ name: 'Sukumar', rollno: 11, marks: 99 } ]
Open a terminal from the location of above .js file and run selectFromWhere.js
Node.js MySQL example program.
arjun@arjun-VPCEH26EN:~/workspace/nodejs$ node selectFromWhere.js
[ RowDataPacket{ name: 'Raja', rollno: 5, marks: 94 },
RowDataPacket{ name: 'Lee', rollno: 9, marks: 98 },
RowDataPacket{ name: 'Bruce Wane', rollno: 10, marks: 92 },
RowDataPacket{ name: 'Sukumar', rollno: 11, marks: 99 } ]
The records are sorted in ascending order with respect to marks column.
protocol41: true,
changedRows: 0 }
insertId: 0,
serverStatus: 34,
warningCount: 0,
if(err) throwerr;
// if there is no error, you have the result
// iterate for all the rows in result
Object.keys(result).forEach(function(key) {
varrow = result[key];
console.log(row.name)
});
});
});
PRACTICAL 5