Posts

Showing posts from August, 2024

SQL

 https://www.mycompiler.io/view/KIiqrAwfpAb

Login page UI

 <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Login Page</title>     <style>         body {             font-family: Arial, sans-serif;         }         .container {             width: 50%;             margin: 0 auto;             padding: 20px;             border: 1px solid #ccc;             border-radius: 10px;         }         .form-group {             margin-bottom: 15px;         }         .form-group label {         ...

Registration page UI

 <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Registration Page</title>     <style>         body {             font-family: Arial, sans-serif;         }         .container {             width: 50%;             margin: 0 auto;             padding: 20px;             border: 1px solid #ccc;             border-radius: 10px;         }         .form-group {             margin-bottom: 15px;         }         .form-group label {       ...

Search Product by Product Name UNIX

 search_product() {     local product_name=$1     if grep -iq "$product_name" products.txt; then         echo "Product '$product_name' found in the product list."     else         echo "Product '$product_name' not found in the product list."     fi } # Example usage: search for 'Mango' search_product "Mango"

Search and Replace Product by Name UNIX

 #!/bin/bash # Function to search and replace product name search_and_replace() {     local search=$1     local replace=$2     if grep -q "$search" products.txt; then         sed -i "s/$search/$replace/" products.txt         echo "Product '$search' has been replaced with '$replace'."     else         echo "Product '$search' not found in the product list."     fi } # Example usage: search and replace 'Orange' with 'Kiwi' search_and_replace "Orange" "Kiwi"

Sort Products by Product Name UNIX

#!/bin/bash # Sort products in ascending order by product name sort products.txt > sorted_products.txt echo "Products have been sorted and saved to sorted_products.txt"