Snippets Collections
BankAccount.java

import java.util.Scanner;

public class BankAccount {
    String name;
	private double balance;
	private int depositCount = 0;
	private int withdrawCount = 0;
	private String accountType;
	
	
	public void deposit(double amount){
		balance += amount;
		System.out.println(amount + " is successfully Deposited");
		depositCount++;
		if(balance > 100000){
			balance = balance + (amount / 100);
		}
	}
	public void setAccountType(String type){
		this.accountType = type;
	}
	
	public void withdraw(double amount){
		if(balance >= amount){
			if(balance - amount < 50000){
				System.out.println("Asre you sure you want to withdraw, it would make your balance below 50,000");
				System.out.println("Press 1 to continue and 0 to abort");
				Scanner input = new Scanner(System.in);
				int confirm = input.nextInt();
				if(confirm != 1){
					System.out.println("Withdrawal aborted");
					return;
				}
			}
			double withdrawAmount = amount;
			if(balance < 50000){
				withdrawAmount = withdrawAmount + amount * 0.02;
				withdrawCount++;
			}
			balance = balance - withdrawAmount;
			System.out.println(withdrawAmount + " is successfully withdrawn");
			
		}
		else{
			System.out.println("Insufficient funds");
		}
			
	}
	public double getBalance(){
		return balance;
	}
	
	public void subscribeSmsAlert(){
		if(accountType.equals("STANDARD")){
			balance -= 2000;
		}
	}
	
	public void subscribeDebitCard(){
		if(accountType.equals("STANDARD")){
			balance -= 5000;
		}
	}
	
	
	void transaction(){
		System.out.println("Account title: " + name);
		System.out.println("Total deposit: " + depositCount);
		System.out.println("Total withdraw: " + withdrawCount);
		System.out.println("Balance: " + balance);
	}
	
}

//////////////////////////////////////////////////////////////////////////////////////

//BankAccountTest.Java

import java.util.Scanner;

public class BankAccountTest{
	
	public static void main(String args[]){
		
		BankAccount account = new BankAccount();
		
		Scanner input = new Scanner(System.in);
		account.name = "Maan";
		
		System.out.println("Enter the account type: ");
		String accountType = input.nextLine();
		account.setAccountType(accountType);
		
		System.out.println("Do want to subscribe SMS alerts(Y or N): ");
		String sms = input.nextLine();
		if(sms.equals("Y") || sms.equals("y")){
			account.subscribeSmsAlert();
		}
		System.out.println("Do you want to subscribe Debit Card(Y or N): ");
		String debit = input.nextLine();
		
		if(debit.equals("Y") || debit.equals("y")){
			account.subscribeDebitCard();
		}
		
		int choice;
		
		do{
			System.out.println("Press 1: To Deposit an amount\nPress 2: To Withdraw an amount\nPress 3: To View the current balance\nPress 4: To Close the program");
		    choice = input.nextInt();
		
		    switch(choice){
			case 1:
			System.out.println("Enter the amount you want to Deposite");
			double depositeAmount = input.nextDouble(); 
			account.deposit(depositeAmount);
			break;
			case 2:
			System.out.println("Enter the amount you want to withdraw");
			double withdrawAmount = input.nextDouble();
			account.withdraw(withdrawAmount);
			break;
			case 3:
			System.out.println("Your current balance is " + account.getBalance());
			break;
			case 4:
			System.out.println("The program is terminated");
			account.transaction();
			break;
			default:
			System.out.println("Incorrect choice. Please try again!");
			break;
			
		
		}
		
	}while(choice!=4);
  }
	
}
SELECT * from strings;

---------+
    S    |
---------+
 coffee  |
 ice tea |
 latte   |
 tea     |
 [NULL]  |
---------+

SELECT * FROM strings WHERE CONTAINS(s, 'te');

---------+
    S    |
---------+
 ice tea |
 latte   |
 tea     |
---------+
curl --request POST \
  --url 'https://api.apyhub.com/convert/rss-file/json?detailed=true' \
  --header 'apy-token: APY0BOODK2plpXgxRjezmBOXqID51DGpFq8QnHJeBQrrzuIBc25UIglN93bbwvnkBWlUia1' \
  --header 'content-type: multipart/form-data' \
  --form 'file=@"test.xml"'
curl --request POST \
  --url 'https://api.apyhub.com/convert/word-file/pdf-file?output=test-sample.pdf&landscape=false' \
  --header 'apy-token: APY0BOODK2plpXgxRjezmBOXqID51DGpFq8QnHJeBQrrzuIBc25UIglN93bbwvnkBWlUia1' \
  --header 'content-type: multipart/form-data' \
  --form 'file=@"test.doc"'
curl --request POST \
  --url 'https://api.apyhub.com/generate/charts/bar/file?output=sample.png' \
  --header 'Content-Type: application/json' \
  --header 'apy-token: APY0BOODK2plpXgxRjezmBOXqID51DGpFq8QnHJeBQrrzuIBc25UIglN93bbwvnkBWlUia1' \
  --data '{
    "title":"Simple Bar Chart",
    "theme":"Light",
    "data":[
        {
            "value":10,
            "label":"label a"
        },
        {
            "value":20,
            "label":"label b"
        },
        {
            "value":80,
            "label":"label c"
        },
        {
            "value":50,
            "label":"label d"
        },
        {
            "value":70,
            "label":"label e"
        },
        {
            "value":25,
            "label":"label f"
        },
        {
            "value":60,
            "label":"label g"
        }
    ]
}'
curl --request POST \
  --url 'https://api.apyhub.com/generate/charts/bar/file?output=sample.png' \
  --header 'Content-Type: application/json' \
  --header 'apy-token: APY0BOODK2plpXgxRjezmBOXqID51DGpFq8QnHJeBQrrzuIBc25UIglN93bbwvnkBWlUia1' \
  --data '{
    "title":"Simple Bar Chart",
    "theme":"Light",
    "data":[
        {
            "value":10,
            "label":"label a"
        },
        {
            "value":20,
            "label":"label b"
        },
        {
            "value":80,
            "label":"label c"
        },
        {
            "value":50,
            "label":"label d"
        },
        {
            "value":70,
            "label":"label e"
        },
        {
            "value":25,
            "label":"label f"
        },
        {
            "value":60,
            "label":"label g"
        }
    ]
}'
curl --request POST \
  --url 'https://api.apyhub.com/generate/qr-code/file?output=sample.png' \
  --header 'Content-Type: application/json' \
  --header 'apy-token: APY0BOODK2plpXgxRjezmBOXqID51DGpFq8QnHJeBQrrzuIBc25UIglN93bbwvnkBWlUia1' \
  --data '{
    "content": "https://apyhub.com",
    "logo": "https://apyhub.com/logo.svg",
    "background_color": "#000000",
    "foreground_color": ["#e8bf2a", "#e8732a"]
}'
[
    {
        "$match": {
            "partnerShortCode": {
                "$in": []
            }
        }
    },
    {
        "$group": {
            "_id": "$partnerShortCode",
            "clinics": {
                "$push": {
                    "clinicName": "$name",
                    "clinicId": "$_id"
                }
            }
        }
    },
    {
        "$project": {
            _id:0,
            "partnerShortCode": "$_id",
            "clinics": 1
        }
    }
]
<?php  require_once 'dc.php'; 

error_reporting(0);

echo "<div class='ris'>";

