diff --git a/.vscode/settings.json b/.vscode/settings.json index 94ec008..a0710f7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,5 @@ { "livePreview.hostIP": "10.169.144.49", - "livePreview.debugOnExternalPreview": false + "livePreview.debugOnExternalPreview": false, + "liveServer.settings.port": 5501 } \ No newline at end of file diff --git a/New folder/New folder/index.html b/New folder/New folder/index.html new file mode 100644 index 0000000..76c0a13 --- /dev/null +++ b/New folder/New folder/index.html @@ -0,0 +1,11 @@ + + + + + + Document + + + + + \ No newline at end of file diff --git a/form.html b/assignment1/form.html similarity index 100% rename from form.html rename to assignment1/form.html diff --git a/video28/index.html b/video28/index.html index a89f033..189c3e3 100644 --- a/video28/index.html +++ b/video28/index.html @@ -1,70 +1,79 @@ + CSS Position + .box { + height: 133px; + width: 80vw; + margin: 5px auto; + padding: 60px; + border: 3px solid black; + + } + + .parent { + /* scroll-behavior: auto; */ + padding: 43px; + margin: 34px; + border: 3px solid black; + /* transform, filter or perspective: can also make an element appear a positioned; */ + position: relative; + /* transform: translate(0); */ + /* filter: invert(0); */ + /* perspective: 0em; */ + } + +
-
-
-
-
-
+
+
+
+
+ + \ No newline at end of file diff --git a/video35/index.html b/video35/index.html index e3caf1e..a3dd353 100644 --- a/video35/index.html +++ b/video35/index.html @@ -6,10 +6,10 @@ Document @@ -66,7 +75,8 @@ distinctio quis voluptas omnis quo velit, adipisci odit sunt accusantium deserunt debitis eaque ipsum aliquam illo doloremque id laudantium illum fugiat doloribus ratione dolore. Accusantium dolor corrupti sint eligendi voluptatibus at, non, quibusdam repellendus similique, dolorem laborum distinctio totam assumenda - atque labore. Pariatur, quos dolore! + atque labore. Pariatur, quos dolore! +
Hey I am a box
diff --git a/video41/index.html b/video41/index.html index eedcf4d..e8a4a9d 100644 --- a/video41/index.html +++ b/video41/index.html @@ -6,6 +6,7 @@ Navbar Design + + + +
+ +
+ +
+
+ Dounload UltraEdit for Windows Reviews +
Download and try UltraEdit before you buy it! This fully-functional 30-day trial gives you access to + all of UltraEdit's powerful features so you can see for yourself why. +

UltraEdit is the world's best text editor.

+
+ + +
+ +
+
+ +
+
+ +
Dounload UltraEdit
+
v2023.1(released 08/16/2023) | Hotfix
+
+
+ + + + + + +
+
+
+ + + \ No newline at end of file diff --git a/video49/index.html b/video49/index.html new file mode 100644 index 0000000..96c7ea1 --- /dev/null +++ b/video49/index.html @@ -0,0 +1,36 @@ + + + + + + + CSS object Fit and Posetion + + + + +
+ +
+ + + \ No newline at end of file diff --git a/video50/index.html b/video50/index.html new file mode 100644 index 0000000..62ce234 --- /dev/null +++ b/video50/index.html @@ -0,0 +1,33 @@ + + + + + + + CSS Filter + + + + +
+ + + +
+ + + \ No newline at end of file diff --git a/video51/index.html b/video51/index.html new file mode 100644 index 0000000..c15a448 --- /dev/null +++ b/video51/index.html @@ -0,0 +1,69 @@ + + + + + + + Ball Bounce + + + + +
+ +
+ +
+
+ + + + \ No newline at end of file diff --git a/video53/NETFLIX_CLONE/assets/images/bg.jpg.jpg b/video53/NETFLIX_CLONE/assets/images/bg.jpg.jpg new file mode 100644 index 0000000..0eacbc3 Binary files /dev/null and b/video53/NETFLIX_CLONE/assets/images/bg.jpg.jpg differ diff --git a/video53/NETFLIX_CLONE/assets/images/img2.png b/video53/NETFLIX_CLONE/assets/images/img2.png new file mode 100644 index 0000000..42d2843 Binary files /dev/null and b/video53/NETFLIX_CLONE/assets/images/img2.png differ diff --git a/video53/NETFLIX_CLONE/assets/images/img3.png b/video53/NETFLIX_CLONE/assets/images/img3.png new file mode 100644 index 0000000..b5070e0 Binary files /dev/null and b/video53/NETFLIX_CLONE/assets/images/img3.png differ diff --git a/video53/NETFLIX_CLONE/assets/images/img4.png b/video53/NETFLIX_CLONE/assets/images/img4.png new file mode 100644 index 0000000..083bc33 Binary files /dev/null and b/video53/NETFLIX_CLONE/assets/images/img4.png differ diff --git a/video53/NETFLIX_CLONE/assets/images/logo.svg b/video53/NETFLIX_CLONE/assets/images/logo.svg new file mode 100644 index 0000000..4aeb03d --- /dev/null +++ b/video53/NETFLIX_CLONE/assets/images/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/video53/NETFLIX_CLONE/assets/videos/video1.m4v b/video53/NETFLIX_CLONE/assets/videos/video1.m4v new file mode 100644 index 0000000..05a2c01 Binary files /dev/null and b/video53/NETFLIX_CLONE/assets/videos/video1.m4v differ diff --git a/video53/NETFLIX_CLONE/assets/videos/video2.mp4 b/video53/NETFLIX_CLONE/assets/videos/video2.mp4 new file mode 100644 index 0000000..a682b5f Binary files /dev/null and b/video53/NETFLIX_CLONE/assets/videos/video2.mp4 differ diff --git a/video53/NETFLIX_CLONE/assets/videos/video3.mp4 b/video53/NETFLIX_CLONE/assets/videos/video3.mp4 new file mode 100644 index 0000000..94d2ded Binary files /dev/null and b/video53/NETFLIX_CLONE/assets/videos/video3.mp4 differ diff --git a/video53/favicon.ico b/video53/favicon.ico new file mode 100644 index 0000000..b083672 Binary files /dev/null and b/video53/favicon.ico differ diff --git a/video53/index.html b/video53/index.html new file mode 100644 index 0000000..edd7220 --- /dev/null +++ b/video53/index.html @@ -0,0 +1,165 @@ + + + + + + + Netflix India – Watch Shows Online, Watch Movies Online + + + + +
+ +
+
+ Enjoy big movies, hit series and more from ₹149. + Join today. cancel anytime. + Ready to watch? Enter your email to create or restart your membership. +
+ + +
+
+ +
+
+
+
+
+ Enjoy on your TV + Watch on smart TVs, PlaySection, Xbox, Chromecast, Apple TV, Slu-ray players and more. +
+
+ + +
+
+
+
+
+ +
+ +
+
+ Dounload your shows to watch offline + Save your favourates easily and always have something to watch. +
+
+
+
+ +
+
+ + +
+
+ Watch everywhere + Stream unlimited movies and TV shhows on your phone, tablet, laptop, and TV. +
+
+
+
+ +
+ +
+
+ Creade profiles for kids + send children on adventures with their favourite characters in a space made just for + them-free with + your membership. +
+
+
+
+
+

