Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
// First, download and unzip the Adafruit-Motor-Shield-library-master library from https://github.com/adafruit/Adafruit-Motor-Shield-library | |
// Extract the ZIP file and copy the folder into the Arduino/libraries directory (inside your Documents folder) | |
#include <AFMotor.h> | |
#define echoPin 9 // attach pin D9 on Arduino (SER1 on motor shield)) to ECHO pin on ultrasonic sensor | |
#define trigPin 10 // attach pin D10 on Arduino (SERVO_2 on motor shield) to TRIG pin on ultrasonic sensor | |
long duration; // duration of sound wave travel | |
int distance; // distance measured |
import { isFunction, isObjectLike } from 'lodash-es' | |
import { useCallback, useRef, useState, useMemo, Dispatch, SetStateAction } from 'react' | |
/** | |
* @author 447f@misaka.com | |
* this hook allows reading an updated state value | |
* immediately by an extra ref. | |
* write to this ref is **not allowed** and should | |
* trigger an error. | |
* @example |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
version: '2' | |
services: | |
openldap: | |
image: osixia/openldap:1.2.3 | |
container_name: openldap | |
environment: | |
LDAP_LOG_LEVEL: "256" | |
LDAP_ORGANISATION: "Example Inc." | |
LDAP_DOMAIN: "example.org" | |
LDAP_BASE_DN: "" |
A quick cheatsheet of useful snippet for Flutter
A widget is the basic type of controller in Flutter Material.
There are two type of basic Widget we can extend our classes: StatefulWidget
or StatelessWidget
.
StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:
// Remove all drafts from your drafts view | |
// Navigate to drafts | |
// F12 to raise dev console | |
// Paste the below | |
(async function(x) { | |
for (let e = document.querySelector('[type="trash"]'); e != null; e = document.querySelector('[type="trash"]')) { | |
e.click(); | |
await new Promise(resolve => setTimeout(resolve, 500)) | |
document.querySelector('[data-qa="drafts_page_draft_delete_confirm"]').click(); | |
await new Promise(resolve => setTimeout(resolve, 1500)) |
-- A method for storing and retrieving hierarchical data in sqlite3 | |
-- by using a trigger and a temporary table. | |
-- I needed this but had trouble finding information on it. | |
-- This is for sqlite3, it mostly won't work on anything else, however | |
-- most databases have better ways to do this anyway. | |
PRAGMA recursive_triggers = TRUE; -- This is not possible before 3.6.18 | |
-- When creating the Node table either use a primary key or some other |