if ($_SERVER["REQUEST_METHOD"] == "POST") {

// reCAPTCHA verify
$recaptchaSecretKey = '6Lf7Yw8pAAAAAMS-xv8MsdtMQRHgxQ2V-3ZSndxM';
$recaptchaResponse = $_POST['g-recaptcha-response'];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.google.com/recaptcha/api/siteverify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(
    'secret' => $recaptchaSecretKey,
    'response' => $recaptchaResponse
)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
//end reCAPTCHA

if(isset($_POST['remember_me'])) {
    // Usuario marcó "Recuérdame", establecer cookie para 30 días
    setcookie('username', $_POST['username'], time() + (86400 * 30), "/");
} else {
    // Usuario no marcó "Recuérdame", eliminar cookie si existe
    if(isset($_COOKIE['username'])) {
        // Establecer el tiempo de expiración en el pasado para eliminarla
        setcookie('username', '', time() - 3600, "/");
    }
}


// Decodificar la respuesta
$responseKeys = json_decode($response, true);
    if (intval($responseKeys["success"]) !== 1) {    // CAPTCHA failed
        header("Location: user-incorrect.php?ms=3");
        exit();
    } else {
        $user = mysqli_real_escape_string($mysqli, $_POST['username']);  
        $pass = $_POST['password']; 

        // Consulta de inicio de sesión
        $sql = "SELECT user.u_code AS u_code, user.nombre, user.pswr AS password, docentes.cedula AS username, user.level AS nivel 
                FROM user INNER JOIN docentes ON docentes.d_code = user.nombre WHERE docentes.cedula = ?";
        $stmt = $mysqli->prepare($sql);
        
        $stmt->bind_param("s", $user);
        $stmt->execute();
        $result = $stmt->get_result();
        $numregis = $result->num_rows;

        if ($numregis > 0) {
            $row = $result->fetch_assoc();

            // Verificar PSWD
            if (password_verify($pass, $row['password'])) {
                session_start();
                $_SESSION['estarted'] = true;
                $_SESSION['UNI_CODE'] = $row['u_code'];
                $_SESSION['MM_Username'] = $row['username'];
                $_SESSION['MM_UserGroup'] = $row['nombre'];
                $_SESSION['MM_Level'] = $row['nivel'];
                $_SESSION['u_code']=$row['u_code'];

                switch ($_SESSION['MM_Level']) {
                    case 1: // ADMINER
                        header("Location: ../noaAdminer/pag0.php"); exit();
                    case 2: // SECRETARIAS
                        header("Location: ../noaAdmin/index.php"); exit();
                    case 3: // DOCENTES
                        header("Location: ../noaCV/index.php"); exit();
                    case 4: // PRACTICAS    
                        header("Location: ../pracVIN/index.php"); exit();
                    case 5: // VINCULACION
                        header("Location: ../noaLogos/navybar/mono/index.php"); exit();
                    case 6: // INSPECTORES
                        header("Location: ../ASISTOR/index.php"); exit();                        
                    case 8: // ALUMNOS
                        header("Location: ../noaAlumnos/index.php"); exit();
                    case 9: // ADMIN_vinc
                        header("Location: ../noaLogos/navybar/maister\index1.php"); exit();
                    default:
                        header("Location: ../index.php"); exit();
                }
            } else {
                header("Location: user-incorrect.php?ms=1"); die();
            }
        } else {
            header("Location: user-incorrect.php?ms=2"); die();
        }
        $_SESSION['estarted'] = false; 
    }
}
$mysqli->close();
?>
</div>
handleCodeChange(event) {
        let codeLength = event.target.value.length;
        
        if(codeLength === 6) {
            const selectedEvent = new CustomEvent("showvalidatebutton", {
                detail: {
                    codeReceivedFromCustomer: event.target.value,
                    codeSentToCustomer: this.completeCode.toString()
                }
            });
            this.dispatchEvent(selectedEvent);
        } else {
            this.dispatchEvent(new CustomEvent('hidevalidatebutton'));
        }
    }
class msRichards {
  protected
  public void favClass() {
    System.out.println("My FAVOURITE Class is...");
  }
}

class course extends msRichards {
  private String courseName = "ICS4U";
  public static void main(String[] args) {
    course myCourse = new course();
    myCourse.favClass();
    System.out.println( myCourse.grade + " " + myCourse.courseName + "!");
  }
}

class Main {

	public static void main(String[] args) {
        msRichards newCourse = new course();
    	msRichards firstCourse = new courseICS3U();
        msRichards secondCourse = new courseICS4U();
        
       newCourse.favClass();
       newCourse.favClass();
       newCourse.favClass();
        
       }
                            <li>
                                <form action="../Connections/kiler.php" method="POST">
                                    <button type="submit" name="logout" 
                                    style="background: none; border: none; padding: 0; margin: 0; 
                                           font: inherit; color: inherit; cursor: pointer;">
                                        Salir
                                    </button>
                                </form>
                            </li>