Frequently asked question

+
+ what is Netflix? + + + +
+ +
+ How much does Netflix cost? + + + +
+ +
+ Where can I watch? + + + +
+ +
+ what can I watch on Netflix? + + + +
+ +
+ Is Netflix good for kids? + + + +
+
+
+ + + + + \ No newline at end of file diff --git a/video53/style.css b/video53/style.css new file mode 100644 index 0000000..1ab0106 --- /dev/null +++ b/video53/style.css @@ -0,0 +1,331 @@ +@import url('https://fonts.googleapis.com/css2?family=Martel:wght@200;300;400;600;700;800;900&display=swap'); + +* { + padding: 0; + margin: 0; + font-family: "Poppins", sans-serif; +} + +body { + background-color: black; + padding: 0; + margin: 0; +} + +.main { + background-image: url("NETFLIX_CLONE/assets/images/bg.jpg.jpg"); + background-position: center center; + background-size: max(1200px, 100vw); + background-repeat: no-repeat; + height: 70vh; + position: relative; +} + +.separation { + height: 3px; + background-color: rgb(88, 87, 87); +} + +.main .box { + height: 70vh; + width: 100%; + opacity: 0.7; + background-color: black; + position: absolute; + top: 0; +} + +nav { + max-width: 60vw; + justify-content: space-between; + margin: auto; + display: flex; + align-items: center; + height: 62px; + position: relative; + z-index: 10; +} + +nav button { + position: relative; + z-index: 10; +} + +.hero { + font-family: "Martel", serif; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + color: white; + position: relative; + gap: 23px; + padding: 30px; + text-align: center; +} + +.hero> :first-child { + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; + font-size: 45px; + font-weight: 900; +} + +.hero> :nth-child(2) { + font-weight: 400; + font-size: 24px; +} + +.hero> :nth-child(3) { + font-weight: 400; + font-size: 20px; +} + +.btn { + padding: 3px 8px; + font-weight: 400; + color: white; + background-color: rgba(248, 243, 243, 0.08); + border: 1px solid white; + border-radius: 4px; + cursor: pointer; +} + +.btn-red { + background-color: red; + color: white; + padding: 6px 16px 11px 12px; + font-size: 20px; + border-radius: 4px; + font-weight: 400; +} + +hero-buttons { + display: flex; + align-items: center; + justify-content: center; + gap: 14px; +} + +.main input { + padding: 13px 39px 13px 39px; + font-size: 12px; + border-radius: 4px; + background-color: rgba(23, 23, 23, 0.7); + color: white; + border: 1px solid rgba(23, 23, 23, 0.5); + ; +} + +.btn-red-sm { + background-color: red; + color: white; +} + +.first { + display: flex; + justify-content: center; + align-items: center; + max-width: 50vw; + margin: auto; + color: white; +} + +@media screen and (max-width: 1300px) { + .first { + flex-wrap: wrap; + } +} + +.secImg { + position: relative; + margin: 20px 0 20px 0; +} + +.secImg video { + position: absolute; + top: 15px; + right: 9px; +} + +section.first>div { + display: flex; + flex-direction: column; +} + +.first>div :nth-child(1) { + font-size: 30px; + font-weight: bolder; + margin: 0 0 0 40px; +} + +.first>div :nth-child(2) { + font-size: 15px; + margin: 0 0 0 40px; +} + +.feq { + background-color: black; + color: white; + padding: 34px; +} + +.feq h2 { + text-align: center; + padding: 0 0 10px 0; +} + +.feq h2:hover { + cursor: pointer; + scale: calc(1.2); + font-weight: bolder; +} + +.feqbox svg { + filter: invert(1); +} + +.feqbox { + display: flex; + justify-content: space-between; + align-items: center; + background-color: gray; + padding: 16px; + max-width: 50vw; + margin: 20px auto; +} + +.feqbox:hover { + transition: all 1s ease-in-out; + cursor: pointer; + background-color: #414141; + scale: calc(1.1); + border-radius: 4px; + font-weight: bolder; + box-shadow: 0 0 10px gray; +} + +footer { + color: white; + padding: 34px; +} + +footer .Question { + margin: 10px 17.3vw 30px 17.3vw; +} + +.footer a { + text-decoration: none; + color: white; + font-size: 14px; + font-family: sans-serif; +} + +.footer a:hover { + color: blue; + text-decoration: underline; +} + +.footer { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + color: white; + max-width: 60vw; + margin: auto; +} + +@media screen and (max-width: 1300px) { + .btn-red { + margin: 6px 0 0 0; + padding: 10px 57px; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + } + + .btn-red:hover { + background-color: rgba(252, 4, 4, 0.885); + } + + .hero> :first-child { + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; + font-size: 30px; + font-weight: 900; + } + + .hero> :nth-child(3) { + font-size: 15px; + } + + .footer { + display: grid; + grid-template-columns: 1fr 1fr; + color: white; + max-width: 60vw; + margin: auto; + } + + .first>div :nth-child(2) { + font-size: 10px; + margin: 5px 0 0 0; + } + + .first>div :nth-child(1) { + font-size: 20px; + font-weight: bolder; + margin: 6px 0 0 0; + + } + + .secImg video { + position: absolute; + top: 16.5px; + right: 9px; + } + + .second .secImg img { + width: 150px; + } + + .second div .nd { + font-size: 11px; + margin: 0; + } + + .second div .ndd { + margin: 2px 0 10px 0; + } + + .fourth div .rth { + font-size: 18px; + margin: 0; + } + + .fourth div .rthh { + margin: 2px 0 10px 0; + } + + .third div .rd { + font-size: 18px; + margin: 0; + } + + .third div .rdd { + margin: 2px 0 10px 0; + } + + .feq h2 { + font-size: 20px; + } + + footer .Question { + margin: 10px 12.3vw 30px 12.3vw; + } + nav{ + max-width: 85vw; + } +} + +.footer-item { + display: flex; + flex-direction: column; + gap: 23px; +} \ No newline at end of file diff --git a/video54/index.html b/video54/index.html new file mode 100644 index 0000000..fc0fd75 --- /dev/null +++ b/video54/index.html @@ -0,0 +1,15 @@ + + + + + + Document + + +
+ Hey I am a Box +
+ + + + \ No newline at end of file diff --git a/video54/new.js b/video54/new.js new file mode 100644 index 0000000..83b957d --- /dev/null +++ b/video54/new.js @@ -0,0 +1,4 @@ +console.log("Code is running...") +console.log("Code is also running...") +console.log("Code is looking like a wow...") + diff --git a/video54/script.js b/video54/script.js new file mode 100644 index 0000000..00a0668 --- /dev/null +++ b/video54/script.js @@ -0,0 +1,16 @@ +alert("Hello World!"); + +var a = prompt("Enter a number : ") +var isTrue = confirm("Are you sure you want to leave this page and blast your computer") + +if(isTrue){ + console.log("Computer is blasting") +} +else{ + console.log("Computer is not blasting") +} +console.log("your number is : "+a) + +document.title = "Hey I am good" + +document.body.style.backgroundColor = "red" \ No newline at end of file diff --git a/video55/index.html b/video55/index.html new file mode 100644 index 0000000..62902ad --- /dev/null +++ b/video55/index.html @@ -0,0 +1,13 @@ + + + + + + java script variable + + + + + + + \ No newline at end of file diff --git a/video55/script.js b/video55/script.js new file mode 100644 index 0000000..71d2c53 --- /dev/null +++ b/video55/script.js @@ -0,0 +1,41 @@ +console.log("Hey this is tutorial video55") + +// var a = 5; +// var b = 6; +// var c = "Dilkhush" +let a = 5; +let b = 6; +let c = "Dilkhush" + +// console.log(a+b) +// console.log(typeof a, typeof b, typeof c); + +{ + let a = 44; + console.log(a) +} +console.log(a) + +let x = "Harry Bhai"; +let y = 22; +let z = 2.44; +let p = true; +let q = undefined; +const r = null; + +console.log(typeof x, typeof y, typeof z, typeof p, typeof q, typeof r) + +let o = { + "name": "Harry", + "job code": 5600, + "isHandsome": true +} + +console.log(o); +o.salary = "100crores"; +console.log(o); +o.salary = "500crores"; + +// const a1 = 6; +// a1=a1+1; +// Not Allowed because a1 is constant \ No newline at end of file diff --git a/video56/index.js b/video56/index.js new file mode 100644 index 0000000..2c36430 --- /dev/null +++ b/video56/index.js @@ -0,0 +1,21 @@ +console.log("Hello I am conditional tutorial ok"); +let age = 12; +let grace = 2; +console.log(age + grace); +console.log(age - grace); +console.log(age * grace); +console.log(age / grace); +console.log(age ** grace); +console.log(age % grace); +if((age+grace) > 17){ + console.log("You can drive"); +} +else{ + console.log("You can't drive"); +} +/* +Ternary Operator +*/ +let a = 2; +let b = 6; +console.log(a>b?(a-b):(b-a)); \ No newline at end of file diff --git a/video57/index.js b/video57/index.js new file mode 100644 index 0000000..5ce7d26 --- /dev/null +++ b/video57/index.js @@ -0,0 +1,36 @@ +console.log("Welcome to java script"); +let a = 1; + +// for (let i = 0; i < 100; i++) { +// console.log(a + i); + +// } + +// while(a<100){ +// console.log(a); +// a++; +// } + +let obj = { + name: "Dilkhush", + role: "Programmer", + company: "Dilkhush Photo Printing Centre Ajgaiva AI" +} + +// forin loop +for (const key in obj) { + const element = obj[key]; + console.log(key,element); +} + +// Forof loop +for (const c of "Dilkhush") { + console.log(c) +} + +// do while loop +let i =0; +do { + console.log(i); + i++; +} while (i<5); \ No newline at end of file diff --git a/video58/index.js b/video58/index.js new file mode 100644 index 0000000..e68016e --- /dev/null +++ b/video58/index.js @@ -0,0 +1,45 @@ + +// Function +function nice(name){ + console.log("Hey "+ name + " you are nice!"); + console.log("Hey "+ name + " you are nice!"); + console.log("Hey "+ name + " you are good!"); + console.log("Hey "+ name + " you are tshirt isnice!"); + console.log("Hey "+ name + " you are nice too!"); +} + +// nice("Rohan") +// nice("Dilkhush") + +// function sum(a, b){ +// console.log(a+b); +// } + +// sum(2,3) + +function sum(a, b, c = 10){ + // console.log(a+b); + return a+b+c; +} + +Result1 = sum(2,3); +Result2 = sum(24,3); +Result3 = sum(2,32); + +// console.log("The sum of these numbers is : ",Result1); +// console.log("The sum of these numbers is : ",Result2); +// console.log("The sum of these numbers is : ",Result3); + +// Arrow Funtion +const func1 = (x)=>{ + console.log("I am an arrow funtion",x); +} +func1(23); +func1(33); +func1(24); +func1(22); + +// console.log("Hey Dilkhush you sare nice!"); +// console.log("Hey Dilkhush you sare good!"); +// console.log("Hey Dilkhush you sare tshirt is nice!"); +// console.log("Hey Dilkhush you sare good too!"); \ No newline at end of file diff --git a/video59/index.js b/video59/index.js new file mode 100644 index 0000000..fe7790b --- /dev/null +++ b/video59/index.js @@ -0,0 +1,34 @@ +console.log("Welcome to faulty-Calculator!"); +function faultyCalculator(num1, num2, operator) { + let random = console.log("Random number : "+Math.random()*10); + if (operator === '+') { + if(random > 5){ + return num1 - num2; // Faulty behavior for addition + } + else{ + return num1 + num2; + } + // return num1 + num2; + } else if (operator === '-') { + if(random < 5){ + return num1 + num2; // Faulty behavior for subtraction + } + return num1 - num2; + } else if (operator === '*') { + if(random < 5){ + return num1 / num2; // Faulty behavior for multiplication + } + return num1 * num2; + } else if (operator === '/') { + if(random < 5){ + return num1 * num2; // Faulty behavior for division + } + return num1 / num2; + } else { + return "Invalid operator"; + } +} +console.log(faultyCalculator(10, 5, '+')); // Output: 15 +console.log(faultyCalculator(10, 5, '-')); // Output: 5 +console.log(faultyCalculator(10, 5, '*')); // Output: 50 (faulty behavior) +console.log(faultyCalculator(10, 5, '/')); // Output: 2 diff --git a/video60/index.js b/video60/index.js new file mode 100644 index 0000000..d7f6fd4 --- /dev/null +++ b/video60/index.js @@ -0,0 +1,21 @@ +console.log("This is strings tutorial"); +let a = "Dilkhush"; +console.log(a[0]); +console.log(a.length); + +let real_name = "Dilkhush Singh"; +let friend_name = "Rohit Sharma"; + +console.log(`His name is ${real_name} and his friends name is ${friend_name}`) + +let b = "Dilkhush Singh"; +console.log(b.toUpperCase()); +console.log(b.toLowerCase()); +console.log(b.slice(1, 5)); +console.log(b.replace("Dilkhush Singh", "Rohit Sharma")); +console.log(b.concat(a," is a good boy.")); +console.log(b.trim()); +console.log(b.charAt(3)); +console.log(b.indexOf("k")); +console.log(b.endsWith("Singh")); +console.log(b.includes("Singh")); \ No newline at end of file diff --git a/video61/index.html b/video61/index.html new file mode 100644 index 0000000..cb4c0c6 --- /dev/null +++ b/video61/index.html @@ -0,0 +1,13 @@ + + + + + + Document + + + + + + + \ No newline at end of file diff --git a/video61/index.js b/video61/index.js new file mode 100644 index 0000000..66d171a --- /dev/null +++ b/video61/index.js @@ -0,0 +1,18 @@ + +faultyCalculator(); +function faultyCalculator() { + let random = Math.random(); + let a = prompt("Enter the 1st number : "); + let c = prompt("Enter the operation : "); + let b = prompt("Enter the 2st number : "); + + let obj = { + "+": "-", + "-": "/", + "*": "+", + "/": "**" + } + vi +} + + diff --git a/video63/index.html b/video63/index.html new file mode 100644 index 0000000..2adde10 --- /dev/null +++ b/video63/index.html @@ -0,0 +1,13 @@ + + + + + + Document + + + + + + + \ No newline at end of file diff --git a/video63/index.js b/video63/index.js new file mode 100644 index 0000000..1a31715 --- /dev/null +++ b/video63/index.js @@ -0,0 +1,37 @@ +let arr = [1, 2, 3, 4, 5]; +// console.log(arr); +// console.log(arr.length); +arr[1] = 20; +// console.log(arr[0]); +// console.log(arr[1]); +// console.log(arr[4]); + +// console.log(arr.toString()); +// console.log(arr.join(" and ")); + +// let a = [1,2,3,4,5,6,7,8,9]; +// console.log(a.push(10)); +// console.log(a); +// a.pop(); +// console.log(a); // adds element at the end +// a.push(" Dilkhush "); +// console.log(a); +// a.shift(); // removes element from the start +// console.log(a); +// a.unshift("PKPER"); // adds element at the start +// console.log(a); + +// delete a[9]; // deletes element but does not change length of array +// console.log(a); +/* Shift is brother of pop and unshift is brother of push */ + +// let x = [1,2]; +// let y = [16,7,8]; +// let z = [11,12,13]; + +// console.log(x.concat(y,z)); + +let number = [1, 2, 3, 4, 5, 6, 7, 8, 9]; + +number.splice(0, 4, 111, 222, 3333); // (start index, number of elements to be removed, elements to be added) +console.log(number); diff --git a/video63/loops.js b/video63/loops.js new file mode 100644 index 0000000..dd6f25d --- /dev/null +++ b/video63/loops.js @@ -0,0 +1,27 @@ +let a = [1, 32, 23, 4]; + + /*for (let index = 0; index < a.length; index++) { + console.log(a[index]); + }*/ + + /* a.forEach((value, index, arr) => { + console.log(value, index, arr); + });*/ + + /*let obj = { + a: 1, + b: 2, + c: 3, + d: 4 + } + for (const key in obj) { + if (Object.hasOwnProperty.call(obj, key)) { + const element = obj[key]; + console.log(key,"= "+element); + } + + }*/ + + for (const iterator of a) { + console.log(iterator); + } \ No newline at end of file diff --git a/video63/mfr.js b/video63/mfr.js new file mode 100644 index 0000000..3040f83 --- /dev/null +++ b/video63/mfr.js @@ -0,0 +1,35 @@ +/*let arr = [1, 2, 3, 4, 5]; +let newArr = []; +for (let index = 0; index < arr.length; index++) { + const element = arr[index]; + + newArr.push(element**2); + +} +console.log(newArr); +*/ + +let arr = [1, 2, 3, 4, 5]; +let newArr = arr.map((e) => { + return e ** 2; +}); +console.log(newArr); + +const greaterThanSeven = (e) => { + if (e > 7) { + return true; + } + return false; +} + +console.log(newArr.filter(greaterThanSeven)); + +let arr2 = [1, 2, 3, 4, 5]; + +const reducer = (a, b) => { + return a + b; +} +console.log(arr2.reduce(reducer)); // sums all elements of array + +Array.from("Dilkhush"); // creates array from string +console.log(Array.from("Dilkhush")); \ No newline at end of file diff --git a/video64/index.html b/video64/index.html new file mode 100644 index 0000000..91b1ec5 --- /dev/null +++ b/video64/index.html @@ -0,0 +1,51 @@ + + + + + + Document + + + + + + + \ No newline at end of file diff --git a/video65/index.html b/video65/index.html new file mode 100644 index 0000000..d49e1b2 --- /dev/null +++ b/video65/index.html @@ -0,0 +1,11 @@ + + + + + + Document + + + + + \ No newline at end of file diff --git a/video65/index.js b/video65/index.js new file mode 100644 index 0000000..87f917f --- /dev/null +++ b/video65/index.js @@ -0,0 +1,26 @@ + console.log("Welcome to factorial world!"); + +/*let arr = [1, 2, 3, 4, 5]; +const reduser = (a,b)=> { + return a*b; +} +console.log("The factoreal of 5 is : ", arr.reduce(reduser));*/ + +alert("Welcome to factorial world!"); +let number = prompt("Enter a number to calculate its factorial : "); + +/*function factorial(n){ + if(n===0 || n===1){ + return 1; + } else { + return n * factorial(n-1); + } +} + +confirm("The factorial of " + number + " is : " + factorial(number));*/ +let n = 1; +for (let i = 1; i <= number; i++) { + const fact = n * i; + n = fact; +} +alert("The factorial of " + number + " is : " + n); diff --git a/video66/index.html b/video66/index.html new file mode 100644 index 0000000..ef7a0ca --- /dev/null +++ b/video66/index.html @@ -0,0 +1,23 @@ + + + + + + Java Script DOM + + +
+
+ This is a box. +
+
+ + + + + \ No newline at end of file diff --git a/video67/index.html b/video67/index.html new file mode 100644 index 0000000..ab8111e --- /dev/null +++ b/video67/index.html @@ -0,0 +1,28 @@ + + + + + + Document + + + +
+
Box1
+
Box2
+
Box3
+
Box4
+
Box5
+
+ + + + \ No newline at end of file diff --git a/video67/script.js b/video67/script.js new file mode 100644 index 0000000..30f46a9 --- /dev/null +++ b/video67/script.js @@ -0,0 +1,5 @@ +console.log("Hello from script.js"); + +document.body.firstElementChild +document.body.firstElementChild.childNodes +document.body.firstElementChild.children \ No newline at end of file diff --git a/video68/index.html b/video68/index.html new file mode 100644 index 0000000..89bf481 --- /dev/null +++ b/video68/index.html @@ -0,0 +1,31 @@ + + + + + + Document + + + +
+
box1
+
box2
+
box3
+
box4
+
box5
+
+ + + + \ No newline at end of file diff --git a/video68/script.js b/video68/script.js new file mode 100644 index 0000000..c0e8fa7 --- /dev/null +++ b/video68/script.js @@ -0,0 +1,18 @@ +console.log("Dilkhush") + +// Class Selector +// let boxes = document.getElementsByClassName("box"); +// console.log(boxes); + +// boxes[2].style.backgroundColor = "red"; + +// id Selector +// document.getElementById("red").style.backgroundColor = "red"; + +// querySelector +// document.querySelector("#red").style.backgroundColor = "green"; +// document.querySelector(".box").style.backgroundColor = "green"; +document.querySelectorAll(".box").forEach(e => { + console.log(e); + e.style.backgroundColor = "green" +}) \ No newline at end of file diff --git a/video69/index.html b/video69/index.html new file mode 100644 index 0000000..a03a791 --- /dev/null +++ b/video69/index.html @@ -0,0 +1,12 @@ + + + + + + Document + + + + + + \ No newline at end of file diff --git a/video69/script.js b/video69/script.js new file mode 100644 index 0000000..61bee77 --- /dev/null +++ b/video69/script.js @@ -0,0 +1,23 @@ +let a = 6; + +// function factorial(number) { +// let arr = Array.from(Array(number + 1).keys()) +// console.log(arr.slice(1,)) +// let c = arr.slice(1,).reduce((a, b) => { +// return a * b +// }) +// console.log("The factorial of " + a + " is : ", c) +// } +// factorial(a) + + + + +function factFor(number) { + let fac = 1; + for (let index = 1; index <= number; index++) { + fac = fac * index + } + return fac +} +console.log( "The factorial of "+a+ " is : ",factFor(a)) \ No newline at end of file diff --git a/video70/index.html b/video70/index.html new file mode 100644 index 0000000..d284fee --- /dev/null +++ b/video70/index.html @@ -0,0 +1,117 @@ + + + + + + + Document + + + +
+
Box1
+
Box2
+
Box3
+
Box4
+
Box5
+
+ + + + \ No newline at end of file diff --git a/video71/.vscode/settings.json b/video71/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/video71/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/video71/index.html b/video71/index.html new file mode 100644 index 0000000..2f1dc27 --- /dev/null +++ b/video71/index.html @@ -0,0 +1,65 @@ + + + + + + + Document + + + + +
+
+ Hey! I am a Box. +
+
+ + + + + \ No newline at end of file diff --git a/video72/index.html b/video72/index.html new file mode 100644 index 0000000..bed690d --- /dev/null +++ b/video72/index.html @@ -0,0 +1,55 @@ + + + + + + Document + + + +
+
box1
+
box2
+
box3
+
box4
+
box5
+
+ + + + \ No newline at end of file diff --git a/video74/.vscode/settings.json b/video74/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/video74/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/video74/eventBubbling.html b/video74/eventBubbling.html new file mode 100644 index 0000000..f5c5e75 --- /dev/null +++ b/video74/eventBubbling.html @@ -0,0 +1,75 @@ + + + + + + + Event Bubbling + + + + +
+
+
+ I am a child +
+
+
+ + + + + \ No newline at end of file diff --git a/video74/index.html b/video74/index.html new file mode 100644 index 0000000..9b055a4 --- /dev/null +++ b/video74/index.html @@ -0,0 +1,35 @@ + + + + + + Event + + +
+
Hey I am a box,
+
+ + + + + + \ No newline at end of file diff --git a/video75/index.html b/video75/index.html new file mode 100644 index 0000000..d33926f --- /dev/null +++ b/video75/index.html @@ -0,0 +1,38 @@ + + + + + + + call back function + + + + + + + + \ No newline at end of file diff --git a/video75/promise.js b/video75/promise.js new file mode 100644 index 0000000..4904ef5 --- /dev/null +++ b/video75/promise.js @@ -0,0 +1,59 @@ +console.log('This is promises'); + +let prom1 = new Promise((resolve, reject) => { + let a = Math.random(); + if (a < 0.5) { + reject("NO randon number was not suppporting you") + } + else { + setTimeout(() => { + console.log('Yes I am done'); + resolve("Harry") + }, 3000); + } +}) + + let prom2 = new Promise((resolve, reject) => { + let a = Math.random(); + if (a < 0.5) { + reject("NO randon number was not suppporting you") + } + else { + setTimeout(() => { + console.log('Yes I am done2'); + resolve("Harry") + }, 1000); + } +}) + + // let p3 = Promise.all([prom1, prom2]) + // p3.then((a)=>{ + // console.log(a); + // }).catch(e=>{ + // console.log(e); + + // }) + + // let p3 = Promise.allSettled([prom1, prom2]) + // p3.then((a)=>{ + // console.log(a); + // }).catch(e=>{ + // console.log(e); + + // }) + + let p3 = Promise.race([prom1, prom2]) + p3.then((a)=>{ + console.log(a); + }).catch(e=>{ + console.log(e); + + }) + +// prom1.then((a) => { +// console.log(a); + +// }).catch((err)=>{ +// console.log(err); + +// }) \ No newline at end of file diff --git a/video76/index.html b/video76/index.html new file mode 100644 index 0000000..66786f9 --- /dev/null +++ b/video76/index.html @@ -0,0 +1,52 @@ + + + + + + + async function + + + + + + + \ No newline at end of file diff --git a/video77/card/card.png b/video77/card/card.png new file mode 100644 index 0000000..5311a7a Binary files /dev/null and b/video77/card/card.png differ diff --git a/video77/index.html b/video77/index.html new file mode 100644 index 0000000..f5598a4 --- /dev/null +++ b/video77/index.html @@ -0,0 +1,63 @@ + + + + + + + Document + + + + +
+
+
+ +
31:06
+
+
+

Introduction to Backend | Sigma Web Dev video #2

+

CodeWithHarry . 727k views . 2 months ago

+
+
+
+ + + + \ No newline at end of file diff --git a/video77/script.js b/video77/script.js new file mode 100644 index 0000000..493e0c8 --- /dev/null +++ b/video77/script.js @@ -0,0 +1,35 @@ +function createCard(title, cName, views, monthsOld, duration, thumbnail) { + // Finish this function + let viewStr + if (views < 1000) { + viewStr = views + } + else if (views < 1000000) { + viewStr = views / 1000 + "K" + } + else if (views > 1000000) { + viewStr = views / 1000000 + "M" + } + else { + viewStr = views / 1000 + "K" + } + let html = `
+
+ +
${duration}
+
+
+

${title}

+

${cName} . ${viewStr} views . ${monthsOld} months ago

+
+
` + document.querySelector(".container").innerHTML = document.querySelector(".container").innerHTML + html +} + + +createCard("Introduction to JavaScript | Sigma Web Dev video #23", "CodeWithHarry", 50000, 7, "31:22", "https://i.ytimg.com/vi/tVzUXW6siu0/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLACwWOixJVrKLFindK92kYMgTcQbw") + +createCard("Introduction to JavaScript | Sigma Web Dev video #23", "CodeWithHarry", 560000000, 17, "31:22", "https://i.ytimg.com/vi/tVzUXW6siu0/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLACwWOixJVrKLFindK92kYMgTcQbw") + +createCard("Introduction to NOde jsd | Sigma Web Dev video #23", "CodeWithHarry", 54, 12, "51:22", "https://i.ytimg.com/vi/tVzUXW6siu0/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLACwWOixJVrKLFindK92kYMgTcQbw") \ No newline at end of file diff --git a/video79/index.html b/video79/index.html new file mode 100644 index 0000000..d15fd8a --- /dev/null +++ b/video79/index.html @@ -0,0 +1,11 @@ + + + + + + Errer Handling + + + + + \ No newline at end of file diff --git a/video79/script.js b/video79/script.js new file mode 100644 index 0000000..1ab2e2c --- /dev/null +++ b/video79/script.js @@ -0,0 +1,22 @@ +let a = prompt("Enter the first number : ") +let b = prompt("Enter the second number : ") +if (isNaN(a) || isNaN(b)) { + throw SyntaxError("Sorry this is not allowed") +} +let sum = parseFloat(a) + parseFloat(b); + +function main() { + let r = 2; 3 + try { + console.log("The sum is : ", sum * r); + return true + } catch (error) { + console.log('Error aa gya bhai !'); + return false + } + finally { + console.log('files are being closed and db connection is being closed'); + } +} +let c = main() + diff --git a/video80/gs.js b/video80/gs.js new file mode 100644 index 0000000..171cd7a --- /dev/null +++ b/video80/gs.js @@ -0,0 +1,21 @@ +class User{ + + constructor(name){ + // invokes the setter + this.name = name; + } + get name(){ + return this._name; + } + + set name(value){ + if(value.length < 4){ + console.log("Name is too short.") + return; + } + this._name = value; + } +} +let user = new User("Dilkhush") +console.log(user.name); +user = new User(""); \ No newline at end of file diff --git a/video80/index.html b/video80/index.html new file mode 100644 index 0000000..52cda05 --- /dev/null +++ b/video80/index.html @@ -0,0 +1,16 @@ + + + + + + Document + + + + + + \ No newline at end of file diff --git a/video80/index.js b/video80/index.js new file mode 100644 index 0000000..e0d417e --- /dev/null +++ b/video80/index.js @@ -0,0 +1,47 @@ +// console.log('welcome to object oriented programing!'); +// let obj = { +// a : 1, +// b : "Dilkhush" +// } +// console.log(obj); + +// let animal = { +// eats : true +// } +// let rabbit = { +// jumps : true +// } +// rabbit.__proto__ = animal; + +class animal{ + constructor(name){ + this.name = name; + console.log('Object is created...'); + } + eats(){ + console.log("I am eating"); + } + jumps(){ + console.log("I am jumping"); + } + play(){ + console.log("I am playing"); + } +} +let a = new animal("Dilkhush") +console.log(a); + +class lion extends animal{ + constructor(name){ + super(name) + console.log('Object is created and he is a lion...'); + } + eats(){ + super.eats() + console.log('I am eating and roor'); + } + +} +let l = new lion("shera") +console.log(l); + diff --git a/video81/index.html b/video81/index.html new file mode 100644 index 0000000..0cd6868 --- /dev/null +++ b/video81/index.html @@ -0,0 +1,64 @@ + + + + + + + Exersise 14 + + + + +
Initializing Hacking...
+ + + + \ No newline at end of file diff --git a/video82/index.html b/video82/index.html new file mode 100644 index 0000000..27f8be4 --- /dev/null +++ b/video82/index.html @@ -0,0 +1,11 @@ + + + + + + Document + + + + + \ No newline at end of file diff --git a/video82/script.js b/video82/script.js new file mode 100644 index 0000000..33e9081 --- /dev/null +++ b/video82/script.js @@ -0,0 +1,46 @@ +console.log(a1); +async function sleep() { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve(45) + }, 1000); + }) +} + +function sum(a,b,c){ + return a+b+c; +} + +(async function main() { + + + + // -------- IIFE(Imediatily invoke function expression) CONCEPT ----------- + // let a = await sleep() + // console.log(a); + // let b = await sleep() + // console.log(b); + +// ------------- DESTRUCTURING ----------------- + // let [x, y, ...rest] = [1, 5, 7, 8, 9] + // console.log(x, y, rest); + + // ------------- DESTRUCTURING ----------------- + let obj = { + a: 1, + b: 2, + c: 3 + } + let {a, b} = obj + console.log(a, b); + + let arr = [1,4,6] + console.log(arr[0] + arr[1] + arr[2]); + console.log(sum(arr[0], arr[1], arr[2])); + console.log(sum(...arr)); + + +})() + // ------------- HOSTING ----------------- + //---------- let and const me HOsting nahi hoti hai --------------------- + var a1 = 6; diff --git a/video83/07_localStorage.html b/video83/07_localStorage.html new file mode 100644 index 0000000..25fd6e7 --- /dev/null +++ b/video83/07_localStorage.html @@ -0,0 +1,75 @@ + + + + + + + + Document + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/video83/index.js b/video83/index.js new file mode 100644 index 0000000..34f7e4a --- /dev/null +++ b/video83/index.js @@ -0,0 +1,22 @@ +// The magical sorting Hat: Imagine you are creating magical sorting hat for a wizard school. Implement a javascript function that takes an array of student names and assigns them to one of the four houses (Grayffindor (length less than 6), Hufflepuff(length less than 8), Ravenclaw(length less than 12), or Slytherin(length greater than or equal to 12)) based on the lentth of their names. + +let students = ["shubh", "anajali", "Shivangi", "Annapuranam", "Dilkhush", "Roshan", "Amar", "Nitish", "Raja", "Shivam", "Pujesh"] + +let houses = [] + +for (const student of students) { + if(student.length <6){ + houses.push("Ganga") + } + else if(student.length < 8){ + houses.push("Koshi") + } + else if(student.length < 12){ + houses.push("Yamuna") + } + else{ + houses.push("Bhramhputra") + } +} +console.log(houses); +