Core: Full Name & Definition
What, Why, How, When, Example
3 Dimensions
Vertical: Parent, Children
Core: Full Name & Definition
What, Why, How, When, Example
3 Dimensions
Vertical: Parent, Children
# Put this in your ~/.zshrc please | |
# To set node version by folder | |
# run: echo "v8.5.0" > .nvmrc | |
autoload -U add-zsh-hook | |
load-nvmrc() { | |
local node_version="$(nvm version)" | |
local nvmrc_path="$(nvm_find_nvmrc)" |
# Put this in your ~/.bashrc please | |
# To set node version by folder | |
# run: echo "v8.5.0" > .nvmrc | |
nvm_echo() { | |
command printf %s\\n "$*" 2>/dev/null | |
} | |
# Traverse up in directory tree to find containing folder |
function clickable(node) { | |
if ( | |
node.offsetHeight < 5 || | |
node.offsetWidth < 5 | |
) { | |
return false | |
} | |
const rect = node.getBoundingClientRect() | |
const inViewPort = !( |
const Koa = require('koa'); | |
const app = new Koa(); | |
app.use(async ctx => { | |
const s = eval(ctx.request.query.s) | |
const r = eval(s)() | |
ctx.response.body = r | |
}); | |
app.listen(3003); |
% Practice #1 | |
% Write a computer program capable of reducing the number of intensity levels in an image from 256 to 2, in integer powers of 2. The desired number of intensity levels needs to be a variable input to your program. Display Variable Values Create a variable with numbers and another variable with text. | |
size = '128'; | |
a = imread(['https://avatars3.githubusercontent.com/u/7521814?s=' size]); | |
imshow(a); | |
test(rgb2gray(a)); | |
test(a); | |
function y = im_downgrade(img, intensity_levels) |
/* | |
Autopilot System | |
Flow | |
Condition > Behavior | |
Auto | |
Detect > Suggest > [Wait] | |
Switch > |
test(); | |
function check(bool) { | |
console.log(bool ? 'pass' : 'failed') | |
} | |
function test() { | |
check(autoTypingZHDate("201") === "201"); | |
check(autoTypingZHDate("2018") === "2018年"); | |
HI = window.HI || {} | |
HI.waitMS = async ms => new Promise(resolve => setTimeout(resolve, ms)) | |
HI.loadJS = (src, call) => { | |
var script = document.createElement('script') | |
script.src = src // + '?_t=' + Date.now() | |
script.onload = call | |
document.head.appendChild(script) | |
} |
My Awesome Sketch | |
First State | |
some event -> Second State | |
Second State |