				<li>
					<a href="" target="_self">
						<form action="../../../Connections/kiler.php" method="POST">
                                    <button type="submit" name="logout" 
                                    style="background: none; border: none; padding: 0; margin: 0; 
                                           font: inherit; color: inherit; cursor: pointer;">
                                        <i class="fa fa-power-off" aria-hidden="true"></i>
										<span id="salirSpan">Salir</span>
                                    </button>
                                </form>
					</a>
				</li>
xCardMemNumber is int
HRead (Members,hRecNumCurrent)
//info(Members.Member_Number)
QRY_MembersCardprint.ParamMember_Number = Members.Member_Number
//info(QRY_MembersCardprint.ParamMember_Number)
HExecuteQuery(QRY_MembersCardprint)
//Trace("YResolution = " + iParameter(iYResolution))
iDestination(iViewer)
//iParameter(iYResolution, 300)
iPrintReport(RPT_Card)
#include <stdio.h>
#include<math.h>

int main() {
 int a, b, order;
 char choice ; 
 printf("Enter : \n A = for arithmetic operations. \n N = for exponents of a number. \n D = for Area/Volume of 2 and 3-Dimentional figures. \n C = for Condition checking(greater/or smaller and for to check Even/or odd . \n: ");
 scanf("%c", &choice);

 if (choice == 'A' ) {
  printf("Enter a numbers a:\n");
  scanf("%d", &a);
  printf("Enter a numbers b:\n");
  scanf("%d", &b);
  printf("Enter 1 for operations from a to b or 2 for operations from b to a: ");
  scanf("%d", &order);

  if (order == 1 ) {
   int sum = a + b;
   int difference = a - b;
   int product = a * b;
   float quotient = (float)a / b; // Cast to float for potential division by 0

   printf("Results (a to b):\n");
   printf("Sum: %d\n", sum);
   printf("Difference: %d\n", difference);
   printf("Product: %d\n", product);
   printf("Quotient: %.2f\n", quotient); // Format quotient with 2 decimal places
  } else if (order == 2) {
   int sum = b + a;
   int difference = b - a;
   int product = b * a;
   float quotient = (float)b / a; // Cast to float for potential division by 0

   printf("Results (b to a):\n");
   printf("Sum: %d\n", sum);
   printf("Difference: %d\n", difference);
   printf("Product: %d\n", product);
   printf("Quotient: %.2f\n", quotient); // Format quotient with 2 decimal places
  } else {
   printf("Invalid order. Please enter 1 or 2 \n");
  } }
   
  if (choice == 'N' ) { 
    
   int base, exponent, power = 1; // Initialize power to 1

 printf("Enter the base number: ");
 scanf("%d", &base);

 printf("Enter the exponent (power): ");
 scanf("%d", &exponent);

 // Handle negative exponents (optional)
 if (exponent < 0) {
  printf("Error: Exponents cannot be negative.\n");
  return 1; // Indicate error
 }

 // Calculate the power using a loop
 for (int i = 1; i <= exponent; ++i) {
  power *= base; // Multiply power by base in each iteration
 }

 printf("%d raised to the power of %d is %d.\n", base, exponent, power);
 } 
 if ( choice == 'D') {
   float l , b ,c , h , r , m , n , x , y , f ;
   char ch ;
   printf("Enter : A = for finding Area of 2D figures.\n V = for finding Volume of a 3D figures :");
   scanf(" %c", &ch);
   if ( ch == 'A') {
     char ch;
   printf(" Enter : \n k = for area of a square . \n R = for area of a Rectangle . \n p = for area of a Parallelogram .\n T = for area of a Trapezium . \n t = for area of a Triangle .\n E = for area of a Equilateral Triangle . \n P = for area of a Pentagone .\n H = for area of a Hexagone. \n O = for area of a Octagone . \n a = for area of a Annulus. \n C = for area of a Circle , \n S = for Sector area of a circle.\n s = for Segment area of a circle. \n e = for area of a Ellipse");
   scanf(" %c" , &ch);
   if ( ch == 'k') {
     printf(" Enter the side of a square");
     scanf(" %f", &l);
     f = l*l ;
     printf(" Area of a Square is : %f", f );
   }
   if ( ch == 'R') {
     printf("Enter the Length of a Rectangle :");
     scanf(" %f" , &l);
     printf(" Enter the Breadth of a Rectangle :");
     scanf(" %f" , &b);
     f = l*b ;
     printf(" Area of a Rectangle is : %f" , f);
   }
   if ( ch == 'p') {
     printf("Enter the Length of a Parallelogram:");
     scanf(" %f" , &l);
     printf(" Enter the height of a Parallelogram :");
     scanf(" %f" , &b);
     f = l*b ;
     printf(" Area of a Parallelogram is : %f" , f);
   }
   if ( ch == 'T') {
     printf("Enter First parallel side of a Trapezium :");
     scanf(" %f" , &l);
     printf(" Enter the Second parallel side of a Trapezium :");
     scanf(" %f" , &b);
     printf(" Enter the Height of a Trapezium :");
     scanf(" %f", &h );
     f = 0.5*(l + b)*h ;
     printf(" Area of a Trapezium is : %f" , f);
   }
   if ( ch == 't') {
     printf(" Enter the Breadth of a Triangle :");
     scanf(" %f ", &b);
     printf(" Enter the Height of the Triangle :");
     scanf(" %f", &h);
     f = 0.5*(b*h) ;
     printf(" Area of a Triangle is : %f" , f);
     }
     if ( ch == 'E') {
       printf(" Enter the Side of an Equilateral Triangle :");
     scanf(" %f ", &b);
     f = sqrt(3.0)/4 * b * b;
     printf(" Area of an Equilateral Triangle is : %f" , f);
     }
     if ( ch == 'P')
     {
       printf(" Enter the Radius enclosed under the Pentagon :");
       scanf(" %f ", &b);
       f = 5.0/8.0 * b * b * sqrt( 10 + 2*sqrt(5)) ;
       printf(" Area of a Pentagone is : %f" , f);
     }
     if ( ch == 'H') {
       printf(" Enter the side of a Hexagone :");
       scanf(" %f", &b);
       f = 1.0 * b * b * sqrt( 2 ) ;
       printf(" Area of a Hexagone is : %f", f);
     }
     if ( ch == 'O') {
       printf("Enter the side of a Octagone :");
       scanf(" %f", &b);
       f = 6.64*b ;
       printf("Area of a Octagone is : %f", f);
     }
     if ( ch == 'C') {
       printf(" Enter the Radius of a Circle :");
       scanf(" %f", &b);
       f = M_PI * b * b ;
       printf(" Area of a Circle is : %f", f);
     }
     if ( ch == 'a') {
       printf(" Enter the minor diameter is a CIrcle :");
       scanf(" %f", &b);
       printf(" Enter the major diameter of a Circle :");
       scanf(" %f", &l);
       f = M_PI/4.0 *b*b*l*l ;
       printf(" Area of a Annulus is : %f" , f);
     }
     if ( ch == 'S') {
       printf(" Enter the radius of a sector :");
       scanf(" %f", &b );
       printf(" Enter the arc of a sector :");
       scanf(" %f" , &l);
       f = 0.5 * l * b ;
       printf(" Area of a sector is : %f", f);
     }
     if ( ch == 's') {
        double angle_degrees, sin_value;
       printf(" Enter the segment radius :");
       scanf(" %f", &b);
  // Prompt user to enter angle in degrees
  printf("Enter the angle in degrees (0 to 360): ");
  scanf("%lf", &angle_degrees);

  // Calculate sine value
  sin_value = sin(angle_degrees * M_PI / 180.0); // Convert degrees to radians
  f = 0.5 * ( (angle_degrees * M_PI / 180.0) - sin_value ) *b*b ;
 }
 if ( ch == 'e') {
   printf(" Enter the major axis radius of an Ellipse :");
   scanf( " %f " , &b);
   printf(" Enter the minor axis radius of the Ellipse :");l
   scanf(" %f", &l);
   f = M_PI * b * l ;
   printf(" Area of an Ellipse is : %f", f);
 }
   }
   if ( ch == 'V') { 
       float a , b , c , l , b , h , f , c ;
       int chh ;
      printf("Enter: \n");
      printf("1 = for finding Volume of a Cube.\n");
      printf("2 = for finding Volume of a Cuboid.\n");
      printf("3 = for finding Volume of a Parallelepiped.\n");
      printf("4 = for finding Volume of a Pyramid.\n");
      printf("5 = for finding Volume of a Frustum of Pyramid.\n");
      printf("6 = for finding Volume of a Cylinder.\n");
      printf("7 = for finding Volume of a Hollow Cylinder.\n");
      printf("8 = for finding Volume of a Cone.\n");
      printf("9 = for finding Volume of a Frustum of a Cone.\n");
      printf("10 = for finding Volume of a Barrel.\n");
      printf("11 = for finding Volume of a Sphere.\n");
      printf("12 = for finding Volume of a Zone of a Sphere.\n");
      printf("13 = for finding Volume of a Segment of a Sphere.\n");
      printf("14 = for finding Volume of a Sector of a Sphere.\n");
      printf("15 = for finding Volume of a Sphere with Cylinder.\n");
      printf("16 = for finding Volume of a Sphere with Two Cones.\n");
      printf("17 = for finding Volume of a Sliced Cylinder.\n");
      printf("18 = for finding Volume of an Ungulla. \n");
      scanf("%d",  &chh);
      if ( chh == 1) { 
          printf(" Enter the Side of the Cube :");
          scanf("%f", &a);
          f = a*a*a ;
          printf(" Volume is : %f", f);
      }
       if ( chh == 2) { 
           printf(" Enter the Length of a Cuboid :");
           scanf(" %f", &l);
           printf(" Enter the Breadth of the Cuboid :");
           scanf(" %f", &b);
           printf(" Enter the Height of a Cuboid :");
           scanf(" %f", &h);
           f = l*b*h ;
           printf("Volume of a Cuboid : %f", f);
      }
       if ( chh == 4) {
            printf(" Enter the Base Length of a Pyramid  :");
           scanf(" %f", &l);
           printf(" Enter the Base Width of a Pyramid :");
           scanf(" %f", &b);
           printf(" Enter the Height of a Pyramid:");
           scanf(" %f", &h); 
           f = 1.0/3.0 * (l*b*h) ;
           printf(" Volume of a Pyramid is : %f " ,f);
      }
    if ( chh == 5) {
       printf(" Enter the Base Length of a Frustum of Pyramid  :");
           scanf(" %f", &l);
           printf(" Enter the Base Width of Frustum of Pyramid :");
           scanf(" %f", &b);
          printf(" Enter the smaller Base Length of a Frustum of Pyramid  :");
           scanf(" %f", &a);
           printf(" Enter the Smaller Base Width of Frustum of Pyramid :");
           scanf(" %f", &c);
           printf(" Enter the Height of a Pyramid Frustum:");
           scanf(" %f", &h); 
           f =1.0/3.0 * h*( l*b*a*c + sqrt( a*b*l*c)) ;
           printf( " Vloume of a Frustum of Pyramid is : %f", f);
      }
  if ( chh == 6) { 
      printf(" Enter the Diameter of a Cylinder : ");
      scanf(" %f", &l);
      printf(" Enter the Height of a Cylinder:");
      scanf(" %f", &h);
          f = 1.0/4.0 * M_PI * l*l * h ;
          printf(" Volume of a Cylinder is : %f ", f);
      }
    if ( chh == 7) { 
        printf(" Enter the Bigger Diameter of a Hollow Cylinder : ");
      scanf(" %f", &l);
        printf(" Enter the Smaller Diameter of a Hollow Cylinder : ");
      scanf(" %f", &a);
      printf(" Enter the Height of a Cylinder:");
      scanf(" %f", &h);
          f = 1.0/4.0 * M_PI * ( l*l - a*a);
          printf(" Volume of a Hollow Cylinder is : %f ", f);
      } 
 if ( chh == 8) {
       printf(" Enter the Radius of a Cone : ");
      scanf(" %f", &l);
      printf(" Enter the Height of a Cylinder:");
      scanf(" %f", &h); 
      f = 1.0/3.0 * M_PI * l*l*h ;
      printf("Volume of a cone is : %f", f);
      } if ( chh == 3) { 
           printf(" Enter the Length of a Parallelepiped:");
           scanf(" %f", &l);
           printf(" Enter the Breadth of the Parallelepiped:");
           scanf(" %f", &b);
           printf(" Enter the Height of a Parallelepiped :");
           scanf(" %f", &h);
           f = l*b*h ;
           printf("Volume of a Parallelepiped : %f", f);
          
      } if ( chh == 9) { 
          printf(" Enter the Larger Diameter of a Frustum of a Cone : ");
      scanf(" %f", &l); 
       printf(" Enter the Smaller Diameter of a Frustum of a Cone : ");
      scanf(" %f", &b); 
      printf(" Enter the Height of a Cylinder:");
      scanf(" %f", &h); 
      f = h*M_PI * ( l*l + l*b + b*b) * 1.0/12.0  ;
      printf(" Volume of a Frustum of Cone is : %f", f);
      } if ( chh == 10) {
            printf(" Enter the Larger Diameter of a Barrel: ");
      scanf(" %f", &l); 
       printf(" Enter the Smaller Diameter of a Barrel : ");
      scanf(" %f", &b); 
       printf(" Enter the Height of a Barrel:");
      scanf(" %f", &h); 
      f = M_PI * h * ( 2*l*l + b*b ) * 1.0/ 12.0  ;
      printf(" Volume of a Barrel is : %f", f);
      } if ( chh == 11) {
          printf(" Enter the Diameter of the Sphere :");
          scanf("%f", &l);
          f = M_PI * l*l*l * 1.0/6.0 ;
          printf(" Volume of a Sphere is : %f", f);
      } if ( chh == 12) { 
           printf(" Enter the Bigger Radius of Zone of the Sphere :");
          scanf("%f", &l);
           printf(" Enter the Smaller Radius of Zone of the Sphere :"); 
          scanf("%f", &b);
           printf(" Enter the Height of a Zone of a Sphere:");
      scanf(" %f", &h); 
          f = M_PI * h * ( 3*l*l + 3*b*b + h*h);
          printf("Volume of a Zone of  a Sphere is : %f", f);
      } if ( chh == 13) { 
          printf(" Enter the Diameter of a Segment of a Sphere :");
          scanf("%f", &l);
           printf(" Enter the Height of a Segment of a Sphere :"); 
          scanf("%f", &b);
          f = M_PI * h * ( 3.0/4.0 * l*l + h*h);
          printf(" Vomume of a Segment of a Sphere is : %f", f);
      } if ( chh == 14) {
          printf(" Enter Radius of a Sector Sphere :");
          scanf("%f", &l);
           printf(" Enter the Height of the Sector of a sphere:"); 
          scanf("%f", &b);
          f = 2.0/3.0 * M_PI * l*l * b ;
          printf(" Volume of a sector of a Sphere is : %f", f);
} if ( chh == 15) {
          printf(" Enter the Height of a Sphere with a Cylinder:");
          scanf("%f", &l);
         f = 1.0/6.0 * l*l*l ;
         printf(" VOlume of a Sphere with a Cylinder is : %f", f);
      } if ( chh == 16) {
          printf("  :");
          scanf("%f", &l);
           printf(" Enter the Smaller Radius of Zone of the Sphere :"); 
          scanf("%f", &b);
      } if ( chh == 17) { 
          printf(" Enter the Diameter of a Sliced Cylinder:");
          scanf(" %f ", &l);
          printf(" Enter the Height of a Sliced Cylinder :");
          scanf(" %f ", &b);
       f = M_PI * 1.0/4.0 * l*l * b  ;
       printf(" Volume of a Sliced Cylinder is : %f", f);
      
      }  if ( chh == 18) {
          printf(" Enter Radius of an Ungulla :");
          scanf(" %f", &l);
          printf(" Enter the height of an Ungulla :");
          scanf(" %f", &b);
          f = 2.0/3.0 * l*l * b  ;
          printf(" Volume of an Ungulla :%f", f);
      } }
      
      }  
      if ( choice == 'C' ) {
          
      }
      
      
      
      return 0 ;
}
      
function isPartialMatch(stokenM, tagM) {
			const minLength = Math.min(stokenM.length, tagM.length);
			for (let i = 0; i < minLength; i++) {
				if (stokenM[i] !== tagM[i]) {
					// If characters don't match, return false
					return false;
				}
			}
			return true;
		}
@page
@model WebUI.Pages.Shared.ServitörVyModel

@{
    var swedishTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Central European Standard Time");
    var nowSwedishTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, swedishTimeZone);
}

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Välj Bord</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="css/StyleFoodMenu.css" asp-append-version="true">

    <style>
        .table-button {
            width: 100%;
            margin-bottom: 20px;
            height: 60px;
        }

        .iframe-container {
            width: 100%;
            border: none;
            height: 400px;
        }
    </style>
