Skip to content

Instantly share code, notes, and snippets.

View lbattaglioli2000's full-sized avatar
🏠
Working from home

Luigi Battaglioli lbattaglioli2000

🏠
Working from home
View GitHub Profile
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jun 22, 2017 at 06:57 PM
-- Server version: 5.6.33
-- PHP Version: 7.0.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
#include <IRremote.h>
IRsend irsend;
void setup()
{
}
void loop() {
for (int i = 0; i < 3; i++) {
#include <IRremote.h>
#include <string.h>
#include <Servo.h>
Servo leftServo;
Servo rightServo;
int RECV_PIN = 5;
IRrecv irrecv(RECV_PIN);
<?php
include("dbh.php");
$email = $_POST["email"];
$password = $_POST["password"];
$sql = "SELECT * FROM users WHERE email='$email' AND password='$password'";
$results = $conn->query($sql);
/*
SparkFun Inventor's Kit
Example sketch 04
MULTIPLE LEDs
Make six LEDs dance. Dance LEDs, dance!
This sketch was written by SparkFun Electronics,
ice_cream = "ice cream"
# method 1:
print("There is ice in ice cream: " + str("ice" in ice_cream))
# or...
# method 2:
ice_in_ice_cream = "ice" in ice_cream
print("There is ice in ice cream: " + str(ice_in_ice_cream))
hello = "Hello there "
world = "wonderful world!"
hello_world = hello + world
print(hello_world)
# Convert the string they entered to an integer
age = int(input("How old are you: "))
# Determine how old the user will be after three years.
# You need to convert it to an integer because you cannot do math on a string. You'll get an error. Try it!
threeYears = age + 3
# Tell the user how old they'll be in three years.
# The integer threeYears must be converted to a string in order to be printed.
print("In three years you'll be " + str(threeYears)) # This is concatenation, we'll learn this in the next lesson.
# You can put the prompt in as a string directly
userName = input("What is your name? ")
# ...OR...
# The prompt can also be stored as a string in a variable like so:
prompt = "How old are you?"
userAge = input(prompt)
var1 = 42
var2 = 24
# Evaluates to false since 24 is not greater than 42
print(var2 > var1)