├── 2D-MarioGame ├── assets │ ├── gifs │ │ ├── giphy (1).gif │ │ ├── giphy (2).gif │ │ ├── giphy (3).gif │ │ ├── giphy (4).gif │ │ ├── giphy (5).gif │ │ ├── giphy (6).gif │ │ ├── giphy.gif │ │ └── mar.gif │ └── images │ │ ├── 814007_super-mario-backgrounds_1920x1200_h.png │ │ └── bg.jpg ├── html │ ├── boy.html │ ├── boyw.html │ ├── intro.html │ ├── intro2.html │ ├── mario.html │ ├── mariow.html │ ├── pokemon.html │ ├── pokemonw.html │ ├── runmario.html │ ├── sonic.html │ └── sonicw.html └── index.html ├── AnimatedCalculator ├── README.md ├── eidt.css ├── index.html └── vanilla-tilt.js ├── Arrays_beginner ├── AlgorithmsToDo.md ├── Array_Insert.c ├── TrappingRainWater.java ├── largest element of two ├── largest-element-in-array.c ├── reverse_array ├── smallest element ├── sum_of_array.c └── two smallest element ├── CONTRIBUTING.md ├── CSS Card ├── card-img.jpg ├── card.html ├── style-card.css └── vanilla-tilt.js ├── DSA ├── Binary Search ├── dsa_hack │ ├── Knapsack DP Problem in Graph.txt │ ├── decimal_to_hexa.cpp.txt │ ├── even-and-odd.c.txt │ └── unique-elements-in-an-array.c.txt └── removeDuplicate.cpp ├── Dev C++ ├── 1-d array.cpp ├── 1-d array.exe ├── 1_inversionCount.cpp ├── 1_inversionCount.exe ├── 3x3 matrix.cpp ├── 3x3 matrix.exe ├── DAA Merge sort.cpp ├── DAA Merge sort.exe ├── DAA Quick sort.cpp ├── DAA Quick sort.exe ├── Singly linked list.cpp ├── Singly linked list.exe ├── Swappimg.cpp ├── Swappimg.exe ├── Switch case two operands.cpp ├── Switch case two operands.exe ├── call by value.cpp ├── call by value.exe ├── circular linked list.cpp ├── circular linked list.exe ├── do while 1 to 10.cpp ├── do while 1 to 10.exe ├── doubly linked list.cpp ├── doubly linked list.exe ├── else if lader.cpp ├── else if lader.exe ├── equal of two no.cpp ├── equal of two no.exe ├── file handle.cpp ├── file handle.exe ├── file_handle.c ├── for 1 to 10.cpp ├── for 1 to 10.exe ├── function.cpp ├── function.exe ├── greater number ternary.cpp ├── greater number ternary.exe ├── hello.cpp ├── hello.exe ├── nested for.cpp ├── nested for.exe ├── pointer.cpp ├── pointer.exe ├── prime.cpp ├── prime.exe ├── selectionSort.cpp ├── selectionSort.exe ├── while 1 to 5.cpp └── while 1 to 5.exe ├── Dictionary App ├── index.html ├── script.js └── style.css ├── Drawing_app ├── index.html ├── script.js └── style.css ├── Expense_Tracker ├── REAMDE.md ├── index.html ├── style.css └── work.js ├── Hacktoberfest 2022.pptx ├── Instagramloginpageui ├── images │ ├── app store.png │ ├── fb.png │ ├── instagram logo.png │ └── play store.png ├── index.html ├── sign-up form.html ├── sign-up.css └── style.css ├── Library Simulation └── library.cpp ├── Liquid_Swipe Animation ├── Longest-Palindromic-Substring.py ├── Movie_Website ├── README.md ├── css │ └── style.css ├── film │ ├── edit.css │ └── index.html └── style.css ├── Python ├── dec_to_bin.py ├── fibonacci.py ├── hexToDeci.py └── reverse.py ├── README.md ├── String Manipulation ├── PalindromeString.java ├── ReverseString.java ├── StringCaseChange.java └── WordType.java ├── TicTacToe ├── excited.gif ├── gameover.mp3 ├── index.html ├── music.mp3 ├── script.js ├── style.css └── ting.mp3 ├── Traval_Landing ├── index.htm ├── script.js └── style.css ├── aboutme.html ├── blog.html ├── business-card ├── Bubble-Background.svg ├── Live-Wave-Background-1 │ └── Live-Wave-Background │ │ └── Informations.txt ├── Live-Wave-Background.svg ├── README.md ├── Snow-Animation-Background.svg ├── Snow-Animation-Background │ └── Snow-Animation-Background │ │ ├── Informations.txt │ │ └── Snow-Animation-Background.svg ├── images │ ├── per.png │ └── pfp-2.jpg ├── index.html ├── profile picture.png ├── script.js └── styles.css ├── colorGenerator ├── app.js ├── index.html └── style.css ├── contactus.html ├── heartshape.py ├── index1.html ├── lap1.jpg ├── loginadmin ├── build │ └── classes │ │ ├── com │ │ └── college │ │ │ ├── dao │ │ │ ├── Database.class │ │ │ └── package-info.class │ │ │ └── entity │ │ │ ├── collegeentity.class │ │ │ └── package-info.class │ │ └── loginadmin │ │ ├── package-info.class │ │ └── userprocess.class ├── database │ └── data.sql └── src │ └── main │ ├── java │ ├── com │ │ └── college │ │ │ ├── dao │ │ │ ├── Database.java │ │ │ └── package-info.java │ │ │ └── entity │ │ │ ├── collegeentity.java │ │ │ └── package-info.java │ └── loginadmin │ │ ├── package-info.java │ │ └── userprocess.java │ └── webapp │ ├── AdminLogo.png │ ├── CSS │ └── style.css │ ├── META-INF │ └── MANIFEST.MF │ ├── StudentLogo.png │ ├── TeacherLogo.png │ ├── WEB-INF │ ├── lib │ │ ├── jakarta-servlet-api-4.jar │ │ ├── jsp-api.jar │ │ ├── jstl-1.2.jar │ │ ├── mysql-connector-java-8.0.30.jar │ │ └── servlet-api-2.5.jar │ └── web.xml │ ├── admincourse.jsp │ ├── admindashboard.jsp │ ├── adminfaculty.jsp │ ├── adminlogin.jsp │ ├── adminstudent.jsp │ ├── adminsubject.jsp │ ├── chooseuser.jsp │ ├── delete.jsp │ ├── deletef.jsp │ ├── facultylogin.jsp │ ├── logo.png │ ├── pnotice.jsp │ ├── process.jsp │ ├── process1.jsp │ ├── process2.jsp │ ├── process3.jsp │ ├── process4.jsp │ ├── process5.jsp │ ├── sprocess.jsp │ ├── studentassign.jsp │ ├── studentdashboard.jsp │ ├── studentlogin.jsp │ ├── tassign.jsp │ ├── teacherdashboard.jsp │ ├── tpnotice.jsp │ ├── tprocess.jsp │ ├── tprocess1.jsp │ ├── tprocess2.jsp │ ├── update.jsp │ └── updatef.jsp ├── parallax scrolling ├── index.css ├── index.html ├── moon.png ├── mountains_behind.png ├── mountains_front.png ├── night-beautiful-landscape-with-winter-city-trees-mountain-moon-shine-with-purple-moon-snow-violet-sky-landscape-background-your-arts_177886-7.jpg └── stars.png ├── python ├── palindrome.py └── triangle.py ├── rust └── bubble_sort.rs ├── search ├── advance_search.html ├── image_search.html ├── index.html └── styles.css ├── sing.jpg ├── sport.jpg ├── to-do-list ├── .gitignore ├── index.html ├── scripts │ └── main.js └── styles │ └── style.css └── web_server ├── package-lock.json ├── package.json ├── public ├── css │ └── style.css ├── img │ ├── canIHelpYou.png │ ├── lost.jpg │ ├── my_current_pic.jpg │ ├── my_pic.jpg │ ├── weather.png │ ├── whatHappened.jpeg │ └── whatHappened.jpg └── js │ ├── app.js │ └── weather.js ├── src ├── app.js ├── style.css └── utils │ ├── forecast.js │ └── geocode.js └── templates ├── partials ├── footer.hbs └── header.hbs └── views ├── 404.hbs ├── about.hbs ├── help.hbs └── index.hbs /2D-MarioGame/assets/gifs/giphy (1).gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/2D-MarioGame/assets/gifs/giphy (1).gif -------------------------------------------------------------------------------- /2D-MarioGame/assets/gifs/giphy (2).gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/2D-MarioGame/assets/gifs/giphy (2).gif -------------------------------------------------------------------------------- /2D-MarioGame/assets/gifs/giphy (3).gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/2D-MarioGame/assets/gifs/giphy (3).gif -------------------------------------------------------------------------------- /2D-MarioGame/assets/gifs/giphy (4).gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/2D-MarioGame/assets/gifs/giphy (4).gif -------------------------------------------------------------------------------- /2D-MarioGame/assets/gifs/giphy (5).gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/2D-MarioGame/assets/gifs/giphy (5).gif -------------------------------------------------------------------------------- /2D-MarioGame/assets/gifs/giphy (6).gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/2D-MarioGame/assets/gifs/giphy (6).gif -------------------------------------------------------------------------------- /2D-MarioGame/assets/gifs/giphy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/2D-MarioGame/assets/gifs/giphy.gif -------------------------------------------------------------------------------- /2D-MarioGame/assets/gifs/mar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/2D-MarioGame/assets/gifs/mar.gif -------------------------------------------------------------------------------- /2D-MarioGame/assets/images/814007_super-mario-backgrounds_1920x1200_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/2D-MarioGame/assets/images/814007_super-mario-backgrounds_1920x1200_h.png -------------------------------------------------------------------------------- /2D-MarioGame/assets/images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/2D-MarioGame/assets/images/bg.jpg -------------------------------------------------------------------------------- /2D-MarioGame/html/boyw.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | Run Bro! 9 | 13 | 14 | 129 | 130 | 131 |
132 |
133 |

Run Bro Run!

134 |

YOU LOST :(

135 | 136 | 137 | 138 |
139 |
140 | 141 | 142 | -------------------------------------------------------------------------------- /2D-MarioGame/html/intro.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PLAY 5 | 6 | 109 | 110 | 111 | PLAY 112 | 113 |

Choose Your Player:

114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 132 | 133 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /2D-MarioGame/html/intro2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PLAY 5 | 6 | 109 | 110 | 111 | PLAY 112 | 113 |

Choose Your Player:

114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 132 | 133 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /2D-MarioGame/html/pokemonw.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | Run Pikachu 9 | 13 | 14 | 142 | 143 | 144 |
145 |
146 |

Run Pikachu Run!

147 |

YOU WON :)

148 | 149 | 150 | 151 |
152 |
153 | 154 | 155 | -------------------------------------------------------------------------------- /2D-MarioGame/html/runmario.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | Run Mario 9 | 130 | 131 | 132 |
133 |
134 |

Run Mario Run!

135 | 136 | 137 | 138 | 139 |
140 |
141 | 142 | 143 | -------------------------------------------------------------------------------- /2D-MarioGame/html/sonicw.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | Run Sonic 9 | 13 | 14 | 129 | 130 | 131 |
132 |
133 |

Run Sonic Run!

134 |