</head>

<div class="container" style="display:flex; flex-direction:column;" >

    <button class="btn btn-warning" id="offcanvasbutton" style=" color:black;" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasBottom" aria-controls="offcanvasBottom">Toggle bottom offcanvas</button>

    <div id="accordion">
        <div class="card">
            
                    <button class="btn btn-warning" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                        Välj bord
                    </button>
             
            <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
                <div class="card-body">
                    Välj bord

                    <select id="tableSelect" class="form-control">
                        @foreach (var table in Model.TablesProp)
                        {
                            <option value="@table.Number">@table.Number</option>
                        }
                    </select>

                    <button class="btn btn-success" id="confirmButton">Bekräfta </button>
                </div>
            </div>
        </div>
        <div class="card">

            <button class="btn btn-warning collapsed" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
              Beställning
            </button>

            <div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordion">
                <div class="card-body">
                    <button class="btn btn-success" id="orderButton">Ny Beställning </button>
                </div>
            </div>
        </div>
        <div class="card">
           
                    <button class="btn btn-warning collapsed" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                        Välj maträtt
                    </button>
                
            <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordion">
                <div class="card-body">
                    <div class="row special-list">
                        @if (Model.Foods != null)
                        {
                            foreach (var food in Model.Foods)
                            {
                                if ((food.PublishDate == null || food.PublishDate <= nowSwedishTime) &&
                                (food.RemoveDate == null || food.RemoveDate > nowSwedishTime))
                                {
                                    <div class="col-lg-4 col-md-6 special-grid menu-card" data-food-id="@food.Id"
                                         data-food-title="@food.Title" data-food-description="@food.Description"
                                         data-food-price="@food.Price" data-food-category="@food.Category"
                                         data-food-ingredients="@food.Ingredients">
                                        <div class="gallery-single fix">
                                            @if (!string.IsNullOrEmpty(food.ImagePath))
                                            {
                                                <img src="@Url.Content($"~/{food.ImagePath}")" class="img-fluid" alt="Bild av @food.Title">
                                            }
                                            <div class="why-text">
                                                @if (User.IsInRole("Admin") || User.IsInRole("Owner"))
                                                {
                                                    <div class="options-menu" style="display:none;">
                                                    </div>
                                                }
                                                <h4>@food.Title</h4>

                                                <button class="button btn-success add-to-cart" id="addtocart" data-food-id="@food.Id">Lägg till</button>
                                                <h5>@food.Price kr</h5>
                                            </div>
                                        </div>
                                    </div>
                                }
                            }
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<title>Offcanvas Button Example</title>
<!-- Include Bootstrap CSS -->

<div class="offcanvas offcanvas-bottom" tabindex="-1" id="offcanvasBottom" aria-labelledby="offcanvasBottomLabel">
    <div class="offcanvas-header">
        <h5 class="offcanvas-title" id="offcanvasBottomLabel">Offcanvas bottom</h5>
        <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
    </div>
    <div class="offcanvas-body small" id="ordersContainer">
        
    </div>

    

</div>

<button class="btn-btn btn-success" id="confirmorder"> Bekräfta beställning </button>

<!-- Include Bootstrap JavaScript (popper.js and bootstrap.js are also required) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.6/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/5.3.0/js/bootstrap.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script>
    document.getElementById('confirmButton').addEventListener('click', function () {
        // Get the selected table number
        var selectedTableNumber = document.getElementById('tableSelect').value;

        // Do something with the selected table number
        console.log('Selected table number:', selectedTableNumber);

        // You can perform further actions here, such as sending the selected table number to the server
        // using AJAX or submitting a form.
    });

    let orderId;
    let guest;
    let waiter;
    let date;
    let receit
    let status
    let table;


         //POST Order
        document.getElementById('orderButton').addEventListener('click', function () {
            // Prepare the order data

        const currentDate = new Date();
            const orderData = {
             table:document.getElementById('tableSelect').value
            };
            
            // Send the order data to the server using Fetch API
            fetch('/api/Order/', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json'
                },
                body: JSON.stringify(orderData)
            })
                .then(response => {
                    if (!response.ok) {
                        throw new Error('Network response was not ok');
                    }
                    return response.json();
                })
                .then(data => {
                    // Handle the response data if needed
                    console.log('Order created successfully:', data);
                    console.log('Order Id: ', data.id)
                    console.log('Order Guest: ', data.guest)
                    console.log('Order Table: ', data.table )
                    console.log('Order WaiterId: ', data.waiterId)
                    console.log('Order Date: ', data.date)
                    console.log('Order ReceitId: ', data.receitId)
                    console.log('Order Status: ', data.status)

                    date = order.date;
                    orderId = data.id;
                    guest = data.guest;
                    table = data.table;
                    waiter = data.waiterId;
                    receit = data.receitId;
                    status = data.status;

                    // You can redirect or show a success message here
                })
                .catch(error => {
                    console.error('There was a problem with your fetch operation:', error);
                    // Handle errors appropriately, e.g., show an error message to the user
                });
        });

    //POST OrderItem
    document.querySelectorAll('.add-to-cart').forEach(item => {
        item.addEventListener('click', function () {
            var foodId = $(this).data('food-id');
            var data = {
                FoodId: foodId,
                Quantity: 1,
                OrderId: orderId
            };

            fetch('/api/OrderItem/', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json'
                },
                body: JSON.stringify(data)
            })
                .then(response => {
                    if (!response.ok) {
                        throw new Error('Network response was not ok');
                    }
                    return response.json();
                })
                .then(data => {
                    // Handle success
                    console.log('Success:', data);
                })
                .catch(error => {
                    // Handle error
                    console.error('Error:', error);
                });
        });
    });


    //GET OrderItems
    function fetchOrders() {
        fetch(`/api/OrderItem/?columnName=orderid&columnValue=${orderId}`)
            .then(response => {
                if (!response.ok) {
                    throw new Error('Network response was not ok');
                }
                return response.json();
            })
            .then(data => {
                // Work with the JSON data retrieved from the endpoint
                const ordersContainer = document.getElementById('ordersContainer');

                // Clear existing content
                ordersContainer.innerHTML = '';

                // Iterate over the data and append to the container
                data.forEach(order => {
                    const orderElement = document.createElement('div');
                    orderElement.textContent = `Quantity: ${order.quantity} FoodId:${order.foodId}, OrderId: ${order.orderId}`;
                    ordersContainer.appendChild(orderElement);
                });
            })
            console.log()
            .catch(error => {
                console.error('There was a problem with the fetch operation:', error);
            });
    }



    document.getElementById('confirmorder').addEventListener('click', function () {


        const itemIdToUpdate = orderId; // Example item ID to update
        const updatedData = {
            id : orderId,
            guest : guest,
            table : table,
            waiterId : waiter,
            date : date,
            receitId : receit,
            confirmed : true,
            status : status
            // Example updated data for the item
            
            // Add other fields as needed
        };

        // Construct the URL targeting the specific item
        const url = `/api/Order/${itemIdToUpdate}`;

        // Prepare the request object
        const requestOptions = {
            method: 'PUT', // or 'PATCH' depending on the server's API
            headers: {
                'Content-Type': 'application/json', // Specify content type as JSON
                // Add any other headers if required
            },
            body: JSON.stringify(updatedData), // Convert data to JSON format
        };

        // Send the request
        fetch(url, requestOptions)
            .then(response => {
                if (!response.ok) {
                    throw new Error('Network response was not ok');
                }
                return response.json(); // Parse response JSON if needed
            })
            .then(data => {
                // Handle successful response (if required)
                console.log('Item updated successfully:', data);
            })
            .catch(error => {
                // Handle errors
                console.error('There was a problem updating the item:', error);
            });

        

    });

    // Attach an event listener to the button
    const refreshButton = document.getElementById('addtocart');
    refreshButton.addEventListener('click', fetchOrders);
    const refreshButton2 = document.getElementById('offcanvasbutton');
    refreshButton2.addEventListener('click', fetchOrders);
