User:NARAYANNN

emp1.php



Employee Number: Employee Name: Employee Address:



emp2.php





Basic: DA: HRA:



emp3.php



employee.php

employee as $emp) {		echo "Employee No=$emp->empno"." "; echo "Employee Name=$emp->empname"." "; echo "Employee Salary=$emp->salary"." "; echo "Employee Designation=$emp->designation"." "; } ?>

employee.xml

 1 		 sagar 20000 		 Clerk 2 		 Shubham 30000 		 Manager 3 		 Divya 500000 		 CEO

setb1.php book as $book) {		echo "Book No=$book->bookno"." "; echo "Book Name=$book->bookname"." "; echo "Author Name=$book->authorname"." "; echo "Price=$book->price"." "; echo "Year=$book->year"." "; } ?>

setb1.xml

 <BookInfo> 1 		 JAVA Balguru Swami 250 		 2006 		 2 		 PHP S.Kadam 350 		 2009 		 3 		 C 		 Denis Ritchie 500 		 1971 		 4 		 C++ Bjarne Straustrup 400 		 1994 		 5 		 DATABASE Rogers Presman 700 		 2001 </BookInfo>

setb2.php <?php $dom=new DomDocument; $dom->load("setb2.xml"); echo"

";

$mname=$dom->getElementsByTagName("moviename"); foreach($mname as $mn) {		echo "$mn->textContent "; }	$aname=$dom->getElementsByTagName("actorname"); foreach($aname as $an) {		echo "$an->textContent "; }

?>

setb2.xml <?xml version="1.0" encoding="UTF-8"?> <MovieInfo> 1 		 Lookism Park Solomon 2017 		 2 		 Atrangi Re 		 Dhanush 2022 		 3 		 Golmaal Ajay Devgn 2018 		 4 		 Taare Zameen Par Aamir Khan 2009 		 5 		 All Of Us Are Dead Park Solomon 2022 </MovieInfo>

seta1.php <?php if(isset($_COOKIE['bca'])) { $x=$_COOKIE['bca']; $x=$x+1; setcookie('bca',$x); echo" You accessed this page $x times"; } else { $x=1; setcookie('bca',$x); echo" You accessed this page $x times"; } ?>

seta2.php

<form method="POST" action="page2.php"> Font Style: <option value="Arial">Arial <option value="Italic">Italic <option value="Times New Roman">Times New Roman

Font Size: 5 8 10

Font Color: blue red green

Font Background: yellow pink white

<input type="submit" name="s" value="submit">

cardataset

#Importing Libraries

import pandas as pd


 * 1) Reading data

df = pd.read_csv('C:/TYBSC/car_data.csv') # Importing the data set df.sample(5) print(df.sample(5)) print(df.shape)


 * 1) Print car companies with car numbers

print(df['Make'].value_counts) new_df = df[df['Make']=='Volkswagen'] print(new_df.shape) # Viewing the new dataset shape


 * 1) Data Cleaning

print(new_df.isnull.sum) new_df = new_df.dropna print(new_df.isnull.sum) new_df.shape new_df.isnull.sum print(new_df.sample(2))


 * 1) Sample data for 2 variables..

new_df = new_df'Engine HP','MSRP' print(new_df.sample(5))

da


 * 1) Importing libraries

import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression


 * 1) Read Data

df = pd.read_csv('C:/TYBSC/car_data.csv') # Importing the data set df.sample(5) #previewing dataset randomly print(df.sample(5)) new_df = df[df['Make']=='Volkswagen'] # in this new data set we only take 'Volkswagen' Cars


 * 1) print(new_df.isnull.sum) # Is there any Null or Empty cell presents

new_df = new_df.dropna # Deleting the rows which have Empty cells


 * 1) print(new_df.isnull.sum) # Is there any Null or Empty cell presents

new_df.isnull.sum #Is there any Null or Empty cell presents print(new_df.sample(2)) # Checking the random dataset sample new_df = new_df'Engine HP','MSRP' # We only take the 'Engine HP' and 'MSRP' columns print(new_df.sample(5))


 * 1) Split Train and Test dataset

X = np.array(new_df'Engine HP') # Storing into X the 'Engine HP' as np.array y = np.array(new_df'MSRP') # Storing into y the 'MSRP' as np.array plt.scatter(X,y,color="red") # Plot a graph X vs y plt.title('HP vs MSRP') plt.xlabel('HP') plt.ylabel('MSRP') plt.show X_train,X_test,y_train,y_test = train_test_split(X,y,test_size = 0.25,random_state=15) regressor = LinearRegression regressor.fit(X_train,y_train) plt.scatter(X_test,y_test,color="green") # Plot a graph with X_test vs y_test plt.plot(X_train,regressor.predict(X_train),color="red",linewidth=3) plt.title('Regression(Test Set)') plt.xlabel('HP') plt.ylabel('MSRP') plt.show plt.scatter(X_train,y_train,color="blue") # Plot a graph with X_train vs y_train plt.plot(X_train,regressor.predict(X_train),color="red",linewidth=3) plt.title('Regression(training Set)') plt.xlabel('HP') plt.ylabel('MSRP') plt.show

jqseta2.html

<!DOCTYPE html>

jQuery append Method

<script src="../js/jquery-3.6.0.slim.min.js">

var i=4;

$(document).ready(function{

$("#btn1").click(function{

$("p").append(" Welcome .");

});

$("#btn2").click(function{

$("ol").append(" <li>HVD "+i+++"</li> ");

});

});

<h1 style="margin-left:150px;">Set A2

Hello All

JQuery

<ol>

<li>HVD 1</li>

<li>HVD 2</li>

<li>HVD 3</li>

</ol>

Append Welcome

Append List

jqseta3.html<!DOCTYPE html>

Click button to display an alert box:

<button onclick="myFunction">Try it

function myFunction{

alert("I am an alert box!");

}

jqseta3.html

<!DOCTYPE html>

Click button to display an confirm box:

<button onclick="confirm">Try it

var r=confirm("Press a button");

if(r==true){

x="You pressed OK!";

}

else{

x="You pressed cancel!";

}

jqseta4.html

<!DOCTYPE html>

var person=prompt("Please enter your name","");

if(person!==null){

document.getElementById("demo").innerHTML="Hello"+person+"!How are you today?";

}

jqseta5.html

<!DOCTYPE html>

My First Web Page

My first paragraph.

<button onclick="document.write(5+6)">Try it

demo.php

<?php

setcookie("username","divya",time+60*60*24*7);

?>

<form action="demo1.php">

<input type="submit" value="submit">

demo1.php

<?php

//updating the cookie

setcookie("username","iamdivya",time+60*60*24*7);

?>

<?php

//check if cookie exists

if(isset($_COOKIE["username"]))

{

echo "cookie set wth value:".$_COOKIE["username"];

}

else

{

echo "cookie not set!";

}

?>

demo3.php

<?php

//updating the cookie

setcookie("username","iamdivya",time-3600);

?>

<?php

echo "cookie username is deleted";

?>

demo4.php

<?php

setcookie("username","divya",time+60*60*24*7);

?>

<form action="demo1.php">

<input type="submit" value="submit">