YOU LOST :(

135 | 136 | 137 | 138 |
139 |
140 | 141 | 142 | -------------------------------------------------------------------------------- /AnimatedCalculator/README.md: -------------------------------------------------------------------------------- 1 | # CalC_with_js -------------------------------------------------------------------------------- /AnimatedCalculator/eidt.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500&display=swap"); 2 | 3 | * { 4 | margin: 0; 5 | padding: 0; 6 | box-sizing: border-box; 7 | font-family: "Quicksand", sans-serif; 8 | } 9 | 10 | body { 11 | display: flex; 12 | justify-content: center; 13 | align-items: center; 14 | min-height: 100vh; 15 | background: #091921; 16 | } 17 | 18 | body::before { 19 | content: ""; 20 | position: absolute; 21 | top: 0; 22 | left: 0; 23 | width: 100%; 24 | height: 100%; 25 | 26 | background: linear-gradient(#e91e63, #ffc107); 27 | clip-path: circle(22% at 30% 20%); 28 | } 29 | 30 | body::after { 31 | content: ""; 32 | position: absolute; 33 | top: 0; 34 | left: 0; 35 | width: 100%; 36 | height: 100%; 37 | 38 | background: linear-gradient(#ffffff, #da00ff); 39 | clip-path: circle(20% at 70% 90%); 40 | } 41 | 42 | .container { 43 | position: relative; 44 | background: rgba(126, 116, 116, 0.05); 45 | border-radius: 6px; 46 | overflow: hidden; 47 | z-index: 10; 48 | backdrop-filter: blur(15px); 49 | border-top: 1px solid rgba(255, 255, 255, 0.2); 50 | border-left: 1px solid rgba(255, 255, 255, 0.2); 51 | box-shadow: 5px 5px 30px rgba(0, 0, 0, 0.2); 52 | } 53 | 54 | .container .calculator { 55 | position: relative; 56 | display: grid; 57 | } 58 | 59 | .container .calculator .value { 60 | grid-column: span 4; 61 | height: 140px; 62 | width: 300px; 63 | text-align: right; 64 | border: none; 65 | outline: none; 66 | padding: 10px; 67 | font-size: 30px; 68 | background: transparent; 69 | color: #fff; 70 | 71 | border-bottom: 1px solid rgba(255, 255, 255, 0.05); 72 | border-right: 1px solid rgba(255, 255, 255, 0.05); 73 | } 74 | 75 | .container .calculator span { 76 | display: grid; 77 | place-items: center; 78 | width: 75px; 79 | height: 75px; 80 | color: #fff; 81 | font-weight: 400; 82 | cursor: pointer; 83 | font-size: 20px; 84 | user-select: none; 85 | 86 | border-bottom: 1px solid rgba(255, 255, 255, 0.05); 87 | border-right: 1px solid rgba(255, 255, 255, 0.05); 88 | } 89 | 90 | .container .calculator span:hover { 91 | transition: 0s; 92 | background: rgba(255, 255, 255, 0.05); 93 | } 94 | 95 | .container .calculator span:active { 96 | background: #14ff47; 97 | color: #192f00; 98 | font-size: 24px; 99 | font-weight: 500; 100 | } 101 | 102 | .container .calculator .clear { 103 | grid-column: span 2; 104 | width: 150px; 105 | background: rgba(255, 255, 255, 0.05); 106 | } 107 | 108 | .container .calculator .plus { 109 | grid-row: span 2; 110 | height: 150px; 111 | } 112 | 113 | .equal { 114 | background: rgba(255, 255, 255, 0.05); 115 | } -------------------------------------------------------------------------------- /AnimatedCalculator/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | CALCULATOR 10 | 11 | 12 | 13 |
14 |
15 | 16 | c 17 | / 18 | * 19 | 7 20 | 8 21 | 9 22 | - 23 | 4 24 | 5 25 | 6 26 | + 27 | 1 28 | 2 29 | 3 30 | 0 31 | 00 32 | . 33 | = 34 | 35 |
36 |
37 | 38 | 39 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Arrays_beginner/AlgorithmsToDo.md: -------------------------------------------------------------------------------- 1 | ## Arrays - TO DO 2 | 3 | - Reverse array 4 | - Sum of elements in array 5 | - Largest element 6 | - Two largest elements 7 | - Smallest element 8 | - Two smallest elements 9 | - Median of elements 10 | - Mean of elements 11 | -------------------------------------------------------------------------------- /Arrays_beginner/Array_Insert.c: -------------------------------------------------------------------------------- 1 | #include 2 | #define MAX 100 3 | 4 | void insert(int arr[], int n, int item, int index); 5 | void display(int arr[], int n); 6 | 7 | main(){ 8 | int arr[MAX], i, n, item, pos; 9 | 10 | // Input 11 | printf("Enter size of array: "); 12 | scanf("%d", &n); 13 | for(i = 0; i < n; i++){ 14 | printf("Enter element %d: ", i+1); 15 | scanf("%d", &arr[i]); 16 | } 17 | 18 | printf("\nEnter number to insert: "); 19 | scanf("%d", &item); 20 | printf("\nEnter position at which to insert: "); 21 | scanf("%d", &pos); 22 | if(pos <= n){ 23 | insert(arr, n, item, pos-1); 24 | n++; 25 | printf("\nNew Array: "); 26 | display(arr, n); 27 | } 28 | else{ 29 | printf("\nINVALID INPUT! Position more than size of array."); 30 | } 31 | } 32 | 33 | void insert(int arr[], int n, int item, int index){ 34 | int i; 35 | for(i = n; i > index; i--){ 36 | arr[i] = arr[i-1]; 37 | } 38 | arr[index] = item; 39 | } 40 | 41 | void display(int arr[], int n){ 42 | int i; 43 | for(i = 0; i < n; i++){ 44 | printf("%d ", arr[i]); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Arrays_beginner/largest element of two: -------------------------------------------------------------------------------- 1 | /* 2 | * C program to read elements into an array and find the 3 | * largest two elements in a given array. 4 | */ 5 | 6 | #include 7 | int main () 8 | { 9 | int n = 0, i = 0, largest1 = 0, largest2 = 0, temp = 0; 10 | 11 | printf ("Enter the size of the array\n"); 12 | scanf ("%d", &n); 13 | int array[n]; 14 | printf ("Enter the elements\n"); 15 | for (i = 0; i < n; i++) 16 | { 17 | scanf ("%d", &array[i]); 18 | } 19 | 20 | printf ("The array elements are : \n"); 21 | for (i = 0; i < n; i++) 22 | { 23 | printf ("%d\t", array[i]); 24 | } 25 | 26 | printf ("\n"); 27 | 28 | largest1 = array[0]; 29 | largest2 = array[1]; 30 | 31 | if (largest1 < largest2) 32 | { 33 | temp = largest1; 34 | largest1 = largest2; 35 | largest2 = temp; 36 | } 37 | 38 | for (int i = 2; i < n; i++) 39 | { 40 | if (array[i] > largest1) 41 | { 42 | largest2 = largest1; 43 | largest1 = array[i]; 44 | } 45 | else if (array[i] > largest2 && array[i] != largest1) 46 | { 47 | largest2 = array[i]; 48 | } 49 | } 50 | 51 | printf ("The FIRST LARGEST = %d\n", largest1); 52 | printf ("THE SECOND LARGEST = %d\n", largest2); 53 | 54 | return 0; 55 | } 56 | -------------------------------------------------------------------------------- /Arrays_beginner/largest-element-in-array.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() { 3 | int i, n; 4 | float arr[100]; 5 | printf("Enter the number of elements (1 to 100): "); 6 | scanf("%d", &n); 7 | 8 | for (i = 0; i < n; ++i) { 9 | printf("Enter number%d: ", i + 1); 10 | scanf("%f", &arr[i]); 11 | } 12 | 13 | // storing the largest number to arr[0] 14 | for (i = 1; i < n; ++i) { 15 | if (arr[0] < arr[i]) 16 | arr[0] = arr[i]; 17 | } 18 | 19 | printf("Largest element = %.2f", arr[0]); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /Arrays_beginner/reverse_array: -------------------------------------------------------------------------------- 1 | // Iterative C program to reverse an array 2 | #include 3 | 4 | /* Function to reverse arr[] from start to end*/ 5 | void rvereseArray(int arr[], int start, int end) 6 | { 7 | int temp; 8 | while (start < end) 9 | { 10 | temp = arr[start]; 11 | arr[start] = arr[end]; 12 | arr[end] = temp; 13 | start++; 14 | end--; 15 | } 16 | } 17 | 18 | /* Utility that prints out an array on a line */ 19 | void printArray(int arr[], int size) 20 | { 21 | int i; 22 | for (i=0; i < size; i++) 23 | printf("%d ", arr[i]); 24 | 25 | printf("\n"); 26 | } 27 | 28 | /* Driver function to test above functions */ 29 | int main() 30 | { 31 | int arr[] = {1, 2, 3, 4, 5, 6}; 32 | int n = sizeof(arr) / sizeof(arr[0]); 33 | printArray(arr, n); 34 | rvereseArray(arr, 0, n-1); 35 | printf("Reversed array is \n"); 36 | printArray(arr, n); 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /Arrays_beginner/smallest element: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int array[100], minimum, size, c, location = 1; 5 | 6 | printf("Enter number of elements in array\n"); 7 | scanf("%d", &size); 8 | 9 | printf("Enter %d integers\n", size); 10 | 11 | for (c = 0; c < size; c++) 12 | scanf("%d", &array[c]); 13 | 14 | minimum = array[0]; 15 | 16 | for (c = 1; c < size; c++) 17 | { 18 | if (array[c] < minimum) 19 | { 20 | minimum = array[c]; 21 | location = c+1; 22 | } 23 | } 24 | 25 | printf("Minimum element is present at location %d and its value is %d.\n", location, minimum); 26 | return 0; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /Arrays_beginner/sum_of_array.c: -------------------------------------------------------------------------------- 1 | /* C Program to find sum of elements 2 | in a given array */ 3 | #include 4 | 5 | // function to return sum of elements 6 | // in an array of size n 7 | int sum(int arr[], int n) 8 | { 9 | int sum = 0; // initialize sum 10 | 11 | // Iterate through all elements 12 | // and add them to sum 13 | for (int i = 0; i < n; i++) 14 | sum += arr[i]; 15 | 16 | return sum; 17 | } 18 | 19 | int main() 20 | { 21 | int arr[] = {12, 3, 4, 15}; 22 | int n = sizeof(arr) / sizeof(arr[0]); 23 | printf("Sum of given array is %d", sum(arr, n)); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /Arrays_beginner/two smallest element: -------------------------------------------------------------------------------- 1 | // C program to find smallest and second smallest elements 2 | #include 3 | #include /* For INT_MAX */ 4 | 5 | void print2Smallest(int arr[], int arr_size) 6 | { 7 | int i, first, second; 8 | 9 | /* There should be atleast two elements */ 10 | if (arr_size < 2) 11 | { 12 | printf(" Invalid Input "); 13 | return; 14 | } 15 | 16 | first = second = INT_MAX; 17 | for (i = 0; i < arr_size ; i ++) 18 | { 19 | /* If current element is smaller than first 20 | then update both first and second */ 21 | if (arr[i] < first) 22 | { 23 | second = first; 24 | first = arr[i]; 25 | } 26 | 27 | /* If arr[i] is in between first and second 28 | then update second */ 29 | else if (arr[i] < second && arr[i] != first) 30 | second = arr[i]; 31 | } 32 | if (second == INT_MAX) 33 | printf("There is no second smallest element\n"); 34 | else 35 | printf("The smallest element is %d and second " 36 | "Smallest element is %d\n", first, second); 37 | } 38 | 39 | /* Driver program to test above function */ 40 | int main() 41 | { 42 | int arr[] = {12, 13, 1, 10, 34, 1}; 43 | int n = sizeof(arr)/sizeof(arr[0]); 44 | print2Smallest(arr, n); 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | ### Thankyou so much for considering contributing to this repository!! 4 | Here is a complete guide to get you started with your Open Source contribution. 5 | 6 |
7 | 8 | ## Steps to follow :scroll: 9 | 1. [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the repository you want to work on. 10 | 2. The next step is to [Clone](https://docs.github.com/en/get-started/quickstart/fork-a-repo#step-2-create-a-local-clone-of-your-fork) the repository onto your local system. 11 | 3. Make the desired changes. 12 | 4. [Add and Commit](https://docs.github.com/en/repositories/working-with-files/managing-files/adding-a-file-to-a-repository) the changes. 13 | 5. [Push]() all changes to your forked version on GitHub/GitLab. 14 | 6. GitHub/GitLab tracks your push records and now its time for you to [Create a Pull request.](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) 15 | 16 | 17 | ## Tutorials (for better understanding):- 18 | 1. How to contribute to Open Source by [freeCodeCamp.](https://www.freecodecamp.org/news/how-to-contribute-to-open-source-projects/) 19 | 2. YouTube Video by EddieJaoude, precisely covering all concepts in depth --> [click here.](https://www.youtube.com/watch?v=yzeVMecydCE) 20 | 21 | 22 | #### If you wish to learn learn and practice more about creating pull requests checkout EddieHubCommunity's [hacktoberfest-practice.](https://github.com/EddieHubCommunity/hacktoberfest-practice) 23 | 24 |
25 | 26 | ### :tada: **Happy Contributing** :tada: 27 | 28 |
29 | -------------------------------------------------------------------------------- /CSS Card/card-img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/CSS Card/card-img.jpg -------------------------------------------------------------------------------- /CSS Card/card.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | CSS Card Template 9 | 10 | 11 | 12 | 13 |
14 |
15 | Card Image 16 |

Healthy Diet

17 | 01 18 |

A healthy diet is a diet that maintains or improves overall health. 19 | A healthy diet provides the body with essential nutrition: fluid, macronutrients such 20 | as protein, micronutrients such as vitamins, and adequate fibre and food energy.

21 |

Quote of the day- One must eat to live, not live to eat. 22 | -Jean-Baptiste Poquelin

23 | 24 |
25 |
26 | 27 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /CSS Card/style-card.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Raleway:wght@500;900&display=swap'); 2 | 3 | * { 4 | margin: 0; 5 | padding: 0; 6 | box-sizing: border-box; 7 | font-family: 'Raleway', sans-serif; 8 | } 9 | 10 | body { 11 | width: 100vw; 12 | position: absolute; 13 | display: flex; 14 | align-items: center; 15 | justify-content: center; 16 | height: 100vh; 17 | background-color: #191919; 18 | color: white; 19 | } 20 | 21 | body::after { 22 | content: ''; 23 | position: absolute; 24 | top: 0; 25 | left: 0; 26 | width: 100%; 27 | height: 100%; 28 | background: linear-gradient(#2196f3, #f0f); 29 | clip-path: circle(30% at right 10%); 30 | } 31 | 32 | body::before { 33 | content: ''; 34 | position: absolute; 35 | top: 0; 36 | left: 0; 37 | width: 100%; 38 | height: 100%; 39 | background: linear-gradient(red, orange); 40 | clip-path: circle(20% at 8% 80%); 41 | } 42 | 43 | .container { 44 | position: relative; 45 | display: flex; 46 | align-items: center; 47 | justify-content: center; 48 | max-width: 1200px; 49 | flex-wrap: wrap; 50 | z-index: 2; 51 | } 52 | 53 | .container .card { 54 | position: relative; 55 | width: 40vw; 56 | border-radius: 20px; 57 | padding: 20px; 58 | overflow: hidden; 59 | background: rgba(225, 225, 225, 0.1); 60 | box-shadow: 20px 20px 50px #000; 61 | border-top: 2px solid rgba(225, 225, 225, 0.25); 62 | border-left: 2px solid rgba(225, 225, 225, 0.25); 63 | backdrop-filter: blur(5px); 64 | } 65 | 66 | .container .card .watermark { 67 | position: absolute; 68 | color: rgba(225, 225, 225, 0.1); 69 | font-weight: 900; 70 | top: -20px; 71 | right: 30px; 72 | font-size: 8rem; 73 | pointer-events: none; 74 | } 75 | 76 | .container .card img { 77 | width: 120px; 78 | height: 120px; 79 | border-radius: 50%; 80 | } 81 | 82 | .btn { 83 | padding: 10px; 84 | border: none; 85 | border-radius: 50px; 86 | background-color: #10fe91; 87 | scale: 1; 88 | cursor: pointer; 89 | } 90 | 91 | .btn:hover { 92 | opacity: 0.9; 93 | scale: 1.05; 94 | transition: 150ms ease-in-out; 95 | } 96 | 97 | /* Utilities */ 98 | 99 | .marg { 100 | margin: 20px 12px; 101 | } 102 | -------------------------------------------------------------------------------- /DSA/Binary Search: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | //function of binary search starts here 5 | int binarySearch(vector& nums, int target) 6 | { 7 | int n=nums.size(); //determining size 8 | int start=0; 9 | int end= n-1; 10 | int mid=start+ (end-start)/2; 11 | 12 | while(start<=end) 13 | { 14 | if(nums[mid]==target) 15 | { 16 | return mid; 17 | } 18 | else if(nums[mid] arr= {2,7,13,32,75,76,93}; 35 | 36 | int index=binarySearch(arr,13); 37 | std::cout << 13<< " is found at index"<> adj[],int v,vector &pass){ 5 | if(time<0) return INT_MAX; 6 | int n = pass.size(); 7 | if(v==n-1){ 8 | return pass[v]; 9 | } 10 | if(dp[v][time]!=-1) return dp[v][time]; 11 | int cost = INT_MAX; 12 | for(auto &x:adj[v]){ 13 | int u = x.first; 14 | int temp = x.second; 15 | if(temp<=time){ 16 | int sol = solve(time-temp,adj,u,pass); 17 | cost = min(cost,sol); 18 | } 19 | } 20 | if(cost==INT_MAX) return dp[v][time] = INT_MAX; 21 | return dp[v][time] = cost + pass[v]; 22 | } 23 | int minCost(int maxTime, vector>& edges, vector& pass) { 24 | memset(dp,-1,sizeof(dp)); 25 | int n = pass.size(); 26 | vector> adj[n]; 27 | for(int i = 0;i 2 | using namespace std; 3 | 4 | string decimal_to_hexa(int n){ 5 | int multiplier=1; 6 | while(multiplier<=n) 7 | multiplier*=16; 8 | multiplier/=16; 9 | string num=""; 10 | int d; 11 | while(multiplier>=1){ 12 | d=n/multiplier; 13 | if(d>9){ 14 | char c='A'+(d-10); 15 | num= num + c; 16 | } 17 | else 18 | num=num + to_string(d); 19 | n=n-(d*multiplier); 20 | multiplier/=16; 21 | } 22 | return num; 23 | } 24 | int main(){ 25 | int n; 26 | cin>>n; 27 | string hexa=decimal_to_hexa(n); 28 | cout< 2 | int main() 3 | { 4 | int n; 5 | printf("Enter n : "); //n is number of elements in the array 6 | scanf("%d", &n); 7 | int arr[n]; 8 | for (int i = 0; i < n; i++) 9 | { 10 | scanf("%d", &arr[i]); 11 | } 12 | int arr_odd[n], arr_even[n]; //arr_odd[] for odd elements and arr_even[] for even elements 13 | int o = 0, e = 0; 14 | for (int i = 0; i < n; i++) 15 | { 16 | if (arr[i] % 2 != 0) 17 | { 18 | arr_odd[o] = arr[i]; //Putting odd numbers in arr_odd[] array. 19 | o++; 20 | } 21 | else if (arr[i] % 2 == 0) 22 | { 23 | arr_even[e] = arr[i]; //Putting even numbers in arr_even[] array. 24 | e++; 25 | } 26 | } 27 | 28 | printf("Even array : [ "); 29 | for (int i = 0; i < e; i++) 30 | { 31 | printf("%d ", arr_even[i]); 32 | } 33 | printf("]\nOdd array : [ "); 34 | for (int i = 0; i < o; i++) 35 | { 36 | printf("%d ", arr_odd[i]); 37 | } 38 | printf("]"); 39 | return 0; 40 | } 41 | -------------------------------------------------------------------------------- /DSA/dsa_hack/unique-elements-in-an-array.c.txt: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(){ 5 | 6 | int size; 7 | /* take the size of the array from user as input */ 8 | printf("Enter size of the array: "); 9 | scanf("%d", &size); 10 | 11 | /* dynamically create an array of the reqruired size */ 12 | int *a = (int*)malloc(sizeof(int)*size); 13 | 14 | if(size<0){ 15 | size = size*(-1); 16 | } 17 | 18 | /* enter the elements to the array */ 19 | printf("Enter elements of the array: "); 20 | for(int k=0; k 2 | using namespace std; 3 | 4 | 5 | struct Listnode { 6 | int val; 7 | Listnode *next; 8 | Listnode() : val(0), next(nullptr) {} 9 | Listnode(int x) : val(x), next(nullptr) {} 10 | Listnode(int x, Listnode *next) : val(x), next(next) {} 11 | }; 12 | 13 | //removing duplicate from exiting list. 14 | class Solution { 15 | public: 16 | Listnode* deleteDuplicates(Listnode* head) { 17 | 18 | //checking for empty list 19 | if(head == NULL) 20 | { 21 | return NULL; 22 | } 23 | 24 | Listnode* it = head->next; // main iterator 25 | Listnode* curr = head; // current node in final list 26 | while(it != NULL) 27 | { 28 | //checking for duplicate values 29 | if(it->val != curr->val) 30 | { 31 | // update final list 32 | curr->next = it; 33 | curr = curr->next; 34 | } 35 | 36 | //if duplicate values appear deleting them 37 | it = it->next; 38 | } 39 | // end list 40 | curr->next = NULL; 41 | return head; 42 | } 43 | }; 44 | -------------------------------------------------------------------------------- /Dev C++/1-d array.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int emp_id[2],i=0; 5 | emp_id[0]=1001; 6 | emp_id[1]=1010; 7 | emp_id[2]=1020; 8 | emp_id[6]=1030; 9 | emp_id[5]=1050; 10 | emp_id[6]=emp_id[5]+emp_id[1]; 11 | for(i=0;i<7;i++) 12 | { 13 | printf("%d\n",emp_id[i]); 14 | } 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /Dev C++/1-d array.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/1-d array.exe -------------------------------------------------------------------------------- /Dev C++/1_inversionCount.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int inversionCount(int input1,int input2[]) 4 | { 5 | int inversionCount=0; 6 | for (int i=0;iinput2[j]) { 11 | inversionCount++; 12 | } 13 | } 14 | } 15 | return inversionCount; 16 | } 17 | int main() 18 | { 19 | int input2[] = { 3,2,1 }; 20 | int input1 = sizeof(input2) / sizeof(input2[0]); 21 | printf(" Number of inversions are %d \n",inversionCount(input1, input2)); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /Dev C++/1_inversionCount.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/1_inversionCount.exe -------------------------------------------------------------------------------- /Dev C++/3x3 matrix.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int mat[3][3],i,j; 5 | for(i=0;i<3;i++) 6 | { 7 | for(j=0;j<3;j++) 8 | { 9 | scanf("%d",&mat[i][j]); 10 | printf("\n"); 11 | } 12 | } 13 | for(i=0;i<3;i++) 14 | { 15 | for(j=0;j<3;j++) 16 | { 17 | printf("\t%d",mat[i][j]); 18 | } 19 | printf("\n"); 20 | } 21 | 22 | return 0; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Dev C++/3x3 matrix.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/3x3 matrix.exe -------------------------------------------------------------------------------- /Dev C++/DAA Merge sort.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | void merge(int arr[], int p, int q, int r) 3 | { 4 | int n1=q-p+1; 5 | int n2=r-q; 6 | int L[n1],M[n2],v,w; 7 | for(w=0;w 2 | 3 | int partition (int a[], int start, int end) 4 | { 5 | int pivot = a[end]; 6 | int i = (start - 1); 7 | 8 | for (int j = start; j <= end - 1; j++) 9 | { 10 | if (a[j] < pivot) 11 | { 12 | i++; 13 | int t = a[i]; 14 | a[i] = a[j]; 15 | a[j] = t; 16 | } 17 | } 18 | int t = a[i+1]; 19 | a[i+1] = a[end]; 20 | a[end] = t; 21 | return (i + 1); 22 | } 23 | 24 | void quick(int a[], int start, int end) 25 | { 26 | if (start < end) 27 | { 28 | int p = partition(a, start, end); 29 | quick(a, start, p - 1); 30 | quick(a, p + 1, end); 31 | } 32 | } 33 | void printArr(int a[], int n) 34 | { 35 | int i; 36 | for (i = 0; i < n; i++) 37 | printf("%d ", a[i]); 38 | } 39 | int main() 40 | { 41 | int a[] = { 34, 55, 73, 24, 95, 10, 100, 1 }; 42 | int n = sizeof(a) / sizeof(a[0]); 43 | printf("Before sorting array elements are - \n"); 44 | printArr(a, n); 45 | quick(a, 0, n - 1); 46 | printf("\nAfter sorting array elements are - \n"); 47 | printArr(a, n); 48 | 49 | return 0; 50 | } 51 | -------------------------------------------------------------------------------- /Dev C++/DAA Quick sort.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/DAA Quick sort.exe -------------------------------------------------------------------------------- /Dev C++/Singly linked list.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | struct node 4 | { 5 | int data; 6 | struct node *next; 7 | }; 8 | struct node *head=NULL; 9 | //struct node * current=NULL; 10 | void printlist() 11 | { 12 | struct node *ptr=head; 13 | printf(" n[head=>]"); 14 | while (ptr!=NULL) 15 | { 16 | printf(" %d=>",ptr->data); 17 | ptr=ptr->next; 18 | } 19 | printf(" [null]n"); 20 | } 21 | void insert (int data) 22 | { 23 | struct node *link=(struct node*)malloc(sizeof(struct node)); 24 | link->data=data; 25 | link->next=head; 26 | head=link; 27 | } 28 | int main() 29 | { 30 | insert (600); 31 | insert (500); 32 | insert (400); 33 | insert (300); 34 | insert (200); 35 | insert (100); 36 | printlist(); 37 | return 0; 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /Dev C++/Singly linked list.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/Singly linked list.exe -------------------------------------------------------------------------------- /Dev C++/Swappimg.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | void swap(int *a,int *b) 3 | { 4 | printf("\nBefore swap a= %d b= %d ",*a,*b); 5 | int temp; 6 | temp=*a; 7 | *a=*b; 8 | *b=temp; 9 | printf("\nAfter swap a= %d b= %d \n",*a,*b); 10 | } 11 | main() 12 | { 13 | int a=10; 14 | int b=20; 15 | printf("Before swapping the values of a= %d & b= %d ",a,b); 16 | swap(&a,&b); 17 | printf("After swapping the values of a= %d & b= %d ",a,b); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /Dev C++/Swappimg.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/Swappimg.exe -------------------------------------------------------------------------------- /Dev C++/Switch case two operands.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | char opr; 5 | int num_1, num_2; 6 | printf("\nEnter the operator ( +,-,*,/)= "); 7 | scanf("%c",&opr); 8 | printf("Enter two operands= "); 9 | scanf("%d %d",&num_1,&num_2); 10 | switch(opr) 11 | { 12 | case '+': 13 | printf("%d + %d = %d", num_1,num_2,num_1+num_2); 14 | break; 15 | case '-': 16 | printf("%d - %d = %d", num_1,num_2,num_1-num_2); 17 | break; 18 | case '*': 19 | printf("%d * %d = %d", num_1,num_2,num_1*num_2); 20 | break; 21 | case '/': 22 | printf("%d / %d = %d", num_1,num_2,num_1/num_2); 23 | break; 24 | default : 25 | printf("Error! The operator is not Matched."); 26 | } 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /Dev C++/Switch case two operands.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/Switch case two operands.exe -------------------------------------------------------------------------------- /Dev C++/call by value.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | void change(int num) 3 | { 4 | printf("\nThe value before function %d",num); 5 | num=num+100; 6 | printf("\n The value after function %d ",num); 7 | } 8 | main() 9 | { 10 | int x=100; 11 | printf("\nThe value of x before function call %d",x); 12 | change(x); 13 | printf("\n The value of x after function call %d",x); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /Dev C++/call by value.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/call by value.exe -------------------------------------------------------------------------------- /Dev C++/circular linked list.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | struct node 4 | { 5 | int data; 6 | struct node *prev; 7 | struct node *next; 8 | }; 9 | struct node *head=NULL; 10 | struct node *last=NULL; 11 | struct node *current=NULL; 12 | 13 | void insert (int data) 14 | { 15 | struct node *link=(struct node*)malloc(sizeof(struct node)); 16 | link->data= data; 17 | link->next=NULL; 18 | if (head==NULL) 19 | { 20 | head=link; 21 | head->next=head; 22 | return; 23 | } 24 | current =head; 25 | while (current->next!=head) 26 | current =current->next; 27 | current->next=link; 28 | link->next=head; 29 | } 30 | void printlist() 31 | { 32 | struct node *ptr=head; 33 | printf("n[head] =>"); 34 | while(ptr->next != head) 35 | { 36 | printf(" %d =>",ptr->data); 37 | ptr=ptr->next; 38 | } 39 | 40 | printf(" %d => ",ptr->data); 41 | printf("[head]n"); 42 | 43 | } 44 | int main() 45 | { 46 | insert(10); 47 | insert(20); 48 | insert(30); 49 | insert(40); 50 | insert(50); 51 | insert(60); 52 | printlist(); 53 | return 0; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /Dev C++/circular linked list.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/circular linked list.exe -------------------------------------------------------------------------------- /Dev C++/do while 1 to 10.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int count=1; 5 | do 6 | { 7 | printf("%d\n",count); 8 | count++; 9 | } 10 | while (count<=10); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /Dev C++/do while 1 to 10.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/do while 1 to 10.exe -------------------------------------------------------------------------------- /Dev C++/doubly linked list.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | struct node 4 | { 5 | int data; 6 | struct node *prev; 7 | struct node *next; 8 | }; 9 | struct node *head=NULL; 10 | struct node *last=NULL; 11 | struct node *current=NULL; 12 | 13 | void insert (int data) 14 | { 15 | struct node *link=(struct node*)malloc(sizeof(struct node)); 16 | link->data= data; 17 | link->prev= NULL; 18 | link->next=NULL; 19 | if (head==NULL) 20 | { 21 | head=link; 22 | return; 23 | } 24 | current =head; 25 | while (current->next!=NULL) 26 | current =current->next; 27 | current->next=link; 28 | last=link; 29 | link->prev=current; 30 | } 31 | void printlist() 32 | { 33 | struct node *ptr=head; 34 | printf("n[head] <=>"); 35 | while(ptr->next != NULL) 36 | { 37 | printf(" %d <=>",ptr->data); 38 | ptr=ptr->next; 39 | } 40 | 41 | printf(" %d <=> ",ptr->data); 42 | printf("[head]n"); 43 | 44 | } 45 | int main() 46 | { 47 | insert(10); 48 | insert(20); 49 | insert(30); 50 | insert(40); 51 | insert(50); 52 | insert(60); 53 | printlist(); 54 | return 0; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /Dev C++/doubly linked list.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/doubly linked list.exe -------------------------------------------------------------------------------- /Dev C++/else if lader.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { int num=0; 5 | printf("Enter an number= "); 6 | scanf("%d",&num); 7 | if(num==42) 8 | { 9 | printf("The inputted number is equal to 42"); 10 | } 11 | else if(num==10){ 12 | printf("The inputted number is equal to 10");} 13 | 14 | else if(num==50){ 15 | printf("The inputted number is equal to 50"); 16 | } 17 | else 18 | printf("The inputted number is not equal to 10, 42, 50"); 19 | return(0); 20 | } 21 | -------------------------------------------------------------------------------- /Dev C++/else if lader.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/else if lader.exe -------------------------------------------------------------------------------- /Dev C++/equal of two no.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { int v1, v2; 5 | printf("\nEnter first variable= "); 6 | scanf("%d",&v1); 7 | printf("\nEnter second variable= "); 8 | scanf("%d",&v2); 9 | if(v1!=v2) 10 | { 11 | printf("the two variables are not equal"); 12 | if(v1>v2){ 13 | printf("\nFirst variable is Greater than second variable"); 14 | } 15 | else 16 | printf("\nFirst variable is Smaller than second variable"); 17 | } 18 | else 19 | printf("The two variables are Equal"); 20 | return(0); 21 | } 22 | -------------------------------------------------------------------------------- /Dev C++/equal of two no.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/equal of two no.exe -------------------------------------------------------------------------------- /Dev C++/file handle.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | FILE * filePointer; 6 | char datatobewritten[50]="Sample of File Handling."; 7 | filePointer=fopen("file_handle.c","w"); 8 | if(filePointer==NULL) 9 | { 10 | printf("file_handle.c file failed to open."); 11 | } 12 | else 13 | { 14 | printf("The file is now opened.\n"); 15 | if(strlen(datatobewritten)>0) 16 | { 17 | fputs(datatobewritten,filePointer); 18 | fputs("\n",filePointer); 19 | } 20 | fclose(filePointer); 21 | printf("Data succesfully written in file file_handle.c\n"); 22 | printf("The file is now closed."); 23 | } 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /Dev C++/file handle.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/file handle.exe -------------------------------------------------------------------------------- /Dev C++/file_handle.c: -------------------------------------------------------------------------------- 1 | Sample of File Handling. 2 | -------------------------------------------------------------------------------- /Dev C++/for 1 to 10.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | printf("number from one to ten are "); 5 | for(int i=1;i<=10;i++) 6 | { 7 | printf("\n%d",i); 8 | } 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /Dev C++/for 1 to 10.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/for 1 to 10.exe -------------------------------------------------------------------------------- /Dev C++/function.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | void msg(); 3 | main() 4 | { 5 | msg(); 6 | printf("\nBye..."); 7 | return 0; 8 | } 9 | void msg() 10 | { 11 | printf("Hello"); 12 | } 13 | -------------------------------------------------------------------------------- /Dev C++/function.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/function.exe -------------------------------------------------------------------------------- /Dev C++/greater number ternary.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int n1,n2,max; 5 | printf("Enter the number= "); 6 | scanf("%d %d",&n1,&n2); 7 | max=(n1>n2)?n1:n2; 8 | printf("The greater number is %d ",max); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /Dev C++/greater number ternary.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/greater number ternary.exe -------------------------------------------------------------------------------- /Dev C++/hello.cpp: -------------------------------------------------------------------------------- 1 | #include"stdio.h" 2 | #include"conio.h" 3 | main() 4 | { 5 | printf("Hello world"); 6 | getch(); 7 | } 8 | 9 | 10 | -------------------------------------------------------------------------------- /Dev C++/hello.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/hello.exe -------------------------------------------------------------------------------- /Dev C++/nested for.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int i,j; 5 | for(i=1;i<=2;i++) 6 | { 7 | for(j=3;j<=4;j++) 8 | { 9 | printf("%d %d\n",i,j); 10 | } 11 | } 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /Dev C++/nested for.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/nested for.exe -------------------------------------------------------------------------------- /Dev C++/pointer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int arr[10]= {1,2,3,4,5,6,7,8,9,10}; 5 | int *ptr; 6 | ptr=arr; 7 | for (int i=0;i<10;i++) 8 | { 9 | printf("Value of *ptr= %d\n",*ptr); 10 | printf("Value of ptr= %d\n",ptr); 11 | ptr++; 12 | } 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /Dev C++/pointer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/pointer.exe -------------------------------------------------------------------------------- /Dev C++/prime.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | main() 4 | { int num; 5 | printf("Enter an number= "); 6 | scanf("%d",&num); 7 | if(num%2==0) 8 | { 9 | printf("The Number %d is even",num); 10 | } 11 | else 12 | printf("the number %d is not even",num); 13 | return(0); 14 | } 15 | -------------------------------------------------------------------------------- /Dev C++/prime.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/prime.exe -------------------------------------------------------------------------------- /Dev C++/selectionSort.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | void show(vector &arr){ 5 | for(int x:arr){ 6 | cout< &arr,int n){ 11 | for(int i = 0; i < n-1; i++){ 12 | int min = i; 13 | for(int j = i+1; j < n;j++){ 14 | if(arr[j] < arr[min]){ 15 | min = j; 16 | } 17 | } 18 | swap(arr[i],arr[min]); 19 | } 20 | } 21 | int main(){ 22 | int n; 23 | cout<<"Enter number of elements in array :\n"; 24 | cin>>n; 25 | vector v; 26 | cout<<"Enter array:\n"; 27 | for(int i = 0; i < n ; i++){ 28 | int k; 29 | cin>>k; 30 | v.push_back(k); 31 | } 32 | sort(v,n); 33 | show(v); 34 | return 0; 35 | } -------------------------------------------------------------------------------- /Dev C++/selectionSort.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/selectionSort.exe -------------------------------------------------------------------------------- /Dev C++/while 1 to 5.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | main() 3 | { 4 | int count=1; 5 | while (count<=10) 6 | { 7 | printf("%d\n",count); 8 | count++; 9 | } 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /Dev C++/while 1 to 5.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Dev C++/while 1 to 5.exe -------------------------------------------------------------------------------- /Dictionary App/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 15 | 16 | 17 | Dictionary 18 | 19 | 20 | 21 |
22 | 30 |
31 |
32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Dictionary App/script.js: -------------------------------------------------------------------------------- 1 | const url = "https://api.dictionaryapi.dev/api/v2/entries/en/"; 2 | const result = document.getElementById("result"); 3 | const sound = document.getElementById("sound"); 4 | const btn = document.getElementById("search-btn"); 5 | 6 | btn.addEventListener("click", () => { 7 | let inpWord = document.getElementById("inp-word").value; 8 | fetch(`${url}${inpWord}`) 9 | .then((response) => response.json()) 10 | .then((data) => { 11 | console.log(data); 12 | result.innerHTML = ` 13 |
14 |

${inpWord}

15 | 18 |
19 |
20 |

${data[0].meanings[0].partOfSpeech}

21 |

/${data[0].phonetic}/

22 |
23 |

24 | ${data[0].meanings[0].definitions[0].definition} 25 |

26 |

27 | ${data[0].meanings[0].definitions[0].example || ""} 28 |

`; 29 | sound.setAttribute("src", `https:${data[0].phonetics[0].audio}`); 30 | }) 31 | .catch(() => { 32 | result.innerHTML = `

Couldn't Find The Word

`; 33 | }); 34 | }); 35 | function playSound() { 36 | sound.play(); 37 | } 38 | -------------------------------------------------------------------------------- /Dictionary App/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | padding: 0; 3 | margin: 0; 4 | box-sizing: border-box; 5 | } 6 | *:not(i) { 7 | font-family: "Poppins", sans-serif; 8 | } 9 | body { 10 | background-color: #9cffe8; 11 | } 12 | .container { 13 | background-color: #ffffff; 14 | width: 90vmin; 15 | position: absolute; 16 | transform: translate(-50%, -50%); 17 | top: 50%; 18 | left: 50%; 19 | padding: 80px 50px; 20 | border-radius: 10px; 21 | box-shadow: 0 20px 40px rgba(38, 33, 61, 0.2); 22 | } 23 | .search-box { 24 | width: 100%; 25 | display: flex; 26 | justify-content: space-between; 27 | } 28 | .search-box input { 29 | padding: 5px; 30 | width: 70%; 31 | border: none; 32 | outline: none; 33 | border-bottom: 3px solid #907af2; 34 | font-size: 16px; 35 | } 36 | .search-box button { 37 | padding: 15px 0; 38 | width: 25%; 39 | background-color: #5f568a; 40 | border: none; 41 | outline: none; 42 | color: #ffffff; 43 | border-radius: 5px; 44 | } 45 | .result { 46 | position: relative; 47 | } 48 | .result h3 { 49 | font-size: 30px; 50 | color: #3e194c; 51 | } 52 | .result .word { 53 | display: flex; 54 | justify-content: space-between; 55 | margin-top: 80px; 56 | } 57 | .result button { 58 | background-color: transparent; 59 | color: #534497; 60 | border: none; 61 | outline: none; 62 | font-size: 18px; 63 | } 64 | .result .details { 65 | display: flex; 66 | gap: 10px; 67 | color: #b3b6d4; 68 | margin: 5px 0 20px 0; 69 | font-size: 14px; 70 | } 71 | .word-meaning { 72 | color: #575a7b; 73 | } 74 | .word-example { 75 | color: #575a7b; 76 | font-style: italic; 77 | border-left: 5px solid #ae9cff; 78 | padding-left: 20px; 79 | margin-top: 30px; 80 | } 81 | .error { 82 | margin-top: 80px; 83 | text-align: center; 84 | } 85 | button { 86 | border-radius: 4px; 87 | background-color: #5ca1e1; 88 | border: none; 89 | color: #fff; 90 | text-align: center; 91 | font-size: 32px; 92 | padding: 16px; 93 | width: 220px; 94 | transition: all 0.5s; 95 | cursor: pointer; 96 | margin: 36px; 97 | box-shadow: 0 10px 20px -8px rgba(0, 0, 0,.7); 98 | } 99 | 100 | button{ 101 | cursor: pointer; 102 | display: inline-block; 103 | position: relative; 104 | transition: 0.5s; 105 | } 106 | 107 | button:after { 108 | content: '»'; 109 | position: absolute; 110 | opacity: 0; 111 | top: 14px; 112 | right: -20px; 113 | transition: 0.5s; 114 | } 115 | 116 | button:hover{ 117 | padding-right: 24px; 118 | padding-left:8px; 119 | } 120 | 121 | button:hover:after { 122 | opacity: 1; 123 | right: 10px; 124 | } 125 | -------------------------------------------------------------------------------- /Drawing_app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Drawing App 8 | 9 | 10 | 11 |
12 | 13 | 10 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Drawing_app/script.js: -------------------------------------------------------------------------------- 1 | const canvas = document.getElementById('canvas'); 2 | const increaseBtn = document.getElementById('increase'); 3 | const decreaseBtn = document.getElementById('decrease'); 4 | const sizeEL = document.getElementById('size'); 5 | const colorEl = document.getElementById('color'); 6 | const clearEl = document.getElementById('clear'); 7 | 8 | 9 | const ctx = canvas.getContext('2d'); 10 | canvas.width = 800; 11 | canvas.height = 700; 12 | 13 | 14 | let size = 10; 15 | let isPressed = false; 16 | colorEl.value = 'black'; 17 | let color = colorEl.value; 18 | let x=0; 19 | let y=0; 20 | 21 | canvas.addEventListener('mousedown', (e) => { 22 | isPressed = true 23 | x = e.offsetX 24 | y = e.offsetY 25 | }) 26 | 27 | document.addEventListener('mouseup', (e) => { 28 | isPressed = false 29 | x = undefined 30 | y = undefined 31 | }) 32 | 33 | canvas.addEventListener('mousemove', (e) => { 34 | if(isPressed) { 35 | const x2 = e.offsetX 36 | const y2 = e.offsetY 37 | drawCircle(x2, y2) 38 | drawLine(x, y, x2, y2) 39 | x = x2 40 | y = y2 41 | } 42 | }) 43 | 44 | function drawCircle(x, y) { 45 | ctx.beginPath(); 46 | ctx.arc(x, y, size, 0, Math.PI * 2) 47 | ctx.fillStyle = color 48 | ctx.fill() 49 | } 50 | 51 | function drawLine(x1, y1, x2, y2) { 52 | ctx.beginPath() 53 | ctx.moveTo(x1, y1) 54 | ctx.lineTo(x2, y2) 55 | ctx.strokeStyle = color 56 | ctx.lineWidth = size * 2 57 | ctx.stroke() 58 | } 59 | 60 | function updateSizeOnScreen() { 61 | sizeEL.innerText = size 62 | } 63 | 64 | increaseBtn.addEventListener('click', () => { 65 | size += 5 66 | if(size > 50) { 67 | size = 50 68 | } 69 | updateSizeOnScreen() 70 | }) 71 | 72 | decreaseBtn.addEventListener('click', () => { 73 | size -= 5 74 | if(size < 5) { 75 | size = 5 76 | } 77 | updateSizeOnScreen() 78 | }) 79 | 80 | // Saving drawing as image 81 | let saveBtn = document.querySelector(".save") 82 | saveBtn.addEventListener("click", () => { 83 | let data = canvas.toDataURL("imag/png") 84 | let a = document.createElement("a") 85 | a.href = data 86 | // what ever name you specify here 87 | // the image will be saved as that name 88 | a.download = "sketch.png" 89 | a.click() 90 | }) 91 | 92 | colorEl.addEventListener('change', (e) => color = e.target.value) 93 | 94 | clearEl.addEventListener('click', () => ctx.clearRect(0,0, canvas.width, canvas.height)) 95 | -------------------------------------------------------------------------------- /Drawing_app/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); 2 | 3 | * { 4 | box-sizing: border-box; 5 | } 6 | 7 | body { 8 | background-color: #f5f5f5; 9 | font-family: 'Roboto', sans-serif; 10 | display: flex; 11 | flex-direction: column; 12 | align-items: center; 13 | justify-content: center; 14 | height: 100vh; 15 | margin: 0; 16 | } 17 | 18 | canvas { 19 | border: 2px solid steelblue; 20 | cursor : crosshair; 21 | } 22 | 23 | .toolbox { 24 | background-color: steelblue; 25 | border: 1px solid slateblue; 26 | display: flex; 27 | width: 804px; 28 | padding: 1rem; 29 | } 30 | 31 | .toolbox > * { 32 | background-color: #fff; 33 | border: none; 34 | display: inline-flex; 35 | align-items: center; 36 | justify-content: center; 37 | font-size: 2rem; 38 | height: 50px; 39 | width: 120px; 40 | margin: 0.25rem; 41 | padding: 0.25rem; 42 | cursor: pointer; 43 | } 44 | 45 | .save{ 46 | font-weight: bold; 47 | background-color: #0234ed; 48 | } 49 | 50 | .toolbox > *:last-child { 51 | margin-left: auto; 52 | } -------------------------------------------------------------------------------- /Expense_Tracker/REAMDE.md: -------------------------------------------------------------------------------- 1 | # Expense Tracker Using Js. -------------------------------------------------------------------------------- /Expense_Tracker/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Expense tracker 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

Balance

16 |

₹0.0

17 |
18 |
19 |

Credit

20 |

+₹0.00

21 |
22 |
23 |

Debit

24 |

-₹0.00

25 |
26 |
27 |

Transaction History

28 |
    29 |

    Add new transation

    30 |
    31 |
    32 | 33 | 34 |
    35 |
    36 | 41 | 42 |
    43 | 44 | 45 | 46 |
    47 | 48 | 49 |
    50 | 51 | 52 | 54 | 55 | 56 |
    57 | 58 |
    59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Expense_Tracker/style.css: -------------------------------------------------------------------------------- 1 | /* @import url("https://fonts.googleapis.com/css2?family=Viaoda+Libre&display=swap"); */ 2 | 3 | :root { 4 | --bg: #0ec1e0; 5 | --text: #1b0505; 6 | --line: #1b0505; 7 | --last: #370cf5; 8 | --box-shadow: 0 1px 5px rgba(250, 250, 250, 0.2), 9 | 0 1px 5px rgba(255, 255, 255, 0.3); 10 | } 11 | 12 | * { 13 | box-sizing: border-box; 14 | } 15 | 16 | body { 17 | font-family: "Viaoda Libre", cursive; 18 | /* background-color: var(--bg); */ 19 | /* background-color: white; */ 20 | background-image: url("https://images.unsplash.com/photo-1523821741446-edb2b68bb7a0?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80"); 21 | background-size: cover; 22 | 23 | color: var(--text); 24 | display: flex; 25 | flex-direction: column; 26 | align-items: center; 27 | justify-content: center; 28 | margin: 0; 29 | min-height: 100vh; 30 | /* padding: 30px 0; */ 31 | } 32 | 33 | .container { 34 | margin: 30px auto; 35 | width: 350px; 36 | background-color: rgb(247, 74, 224); 37 | padding: 10px 10px; 38 | } 39 | 40 | h1 { 41 | letter-spacing: 1px; 42 | margin: 0; 43 | } 44 | 45 | h3 { 46 | border-bottom: 1px solid var(--line); 47 | padding: 10px; 48 | margin: 40px 0 10px; 49 | } 50 | 51 | h4 { 52 | margin: 0; 53 | text-transform: uppercase; 54 | color: var(--last); 55 | } 56 | 57 | p { 58 | color: var(--bg); 59 | font-weight: bold; 60 | } 61 | 62 | .inc-exp-container { 63 | background-color: var(--line); 64 | padding: 20px; 65 | box-shadow: var(--box-shadow); 66 | display: flex; 67 | justify-content: space-between; 68 | margin: 20px 0; 69 | } 70 | 71 | .inc-exp-container>div { 72 | flex: 1; 73 | text-align: center; 74 | } 75 | 76 | .inc-exp-container>div:first-of-type { 77 | border-right: 1px solid var(--last); 78 | } 79 | 80 | .money { 81 | font-size: 20px; 82 | letter-spacing: 1px; 83 | margin: 5px 0; 84 | } 85 | 86 | .money.plus { 87 | color: forestgreen; 88 | } 89 | 90 | .money.minus { 91 | color: crimson; 92 | } 93 | 94 | label { 95 | display: inline-block; 96 | margin: 10px 0; 97 | font-size: large; 98 | font-weight: bold; 99 | text-decoration: underline; 100 | } 101 | 102 | input[type="text"], 103 | input[type="number"] { 104 | border: 1px solid var(--last); 105 | border-radius: 5px; 106 | display: block; 107 | font-size: 16px; 108 | padding: 10px; 109 | width: 100%; 110 | } 111 | 112 | .btn { 113 | cursor: pointer; 114 | background-color: var(--line); 115 | box-shadow: var(--box-shadow); 116 | color: var(--bg); 117 | display: block; 118 | font-size: 16px; 119 | font-weight: bold; 120 | margin: 10px 0 30px; 121 | padding: 10px; 122 | width: 100%; 123 | } 124 | 125 | .btn:focus, 126 | .delete-btn:focus { 127 | outline: none; 128 | } 129 | 130 | .list { 131 | list-style-type: none; 132 | padding: 0; 133 | margin-bottom: 40px; 134 | } 135 | 136 | .list li { 137 | background-color: var(--text); 138 | color: var(--bg); 139 | display: flex; 140 | justify-content: space-between; 141 | position: relative; 142 | padding: 10px; 143 | margin: 10px 0; 144 | } 145 | 146 | .list li.plus { 147 | border-right: 5px solid forestgreen; 148 | } 149 | 150 | .list li.minus { 151 | border-right: 5px solid crimson; 152 | } 153 | 154 | .delete-btn { 155 | cursor: pointer; 156 | background-color: var(--line); 157 | border: 0; 158 | color: aliceblue; 159 | font-size: 20px; 160 | line-height: 20px; 161 | padding: 2px 5px; 162 | position: absolute; 163 | top: 50%; 164 | left: 0; 165 | transform: translate(-100%, -50%); 166 | opacity: 0; 167 | transition: opacity 0.3s ease-in; 168 | } 169 | 170 | .list li:hover .delete-btn { 171 | opacity: 1; 172 | } 173 | 174 | a { 175 | text-decoration: none; 176 | cursor: pointer; 177 | background-color: var(--line); 178 | box-shadow: var(--box-shadow); 179 | color: var(--bg); 180 | display: block; 181 | font-size: 16px; 182 | font-weight: bold; 183 | /* margin: 10px 0 30px; */ 184 | /* padding: 10px; */ 185 | width: 100%; 186 | } -------------------------------------------------------------------------------- /Expense_Tracker/work.js: -------------------------------------------------------------------------------- 1 | const balance = document.getElementById("balance"); 2 | const money_plus = document.getElementById("money-plus"); 3 | const list = document.getElementById("list"); 4 | const form = document.getElementById("form"); 5 | const text = document.getElementById("text"); 6 | const amount = document.getElementById("amount"); 7 | const money_minus = document.getElementById("money-minus"); 8 | 9 | 10 | const localStorageTransations = JSON.parse(localStorage.getItem("transations")); 11 | 12 | let transations = 13 | localStorage.getItem("transations") !== null ? localStorageTransations : []; 14 | 15 | function addTransation(e) { 16 | e.preventDefault(); 17 | if (text.value.trim() === "" || amount.value.trim() === "") { 18 | text.placeholder = "please add a text"; 19 | text.style.backgroundColor = "#ccc"; 20 | amount.placeholder = "please add amount"; 21 | amount.style.backgroundColor = "#ccc"; 22 | } else { 23 | const transation = { 24 | id: genenrateID(), 25 | text: text.value, 26 | amount: +amount.value, 27 | }; 28 | transations.push(transation); 29 | addTransationDOM(transation); 30 | updateValues(); 31 | updateLocalStorage(); 32 | text.value = ""; 33 | amount.value = ""; 34 | } 35 | } 36 | function genenrateID() { 37 | return Math.floor(Math.random() * 100000000); 38 | } 39 | 40 | function addTransationDOM(transation) { 41 | const sign = transation.amount < 0 ? "-" : "+"; 42 | const item = document.createElement("li"); 43 | item.classList.add(transation.amount < 0 ? "minus" : "plus"); 44 | item.innerHTML = `${transation.text} ${sign}${Math.abs( 45 | transation.amount 46 | )} `; 48 | list.appendChild(item); 49 | // localStorage.setItem('mostRecentScore', total); 50 | 51 | } 52 | function updateValues() { 53 | const amounts = transations.map((transation) => transation.amount); 54 | const total = amounts.reduce((acc, item) => (acc += item), 0).toFixed(2); 55 | const income = amounts 56 | .filter((item) => item > 0) 57 | .reduce((acc, item) => (acc += item), 0) 58 | .toFixed(2); 59 | const expense = ( 60 | amounts.filter((item) => item < 0).reduce((acc, item) => (acc += item), 0) * 61 | -1 62 | ).toFixed(2); 63 | 64 | balance.innerText = `₹${total}`; 65 | money_plus.innerText = `₹${income}`; 66 | money_minus.innerText = `₹${expense}`; 67 | localStorage.setItem('mostRecentScore', total); 68 | // console.log(total); 69 | 70 | } 71 | 72 | function removeTransation(id) { 73 | transations = transations.filter((transation) => transation.id !== id); 74 | updateLocalStorage(); 75 | init(); 76 | } 77 | 78 | function updateLocalStorage() { 79 | localStorage.setItem("transations", JSON.stringify(transations)); 80 | // localStorage.setItem("totalSUM",) 81 | // console.log(total) 82 | // console.log(JSON.stringify(transations)); 83 | // localStorage.setItem('mostRecentScore', total); 84 | 85 | } 86 | 87 | 88 | function init() { 89 | list.innerHTML = ""; 90 | transations.forEach(addTransationDOM); 91 | updateValues(); 92 | } 93 | init(); 94 | 95 | form.addEventListener("submit", addTransation); 96 | // localStorage.setItem('mostRecentScore', total); 97 | -------------------------------------------------------------------------------- /Hacktoberfest 2022.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Hacktoberfest 2022.pptx -------------------------------------------------------------------------------- /Instagramloginpageui/images/app store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Instagramloginpageui/images/app store.png -------------------------------------------------------------------------------- /Instagramloginpageui/images/fb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Instagramloginpageui/images/fb.png -------------------------------------------------------------------------------- /Instagramloginpageui/images/instagram logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Instagramloginpageui/images/instagram logo.png -------------------------------------------------------------------------------- /Instagramloginpageui/images/play store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/Instagramloginpageui/images/play store.png -------------------------------------------------------------------------------- /Instagramloginpageui/sign-up form.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Instagram Sign-Up-Clone 9 | 10 | 11 | 12 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /Instagramloginpageui/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | body{ 7 | background-color: #FAFAFA; 8 | } 9 | 10 | /*--------- LOGIN SECTION--------- */ 11 | .login { 12 | height: 380px; 13 | width: 347px; 14 | background-color: white; 15 | border: 0.3px solid gainsboro; 16 | margin: 3rem auto; 17 | } 18 | .login img { 19 | height: 45px; 20 | width: 170px; 21 | margin: 2rem 5.5rem; 22 | } 23 | .login .box1 { 24 | height: 38px; 25 | width: 265px; 26 | margin: 0rem 2.5rem; 27 | padding: 1rem 1rem; 28 | border-radius: 3px; 29 | color: rgb(143, 140, 140); 30 | background-color: #fafafa; 31 | outline: 0px; 32 | border: 0.3px solid gainsboro; 33 | } 34 | .login .box2 { 35 | height: 38px; 36 | width: 265px; 37 | margin: 0.5rem 2.5rem; 38 | padding: 1rem 1rem; 39 | border-radius: 3px; 40 | color: rgb(143, 140, 140); 41 | background-color: #fafafa; 42 | outline: 0px; 43 | border: 0.3px solid gainsboro; 44 | } 45 | .login .btn { 46 | height: 38px; 47 | width: 265px; 48 | margin: 0.7rem 2.5rem; 49 | color: white; 50 | border-radius: 5px; 51 | background-color: rgba(var(--d69, 0, 149, 246), 0.3); 52 | border: 0.3px solid gainsboro; 53 | } 54 | .login .btn:hover { 55 | color: white; 56 | background-color: rgb(0, 146, 236); 57 | cursor: pointer; 58 | } 59 | 60 | /*------- PARTITION SECTION------- */ 61 | .partition .left { 62 | height: 1px; 63 | width: 98px; 64 | margin: 1rem 2.5rem; 65 | background-color: rgb(202, 197, 197); 66 | } 67 | .partition .center { 68 | margin: -1.4rem 10.2rem; 69 | font-size: 13px; 70 | color: rgb(58, 57, 57); 71 | } 72 | .partition .right { 73 | height: 1px; 74 | width: 95px; 75 | margin: 0.7rem 12.5rem; 76 | background-color: rgb(202, 197, 197); 77 | } 78 | /*------- BOTTOM SECTION -----*/ 79 | .bottom img { 80 | height: 25px; 81 | width: 25px; 82 | margin: 1.3rem 5.5rem; 83 | } 84 | .bottom a { 85 | text-decoration: none; 86 | color: #2c3e66; 87 | font-family: "Noto Sans JP", sans-serif; 88 | font-size: 14px; 89 | font-weight: bold; 90 | margin: 1.45rem -5.2rem; 91 | } 92 | .bottom h4 { 93 | font-size: 11px; 94 | letter-spacing: 1px; 95 | margin: 3rem -2.7rem; 96 | cursor: pointer; 97 | font-weight: 200; 98 | font-family: "Noto Sans JP", sans-serif; 99 | } 100 | 101 | /* ---------------SIGN UP SECTION------------ */ 102 | .sign-up { 103 | height: 60px; 104 | width: 350px; 105 | background-color: white; 106 | border: 0.3px solid gainsboro; 107 | margin: -2rem auto; 108 | } 109 | .sign-up h3 { 110 | font-size: 15px; 111 | letter-spacing: -0.3px; 112 | margin: 1rem 4rem; 113 | font-weight: 400; 114 | font-family: "Noto Sans JP", sans-serif; 115 | } 116 | .sign-up a { 117 | text-decoration: none; 118 | font-size: 13px; 119 | color: #0095f6; 120 | font-weight: bolder; 121 | margin: 1.1rem -3.5rem; 122 | letter-spacing: 0.9px; 123 | font-family: "Noto Sans JP", sans-serif; 124 | } 125 | 126 | /*---------------- DOWNLOAD SECTION---------------- */ 127 | .download h3 { 128 | margin: 3.5rem 9rem; 129 | font-size: 15px; 130 | font-weight: lighter; 131 | letter-spacing: 1.2px; 132 | font-family: "Noto Sans JP", sans-serif; 133 | } 134 | .download img { 135 | height: 41px; 136 | width: 133px; 137 | cursor: pointer; 138 | } 139 | .download .app-store { 140 | margin: -2rem 0.5rem 0rem 3rem; 141 | } 142 | .download .play-store { 143 | margin: -6rem 0.7rem 0rem 0rem; 144 | } 145 | /*------------------ FOOTER SECTION ------------------*/ 146 | .footer .first-footer { 147 | font-size: 13px; 148 | margin: 2.7rem 2rem; 149 | word-spacing: 12px; 150 | color: gray; 151 | font-family: "Noto Sans JP", sans-serif; 152 | cursor: pointer; 153 | } 154 | .footer .second-footer .languages { 155 | margin: -2rem 0rem 0rem 3rem; 156 | font-size: 20px; 157 | } 158 | .footer .second-footer #option { 159 | color: rgb(100, 94, 94); 160 | color: gray; 161 | height: 30px; 162 | width: 155px; 163 | font-size: 13px; 164 | padding-left: 10px; 165 | border: 0px; 166 | outline: 0px; 167 | } 168 | .second-footer .copyright { 169 | color: gray; 170 | margin: -1.9rem 0rem 0rem 2rem; 171 | } 172 | -------------------------------------------------------------------------------- /Longest-Palindromic-Substring.py: -------------------------------------------------------------------------------- 1 | class Solution(object): 2 | def longestPalindrome(self, s): 3 | 4 | def helper(s, l, r): 5 | while l >= 0 and r < len(s) and s[l] == s[r]: 6 | l -= 1 7 | r += 1 8 | l += 1 9 | r -= 1 10 | 11 | return ((r - l) + 1, l, r) 12 | 13 | longest = left = right = 0 14 | 15 | for i in range(len(s)): 16 | for j in range(2): 17 | length, l, r = helper(s, i, i + j) 18 | if length > longest: 19 | longest = length 20 | right = r 21 | left = l 22 | 23 | return s[left : right + 1] 24 | -------------------------------------------------------------------------------- /Movie_Website/README.md: -------------------------------------------------------------------------------- 1 | # Movie_Website 2 | 3 | -------------------------------------------------------------------------------- /Python/dec_to_bin.py: -------------------------------------------------------------------------------- 1 | n=int(input("Enter a number:")) 2 | print(bin(n)) -------------------------------------------------------------------------------- /Python/fibonacci.py: -------------------------------------------------------------------------------- 1 | series_range = int(input('Uptill where you wanna print fibonacci series : ')) 2 | a = 0 3 | b = 1 4 | while a <= series_range: 5 | print(a) 6 | c = a 7 | a = b 8 | b = b+c -------------------------------------------------------------------------------- /Python/hexToDeci.py: -------------------------------------------------------------------------------- 1 | values_store = {"A": 10, "B": 11, "C": 12, "D": 13, "E": 14, "F": 15} 2 | hexadecimal = input( 3 | "Enter any Hexadecimal number that you wanna convert to Decimal: ") 4 | hexa_list = list(hexadecimal) 5 | n = len(hexa_list)-1 6 | decimal = 0 7 | for i in hexa_list: 8 | if i.isalpha(): 9 | number = int(values_store[i]) 10 | else: 11 | number = int(i) 12 | convert = number*16**n 13 | decimal = decimal+convert 14 | n = n-1 15 | print("Decimal of ", hexadecimal, " is: ", decimal) -------------------------------------------------------------------------------- /Python/reverse.py: -------------------------------------------------------------------------------- 1 | number = int(input("Enter the integer number: ")) 2 | 3 | revs_number = 0 4 | 5 | 6 | while (number > 0): 7 | remainder = number % 10 8 | revs_number = (revs_number * 10) + remainder 9 | number = number // 10 10 | 11 | print("The reverse number is : {}".format(revs_number)) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Excluded Hacktoberfest_2022 2 | 3 | This repository is excluded from Hacktoberfest_2022 4 | 5 | ![ Hacktoberfest_2022](https://user-images.githubusercontent.com/60610128/193233241-0ed224b3-d193-4fd0-9ecc-8420621c0029.png) 6 | 7 | ## Rules to contribute to this Repo 8 | 9 | - Use any programming language. 10 | - C, C++, JAVA, Python, Data Structure and Algorithms, HTML, CSS, Android Projects, Web Developement, AI etc. 11 | - Anything valuable. 12 | 13 | ## Steps for Contributing 14 | 15 | ## Getting started 16 | 17 | - Fork this repository (Click the Fork button in the top right of this page, click your Profile Image) 18 | - Clone your fork down to your local machine 19 | 20 | ```markdown 21 | git clone https://github.com/durgesh2001/Hacktoberfest_2022.git 22 | ``` 23 | 24 | - Create a branch 25 | 26 | ```markdown 27 | git checkout -b branch-name 28 | ``` 29 | 30 | - Make your changes (choose from any task below) 31 | - Commit and push 32 | 33 | ```markdown 34 | git add . 35 | git commit -m 'Commit message' 36 | git push origin branch-name 37 | ``` 38 | 39 | - Create a new pull request from your forked repository (Click the `New Pull Request` button located at the top of your repo) 40 | - Wait for your PR review and merge approval! 41 | - **Star this repository** if you had fun! 42 | -------------------------------------------------------------------------------- /String Manipulation/PalindromeString.java: -------------------------------------------------------------------------------- 1 | /* Given a string and check whether its palindrome or not. A palindrome string is a string which is same even after reverseing the string. 2 | This code is uses non-case sensitive comparing which means capital and small letter will be treated same. 3 | Examples : 4 | Input: - Enter the String: 5 | - MaaM 6 | 7 | Output: a palindrome string 8 | */ 9 | 10 | import java.util.Scanner; 11 | class PalindromeString { 12 | public static void main(String args[]) { 13 | Scanner sc = new Scanner(System.in); 14 | String s1, s2 = ""; 15 | System.out.println("Enter a string:"); 16 | s1 = sc.nextLine(); 17 | int l = s1.length(); 18 | for (int i = 0; i < l; i++) { 19 | char ch = s1.charAt(i); 20 | s2 = ch + s2; 21 | } 22 | if (s1.equalsIgnoreCase(s2) == true) { 23 | System.out.println("A palindrome string"); 24 | } else { 25 | System.out.println("Not a palindrome string"); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /String Manipulation/ReverseString.java: -------------------------------------------------------------------------------- 1 | /* Given a string and reverse each word at the smae position without altering sequence of words. 2 | Examples : 3 | Input: - Enter the String: 4 | - This is a test string 5 | 6 | Output: sihT si a tset gnirts 7 | */ 8 | 9 | import java.util.Scanner; 10 | class ReverseString { 11 | public static void main(String args[]) { 12 | Scanner sc = new Scanner(System.in); 13 | System.out.println("Enter a string"); 14 | String s = sc.nextLine(); 15 | s = s + " "; 16 | int p = 0, i, j, n; 17 | char ch, ch1; 18 | String rev = ""; 19 | String rev1 = ""; 20 | int l = s.length(); 21 | for (i = 0; i < l; i++) { 22 | ch = s.charAt(i); 23 | if (ch == ' ') { 24 | rev = s.substring(p, i + 1); 25 | StringBuffer k = new StringBuffer(rev); 26 | rev1 = rev1 + k.reverse(); 27 | p = i + 1; 28 | } 29 | } 30 | System.out.println("Reversed string -" + rev1); 31 | System.out.println("Original string - " + s); 32 | } 33 | } -------------------------------------------------------------------------------- /String Manipulation/StringCaseChange.java: -------------------------------------------------------------------------------- 1 | /* Given a string and change the Case of each character to its opposite like Lower case becomes Upper case and vise-versa. 2 | Examples : 3 | Input: - Enter the String: 4 | - CaSe ChanGe 5 | 6 | Output: cAsE cHANgE 7 | */ 8 | 9 | import java.io.*; 10 | class StringCaseChange { 11 | public static void main(String args[]) throws IOException { 12 | int i, l; 13 | char ch; 14 | String str1 = " "; 15 | InputStreamReader reader = new InputStreamReader(System.in); 16 | BufferedReader br = new BufferedReader(reader); 17 | System.out.println("Enter a string:"); 18 | String str = br.readLine(); 19 | l = str.length(); 20 | for (i = 0; i < l; i++) { 21 | ch = str.charAt(i); 22 | if (ch >= 'A' && ch <= 'Z') { 23 | ch += 32; 24 | } else if (ch >= 'a' && ch <= 'z') { 25 | ch -= 32; 26 | } 27 | str1 = str1 + ch; 28 | } 29 | System.out.println("The converted string is - " + str1); 30 | } 31 | } -------------------------------------------------------------------------------- /String Manipulation/WordType.java: -------------------------------------------------------------------------------- 1 | /* Given a string and count size of smallest and largest word in sentence. Display them as well. 2 | Examples : 3 | Input: - Enter the String: 4 | - This is a test string 5 | 6 | Output: Largest word - string 7 | Frequency of word - 6 8 | Smallest word - a 9 | Frequency of word - 1 10 | */ 11 | 12 | import java.util.Scanner; 13 | class WordType { 14 | public static void main(String args[]) { 15 | Scanner sc = new Scanner(System.in); 16 | System.out.println("Enter a String"); 17 | String s1 = sc.nextLine(); 18 | s1 = s1 + " "; 19 | String s2 = "", s3 = "", s4 = ""; 20 | int i, l, max = 0, n = 0, p = 0; 21 | l = s1.length(); 22 | int min = l; 23 | for (i = 0; i < l; i++) { 24 | char ch = s1.charAt(i); 25 | if (ch == ' ') { 26 | s2 = s1.substring(p, i); 27 | System.out.println(s2); 28 | n = s2.length(); 29 | p = i + 1; 30 | System.out.println(s4); 31 | } 32 | if (n > max) { 33 | s3 = s2; 34 | max = n; 35 | } 36 | if (n < min) { 37 | s4 = s2; 38 | min = n; 39 | } 40 | } 41 | System.out.println("Largest word=" + s3); 42 | System.out.println("Frequency of word=" + max); 43 | System.out.println("Smallest word=" + s4); 44 | System.out.println("Frequency of word=" + min); 45 | } 46 | } -------------------------------------------------------------------------------- /TicTacToe/excited.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/TicTacToe/excited.gif -------------------------------------------------------------------------------- /TicTacToe/gameover.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/TicTacToe/gameover.mp3 -------------------------------------------------------------------------------- /TicTacToe/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tic Tac Toe 8 | 9 | 10 | 11 | 16 | 17 |
    18 |
    19 |
    20 |
    21 |
    22 |
    23 |
    24 |
    25 |
    26 |
    27 |
    28 |
    29 |
    30 |
    31 |

    Welcome to Tic Tac Toe

    32 |
    33 | Turn for X 34 | 35 |
    36 |
    37 | 38 |
    39 |
    40 |
    41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /TicTacToe/music.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/TicTacToe/music.mp3 -------------------------------------------------------------------------------- /TicTacToe/script.js: -------------------------------------------------------------------------------- 1 | console.log("Welcome to Tic Tac Toe") 2 | let music = new Audio("music.mp3") 3 | let audioTurn = new Audio("ting.mp3") 4 | let gameover = new Audio("gameover.mp3") 5 | let turn = "X" 6 | let isgameover = false; 7 | 8 | // Function to change the turn 9 | const changeTurn = ()=>{ 10 | return turn === "X"? "0": "X" 11 | } 12 | 13 | // Function to check for a win 14 | const checkWin = ()=>{ 15 | let boxtext = document.getElementsByClassName('boxtext'); 16 | let wins = [ 17 | [0, 1, 2, 5, 5, 0], 18 | [3, 4, 5, 5, 15, 0], 19 | [6, 7, 8, 5, 25, 0], 20 | [0, 3, 6, -5, 15, 90], 21 | [1, 4, 7, 5, 15, 90], 22 | [2, 5, 8, 15, 15, 90], 23 | [0, 4, 8, 5, 15, 45], 24 | [2, 4, 6, 5, 15, 135], 25 | ] 26 | wins.forEach(e =>{ 27 | if((boxtext[e[0]].innerText === boxtext[e[1]].innerText) && (boxtext[e[2]].innerText === boxtext[e[1]].innerText) && (boxtext[e[0]].innerText !== "") ){ 28 | document.querySelector('.info').innerText = boxtext[e[0]].innerText + " Won" 29 | isgameover = true 30 | document.querySelector('.imgbox').getElementsByTagName('img')[0].style.width = "200px"; 31 | document.querySelector(".line").style.transform = `translate(${e[3]}vw, ${e[4]}vw) rotate(${e[5]}deg)` 32 | document.querySelector(".line").style.width = "20vw"; 33 | } 34 | }) 35 | } 36 | 37 | // Game Logic 38 | // music.play() 39 | let boxes = document.getElementsByClassName("box"); 40 | Array.from(boxes).forEach(element =>{ 41 | let boxtext = element.querySelector('.boxtext'); 42 | element.addEventListener('click', ()=>{ 43 | if(boxtext.innerText === ''){ 44 | boxtext.innerText = turn; 45 | turn = changeTurn(); 46 | audioTurn.play(); 47 | checkWin(); 48 | if (!isgameover){ 49 | document.getElementsByClassName("info")[0].innerText = "Turn for " + turn; 50 | } 51 | } 52 | }) 53 | }) 54 | 55 | // Add onclick listener to reset button 56 | reset.addEventListener('click', ()=>{ 57 | let boxtexts = document.querySelectorAll('.boxtext'); 58 | Array.from(boxtexts).forEach(element => { 59 | element.innerText = "" 60 | }); 61 | turn = "X"; 62 | isgameover = false 63 | document.querySelector(".line").style.width = "0vw"; 64 | document.getElementsByClassName("info")[0].innerText = "Turn for " + turn; 65 | document.querySelector('.imgbox').getElementsByTagName('img')[0].style.width = "0px" 66 | }) 67 | 68 | -------------------------------------------------------------------------------- /TicTacToe/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Baloo+Bhaina+2&family=Roboto&display=swap'); 2 | *{ 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | nav{ 8 | background-color: rgb(123, 54, 123); 9 | color: white; 10 | height: 65px; 11 | font-size: 27px; 12 | display: flex; 13 | align-items: center; 14 | padding: 0 12px; 15 | font-family: 'Roboto', sans-serif; 16 | } 17 | 18 | nav ul{ 19 | list-style-type: none; 20 | } 21 | 22 | .gameContainer{ 23 | display: flex; 24 | justify-content: center; 25 | margin-top: 50px; 26 | } 27 | 28 | .container{ 29 | display: grid; 30 | grid-template-rows: repeat(3, 10vw); 31 | grid-template-columns: repeat(3, 10vw); 32 | font-family: 'Roboto', sans-serif; 33 | position: relative; 34 | } 35 | 36 | .box{ 37 | border: 2px solid black; 38 | font-size: 8vw; 39 | cursor: pointer; 40 | display: flex; 41 | justify-content: center; 42 | align-items: center; 43 | } 44 | 45 | .box:hover{ 46 | background-color: rgb(242, 234, 250); 47 | } 48 | 49 | .info { 50 | font-size: 28px; 51 | } 52 | 53 | .gameInfo{ 54 | padding: 0 34px; 55 | font-family: 'Baloo Bhaina 2', cursive; 56 | } 57 | 58 | .gameInfo h1{ 59 | font-size: 2.5rem; 60 | } 61 | 62 | .imgbox img{ 63 | width: 0; 64 | transition: width 1s ease-in-out; 65 | } 66 | 67 | .br-0{ 68 | border-right: 0; 69 | } 70 | 71 | .bl-0{ 72 | border-left: 0; 73 | } 74 | 75 | .bt-0{ 76 | border-top: 0; 77 | } 78 | 79 | .bb-0{ 80 | border-bottom: 0; 81 | } 82 | 83 | #reset { 84 | margin: 0 33px; 85 | padding: 3px 20px; 86 | background: #21bece; 87 | border-radius: 85px; 88 | cursor: pointer; 89 | font-family: 'Baloo Bhaina 2'; 90 | font-size: 15px; 91 | font-weight: bolder; 92 | } 93 | 94 | .line{ 95 | background-color: black; 96 | height: 3px; 97 | width: 0; 98 | position: absolute; 99 | background-color: #911d91; 100 | transition: width 1s ease-in-out; 101 | } 102 | 103 | @media screen and (max-width: 950px) 104 | { 105 | .gameContainer{ 106 | flex-wrap: wrap; 107 | } 108 | .gameInfo{ 109 | margin-top: 34px; 110 | } 111 | .gameInfo h1{ 112 | font-size: 1.5rem; 113 | } 114 | .container { 115 | grid-template-rows: repeat(3, 20vw); 116 | grid-template-columns: repeat(3, 20vw); 117 | } 118 | } -------------------------------------------------------------------------------- /TicTacToe/ting.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/TicTacToe/ting.mp3 -------------------------------------------------------------------------------- /Traval_Landing/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Travel Landing Page 9 | 10 | 11 |
    12 |
    13 | 14 |
    15 |
    16 | 17 | 18 | 19 |
    20 |
    21 |

    Never Stop To

    22 |

    Exploring The World

    23 |

    “Jobs fill your pockets, adventures fill your soul. 24 | Remember that happiness is a way of travel, not a destination. 25 | The world is a book and those who do not travel read only one page. 26 | Travel is the only thing you buy that makes you richer.”

    27 | Explore 28 |
    29 | 34 |
    35 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Traval_Landing/script.js: -------------------------------------------------------------------------------- 1 | const menuToggle = document.querySelector('.toggle'); 2 | const showcase = document.querySelector('.showcase'); 3 | 4 | menuToggle.addEventListener('click', () => { 5 | menuToggle.classList.toggle('active'); 6 | showcase.classList.toggle('active'); 7 | }) -------------------------------------------------------------------------------- /Traval_Landing/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap'); 2 | * 3 | { 4 | margin: 0; 5 | padding: 0; 6 | box-sizing: border-box; 7 | font-family: 'Poppins', sans-serif; 8 | } 9 | header 10 | { 11 | position: absolute; 12 | top: 0; 13 | left: 0; 14 | width: 100%; 15 | padding: 40px 100px; 16 | z-index: 1000; 17 | display: flex; 18 | justify-content: space-between; 19 | align-items: center; 20 | } 21 | header .logo 22 | { 23 | color: #fff; 24 | text-transform: uppercase; 25 | cursor: pointer; 26 | } 27 | .toggle 28 | { 29 | position: relative; 30 | width: 60px; 31 | height: 60px; 32 | background: url(https://i.ibb.co/HrfVRcx/menu.png); 33 | background-repeat: no-repeat; 34 | background-size: 30px; 35 | background-position: center; 36 | cursor: pointer; 37 | } 38 | .toggle.active 39 | { 40 | background: url(https://i.ibb.co/rt3HybH/close.png); 41 | background-repeat: no-repeat; 42 | background-size: 25px; 43 | background-position: center; 44 | cursor: pointer; 45 | } 46 | .showcase 47 | { 48 | position: absolute; 49 | right: 0; 50 | width: 100%; 51 | min-height: 100vh; 52 | padding: 100px; 53 | display: flex; 54 | justify-content: space-between; 55 | align-items: center; 56 | background: #111; 57 | transition: 0.5s; 58 | z-index: 2; 59 | } 60 | .showcase.active 61 | { 62 | right: 300px; 63 | } 64 | 65 | .showcase .hide 66 | { 67 | position: absolute; 68 | top: 0; 69 | left: 0; 70 | width: 100%; 71 | height: 100%; 72 | object-fit: cover; 73 | opacity: 0.8; 74 | } 75 | .overlay 76 | { 77 | position: absolute; 78 | top: 0; 79 | left: 0; 80 | width: 100%; 81 | height: 100%; 82 | background: #03a8f448; 83 | mix-blend-mode: overlay; 84 | } 85 | .text 86 | { 87 | position: relative; 88 | z-index: 10; 89 | } 90 | 91 | .text h2 92 | { 93 | font-size: 5em; 94 | font-weight: 800; 95 | color: #fff; 96 | line-height: 1em; 97 | text-transform: uppercase; 98 | } 99 | .text h3 100 | { 101 | font-size: 4em; 102 | font-weight: 700; 103 | color: #fff; 104 | line-height: 1em; 105 | text-transform: uppercase; 106 | } 107 | .text p 108 | { 109 | font-size: 1.1em; 110 | color: #fff; 111 | margin: 20px 0; 112 | font-weight: 400; 113 | max-width: 700px; 114 | } 115 | .text a 116 | { 117 | display: inline-block; 118 | font-size: 1em; 119 | background: #fff; 120 | padding: 10px 30px; 121 | text-transform: uppercase; 122 | text-decoration: none; 123 | font-weight: 500; 124 | margin-top: 10px; 125 | color: #111; 126 | letter-spacing: 2px; 127 | transition: 0.2s; 128 | } 129 | .text a:hover 130 | { 131 | letter-spacing: 6px; 132 | } 133 | .social 134 | { 135 | position: absolute; 136 | z-index: 10; 137 | bottom: 60px; 138 | display: flex; 139 | justify-content: center; 140 | align-items: center; 141 | } 142 | .social li 143 | { 144 | list-style: none; 145 | 146 | } 147 | .social li a 148 | { 149 | display: inline-block; 150 | margin-right: 20px; 151 | filter: invert(1); 152 | transform: scale(0.5); 153 | transition: 0.5s; 154 | } 155 | .social li a:hover 156 | { 157 | transform: scale(0.5) translateY(-15px); 158 | } 159 | .menu 160 | { 161 | position: absolute; 162 | top: 0; 163 | right: 0; 164 | width: 300px; 165 | height: 100%; 166 | display: flex; 167 | justify-content: center; 168 | align-items: center; 169 | } 170 | .menu ul 171 | { 172 | position: relative; 173 | } 174 | .menu ul li 175 | { 176 | list-style: none; 177 | } 178 | .menu ul li a 179 | { 180 | text-decoration: none; 181 | font-size: 24px; 182 | color: #111; 183 | } 184 | .menu ul li a:hover 185 | { 186 | color: #03a9f4; 187 | } 188 | 189 | @media (max-width: 991px) 190 | { 191 | .showcase, 192 | .showcase header 193 | { 194 | padding: 40px; 195 | } 196 | .text h2 197 | { 198 | font-size: 3em; 199 | } 200 | .text h3 201 | { 202 | font-size: 2em; 203 | } 204 | } -------------------------------------------------------------------------------- /business-card/Live-Wave-Background-1/Live-Wave-Background/Informations.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/business-card/Live-Wave-Background-1/Live-Wave-Background/Informations.txt -------------------------------------------------------------------------------- /business-card/README.md: -------------------------------------------------------------------------------- 1 | https://uday03meh.netlify.app/ 2 | https://uday03meh.vercel.app/ 3 | -------------------------------------------------------------------------------- /business-card/Snow-Animation-Background/Snow-Animation-Background/Informations.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/business-card/Snow-Animation-Background/Snow-Animation-Background/Informations.txt -------------------------------------------------------------------------------- /business-card/images/per.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/business-card/images/per.png -------------------------------------------------------------------------------- /business-card/images/pfp-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/business-card/images/pfp-2.jpg -------------------------------------------------------------------------------- /business-card/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
    7 |
    8 | 9 |
    10 |

    Uday Mehtani

    11 |

    Frontend Developer

    12 |

    Delhi, India

    13 |
    14 |
    15 |
    16 | 17 |
    18 |
    19 |
    20 |
    21 |
    22 |
    23 |
    24 |
    25 |
    26 | 27 |
    28 |
    29 |
    30 |
    31 |
    32 |
    33 |
    34 |
    35 |
    36 | 37 |
    38 |
    39 |
    40 |
    41 |
    42 |
    43 |
    44 |
    45 |
    46 | 47 |
    48 |
    49 |
    50 |
    51 |
    52 |
    53 |
    54 |
    55 |
    56 | 57 |
    58 |
    59 |
    60 |
    61 |
    62 |
    63 |
    64 |
    65 |
    66 | 67 |
    68 |
    69 |
    70 |
    71 |
    72 |
    73 |
    74 |
    75 |
    76 | 77 |
    78 |
    79 |
    80 |
    81 |
    82 |
    83 |
    84 |
    85 |
    86 | 87 |
    88 |
    89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /business-card/profile picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/business-card/profile picture.png -------------------------------------------------------------------------------- /business-card/script.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('mousemove', (e) => { 2 | const sqrs = document.querySelectorAll('.item'); 3 | 4 | const mouseX = e.pageX; 5 | const mouseY = e.pageY; 6 | 7 | sqrs.forEach(sqr => { 8 | const sqrX = sqr.offsetLeft + 20; 9 | const sqrY = sqr.offsetTop + 20; 10 | 11 | const diffX = mouseX - sqrX; 12 | const diffY = mouseY - sqrY; 13 | 14 | const radians = Math.atan2(diffY, diffX); 15 | 16 | const angle = radians * 180 / Math.PI; 17 | 18 | sqr.style.transform = `rotate(${angle}deg)`; 19 | }) 20 | 21 | }) -------------------------------------------------------------------------------- /business-card/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 20px; 3 | /* 4 | Challenge: 5 | Find a web safe font you like, and add it 6 | to your card. 7 | */ 8 | background: url("Bubble-Background.svg"); 9 | background-size: cover; 10 | font-family: Verdana, Geneva, Tahoma, sans-serif; 11 | } 12 | 13 | .avatar { 14 | width: 120px; 15 | height: 120px; 16 | margin-top:auto; 17 | margin-bottom:auto; 18 | border-radius:80px; 19 | } 20 | 21 | .card { 22 | width: 400px; 23 | margin: 0 auto; 24 | border-radius:15px; 25 | padding: 20px; 26 | display: flex; 27 | justify-content: space-around; 28 | /* text-align: center; */ 29 | background: rgb(238,174,202); 30 | background: radial-gradient(circle, rgba(238,174,202,1) 0%, rgba(148,187,233,1) 100%); 31 | font-size:17px; 32 | color: #003049; 33 | border-bottom: 6px solid #fec89a; 34 | 35 | /* 36 | Challenge: 37 | Find a color palette you like on Coolors.co 38 | and use it in your business card. 39 | */ 40 | } 41 | 42 | .border-blue { 43 | border: 1px dotted blue; 44 | } 45 | h4{ 46 | margin-top:0px; 47 | } 48 | p{ 49 | margin-bottom:10px 50 | } 51 | /* 52 | Stretch goals: 53 | Find other ways you can personalize 54 | the design of your business card, e.g.: 55 | - change the border(s) 56 | - add border radius 57 | - shuffle the layout 58 | - shadows 🤯 59 | - hover effects 🤯🤯 60 | - animations 🤯🤯🤯 61 | */ 62 | 63 | /* 64 | Final challenge: 65 | Download the code to your local computer and place it 66 | in a folder called "business-card" 67 | */ 68 | .card:hover{ 69 | background: linear-gradient(90deg, #FDBB2D 0%, #22C1C3 100%); 70 | color:#0f0f0f; 71 | } 72 | 73 | html { 74 | box-sizing: border-box; 75 | cursor: url('https://i.ibb.co/6bycCv7/Ellipse-4.png'), default; 76 | } 77 | 78 | *, *:before, *:after { 79 | box-sizing: inherit; 80 | } 81 | 82 | html, body { 83 | height: 100%; 84 | width: 100%; 85 | margin: 0; 86 | padding: 0; 87 | background-color: #030302; 88 | } 89 | 90 | body { 91 | display: flex; 92 | justify-content: center; 93 | align-items: center; 94 | } 95 | 96 | .wrapper { 97 | display: grid; 98 | grid-template-columns: repeat(9, 40px); 99 | grid-template-rows: repeat(7, 40px); 100 | grid-gap: 1.5rem; 101 | margin-top:40px; 102 | 103 | } 104 | .item { background:url("profile picture.png"); 105 | background-size:cover; 106 | background-repeat: no-repeat; 107 | } 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /colorGenerator/app.js: -------------------------------------------------------------------------------- 1 | const simple = document.getElementById("simple"); 2 | const hex_value = document.getElementById("hex"); 3 | const button = document.getElementById("btn"); 4 | const color = document.querySelector(".color"); 5 | 6 | const marker = document.querySelector("#marker"); 7 | const item = document.querySelectorAll("a"); 8 | 9 | 10 | 11 | colors = ["Red", "Green", "Blue"]; 12 | hex = [1, 2, 3, 4, 5, 6, 7, 8, 9, "a", "b", "c", "d", "e", "f"]; 13 | 14 | //Menu slider 15 | 16 | document.addEventListener("DOMContentLoaded", ()=>{ 17 | marker.style.left = item[0].offsetLeft + "px"; 18 | marker.style.width = item[0].offsetWidth + "px"; 19 | }) 20 | window.addEventListener("resize", indicator2) 21 | 22 | 23 | function indicator2(){ 24 | item.forEach(link => { 25 | if(link.classList.contains("active")){ 26 | marker.style.left = link.offsetLeft + "px"; 27 | marker.style.width = link.offsetWidth + "px"; 28 | } 29 | }) 30 | } 31 | function indicator(e){ 32 | e.target.classList.add("active"); 33 | marker.style.left = e.target.offsetLeft + "px"; 34 | marker.style.width = e.target.offsetWidth + "px"; 35 | } 36 | 37 | item.forEach((link) => { 38 | link.addEventListener("click", (e) =>{ 39 | item.forEach(link => { 40 | if(link.classList.contains("active")){ 41 | link.classList.remove("active") 42 | } 43 | }) 44 | indicator(e); 45 | }) 46 | }) 47 | 48 | 49 | 50 | 51 | //For simple colors 52 | function click(){ 53 | button.addEventListener("click", ()=>{ 54 | let randomNumber = Math.floor(Math.random() * colors.length); 55 | document.body.style.backgroundColor = colors[randomNumber]; 56 | 57 | 58 | color.textContent = colors[randomNumber] 59 | 60 | }) 61 | } 62 | click(); 63 | 64 | //For Hex Colors 65 | hex_value.addEventListener("click", ()=>{ 66 | document.body.style.background = "white"; 67 | color.textContent = "#ffffff"; 68 | 69 | clickEvent(); 70 | 71 | }); 72 | 73 | function clickEvent(){ 74 | button.addEventListener("click", ()=>{ 75 | let values = "#"; 76 | for(i= 0; i<6; i++){ 77 | let randomNumber = Math.floor(Math.random()* hex.length); 78 | values += hex[randomNumber] 79 | } 80 | color.textContent = values; 81 | document.body.style.backgroundColor = values; 82 | }) 83 | }; 84 | 85 | simple.addEventListener("click", ()=>{ 86 | document.body.style.backgroundColor = "#ffffff"; 87 | color.textContent = "White" 88 | click(); 89 | }) 90 | -------------------------------------------------------------------------------- /colorGenerator/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Color Picker 7 | 8 | 9 | 10 | 21 |
    22 |
    23 |
    24 |
    25 |

    Background-Color :

    White 26 |
    27 |
    28 | 29 |
    30 |
    31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /colorGenerator/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | li { 8 | list-style: none; 9 | } 10 | 11 | a { 12 | text-decoration: none; 13 | font-size: 1rem; 14 | } 15 | nav{ 16 | box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.6); 17 | background-color: #ffffff; 18 | } 19 | .wrapper { 20 | display: flex; 21 | max-width: 80%; 22 | margin: 0 auto; 23 | padding:.9em .1em; 24 | justify-content: space-between; 25 | align-items: center; 26 | letter-spacing: 1.5px; 27 | 28 | } 29 | 30 | .logo { 31 | color: rgb(17, 147, 199); 32 | } 33 | ul { 34 | position: relative; 35 | display: flex; 36 | justify-content: flex-end; 37 | } 38 | #marker { 39 | position: absolute; 40 | width: 0; 41 | bottom:0; 42 | left: 0; 43 | height: 5px; 44 | background-color: rgb(17, 147, 199); 45 | bottom: -4px; 46 | transition: all .3s linear; 47 | border-radius: 4px; 48 | } 49 | 50 | a { 51 | margin: 0 0.6rem; 52 | padding: 0.3em; 53 | color: black; 54 | font-size: 1.5rem; 55 | font-weight: 800; 56 | 57 | } 58 | main { 59 | height: 80vh; 60 | display: flex; 61 | justify-content: center; 62 | align-items: center; 63 | text-align: center; 64 | font-size: 1.8rem; 65 | } 66 | 67 | .container { 68 | margin: auto; 69 | background-color: black; 70 | color: white; 71 | margin-bottom: 0.8em; 72 | border-radius: 10px; 73 | box-shadow: 0 9px 9px rgba(0, 0, 0, 0.5); 74 | padding: .2em 0; 75 | max-width: 900px; 76 | } 77 | .container h2 { 78 | font-size: 3rem; 79 | padding: 10px; 80 | } 81 | .wrapper2{ 82 | width: 80%; 83 | margin: 0 auto; 84 | } 85 | .color { 86 | margin-left: 1.5em 0; 87 | letter-spacing: 3px; 88 | color: blueviolet; 89 | font-size: 3rem; 90 | font-weight: 900; 91 | letter-spacing: 9px; 92 | } 93 | #btn { 94 | font-size: 1.6rem; 95 | padding: 0.3em 0.8em; 96 | background: transparent; 97 | border-radius: 6px; 98 | border: transparent; 99 | box-shadow: 0 4px 7px rgba(0, 0, 0, 0.6); 100 | outline: none; 101 | } 102 | 103 | @media (max-width: 700px) { 104 | .wrapper{ 105 | letter-spacing: normal; 106 | align-items: center; 107 | font-size: .8rem; 108 | } 109 | .wrapper li a{ 110 | font-size: 1.2rem; 111 | } 112 | .wrapper2{ 113 | font-size: 0.2rem; 114 | padding: 0; 115 | } 116 | 117 | } 118 | @media (max-width:460px){ 119 | .wrapper{ 120 | width: 100%; 121 | } 122 | .wrapper li a{ 123 | font-size: .75rem; 124 | } 125 | .wrapper2{ 126 | font-size: 0.2rem; 127 | padding: 0; 128 | } 129 | .wrapper2 .container h2, .color{ 130 | font-size: 1.5rem; 131 | letter-spacing: 1.5px; 132 | } 133 | 134 | } 135 | @media (max-width: 352px){ 136 | ul{ 137 | margin-right: 0; 138 | } 139 | .wrapper li a{ 140 | font-size: 0.72rem; 141 | margin: 0.2em; 142 | } 143 | } 144 | 145 | -------------------------------------------------------------------------------- /heartshape.py: -------------------------------------------------------------------------------- 1 | print('\n'.join 2 | ([''.join 3 | ([('HappyBirthday'[(x-y)%13] 4 | if((x*0.04)**2+(y*0.1)**2-1)**3-(x*0.04)**2*(y*0.1)**3<=0 else' ') 5 | for x in range(-30,30)]) 6 | for y in range(15,-15,-1)])) -------------------------------------------------------------------------------- /lap1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/lap1.jpg -------------------------------------------------------------------------------- /loginadmin/build/classes/com/college/dao/Database.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/build/classes/com/college/dao/Database.class -------------------------------------------------------------------------------- /loginadmin/build/classes/com/college/dao/package-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/build/classes/com/college/dao/package-info.class -------------------------------------------------------------------------------- /loginadmin/build/classes/com/college/entity/collegeentity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/build/classes/com/college/entity/collegeentity.class -------------------------------------------------------------------------------- /loginadmin/build/classes/com/college/entity/package-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/build/classes/com/college/entity/package-info.class -------------------------------------------------------------------------------- /loginadmin/build/classes/loginadmin/package-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/build/classes/loginadmin/package-info.class -------------------------------------------------------------------------------- /loginadmin/build/classes/loginadmin/userprocess.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/build/classes/loginadmin/userprocess.class -------------------------------------------------------------------------------- /loginadmin/src/main/java/com/college/dao/Database.java: -------------------------------------------------------------------------------- 1 | package com.college.dao; 2 | 3 | public class Database { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /loginadmin/src/main/java/com/college/dao/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | /** 5 | * @author Ritam Kumarb Kundu 6 | * 7 | */ 8 | package com.college.dao; -------------------------------------------------------------------------------- /loginadmin/src/main/java/com/college/entity/collegeentity.java: -------------------------------------------------------------------------------- 1 | package com.college.entity; 2 | 3 | public class collegeentity { 4 | String fname; 5 | String lname ; 6 | String roll; 7 | String course; 8 | String year; 9 | public collegeentity(String fname, String lname, String roll, String course, String year) 10 | { 11 | 12 | } 13 | public String getFname() { 14 | return fname; 15 | } 16 | public void setFname(String fname) { 17 | this.fname = fname; 18 | } 19 | public String getLname() { 20 | return lname; 21 | } 22 | public void setLname(String lname) { 23 | this.lname = lname; 24 | } 25 | public String getRoll() { 26 | return roll; 27 | } 28 | public void setRoll(String roll) { 29 | this.roll = roll; 30 | } 31 | public String getCourse() { 32 | return course; 33 | } 34 | public void setCourse(String course) { 35 | this.course = course; 36 | } 37 | public String getYear() { 38 | return year; 39 | } 40 | public void setYear(String year) { 41 | this.year = year; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /loginadmin/src/main/java/com/college/entity/package-info.java: -------------------------------------------------------------------------------- 1 | package com.college.entity; -------------------------------------------------------------------------------- /loginadmin/src/main/java/loginadmin/package-info.java: -------------------------------------------------------------------------------- 1 | package loginadmin; -------------------------------------------------------------------------------- /loginadmin/src/main/java/loginadmin/userprocess.java: -------------------------------------------------------------------------------- 1 | package loginadmin; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | 6 | import javax.servlet.http.HttpServlet; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | /** 11 | * Servlet implementation class userprocess 12 | */ 13 | public class userprocess extends HttpServlet { 14 | private static final long serialVersionUID = 1L; 15 | 16 | /** 17 | * @see HttpServlet#HttpServlet() 18 | */ 19 | public userprocess() { 20 | super(); 21 | // TODO Auto-generated constructor stub 22 | } 23 | 24 | /** 25 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) 26 | */ 27 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 28 | // TODO Auto-generated method stub 29 | response.getWriter().append("Served at: ").append(request.getContextPath()); 30 | } 31 | 32 | /** 33 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) 34 | */ 35 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 36 | // TODO Auto-generated method stub 37 | doGet(request, response); 38 | 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/AdminLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/src/main/webapp/AdminLogo.png -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/StudentLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/src/main/webapp/StudentLogo.png -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/TeacherLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/src/main/webapp/TeacherLogo.png -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/WEB-INF/lib/jakarta-servlet-api-4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/src/main/webapp/WEB-INF/lib/jakarta-servlet-api-4.jar -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/WEB-INF/lib/jsp-api.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/src/main/webapp/WEB-INF/lib/jsp-api.jar -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/WEB-INF/lib/jstl-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/src/main/webapp/WEB-INF/lib/jstl-1.2.jar -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.30.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.30.jar -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/WEB-INF/lib/servlet-api-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/src/main/webapp/WEB-INF/lib/servlet-api-2.5.jar -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | loginadmin 4 | 5 | index.html 6 | index.jsp 7 | index.htm 8 | default.html 9 | default.jsp 10 | default.htm 11 | 12 | -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/adminlogin.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Administrator Login 8 | 9 | 10 | 11 |
    12 |

    Admin Login

    13 |
    14 |
    15 | 16 | 17 | 18 | 19 | 20 |
    21 |
    22 | 23 | 24 | 25 |
    26 | 27 | Forgot Password? 28 | 29 | 30 |
    31 | 32 | Remember me 33 |
    34 |
    35 |
    36 | 37 | -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/chooseuser.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Choose Operator 11 | 12 | 13 | 14 | 15 | 16 | 17 |
    18 |
    19 |

    Who are you

    20 |
    21 | 22 |
    23 |
    24 | Admin 25 | 26 |
    27 |
    28 | Student 29 |
    30 |
    31 | Teacher 32 |
    33 |
    34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/delete.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@page import="java.sql.*" %> 4 | <% 5 | String redirectUrl = "adminstudent.jsp"; 6 | String roll = request.getParameter("roll"); 7 | final String url="jdbc:mysql://localhost/data"; 8 | final String user="root"; 9 | final String pass=""; 10 | //this code is to register the mysql connector 11 | Class.forName("com.mysql.cj.jdbc.Driver"); 12 | //this code is to establish the connection 13 | Connection conn=DriverManager.getConnection(url,user,pass); 14 | Statement st = conn.createStatement(); 15 | st.executeUpdate("delete from student_details where roll='"+roll+"'"); 16 | response.sendRedirect(redirectUrl); 17 | %> -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/deletef.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@page import="java.sql.*" %> 4 | <% 5 | String redirectUrl = "adminfaculty.jsp"; 6 | String tid = request.getParameter("tid"); 7 | final String url="jdbc:mysql://localhost/data"; 8 | final String user="root"; 9 | final String pass=""; 10 | //this code is to register the mysql connector 11 | Class.forName("com.mysql.cj.jdbc.Driver"); 12 | //this code is to establish the connection 13 | Connection conn=DriverManager.getConnection(url,user,pass); 14 | Statement st = conn.createStatement(); 15 | st.executeUpdate("delete from faculty_details where tid='"+tid+"'"); 16 | response.sendRedirect(redirectUrl); 17 | %> -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/facultylogin.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Teacher Login 8 | 9 | 10 | 11 | 12 |
    13 |

    Teacher Login

    14 |
    15 |
    16 | 17 | 18 | 19 |
    20 |
    21 | 22 | 23 | 24 |
    25 |
    Forgot Password?
    26 | 27 |
    28 | Remember me 29 |
    30 |
    31 |
    32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/loginadmin/src/main/webapp/logo.png -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/process.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*"%> 4 | <% 5 | try{ 6 | String username = request.getParameter("username"); 7 | String password = request.getParameter("password"); 8 | String redirectUrl = "admindashboard.jsp"; 9 | final String url="jdbc:mysql://localhost/data"; 10 | final String user="root"; 11 | final String pass=""; 12 | final String Query="select * from adminlogin where username='"+username+"' and password='"+password+"'"; 13 | //this code is to register the mysql connector 14 | Class.forName("com.mysql.cj.jdbc.Driver"); 15 | //this code is to establish the connection 16 | Connection conn=DriverManager.getConnection(url,user,pass); 17 | Statement st = conn.createStatement(); 18 | ResultSet rs = st.executeQuery(Query); 19 | rs.next(); 20 | if(rs.getString("username").equals(username) && rs.getString("password").equals(password)) 21 | { 22 | response.sendRedirect(redirectUrl); 23 | } 24 | else 25 | { 26 | out.println("Incorrect Login Details"); 27 | } 28 | }catch(Exception e) 29 | { 30 | System.out.println(e); 31 | e.printStackTrace(); 32 | } 33 | %> -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/process1.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*"%> 4 | <% 5 | try{ 6 | String ptoall = request.getParameter("ptoall"); 7 | String redirectUrl = "admindashboard.jsp"; 8 | final String url="jdbc:mysql://localhost/data"; 9 | final String user="root"; 10 | final String pass=""; 11 | final String Query="insert into ptoall(notice) values(?)"; 12 | //this code is to register the mysql connector 13 | Class.forName("com.mysql.cj.jdbc.Driver"); 14 | //this code is to establish the connection 15 | Connection conn=DriverManager.getConnection(url,user,pass); 16 | PreparedStatement pst = conn.prepareStatement(Query); 17 | pst.setString(1, ptoall); 18 | pst.executeUpdate(); 19 | response.sendRedirect(redirectUrl); 20 | }catch(Exception e) 21 | { 22 | System.out.println(e); 23 | e.printStackTrace(); 24 | } 25 | %> -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/process2.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*"%> 4 | <% 5 | try{ 6 | String coursecode = request.getParameter("coursecode"); 7 | String coursename = request.getParameter("coursename"); 8 | String courseduration = request.getParameter("courseduration"); 9 | String redirectUrl = "admincourse.jsp"; 10 | final String url="jdbc:mysql://localhost/data"; 11 | final String user="root"; 12 | final String pass=""; 13 | final String Query="insert into course(course_code,course_name,course_duration) values(?,?,?)"; 14 | //this code is to register the mysql connector 15 | Class.forName("com.mysql.cj.jdbc.Driver"); 16 | //this code is to establish the connection 17 | Connection conn=DriverManager.getConnection(url,user,pass); 18 | PreparedStatement pst = conn.prepareStatement(Query); 19 | pst.setString(1, coursecode); 20 | pst.setString(2, coursename); 21 | pst.setString(3, courseduration); 22 | pst.executeUpdate(); 23 | response.sendRedirect(redirectUrl); 24 | }catch(Exception e) 25 | { 26 | System.out.println(e); 27 | e.printStackTrace(); 28 | } 29 | %> -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/process3.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*"%> 4 | <% 5 | try{ 6 | String fname = request.getParameter("fname"); 7 | String lname = request.getParameter("lname"); 8 | String roll = request.getParameter("roll"); 9 | String course = request.getParameter("course"); 10 | String year = request.getParameter("year"); 11 | String redirectUrl = "adminstudent.jsp"; 12 | final String url="jdbc:mysql://localhost/data"; 13 | final String user="root"; 14 | final String pass=""; 15 | final String Query="insert into student_details(fname,lname,roll,course,year) values(?,?,?,?,?)"; 16 | //this code is to register the mysql connector 17 | Class.forName("com.mysql.cj.jdbc.Driver"); 18 | //this code is to establish the connection 19 | Connection conn=DriverManager.getConnection(url,user,pass); 20 | PreparedStatement pst = conn.prepareStatement(Query); 21 | pst.setString(1, fname); 22 | pst.setString(2, lname); 23 | pst.setString(3, roll); 24 | pst.setString(4, course); 25 | pst.setString(5, year); 26 | pst.executeUpdate(); 27 | response.sendRedirect(redirectUrl); 28 | }catch(Exception e) 29 | { 30 | System.out.println(e); 31 | e.printStackTrace(); 32 | } 33 | %> -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/process4.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*"%> 4 | <% 5 | try{ 6 | String tid = request.getParameter("tid"); 7 | String tname = request.getParameter("tname"); 8 | String qual = request.getParameter("qual"); 9 | String temail = request.getParameter("temail"); 10 | String sub = request.getParameter("sub"); 11 | String redirectUrl = "adminfaculty.jsp"; 12 | final String url="jdbc:mysql://localhost/data"; 13 | final String user="root"; 14 | final String pass=""; 15 | final String Query="insert into faculty_details(tid,tname,qual,temail,sub) values(?,?,?,?,?)"; 16 | //this code is to register the mysql connector 17 | Class.forName("com.mysql.cj.jdbc.Driver"); 18 | //this code is to establish the connection 19 | Connection conn=DriverManager.getConnection(url,user,pass); 20 | PreparedStatement pst = conn.prepareStatement(Query); 21 | pst.setString(1, tid); 22 | pst.setString(2, tname); 23 | pst.setString(3, qual); 24 | pst.setString(4, temail); 25 | pst.setString(5, sub); 26 | pst.executeUpdate(); 27 | response.sendRedirect(redirectUrl); 28 | }catch(Exception e) 29 | { 30 | System.out.println(e); 31 | e.printStackTrace(); 32 | } 33 | %> -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/process5.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*"%> 4 | <% 5 | try{ 6 | String scode = request.getParameter("scode"); 7 | String sname = request.getParameter("sname"); 8 | String course_name = request.getParameter("course_name"); 9 | String tmarks = request.getParameter("tmarks"); 10 | String pmark = request.getParameter("pmark"); 11 | String redirectUrl = "adminsubject.jsp"; 12 | final String url="jdbc:mysql://localhost/data"; 13 | final String user="root"; 14 | final String pass=""; 15 | final String Query="insert into subject(scode,sname,course_name,tmarks,pmark) values(?,?,?,?,?)"; 16 | //this code is to register the mysql connector 17 | Class.forName("com.mysql.cj.jdbc.Driver"); 18 | //this code is to establish the connection 19 | Connection conn=DriverManager.getConnection(url,user,pass); 20 | PreparedStatement pst = conn.prepareStatement(Query); 21 | pst.setString(1, scode); 22 | pst.setString(2, sname); 23 | pst.setString(3, course_name); 24 | pst.setString(4, tmarks); 25 | pst.setString(5, pmark); 26 | pst.executeUpdate(); 27 | response.sendRedirect(redirectUrl); 28 | }catch(Exception e) 29 | { 30 | System.out.println(e); 31 | e.printStackTrace(); 32 | } 33 | %> -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/sprocess.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*"%> 4 | <% 5 | try{ 6 | String lname = request.getParameter("lname"); 7 | String roll = request.getParameter("roll"); 8 | String redirectUrl = "studentdashboard.jsp"; 9 | final String url="jdbc:mysql://localhost/data"; 10 | final String user="root"; 11 | final String pass=""; 12 | final String Query="select * from student_details where lname='"+lname+"' and roll='"+roll+"'"; 13 | //this code is to register the mysql connector 14 | Class.forName("com.mysql.cj.jdbc.Driver"); 15 | //this code is to establish the connection 16 | Connection conn=DriverManager.getConnection(url,user,pass); 17 | Statement st = conn.createStatement(); 18 | ResultSet rs = st.executeQuery(Query); 19 | rs.next(); 20 | if(rs.getString("lname").equals(lname) && rs.getString("roll").equals(roll)) 21 | { 22 | response.sendRedirect(redirectUrl); 23 | } 24 | else 25 | { 26 | out.println("Incorrect Login Details"); 27 | } 28 | }catch(Exception e) 29 | { 30 | System.out.println(e); 31 | e.printStackTrace(); 32 | } 33 | %> -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/studentlogin.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Student Login 8 | 9 | 10 | 11 | 12 |
    13 |

    Student Login

    14 |
    15 |
    16 | 17 | 18 | 19 |
    20 |
    21 | 22 | 23 | 24 |
    25 |
    Forgot Password?
    26 | 27 |
    28 | Remember me 29 |
    30 |
    31 |
    32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/tprocess.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | pageEncoding="UTF-8"%> 4 | <%@ page import="java.sql.*"%> 5 | <% 6 | try{ 7 | String tid = request.getParameter("tid"); 8 | String temail = request.getParameter("temail"); 9 | String redirectUrl = "teacherdashboard.jsp"; 10 | final String url="jdbc:mysql://localhost/data"; 11 | final String user="root"; 12 | final String pass=""; 13 | final String Query="select * from faculty_details where tid='"+tid+"' and temail='"+temail+"'"; 14 | //this code is to register the mysql connector 15 | Class.forName("com.mysql.cj.jdbc.Driver"); 16 | //this code is to establish the connection 17 | Connection conn=DriverManager.getConnection(url,user,pass); 18 | Statement st = conn.createStatement(); 19 | ResultSet rs = st.executeQuery(Query); 20 | rs.next(); 21 | if(rs.getString("tid").equals(tid) && rs.getString("temail").equals(temail)) 22 | { 23 | response.sendRedirect(redirectUrl); 24 | } 25 | }catch(Exception e) 26 | { 27 | System.out.println(e); 28 | e.printStackTrace(); 29 | } 30 | %> -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/tprocess1.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*"%> 4 | <% 5 | try{ 6 | String ttoall = request.getParameter("ttoall"); 7 | String redirectUrl = "teacherdashboard.jsp"; 8 | final String url="jdbc:mysql://localhost/data"; 9 | final String user="root"; 10 | final String pass=""; 11 | final String Query="insert into ttoall(notice) values(?)"; 12 | //this code is to register the mysql connector 13 | Class.forName("com.mysql.cj.jdbc.Driver"); 14 | //this code is to establish the connection 15 | Connection conn=DriverManager.getConnection(url,user,pass); 16 | PreparedStatement pst = conn.prepareStatement(Query); 17 | pst.setString(1, ttoall); 18 | pst.executeUpdate(); 19 | response.sendRedirect(redirectUrl); 20 | }catch(Exception e) 21 | { 22 | System.out.println(e); 23 | e.printStackTrace(); 24 | } 25 | %> -------------------------------------------------------------------------------- /loginadmin/src/main/webapp/tprocess2.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*"%> 4 | <% 5 | try{ 6 | String tassign = request.getParameter("tassign"); 7 | String redirectUrl = "tassign.jsp"; 8 | final String url="jdbc:mysql://localhost/data"; 9 | final String user="root"; 10 | final String pass=""; 11 | final String Query="insert into tassign(tassign) values(?)"; 12 | //this code is to register the mysql connector 13 | Class.forName("com.mysql.cj.jdbc.Driver"); 14 | //this code is to establish the connection 15 | Connection conn=DriverManager.getConnection(url,user,pass); 16 | PreparedStatement pst = conn.prepareStatement(Query); 17 | pst.setString(1, tassign); 18 | pst.executeUpdate(); 19 | response.sendRedirect(redirectUrl); 20 | }catch(Exception e) 21 | { 22 | System.out.println(e); 23 | e.printStackTrace(); 24 | } 25 | %> -------------------------------------------------------------------------------- /parallax scrolling/index.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | scroll-behavior: smooth; 6 | } 7 | body{ 8 | overflow-x: hidden; 9 | 10 | 11 | min-height: 100vh; 12 | background: linear-gradient(#04070f, #1d3272) ; 13 | 14 | } 15 | header{ 16 | position: absolute; 17 | top: 0; 18 | left: 0; 19 | width: 100%; 20 | padding: 30px 100px; 21 | display: flex; 22 | align-items: center; 23 | justify-content: space-between; 24 | z-index: 10000; 25 | } 26 | header .logo{ 27 | text-decoration: none; 28 | font-size: 1.5em; 29 | color: white; 30 | } 31 | header ul{ 32 | display: flex; 33 | justify-content: center; 34 | align-items: centr; 35 | 36 | 37 | } 38 | header li{ 39 | color: white; 40 | margin-left: 20px; 41 | list-style: none; 42 | border-radius: 20px; 43 | font-size: 1.5em; 44 | text-align: center; 45 | width: 80px; 46 | } 47 | header li:hover{ 48 | background-color: white; 49 | cursor: pointer; 50 | color: black; 51 | } 52 | section{ 53 | position: relative; 54 | display: flex; 55 | align-items: center; 56 | justify-content: center; 57 | overflow: hidden; 58 | height: 150vh; 59 | width: 100%; 60 | padding: 300px; 61 | } 62 | 63 | section img{ 64 | position:absolute; 65 | top: 0px; 66 | left: 0; 67 | height: 100%; 68 | width: 100%; 69 | object-fit: cover; 70 | 71 | } 72 | section::before{ 73 | content: ''; 74 | position: absolute; 75 | width: 100%; 76 | height: 200px; 77 | bottom: 0; 78 | background: linear-gradient(to top,#200e25,transparent); 79 | z-index: 10000; 80 | } 81 | #moon{ 82 | mix-blend-mode: screen; 83 | overflow: hidden; 84 | } 85 | #mountain_front{ 86 | 87 | z-index: 10;; 88 | } 89 | #text{ 90 | right: -100px; 91 | position: absolute; 92 | color: white; 93 | /* z-index:2; */ 94 | font-size: 4em; 95 | /* transform: translateY(200px); */ 96 | } 97 | #btn{ 98 | transform: translateY(100px); 99 | cursor: pointer; 100 | border-radius: 20px; 101 | width: 100px; 102 | border: none; 103 | padding:4px; 104 | font-size: 1.5em; 105 | 106 | } 107 | #content{ 108 | position: relative; 109 | 110 | 111 | height: 300vh; 112 | width: 100%; 113 | background: #200e25; 114 | color: white; 115 | font-size: 2em; 116 | padding: 50px 50px; 117 | text-align: center; -------------------------------------------------------------------------------- /parallax scrolling/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Scrolling 9 | 10 | 11 | 12 |
    13 | 14 |
      15 |
    • Home
    • 16 |
    • Menu
    • 17 |
    • Service
    • 18 |
    • About
    • 19 |
    20 |
    21 |
    22 | 23 | img 24 | img 25 | img 26 |

    [ Product Name]

    27 | 28 | img 29 |
    30 | 31 |
    32 | [Get your product description here]


    33 |

    Add product details and brief description.
    34 | All features are constumizable accordiing to clients needs and requirement.

    35 |

    36 | 37 | 38 |

    39 | For backend Node.js and Express support is available. 40 | 41 |

    42 |

    43 |

    44 | For database MongoDB support is available 45 |

    46 |

    47 |

    48 | For optimization React.js support is available 49 |

    50 |
    51 | 71 | 72 | -------------------------------------------------------------------------------- /parallax scrolling/moon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/parallax scrolling/moon.png -------------------------------------------------------------------------------- /parallax scrolling/mountains_behind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/parallax scrolling/mountains_behind.png -------------------------------------------------------------------------------- /parallax scrolling/mountains_front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/parallax scrolling/mountains_front.png -------------------------------------------------------------------------------- /parallax scrolling/night-beautiful-landscape-with-winter-city-trees-mountain-moon-shine-with-purple-moon-snow-violet-sky-landscape-background-your-arts_177886-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/parallax scrolling/night-beautiful-landscape-with-winter-city-trees-mountain-moon-shine-with-purple-moon-snow-violet-sky-landscape-background-your-arts_177886-7.jpg -------------------------------------------------------------------------------- /parallax scrolling/stars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/parallax scrolling/stars.png -------------------------------------------------------------------------------- /python/palindrome.py: -------------------------------------------------------------------------------- 1 | word = input("Enter any word: ").lower() 2 | a = word 3 | opposite = word[::-1] 4 | if a == opposite: 5 | print(word+" is PALINDROME") 6 | else: 7 | print(word+" is not PALINDROME") -------------------------------------------------------------------------------- /python/triangle.py: -------------------------------------------------------------------------------- 1 | a = int(input("Enter Any Number (rows) : ")) 2 | while a > 0: 3 | b = a 4 | while b > 0: 5 | print("*", end="") 6 | b = b-1 7 | print("") 8 | a = a-1 -------------------------------------------------------------------------------- /rust/bubble_sort.rs: -------------------------------------------------------------------------------- 1 | fn bubble_sort(array: &mut[T]) { 2 | for i in 0..array.len() { 3 | for j in 0..array.len() - 1 - i { 4 | if array[j] > array[j + 1] { 5 | array.swap(j, j + 1) 6 | } 7 | } 8 | } 9 | } 10 | 11 | #[test] 12 | fn test_i32() { 13 | let mut numbers: [i32; 5] = [0, 5, 2, 3, 2]; 14 | let results: [i32; 5] = [0, 2, 2, 3, 5]; 15 | bubble_sort(&mut numbers); 16 | assert_eq!(numbers, results); 17 | } 18 | 19 | 20 | #[test] 21 | fn test_strings() { 22 | let mut strings: [&str; 5] = ["d", "a", "b", "e", "c"]; 23 | let results: [&str; 5] = ["a", "b", "c", "d", "e"]; 24 | bubble_sort(&mut strings); 25 | assert_eq!(strings, results); 26 | } 27 | -------------------------------------------------------------------------------- /search/advance_search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Advance Search 13 | 14 | 15 |
    16 | 24 |
    25 |
    26 | 27 |
    28 |
    29 |

    Find Pages With

    30 |
    31 |
    32 | 66 |
    67 | 68 | 69 | -------------------------------------------------------------------------------- /search/image_search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Images 15 | 16 | 17 |
    18 | 26 |
    27 |
    28 | 29 |
    30 | 31 |
    32 |
    33 |
    34 |
    35 | 36 | 37 |
    38 |
    39 |
    40 | 41 |   42 | 43 |
    44 |
    45 |
    46 | 47 | 48 | -------------------------------------------------------------------------------- /search/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Home 15 | 16 | 17 |
    18 | 26 |
    27 |
    28 | 29 |
    30 | 31 |
    32 |
    33 |
    34 |
    35 | 36 |
    37 |
    38 |
    39 | 40 |   41 | 42 |
    43 |
    44 |
    45 | 46 | 47 | -------------------------------------------------------------------------------- /search/styles.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap'); 2 | body { 3 | font-family: 'Segoe UI', sans-serif; 4 | } 5 | body { 6 | display: flex; 7 | justify-content: center; 8 | flex-direction: column; 9 | } 10 | body header { 11 | display: flex; 12 | justify-content: flex-end; 13 | margin: 20px; 14 | align-items: center; 15 | font-size:medium; 16 | } 17 | 18 | body .logo-container { 19 | width: 100%; 20 | display: flex; 21 | height: auto; 22 | } 23 | body .logo-container .main-logo { 24 | width: 272px; 25 | height: 90px; 26 | background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Google_2015_logo.svg/272px-Google_2015_logo.svg.png'); 27 | margin: auto; 28 | } 29 | body .input-container { 30 | letter-spacing: normal; 31 | word-spacing: normal; 32 | width: 80%; 33 | min-width: 300px; 34 | max-width: 580px; 35 | margin: 0 auto; 36 | display: flex; 37 | position: relative; 38 | } 39 | body .input-container:before { 40 | content: ' '; 41 | background-image: url('https://img.icons8.com/ios/24/000000/search--v1.png'); 42 | background-repeat: no-repeat; 43 | background-position: center; 44 | width: 44px; 45 | height: 44px; 46 | position: absolute; 47 | transform: scale(0.7); 48 | cursor: pointer; 49 | } 50 | body .input-container:after { 51 | content: ' '; 52 | background-image: url('https://img.icons8.com/material-rounded/24/000000/microphone.png'); 53 | background-repeat: no-repeat; 54 | background-position: center; 55 | width: 44px; 56 | height: 44px; 57 | position: absolute; 58 | transform: scale(0.9); 59 | right: 5px; 60 | cursor: pointer; 61 | } 62 | body .input-container #search { 63 | font-size: 16px; 64 | width: 100%; 65 | align-self: center; 66 | border-radius: 22px; 67 | height: 44px; 68 | border: none; 69 | box-sizing: border-box; 70 | padding-left: 40px; 71 | box-shadow: 0 1px 6px 0 rgba(32, 33, 36, 0.28); 72 | } 73 | body .input-container #search:focus { 74 | outline: none; 75 | } 76 | body .input-container #search:focus::placeholder { 77 | color: transparent; 78 | } 79 | .subbtn{ 80 | background-color: #f8f9fa; 81 | border: 1px solid #f8f9fa; 82 | border-radius: 4px; 83 | color: #3c4043; 84 | font-family: arial,sans-serif; 85 | font-size: 14px; 86 | margin: 11px 4px; 87 | padding: 0px 30px 0px 30px; 88 | line-height: 27px; 89 | height: 36px; 90 | min-width: 54px; 91 | text-align: center; 92 | cursor: pointer; 93 | user-select: none; 94 | } 95 | .ad0{ 96 | margin-left: 20px; 97 | padding: 0; 98 | font-weight:400; 99 | font-style:normal; 100 | font-size: 140%; 101 | vertical-align: baseline; 102 | } 103 | #pages0{ 104 | margin-left: 30px; 105 | font-weight: 500; 106 | font-size:large; 107 | } 108 | 109 | .adform{ 110 | margin-left: 30px; 111 | font-size:small; 112 | } 113 | 114 | -------------------------------------------------------------------------------- /sing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/sing.jpg -------------------------------------------------------------------------------- /sport.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/sport.jpg -------------------------------------------------------------------------------- /to-do-list/.gitignore: -------------------------------------------------------------------------------- 1 | /assets/ref/ 2 | -------------------------------------------------------------------------------- /to-do-list/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | To-do list 11 | 12 | 13 | 14 |
    15 |

    To-do list

    16 |
    17 | 18 |
    19 |
    20 | 21 | 22 |
    23 | 24 |
    25 |
      26 |
      27 |
      28 | 29 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /to-do-list/scripts/main.js: -------------------------------------------------------------------------------- 1 | const themeToggler = document.querySelector(".theme-ctrl"); 2 | const taskList = document.querySelector(".task-list"); 3 | const addButton = document.querySelector(".user-task-add"); 4 | const taskInput = document.getElementById("user-task-input"); 5 | 6 | // IMPLEMENT DARK MODE 7 | function toggleTheme() { 8 | const docBody = document.body; 9 | const themeIcon = document.querySelector(".theme-ctrl i"); 10 | 11 | if (themeToggler.classList.contains("to-dark")) { 12 | docBody.setAttribute("class", "dark-mode"); 13 | themeToggler.classList.remove("to-dark"); 14 | themeToggler.classList.add("to-light"); 15 | 16 | // CHANGE THEME ICON TO SUN 17 | themeIcon.classList.remove("fa-moon"); 18 | themeIcon.classList.add("fa-sun"); 19 | } else { 20 | docBody.removeAttribute("class"); 21 | themeToggler.classList.remove("to-light"); 22 | themeToggler.classList.add("to-dark"); 23 | 24 | // CHANGE THEME ICON TO MOON 25 | themeIcon.classList.remove("fa-sun"); 26 | themeIcon.classList.add("fa-moon"); 27 | } 28 | } 29 | 30 | themeToggler.addEventListener("click", toggleTheme); 31 | 32 | // COMPLETE TASK 33 | function completeTask(e) { 34 | const eventTarget = e.target; 35 | 36 | if (eventTarget.classList.contains("user-task-check")) { 37 | eventTarget.parentElement.previousElementSibling.style.textDecoration = "line-through"; 38 | } else if (eventTarget.classList.contains("fa-check")) { 39 | eventTarget.parentElement.parentElement.previousElementSibling.style.textDecoration = "line-through"; 40 | } 41 | } 42 | 43 | // DELETE ITEMS FROM TASK LIST 44 | function deleteTask(e) { 45 | const eventTarget = e.target; 46 | 47 | if (eventTarget.classList.contains("user-task-delete")) { 48 | eventTarget.parentElement.parentElement.remove(); 49 | } else if (eventTarget.classList.contains("fa-trash")) { 50 | eventTarget.parentElement.parentElement.parentElement.remove(); 51 | } 52 | } 53 | 54 | // ADD ITEMS TO TASK LIST 55 | function addTask() { 56 | const taskValue = taskInput.value; 57 | 58 | if (taskValue !== '') { 59 | const li = document.createElement("li"); 60 | const span = document.createElement("span"); 61 | const task = document.createTextNode(taskValue); 62 | const div = document.createElement("div"); 63 | const checkButton = document.createElement("button"); 64 | const deleteButton = document.createElement("button"); 65 | const checkIcon = document.createElement("i"); 66 | const deleteIcon = document.createElement("i"); 67 | 68 | span.setAttribute("class", "task"); 69 | span.appendChild(task); 70 | 71 | checkButton.setAttribute("type", "button"); 72 | checkButton.className = "btn user-task-check" 73 | checkButton.setAttribute("title", "Complete task"); 74 | 75 | checkIcon.className = "fa-solid fa-check"; 76 | checkButton.appendChild(checkIcon); 77 | 78 | deleteButton.setAttribute("type", "button"); 79 | deleteButton.className = "btn user-task-delete" 80 | deleteButton.setAttribute("title", "Delete task"); 81 | 82 | deleteIcon.className = "fa-solid fa-trash"; 83 | deleteButton.appendChild(deleteIcon); 84 | 85 | div.setAttribute("class", "task-edit-ctrls"); 86 | div.appendChild(checkButton); 87 | div.appendChild(deleteButton); 88 | 89 | li.appendChild(span); 90 | li.appendChild(div); 91 | 92 | taskList.appendChild(li); 93 | 94 | taskInput.value = ''; 95 | 96 | // LISTEN FOR CLICK EVENT ON CHECK BUTTON 97 | checkButton.addEventListener("click", completeTask); 98 | 99 | // LISTEN FOR CLICK EVENT ON DELETE BUTTON 100 | deleteButton.addEventListener("click", deleteTask); 101 | } 102 | } 103 | 104 | addButton.addEventListener("click", addTask); 105 | 106 | // ADD TASK TO TASK LIST ON PRESSING "ENTER" KEY 107 | taskInput.addEventListener("keypress", (e) => { 108 | if (e.code === "Enter") { 109 | addTask(); 110 | } 111 | }); 112 | 113 | -------------------------------------------------------------------------------- /web_server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "weather-app-node", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node src/app.js", 8 | "dev": "nodemon src/app.js -e js,hbs", 9 | "build:css": "tailwind build src/style.css -o public/css/style.css" 10 | }, 11 | "keywords": [], 12 | "author": "", 13 | "license": "ISC", 14 | "dependencies": { 15 | "dotenv": "^8.2.0", 16 | "express": "^4.17.1", 17 | "hbs": "^4.1.1", 18 | "postman-request": "^2.88.1-postman.22", 19 | "tailwindcss": "^1.4.5" 20 | }, 21 | "devDependencies": { 22 | "nodemon": "^2.0.3" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /web_server/public/img/canIHelpYou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/web_server/public/img/canIHelpYou.png -------------------------------------------------------------------------------- /web_server/public/img/lost.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/web_server/public/img/lost.jpg -------------------------------------------------------------------------------- /web_server/public/img/my_current_pic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/web_server/public/img/my_current_pic.jpg -------------------------------------------------------------------------------- /web_server/public/img/my_pic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/web_server/public/img/my_pic.jpg -------------------------------------------------------------------------------- /web_server/public/img/weather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/web_server/public/img/weather.png -------------------------------------------------------------------------------- /web_server/public/img/whatHappened.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/web_server/public/img/whatHappened.jpeg -------------------------------------------------------------------------------- /web_server/public/img/whatHappened.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/durgesh2001/Hacktoberfest_2022/8b0e5adb28d444186b00f8fe4421de7ea03af055/web_server/public/img/whatHappened.jpg -------------------------------------------------------------------------------- /web_server/public/js/app.js: -------------------------------------------------------------------------------- 1 | console.log("Client side app.js JavaScript file is loaded"); 2 | 3 | const toggleDarkMode = document.querySelector("#toggleDarkMode"); 4 | let darkMode = localStorage.getItem("darkMode"); 5 | 6 | const enableDarkMode = () => { 7 | document.body.classList.add("darkmode"); 8 | localStorage.setItem("darkMode", "enabled"); 9 | }; 10 | 11 | const disableDarkMode = () => { 12 | document.body.classList.remove("darkmode"); 13 | localStorage.setItem("darkMode", null); 14 | }; 15 | 16 | if (darkMode === "enabled") { 17 | enableDarkMode(); 18 | } 19 | 20 | toggleDarkMode.addEventListener("click", () => { 21 | darkMode = localStorage.getItem("darkMode"); 22 | if (darkMode !== "enabled") { 23 | enableDarkMode(); 24 | } else { 25 | disableDarkMode(); 26 | } 27 | }); 28 | -------------------------------------------------------------------------------- /web_server/public/js/weather.js: -------------------------------------------------------------------------------- 1 | console.log("Client side weather.js JavaScript file is loaded"); 2 | 3 | const weatherForm = document.querySelector("form"); 4 | const weatherImage = document.querySelector("#weatherImage"); 5 | const description = document.querySelector("#description"); 6 | const locationInput = document.querySelector("#locationInput"); 7 | const temperature = document.querySelector("#temperature"); 8 | const feelsLike = document.querySelector("#feelsLike"); 9 | const precip = document.querySelector("#precip"); 10 | const wind = document.querySelector("#wind"); 11 | const lastUpdate = document.querySelector("#lastUpdate"); 12 | 13 | weatherForm.addEventListener("submit", (e) => { 14 | e.preventDefault(); 15 | const location = locationInput.value; 16 | description.textContent = "Loading..."; 17 | 18 | fetch(`/weather?address=${location}`).then((response) => { 19 | response.json().then((data) => { 20 | console.log(data); 21 | if (data.error) { 22 | description.textContent = "Opps. It looks like there has been an error."; 23 | lastUpdate.textContent = data.error; 24 | } else { 25 | locationInput.value = data.location; 26 | weatherImage.src = data.forecast.weatherIcon; 27 | description.textContent = data.forecast.description; 28 | temperature.textContent = `${data.forecast.temperature} °C`; 29 | feelsLike.textContent = `Feels Like: ${data.forecast.feelsLike} °C`; 30 | precip.textContent = `Precip: ${data.forecast.precip}`; 31 | wind.textContent = `Wind Speed(Dir): ${data.forecast.wind} (${data.forecast.windDir})`; 32 | lastUpdate.textContent = `Last Update: ${new Date().toLocaleTimeString()}`; 33 | } 34 | }); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /web_server/src/app.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const express = require("express"); 3 | const hbs = require("hbs"); 4 | const geocode = require("./utils/geocode"); 5 | const forecast = require("./utils/forecast"); 6 | 7 | const app = express(); 8 | const port = process.env.PORT || 3000; 9 | 10 | // Define paths for Express config 11 | const publicDirectoryPath = path.join(__dirname, "../public"); 12 | const viewsPath = path.join(__dirname, "../templates/views"); 13 | const partialsPath = path.join(__dirname, "../templates/partials"); 14 | 15 | // Setup handlebars engine and views location 16 | app.set("view engine", "hbs"); 17 | app.set("views", viewsPath); 18 | hbs.registerPartials(partialsPath); 19 | 20 | // Setup static directory to server 21 | app.use(express.static(publicDirectoryPath)); 22 | 23 | app.get("", (req, res) => { 24 | res.render("index", { 25 | title: "Weather App", 26 | name: "Bikas Kumar Behera", 27 | }); 28 | }); 29 | 30 | app.get("/about", (req, res) => { 31 | res.render("about", { 32 | title: "About Me", 33 | name: "Bikas Kumar Behera", 34 | }); 35 | }); 36 | 37 | app.get("/help", (req, res) => { 38 | res.render("help", { 39 | helpTxt: "Help text printing...", 40 | title: "Help", 41 | name: "Bikas Kumar Behera", 42 | }); 43 | }); 44 | 45 | // app.com/weather 46 | app.get("/weather", (req, res) => { 47 | if (!req.query.address) { 48 | return res.send({ 49 | error: "You must provide an address.", 50 | }); 51 | } 52 | geocode( 53 | req.query.address, 54 | (error, { latitude, longitude, location } = {}) => { 55 | if (error) { 56 | return res.send({ error }); 57 | } 58 | forecast(latitude, longitude, (error, forecastData) => { 59 | if (error) { 60 | return res.send({ error }); 61 | } 62 | res.send({ 63 | forecast: forecastData, 64 | location, 65 | address: req.query.address, 66 | }); 67 | }); 68 | } 69 | ); 70 | }); 71 | 72 | app.get("/help/*", (req, res) => { 73 | res.render("404 Help", { 74 | title: "404", 75 | name: "Bikas Kumar Behera ", 76 | errorTxt: "Help article not found.", 77 | }); 78 | }); 79 | 80 | app.get("*", (req, res) => { 81 | res.render("404", { 82 | title: "404", 83 | name: "Bikas Kumar Behera ", 84 | errorTxt: "Oh no! Page not found.", 85 | }); 86 | }); 87 | 88 | // app.listen(3000, () => { 89 | // console.log("Server is up on port 3000."); 90 | // }); 91 | 92 | app.listen(port, () => { 93 | console.log(`Server is up on port ${port}.`); 94 | }); 95 | -------------------------------------------------------------------------------- /web_server/src/style.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | 3 | @tailwind components; 4 | 5 | @tailwind utilities; 6 | 7 | #toggleMenu:checked + #menu { 8 | display: block; 9 | } 10 | 11 | :root { 12 | --bg-color-one: #b2f5ea; 13 | --bg-color-two: #f7fafc; 14 | --bg-color-three: #3c366b; 15 | 16 | --text-colorT-one: #3c366b; 17 | --text-colorT-two: #e6fffa; 18 | --text-colorT-three: #4c51bf; 19 | } 20 | 21 | .darkmode { 22 | --bg-color-one: #4a5568; 23 | --bg-color-two: #2d3748; 24 | --bg-color-three: #e6fffa; 25 | 26 | --text-colorT-one: #e6fffa; 27 | --text-colorT-two: #3c366b; 28 | --text-colorT-three: #81e6d9; 29 | } -------------------------------------------------------------------------------- /web_server/src/utils/forecast.js: -------------------------------------------------------------------------------- 1 | const request = require("postman-request"); 2 | require("dotenv").config(); 3 | 4 | const forecast = (latitute, longitude, callback) => { 5 | const weatherURL = `http://api.weatherstack.com/current?access_key=d23344c43a6ccdf404c8ebac6f1b242d&query=${latitute},${longitude}`; 6 | 7 | request({ url: weatherURL, json: true }, (error, response) => { 8 | if (error) { 9 | callback("Unable to connect to weather services :/", undefined); 10 | } else if (response.body.success === false) { 11 | callback("Unable to find location.", undefined); 12 | } else { 13 | callback(undefined, { 14 | locationName: response.body.location.name, 15 | locationRegion: response.body.location.region, 16 | locationCountry: response.body.location.country, 17 | temperature: response.body.current.temperature, 18 | feelsLike: response.body.current.feelslike, 19 | precip: response.body.current.precip, 20 | wind: response.body.current.wind_speed, 21 | windDir: response.body.current.wind_dir, 22 | description: response.body.current.weather_descriptions[0], 23 | lastUpdate: response.body.current.observation_time, 24 | weatherIcon: response.body.current.weather_icons[0], 25 | }); 26 | } 27 | }); 28 | }; 29 | 30 | module.exports = forecast; 31 | -------------------------------------------------------------------------------- /web_server/src/utils/geocode.js: -------------------------------------------------------------------------------- 1 | const request = require("postman-request"); 2 | require("dotenv").config(); 3 | 4 | const geocode = (address, callback) => { 5 | const geocodeURL = `https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent( 6 | address 7 | )}.json?access_token=pk.eyJ1IjoiYmlrYXNrcjU3IiwiYSI6ImNsNnV0MWs2bjFvMGQzZG1tbXJ2ZnIweXEifQ.LNhfoIzXAhBa3yY5QrPYcA&limit=1`; 8 | // )}.json?access_token=${process.env.accessKey_mapBox}&limit=1`; 9 | 10 | request({ url: geocodeURL, json: true }, (error, response) => { 11 | if (error) { 12 | callback("Unable to connect to location services :/", undefined); 13 | } else if (response.body.features.length === 0) { 14 | callback("Unable to find location. Try another search", undefined); 15 | } else { 16 | callback(undefined, { 17 | latitude: response.body.features[0].center[1], 18 | longitude: response.body.features[0].center[0], 19 | location: response.body.features[0].place_name, 20 | }); 21 | } 22 | }); 23 | }; 24 | 25 | module.exports = geocode; 26 | -------------------------------------------------------------------------------- /web_server/templates/partials/footer.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web_server/templates/partials/header.hbs: -------------------------------------------------------------------------------- 1 |
      2 | 3 |
      4 | 5 |

      Weather App

      6 |
      7 | 8 | 14 | 15 | 16 | 42 |
      -------------------------------------------------------------------------------- /web_server/templates/views/404.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 404 Page Not Found 8 | 9 | 10 | 11 | 12 | 13 | 14 |
      15 | {{>header}} 16 |
      17 |
      19 |

      20 | {{errorTxt}} 21 |

      22 | bitmoji of girl looking for the webpage with a magnifying glass 24 |
      25 |
      26 | {{>footer}} 27 |
      28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /web_server/templates/views/about.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Weather App 8 | 9 | 10 | 11 | 12 | 13 | 14 |
      15 | {{>header}} 16 |
      17 |
      18 |

      {{title}}

      19 | Profile picture 21 |
      22 |

      My name is Bikas Kumar Behera. I am a junior level full-stack web developer based in Bhubaneswar, Odisha, India

      23 |
      24 |

      This project was completed as part of Udemy's The Complete Node.js 25 | Developer Course with Andrew Mead. I followed the course and expanded on it by 26 | displaying additional information from the APIs, adding a dark-mode, and designing the page using tailwindCSS. 29 |

      30 |
      31 |
      32 |
      33 | {{>footer}} 34 |
      35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /web_server/templates/views/help.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Weather App 8 | 9 | 10 | 11 | 12 | 13 | 14 |
      15 | {{>header}} 16 |
      17 |
      18 |

      {{title}}

      19 | bitmoji with the text 'What happened?' 21 |
      22 | 23 |

      What is this webpage?

      24 |

      This is a very basic webpage that tells users about the weather in any location in the world. It 25 | uses data from mapbox.com and weatherstack.com.

      29 |
      30 |

      How does it work?

      31 |

      It's very simple. Click on the 'weather' tab. On this page the user will find an input box where 32 | he/she can type in the location they want. Click the 'search' button beside the input box. 33 |

      34 |
      35 |

      I followed the instructions, but got the weather information from some other place. What can I do?

      36 |

      In cases like this, I suggest users be more specific with their queries. 37 | Don't just type in the city name, try typing in the country's name as well.

      38 |
      39 |

      Are you a fellow developer?

      40 |

      If you are a developer and want to take a look at the code you can do so at https://github.com/Bikaskumar572/Weather_website.

      43 |
      44 |
      45 |
      46 | {{>footer}} 47 |
      48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /web_server/templates/views/index.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Weather-App 8 | 9 | 10 | 11 | 12 | 13 | 14 |
      15 | {{>header}} 16 |
      17 |
      19 | weather icon 22 |

      23 | {{title}}

      24 | 25 |
      26 | 29 | 32 |
      33 | 34 |
      36 |

      38 | --°C

      39 |
      40 |

      Feels Like: --°C

      41 |

      Precip: -- %

      42 |

      Wind Speed(Dir): -- --

      43 |
      44 |
      45 | 46 |

      Last Update: -----

      47 |
      48 |
      49 | {{>footer}} 50 |
      51 | 52 | 53 | 54 | 55 | --------------------------------------------------------------------------------