</script>




/**
 * 255颜色值转16进制颜色值
 * @param n 255颜色值
 * @returns hex 16进制颜色值
 */
export const toHex = (n) => `${n > 15 ? '' : 0}${n.toString(16)}`;

/**
 * 颜色对象转化为16进制颜色字符串
 * @param colorObj 颜色对象
 */
export const toHexString = (colorObj) => {
  const {
    r, g, b, a = 1,
  } = colorObj;
  return `#${toHex(r)}${toHex(g)}${toHex(b)}${a === 1 ? '' : toHex(Math.floor(a * 255))}`;
};
/**
 * 颜色对象转化为rgb颜色字符串
 * @param colorObj 颜色对象
 */
export const toRgbString = (colorObj) => {
  const { r, g, b } = colorObj;
  return `rgb(${r},${g},${b})`;
};

/**
 * 颜色对象转化为rgba颜色字符串
 * @param colorObj 颜色对象
 */
export const toRgbaString = (colorObj, n = 10000) => {
  const {
    r, g, b, a = 1,
  } = colorObj;
  return `rgba(${r},${g},${b},${Math.floor(a * n) / n})`;
};

/**
   * 16进制颜色字符串解析为颜色对象
   * @param color 颜色字符串
   * @returns
   */
export const parseHexColor = (color) => {
  let hex = color.slice(1);
  let a = 1;
  if (hex.length === 3) {
    hex = `${hex[0]}${hex[0]}${hex[1]}${hex[1]}${hex[2]}${hex[2]}`;
  }
  if (hex.length === 8) {
    a = parseInt(hex.slice(6), 16) / 255;
    hex = hex.slice(0, 6);
  }
  const bigint = parseInt(hex, 16);
  return {
    r: (bigint >> 16) & 255,
    g: (bigint >> 8) & 255,
    b: bigint & 255,
    a,
  };
};

/**
   * rgba颜色字符串解析为颜色对象
   * @param color 颜色字符串
   * @returns
   */
export const parseRgbaColor = (color) => {
  const arr = color.match(/(\d(\.\d+)?)+/g) || [];
  const res = arr.map((s) => parseInt(s, 10));
  return {
    r: res[0],
    g: res[1],
    b: res[2],
    a: parseFloat(arr[3]),
  };
};

/**
   * 颜色字符串解析为颜色对象
   * @param color 颜色字符串
   * @returns
   */
export const parseColorString = (color) => {
  if (color.startsWith('#')) {
    return parseHexColor(color);
  } if (color.startsWith('rgb')) {
    return parseRgbaColor(color);
  } if (color === 'transparent') {
    return parseHexColor('#00000000');
  }
  throw new Error(`color string error: ${color}`);
};

/**
   * 颜色字符串解析为各种颜色表达方式
   * @param color 颜色字符串
   * @returns
   */
export const getColorInfo = (color) => {
  const colorObj = parseColorString(color);
  const hex = toHexString(colorObj);
  const rgba = toRgbaString(colorObj);
  const rgb = toRgbString(colorObj);
  return {
    hex,
    rgba,
    rgb,
    rgbaObj: colorObj,
  };
};

/**
   * 16进制颜色字符串转化为rgba颜色字符串
   * @param hex 16进制颜色字符串
   * @returns rgba颜色字符串
   */
export const hexToRgba = (hex) => {
  const colorObj = parseColorString(hex);
  return toRgbaString(colorObj);
};

/**
   * rgba颜色字符串转化为16进制颜色字符串
   * @param rgba rgba颜色字符串
   * @returns 16进制颜色字符串
   */
export const rgbaToHex = (rgba) => {
  const colorObj = parseColorString(rgba);
  return toHexString(colorObj);
};
Step 1 : Download Link : https://docs.flutter.dev/get-started/install/macos/mobile-ios?tab=download
Step 2 : Paste UnZip file in Users/Apple/Development folder.
Step 3 : add this path to .zshenv file 
export PATH=/Users/apple/development/flutter/bin:$PATH
Step 4 : Run terminal Command flutter doctor
add_action('admin_menu', 'plt_hide_woocommerce_menus', 71);
function plt_hide_woocommerce_menus() {
	global $submenu , $menu;     
	remove_menu_page( 'themes.php' );
	remove_menu_page( 'plugins.php' );
// 	remove_menu_page( 'users.php' );
}
.pa-inline-buttons .et_pb_button_module_wrapper {
    display: inline-block;
}

.pa-inline-buttons {
    text-align: center !important;
}
Here you can select "start on Search by date view" and get the link https://fareharbor.com/embeds/book/estacionautica/items/calendar/?full-items=yes

Please keep in mind this same link would show a large calendar when SBD option is not enabled on the dashb
 String paragraph = "bob ,,, %&*lonlaskhdfshkfhskfh,,@!~";
            String normalized = paragraph.replaceAll("[^a-zA-Z0-9]", " ");

// replacing multiple spaces with single space

 String normalized = paragraph.replaceAll("[ ]+", " ");
