MySQL Cheat Sheet
Help with SQL commands to interact with a MySQL database
MySQL Locations
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
Help with SQL commands to interact with a MySQL database
runtime: python27 | |
api_version: 1 | |
threadsafe: true | |
handlers: | |
- url: / | |
static_files: dist/[project-name]/index.html | |
upload: dist/[project-name]/index.html | |
- url: / | |
static_dir: dist/[project-name] | |
skip_files: |
/* ********** Online / Offline Detection ********** */ | |
// Request a small image at an interval to determine status | |
// ** Get a 1x1 pixel image here: http://www.1x1px.me/ | |
// ** Use this code with an HTML element with id="status" | |
const checkOnlineStatus = async () => { | |
try { | |
const online = await fetch("/1pixel.png"); | |
return online.status >= 200 && online.status < 300; // either true or false |
```java | |
import java.util.Scanner; | |
public class HelloWorld { | |
public static void main(String[] args) { | |
// Creates a reader instance which takes | |
// input from standard input - keyboard | |
Scanner reader = new Scanner(System.in); |
/** @type {import("snowpack").SnowpackUserConfig } */ | |
export default { | |
mount: { | |
/* ... */ | |
public: '/', | |
src: '/dist' | |
}, | |
plugins: [ | |
/* ... */ | |
], |
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import App from "./App"; | |
const rootElement = document.getElementById("root"); | |
const root = ReactDOM.createRoot(rootElement); | |
root.render(<App />); |
import React from "react"; | |
function App() { | |
return ( | |
<div> | |
<header> | |
<img | |
src="https://res.cloudinary.com/dz4tt9omp/image/upload/v1625528354/react.png" | |
alt="logo" | |
/> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="description" content="Starter Snowpack App" /> | |
<link rel="stylesheet" type="text/css" href="/index.css" /> | |
<title>Starter Snowpack App</title> | |
</head> |
let modal = document.querySelector(".modal"); | |
let show = document.querySelector(".show"); | |
let closeButton = document.querySelector(".close-button"); | |
function toggleModal() { | |
modal.classList.toggle("show-modal"); | |
} | |
function windowOnClick(event) { | |
if (event.target === modal) { |
.btn{ | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
background: pink; | |
font-size: 20px; | |
color: white; | |
padding: 10px 30px; | |
cursor: pointer; |