Posts

Showing posts from October, 2025

Pdf

  Et

Prac 9

 9A) <head> <script src="https://code.jquery.com/jquery-3.7.1.min.js"> </script> <script> $(document).ready(function () { $("button").click(function () { $('#myDiv').animate({ height: 200px', width: 200px', left: 500px' }); }); }); </script> <style> .redDiv { background-color: red; height: 100px; width: 100px; position: absolute; } </style> </head> <body> <h1>Demo: jQuery animate() method</h1> <button>click</button> <div id="myDiv" class="redDiv"> </div> </body> </html> 9A.2) <!Doctype html> <html> <head> <script src="https://code.jquery.com/jquery-3.7.1.min.js"> </script> <script> $(document).ready(function () { $("button").click(function () { $("#p1").css({ "color": "red", "font-size": 50)) .slideUp(2000) slideDown (2000); }); });...

Prac 8

 Always Remember Step 1: Create a folder on your Desktop. Step 2: Open Google Chrome and type “jQuery download”. Step 3: Select the first option in search engine showing with the URL https://jquery.com/download/ open the site. Step 4: Right Click on the Download jQuery button and choose the option  “Save as link” by providing Respective folder which you created. Step 5: “jquery-3.7.1.min.js’’ file save in your Created folder. Step 6: Now Create your code file with (.html extension and All files) in the same folder you created earlier. Step 7: While writing a code in the code file syntax <script src=> in that paste the full name of the downloaded jQuery file in  <script src= “jquery- 3.7.1.min.js”> Step 8: Then only it will execute jQuery properties locally when run the code  file 8A)<!DOCTYPE HTML> <html> <head> <script src="jquery-3.7.1.min.js"></script> <script> $(document).ready(function(){ $("p").click(...

Prac 5

 5Apackage com.example.MongoDB; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoClients; import com.mongodb.client.MongoDatabase; public class MongoConnection { public static MongoDatabase connect() { String uri="mongodb://localhost:27017"; MongoClient mongoClient=MongoClients.create(uri); return mongoClient.getDatabase("dbs1"); } } 5B) package com.example.MongoDB; import org.bson.Document; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; public class Mongo_Insert { public static void main(String[] args) { MongoDatabase database MongoConnection.connect(); MongoCollection<Document> collection=database.getCollection("Employee"); Document doc=new Document("Name", "Jyoti") .append("Age", 27).append("EmailId", "jyoti07@gmail.com"); collection.insertone(doc); System.out.println("Document inserted successfully!"); } 5C) package com.example.Mo...

Prac 7

 7A) from pymongo import MongoClient client =MongoClient("mongodb://localhost:27017/") db = client ["db"] collection = db["Personal Details"] result = collection.insert_many([{"Name":"Ketan", "Age":24,"City":"Mumbai"}, {"Name":"Rohit", "Age":22, "City": "Mumbai"), {"Name":"Anii", "Age":20, "City": "Kolkata"}, {"Name":"Kawya", "Age":23,"City": "Karnataka"}]) print(f"Data inserted with _id: (result.inserted_ids)") 7B)from pymongo import MongoClient client = MongoClient("mongodb://localhost:27017/") db = client ["db"] collection = db ["Personal_Details"] print("All Documents in Personal Details:") doc= collection.find() for i in doc: print(i) 7C) from pymongo inport MongoClient client = MongoClient("mongodb:/...

Prac 4

 4B) mongodump --d (database name) --c (collection name) --o (path) 4C)mongorestore --d (database name) --c (collection name) --o (path)

Prac 3

 3A)use dbs1 > db.createCollection ("Student") > db. Student.insertMany([{"Name":"Ajay", "Age": 25, "Department":"IT", "City": "Mumbai", "Stipend":4000),{"Name":"Amir", "Age":24, "Department": "IT", "City":"Navi Mumbai", "Stipend": 5000), {"Name": "Ranveer", "Age":21, "Department":"CS", "City": "Palghar", "Stipend":16000), ("Name":"Rajkumar", "Age":26, "Department":"CS", "City":"Navi Mumbai", "Stipend":6000), {"Name": "Kriti", "Age":30,"Department": "IT", "City": "Palghar", "Stipend":3000),{"Name":"Ayesha", "Age":27, "Department":"CS...

Prac 2

 2A)show dbs use Krish 2B)db.createCollection("emp") 2C)use Krish db.createcollection("emp") db.emp.insertMany([{"Name":"Krish","Age":20,"email_id":"krish123@gmail.com"},{"Name":"Trish","Age":21,"email_id":"trish123@gmail.com"},{"Name":"Hrish","Age":22,"email_id":"hrish123@gmail.com"},{"Name":"Vrish","Age":23,"email_id":"vrish123@gmail.com"}]) 2D)db.emp.countDocuments() 2E)db.emp.find() 2F)db.emp.find({Name:"Krish"}) 2G)db.emp.updateOne({Name:"Krish"},{$set:{Age:24}) 2H)db.emp.deleteOne({Name:"Trish"}) 2I)db.emo.drop()

Prac 1

 1A)use Krish drop.database() 1B)show dbs use Krish db.createcollection("emp") db.createcollection("emp1") show collections db.emp.drop() show collections  1C)use Krish db.createcollection("emp") db.emp.insertMany([{"Name":"Krish","Age":20,"email_id":"krish123@gmail.com"},{"Name":"Trish","Age":21,"email_id":"trish123@gmail.com"},{"Name":"Hrish","Age":22,"email_id":"hrish123@gmail.com"},{"Name":"Vrish","Age":23,"email_id":"vrish123@gmail.com"}]) db.emp.find() db.emp.updateOne({Name:"Krish"},{$set:{Age:24}) db.emp.deleteOne({Name:"Trish"}) Or use Krish db.createCollection("emp") db.emp.insertMany([   { "Name": "Krish", "Age": 20, "email_id": "krish123@gmail.com" },   { "Name...