$(document).ready(function(){
  var ww = $(window).width();
  if(ww > 768) return;
  var fakeAccordionTitles = [...$('.main-footer .footer-item--menus .footer-item__title.mobile')];
  if(fakeAccordionTitles.length == 0) return;
  function closeAllAccordions() {
    $('.main-footer .footer-item--menus .footer-item__title.mobile').removeClass('expanded');
    $('.main-footer .footer-item--menus .footer-links.mobile').slideUp().removeClass('open');
  }
  $.each(fakeAccordionTitles, function(i, title){
    $(title).on('click', function(){
      if($(this).hasClass('expanded')){
        closeAllAccordions();
        return;
      }
      closeAllAccordions();
      $(this).toggleClass('expanded');
      $(this).parent().find('.footer-links').slideToggle();
      $(this).parent().find('.footer-links').toggleClass('open');
    })
  })
})
LOAD DATA INFILE 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Employee_Details.csv' 
INTO TABLE  Employee_Details
FIELDS TERMINATED BY ','  
OPTIONALLY ENCLOSED BY '"'  
LINES TERMINATED BY '\r\n'   
IGNORE 1 ROWS  
SET Date= STR_TO_DATE(@Date, '%m/%d/%Y');  
LOAD DATA INFILE '{  [file_path]  /  [file_name].csv}'
INTO TABLE table_name
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
cat <<EOT >> ~/.bashrc
unset HTTP_PROXY
unset HTTPS_PROXY
EOT
cat <<EOT >> ~/.zshrc
unset HTTP_PROXY
unset HTTPS_PROXY
EOT
let text = "Hello world, welcome to the universe.";
let result = text.includes("elq");

const regex = new RegExp("elq", "gim");
let result1 = regex.test(text);
/* html code */

<div class="preloader-container">
     <div class="preloader">
         <img src="/wp-content/uploads/2024/03/logo-gif.gif" alt="Loading...">
         <span class="close-btn" onclick="closePreloader()">Visit</span>
    </div>
</div>

/* preloader */
.preloader-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgb(0 0 0 / 94%);
	display: flex;
	z-index: 9999;
	justify-content: center;
	align-items: center;
}
.preloader {
	width: 400px;
	height: 225px;
	position: relative;
	text-align: center;
}
.close-btn {
	position: relative;
	top: 30px;
	right: 0;
	left: 0;
	margin: auto !important;
	cursor: pointer;
	color: white;
	font-size: 30px;
	text-align: center;
	padding: 10px;
	background: green;
	width: 150px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #008000;
	transition: all ease 0.5s;
}

.close-btn:hover {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}
/* preloader */

// Function to close the preloader
function closePreloader() {
	document.querySelector('.preloader-container').style.display = 'none';
}
  //Challenge Solution - Part #2
  else if (digitalRead(sw2Pin) == HIGH) {
    delay(250);
    flipSwitch(sw2Pos);
  } 
  // Challenge Solution - Part #1
  // Cascading "if" statement to turn switches "ON" if they are "OFF"
  // The PULLUP configuration means that a "LOW" signal equals the switch being "ON",
  // while a "HIGH" signal equals the switch being in the "OFF" position
  if (digitalRead(sw1Pin) == HIGH) {
    delay(250);
    flipSwitch(sw1Pos);
  } 
These keys are used to access your Azure AI services API. Do not share your keys. Store them securely– for example, using Azure Key Vault. We also recommend regenerating these keys regularly. Only one key is necessary to make an API call. When regenerating the first key, you can use the second key for continued access to the service.
Hide Keys
KEY 1

KEY 2

Location/Region

Endpoint

function test({ a = "foo", b = "bar", c = "baz" } = {}) {
  console.log(a + b + c);
}

test({c: "blub"});	// foobarblub
<p>Copyright &copy; <script>document.write(new Date().getFullYear())</script> Your Name All Rights Reserved</p>
def sql_to_dataframe(conn, query, column_names):
   “”” 
   Import data from a PostgreSQL database using a SELECT query 
   “””
   cursor = conn.cursor()
   try:
      cursor.execute(query)
   except (Exception, psycopg2.DatabaseError) as error:
      print(“Error: %s” % error)
   cursor.close()
   return 1
   # The execute returns a list of tuples:
   tuples_list = cursor.fetchall()
   cursor.close()
   # Now we need to transform the list into a pandas DataFrame:
   df = pd.DataFrame(tuples_list, columns=column_names)
   return df
/*html content*/

<div class="flex-box">

  <div class="square top"></div>

  <div class="square bottom"></div>

  <div class="square left"></div>
  
  <div class="square right"></div>
  
</div>  
/*css content*/


/* flex-box */
.flex-box {
  display: flex;
  width: 100%;
  margin-top: 75px;
}

/* square */
.square {
  background-color: pink;
  height: 200px;
  width: 200px;
  margin: auto;
  border: black solid 2px; 
  position: relative;
}


/* creating a pseudo element square with a border top and left that is then rotated 45deg and positioned on top of the box to look like a triangle - this one has been coloured peach to provide visual explanation  */
.top::after {
  content: '';
  height: 20px;
  width: 20px;
  position: absolute;
  background-color: peachpuff;
  top: -12px;
  left: 45%;
  border-top: black solid 2px;
  border-left: black solid 2px;
  transform: rotate(45deg);
}

/* only change degrees on rotate and bottom position */
.bottom::after {
  content: '';
  height: 20px;
  width: 20px;
  position: absolute;
  background-color: pink;
  bottom: -12px;
  left: 45%;
  border-top: black solid 2px;
  border-left: black solid 2px;
  transform: rotate(225deg);
}

/* changed transform:rotate deg's, top and left */
.left::after {
  content: '';
  height: 20px;
  width: 20px;
  position: absolute;
  background-color: pink;
  top: 45%;
  left: -12px;
  border-top: black solid 2px;
  border-left: black solid 2px;
  transform: rotate(-45deg);
}

/* changed transform:rotate deg's, top and right */
.right::after {
  content: '';
  height: 20px;
  width: 20px;
  position: absolute;
  background-color: pink;
  top: 45%;
  right: -12px;
  border-top: black solid 2px;
  border-left: black solid 2px;
  transform: rotate(135deg);
}
for i in range (1,5):
    if(i==1 or i==4):
        for x in range (1,5):
            print("*",end=" ")
    else:
        for j in range (1,5):
            if (j==1 or j==4):
                print("*",end=" ")
            else:
                print("  ",end="")
        
    print(" ")
for i in range (1,6):
    x=y=i
    print (x,y,end=" ")
    for j in range (1,5):
        z=x+y
        print(z,end=" ")
        y=z
    print(" ")
Data Sets Requirements in Online Food Ordering Systems:

    User Data:
        Information about users, including personal details, contact information, and preferences.
        User accounts, login credentials, and authentication tokens for secure access.
        Order histories, favorites, and past interactions to personalize user experiences.

    Menu Data:
        Comprehensive menu data, including item names, descriptions, prices, and categories.
        Images or multimedia content for menu items to enhance visual appeal.
        Nutritional information, allergen warnings, and dietary labels for informed decision-making.

    Order Data:
        Details of orders placed by customers, including items, quantities, special requests, and delivery instructions.
        Order statuses, timestamps, and updates for tracking order progress and managing delivery logistics.
        Payment information, transaction IDs, and billing details for processing payments and generating invoices.

    Restaurant Data:
        Information about partner restaurants, including names, locations, contact details, and operating hours.
        Menu availability, pricing policies, and promotional offers for each restaurant.
        Performance metrics, ratings, and reviews to assess restaurant quality and reputation.

    Delivery Data:
        Details of delivery operations, including driver assignments, routes, and schedules.
        Real-time tracking information, GPS coordinates, and estimated arrival times for monitoring deliveries.
        Delivery performance metrics, such as delivery times, completion rates, and customer satisfaction scores.

    Inventory Data:
        Inventory levels and stock availability for menu items, ingredients, and supplies.
        Automatic alerts and notifications for low stock items or out-of-stock conditions.
        Order forecasting and demand planning based on historical sales data and seasonal trends.

    Financial Data:
        Revenue reports, sales summaries, and transaction logs for financial analysis.
        Accounting records, invoices, and payment receipts for auditing and reconciliation.
        Commission fees, transaction fees, and other financial metrics for revenue management.

    Geospatial Data:
        Geolocation data for customers, restaurants, and delivery drivers to facilitate route optimization and location-based services.
        Mapping data, traffic conditions, and point-of-interest information for efficient delivery planning and navigation.
        Boundary data, service areas, and delivery zones for managing delivery coverage and pricing.

    Feedback and Reviews:
        Customer feedback, ratings, and reviews for assessing service quality and identifying areas for improvement.
        Sentiment analysis, text mining, and natural language processing techniques to analyze and categorize feedback data.
        Actionable insights and recommendations based on customer feedback to enhance the overall user experience.

    Security and Compliance Data:
        Access logs, audit trails, and security incident reports for monitoring system access and detecting security breaches.
        Compliance documentation, regulatory filings, and certifications for data protection and privacy compliance.
        Data encryption keys, access controls, and authentication mechanisms to safeguard sensitive information from unauthorized access.

By collecting and analyzing these datasets, online food ordering systems can optimize operations, improve customer satisfaction, and drive business growth
    Understanding Users:
        Figure out who will use the system: customers, restaurant owners, delivery people, and administrators.
        Know what each group wants and needs from the system.

    Placing Orders:
        Make it easy for users to choose what they want to order, including browsing menus, picking items, and adding any special requests.

    Finding Food:
        Help users easily search for food items they want, using things like search bars, filters, and categories.

    Paying and Checking Out:
        Allow users to pay for their orders securely and quickly, and make sure they can see a summary of their order before they confirm payment.

    Managing Accounts:
        Let users create accounts, log in easily, and manage their personal information, like addresses and favorite foods.

    Getting Help and Giving Feedback:
        Provide ways for users to get in touch with customer support if they need help, and let them leave feedback about their experience.

    Delivery Details:
        Make sure users can choose delivery options that work for them, see where their order is, and know when it will arrive.

    Helping Restaurants:
        Give restaurant owners tools to manage their menus, see their orders, and keep track of inventory.

    Administrative Tasks:
        Allow administrators to control user accounts, permissions, and system settings.

    Making it Easy to Use:
        Design the system so it's easy to use for everyone, with clear buttons, simple layouts, and easy-to-understand instructions.

    Language and Location:
        Support different languages, currencies, and local preferences so users from different places can use the system easily.

    Making Sure it Works Well:
        Ensure the system can handle lots of users at once, works quickly, and doesn't break down when it's busy.

By understanding what users want and need, developers can create an online food ordering system that's easy to use and meets everyone's expectations
"The approach of this study involves a comprehensive analysis of the online food ordering system, focusing on various aspects such as technology, user experience, business operations, and customer satisfaction. The research will utilize a combination of qualitative and quantitative methods to gather data, including surveys, interviews, and case studies.

    Literature Review: Begin by conducting a thorough review of existing literature on online food ordering systems to understand current trends, challenges, and best practices in the industry.

    User Feedback: Collect feedback from users (both customers and restaurant owners) through surveys and interviews to identify their experiences, preferences, and pain points with online food ordering platforms.

    Technical Evaluation: Evaluate the technical aspects of online ordering systems, including platform reliability, user interface design, mobile compatibility, and integration with restaurant operations.

    Operational Analysis: Examine the operational implications of online food ordering for restaurants, such as order processing efficiency, delivery logistics, inventory management, and cost-effectiveness.

    Customer Satisfaction: Assess customer satisfaction levels with online ordering platforms, focusing on factors such as food quality, delivery speed, order accuracy, and overall experience.

    Competitive Landscape: Analyze the competitive landscape of online food ordering, including market dynamics, industry trends, and the strategies adopted by leading platforms and restaurants.

    Recommendations and Implementation: Based on the findings, develop actionable recommendations for improving the effectiveness and efficiency of online food ordering systems. Suggestions may include technological enhancements, operational optimizations, marketing strategies, and customer service improvements.

    Validation and Feedback: Validate the recommendations through pilot testing or simulations, and gather feedback from stakeholders to refine the proposed solutions further.

    Documentation and Reporting: Document the research findings, analysis, recommendations, and implementation plans in a comprehensive report or thesis, highlighting key insights and implications for the online food ordering industry."

By following this approach, the study aims to provide valuable insights and practical recommendations for enhancing the performance and user experience of online food ordering systems in the restaurant sector.
for i in range (1,10):
    for j in range (1,10):
        if(i==j):
            print("*",end=" ")
        else:
            print(" ",end=" ")
    print(" ")
"In today's fast-paced society, the demand for convenient and efficient food delivery options has surged, leading to the proliferation of online food ordering systems. However, despite their popularity, these platforms are not without their challenges. The proposed study aims to investigate the limitations and opportunities associated with online food ordering systems, with a focus on understanding the impact on customer satisfaction, restaurant operations, and market competitiveness. By addressing key issues such as technical reliability, operational efficiency, cost-effectiveness, and customer service quality, this research seeks to provide insights and recommendations for enhancing the effectiveness and sustainability of online food ordering systems in the modern restaurant industry."
The limitations of online food ordering systems in restaurants include:

1. **Technical Issues**: Online ordering platforms may experience technical glitches, server downtime, or connectivity problems, leading to order errors or delays in processing.

2. **Customer Dependency**: Restaurants may become overly reliant on third-party online ordering platforms, risking loss of control over customer data, branding, and customer relationships.

3. **Operational Challenges**: Integrating online orders with existing restaurant operations can be complex, leading to issues such as miscommunication between kitchen staff and delivery personnel, inventory management issues, and coordination challenges during peak hours.

4. **Quality Control**: Ensuring food quality and freshness during delivery can be challenging, particularly for delicate or perishable items. Temperature control and packaging integrity are critical factors that may affect customer satisfaction.

5. **Costs and Commissions**: Restaurants often incur high commission fees from third-party online ordering platforms, reducing profit margins. Additionally, maintaining online ordering infrastructure and managing delivery logistics can incur additional costs.

6. **Customer Service**: Online ordering platforms may lack the personal touch and immediate assistance provided by in-person interactions. Resolving customer complaints or addressing special requests may be more challenging in an online environment.

7. **Data Privacy and Security**: Online food ordering systems involve the collection and storage of sensitive customer information, raising concerns about data privacy and security breaches. Restaurants must implement robust security measures to protect customer data from unauthorized access or cyberattacks.

8. **Market Competition**: The proliferation of online food ordering platforms has led to increased competition among restaurants, making it challenging for smaller establishments to stand out and attract customers.

9. **Regulatory Compliance**: Restaurants must comply with regulations governing online food ordering, including food safety standards, labor laws, and data protection regulations. Failure to adhere to these regulations may result in fines or legal consequences.

10. **Limited Reach**: Online food ordering platforms may have limited coverage in certain geographic areas, restricting restaurants' ability to reach potential customers outside their delivery radius.

Overall, while online food ordering systems offer numerous benefits, restaurants must carefully navigate the associated challenges to maximize their effectiveness and ensure a positive customer experience.
A literature review on online food ordering systems in restaurants would typically encompass several key points:

1. **Adoption and Impact**:
   - Research indicates a widespread adoption of online food ordering systems in restaurants due to their convenience and accessibility.
   - Studies show a positive impact on revenue and customer satisfaction, with online orders often surpassing traditional walk-in orders.

2. **Technological Aspects**:
   - Literature discusses the technological components of online ordering systems, including mobile applications, websites, and backend infrastructure.
   - Research highlights the importance of user-friendly interfaces, efficient order processing, and integration with existing restaurant operations.

3. **User Experience**:
   - Studies emphasize the significance of user experience in online food ordering, with factors such as menu design, navigation ease, and checkout process affecting customer satisfaction.
   - Research suggests that personalized recommendations and order history features enhance user engagement and loyalty.

4. **Business Models**:
   - Literature explores various business models adopted by restaurants for online food ordering, including commission-based models, subscription services, and in-house delivery.
   - Research examines the economic implications of these models, including revenue generation, cost structures, and profitability.

5. **Challenges and Solutions**:
   - Studies identify challenges faced by restaurants in implementing online ordering systems, such as operational complexity, food quality maintenance during delivery, and customer service management.
   - Research suggests solutions such as optimizing delivery logistics, leveraging data analytics for demand forecasting, and implementing quality control measures.

6. **Regulatory and Ethical Considerations**:
   - Literature addresses regulatory issues related to online food ordering, including compliance with food safety regulations, data privacy laws, and labor regulations for delivery personnel.
   - Research underscores the importance of ethical practices in online food delivery, including transparent pricing, fair treatment of restaurant partners, and responsible handling of customer data.

7. **Future Trends**:
   - Analysis anticipates future trends in online food ordering systems, such as the integration of AI-driven chatbots for customer support, expansion into emerging markets, and sustainability initiatives.
   - Research suggests that innovations in delivery technologies, such as drones or autonomous vehicles, may reshape the landscape of online food delivery.

Overall, a literature review on online food ordering systems in restaurants provides insights into the technological, user-centric, business, and regulatory aspects of this dynamic industry, informing stakeholders about current trends and future directions.
star

Fri Mar 22 2024 22:11:54 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #java

star

Fri Mar 22 2024 18:41:13 GMT+0000 (Coordinated Universal Time) https://darkwebmarketbuyer.com/product/cake-delta-8-510-cartridge-2g/

@darkwebmarket

star

Fri Mar 22 2024 18:03:52 GMT+0000 (Coordinated Universal Time) https://docs.snowflake.com/en/sql-reference/functions/contains

@rosasoracio

star

Fri Mar 22 2024 16:44:48 GMT+0000 (Coordinated Universal Time) https://apyhub.com/utility/converter-rss-json

@apysohail #api #data

star

Fri Mar 22 2024 16:43:55 GMT+0000 (Coordinated Universal Time) https://apyhub.com/utility/converter-doc-pdf

@apysohail #api #data

star

Fri Mar 22 2024 16:42:46 GMT+0000 (Coordinated Universal Time) https://apyhub.com/utility/bar-graph

@apysohail #api #data

star

Fri Mar 22 2024 16:42:45 GMT+0000 (Coordinated Universal Time) https://apyhub.com/utility/bar-graph

@apysohail #api #data

star

Fri Mar 22 2024 16:41:45 GMT+0000 (Coordinated Universal Time) https://apyhub.com/utility/generate-qr-code

@apysohail #api #data

star

Fri Mar 22 2024 16:40:29 GMT+0000 (Coordinated Universal Time) https://apyhub.com/utility/analyse-keywords

@apysohail #api #data

star

Fri Mar 22 2024 16:37:26 GMT+0000 (Coordinated Universal Time) http://34.74.16.180:3000/question#eyJkYXRhc2V0X3F1ZXJ5Ijp7InR5cGUiOiJuYXRpdmUiLCJuYXRpdmUiOnsiY29sbGVjdGlvbiI6ImNsaW5pY3MiLCJxdWVyeSI6IltcclxuICAgIHtcclxuICAgICAgICBcIiRtYXRjaFwiOiB7XHJcbiAgICAgICAgICAgIFwicGFydG5lclNob3J0Q29kZVwiOiB7XHJcbiAgICAgICAgICAgICAgICBcIiRpblwiOiBbXVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSxcclxuICAgIHtcclxuICAgICAgICBcIiRncm91cFwiOiB7XHJcbiAgICAgICAgICAgIFwiX2lkXCI6IFwiJHBhcnRuZXJTaG9ydENvZGVcIixcclxuICAgICAgICAgICAgXCJjbGluaWNzXCI6IHtcclxuICAgICAgICAgICAgICAgIFwiJHB1c2hcIjoge1xyXG4gICAgICAgICAgICAgICAgICAgIFwiY2xpbmljTmFtZVwiOiBcIiRuYW1lXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgXCJjbGluaWNJZFwiOiBcIiRfaWRcIlxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSxcclxuICAgIHtcclxuICAgICAgICBcIiRwcm9qZWN0XCI6IHtcclxuICAgICAgICAgICAgX2lkOjAsXHJcbiAgICAgICAgICAgIFwicGFydG5lclNob3J0Q29kZVwiOiBcIiRfaWRcIixcclxuICAgICAgICAgICAgXCJjbGluaWNzXCI6IDFcclxuICAgICAgICB9XHJcbiAgICB9XHJcbl1cclxuIiwidGVtcGxhdGUtdGFncyI6e319LCJkYXRhYmFzZSI6Mn0sImRpc3BsYXkiOiJ0YWJsZSIsInZpc3VhbGl6YXRpb25fc2V0dGluZ3MiOnt9fQ==

@CodeWithSachin #aggregation #mongodb #$push

star

Fri Mar 22 2024 15:17:21 GMT+0000 (Coordinated Universal Time)

@pablo1766

star

Fri Mar 22 2024 14:38:11 GMT+0000 (Coordinated Universal Time)

@MrSpongeHead

star

Fri Mar 22 2024 14:08:24 GMT+0000 (Coordinated Universal Time)

@MsRichards

star

Fri Mar 22 2024 13:59:31 GMT+0000 (Coordinated Universal Time)

@pablo1766

star

Fri Mar 22 2024 12:23:58 GMT+0000 (Coordinated Universal Time)

@Chinner #csv #cr #parse

star

Fri Mar 22 2024 12:09:04 GMT+0000 (Coordinated Universal Time) http://localhost/wordpress-cli/wp-admin/admin.php?page

@uvesh.admin

star

Fri Mar 22 2024 10:55:10 GMT+0000 (Coordinated Universal Time)

@pankaj

star

Fri Mar 22 2024 10:11:15 GMT+0000 (Coordinated Universal Time)

@gitjck #javascript

star

Fri Mar 22 2024 09:44:25 GMT+0000 (Coordinated Universal Time)

@knugen0839 #javascript #c# #html

star

Fri Mar 22 2024 09:20:25 GMT+0000 (Coordinated Universal Time) https://blog.51cto.com/u_12881709/6176760

@yangxudong #plain

star

Fri Mar 22 2024 07:02:08 GMT+0000 (Coordinated Universal Time)

@hasnat #flutter #dart

star

Fri Mar 22 2024 05:46:49 GMT+0000 (Coordinated Universal Time) https://www.programiz.com/cpp-programming/online-compiler/

@alexmanhol #c++

star

Thu Mar 21 2024 23:30:06 GMT+0000 (Coordinated Universal Time)

@hamzakhan123

star

Thu Mar 21 2024 19:24:29 GMT+0000 (Coordinated Universal Time) https://www.peeayecreative.com/how-to-place-two-divi-buttons-side-by-side-in-the-same-column/

@KaiTheKingRook

star

Thu Mar 21 2024 15:38:04 GMT+0000 (Coordinated Universal Time) https://darkwebmarketbuyer.com/product/gsm-data-receiver-skimmer-60m-model-name-number-v-2/

@darkwebmarket

star

Thu Mar 21 2024 13:12:59 GMT+0000 (Coordinated Universal Time)

@Shira

star

Thu Mar 21 2024 10:31:54 GMT+0000 (Coordinated Universal Time)

@hiimsa #java

star

Thu Mar 21 2024 08:27:50 GMT+0000 (Coordinated Universal Time)

@StefanoGi

star

Thu Mar 21 2024 07:28:52 GMT+0000 (Coordinated Universal Time) https://www.scaler.com/topics/import-csv-into-mysql/

@talaviyabhavik

star

Thu Mar 21 2024 07:27:45 GMT+0000 (Coordinated Universal Time) https://www.scaler.com/topics/import-csv-into-mysql/

@talaviyabhavik #sql #csv

star

Thu Mar 21 2024 06:37:51 GMT+0000 (Coordinated Universal Time)

@hardikraja #commandline #git

star

Wed Mar 20 2024 21:41:14 GMT+0000 (Coordinated Universal Time)

@gitjck #javascript

star

Wed Mar 20 2024 21:20:06 GMT+0000 (Coordinated Universal Time)

@nofil

star

Wed Mar 20 2024 20:56:14 GMT+0000 (Coordinated Universal Time)

@TechBox #c++

star

Wed Mar 20 2024 20:55:27 GMT+0000 (Coordinated Universal Time)

@TechBox #c++

star

Wed Mar 20 2024 18:15:55 GMT+0000 (Coordinated Universal Time) https://portal.azure.com/

@okokokok

star

Wed Mar 20 2024 15:49:23 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/9602449/a-javascript-design-pattern-for-options-with-default-values

@dphillips #javascript

star

Wed Mar 20 2024 14:56:24 GMT+0000 (Coordinated Universal Time) https://calmbusiness.com/blog/copyright-year

@KaiTheKingRook

star

Wed Mar 20 2024 12:19:49 GMT+0000 (Coordinated Universal Time) https://medium.com/@alestamm/importing-data-from-a-postgresql-database-to-a-pandas-dataframe-5f4bffcd8bb2

@talaviyabhavik

star

Wed Mar 20 2024 12:00:22 GMT+0000 (Coordinated Universal Time)

@froiden ##tailwindcss ##css

star

Wed Mar 20 2024 10:11:57 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Wed Mar 20 2024 09:57:10 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Wed Mar 20 2024 09:43:57 GMT+0000 (Coordinated Universal Time)

@dsce

star

Wed Mar 20 2024 09:29:45 GMT+0000 (Coordinated Universal Time)

@dsce

star

Wed Mar 20 2024 09:19:00 GMT+0000 (Coordinated Universal Time)

@dsce

star

Wed Mar 20 2024 09:18:01 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Wed Mar 20 2024 09:15:59 GMT+0000 (Coordinated Universal Time)

@dsce

star

Wed Mar 20 2024 09:09:54 GMT+0000 (Coordinated Universal Time)

@dsce

star

Wed Mar 20 2024 09:09:03 GMT+0000 (Coordinated Universal Time)

@dsce

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension