https://github.com/reactjs/react-basic/blob/master/README.md
function NameBox(name) {
return { fontWeight: 'bold', labelContent: name };
}
// Level 1 reuse: Show user name with blue border
from reportlab.lib.pagesizes import A5, landscape | |
# A5 = (210*mm,148*mm) | |
LANDSCAPE_A5 = landscape(A5) | |
PAGE_WIDTH = LANDSCAPE_A5[0] | |
PAGE_HEIGHT = LANDSCAPE_A5[1] | |
HORIZONTAL_MARGIN = PAGE_WIDTH / 32 | |
VERTICAL_MARGIN = PAGE_HEIGHT / 16 |
# Copy with links | |
cp -r src/* dst/ | |
# Copy without links but files | |
cp -rL src/* dst/ | |
# Scp to the remote side without links but files | |
# Remember to replace `localhost` and `pwd` with your own variables | |
scp -r src/* localhost:`pwd`/dst |
A = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
B = [2, 4, 6, 8, 10] | |
setA = set(A) | |
setB = set(B) | |
# C = A ^ B | |
https://github.com/reactjs/react-basic/blob/master/README.md
function NameBox(name) {
return { fontWeight: 'bold', labelContent: name };
}
// Level 1 reuse: Show user name with blue border
from treelib import Tree | |
tree = Tree() | |
# Create a tree for demo purpose | |
tree.create_node('A', 'a') | |
tree.create_node('B', 'b', parent='a') | |
tree.create_node('C', 'c', parent='a') | |
tree.create_node('D', 'd', parent='b') | |
tree.create_node('E', 'e', parent='b') | |
tree.create_node('F', 'f', parent='c') |
from treelib import Tree | |
tree = Tree() | |
# Create a tree for demo purpose | |
tree.create_node('A', 'a') | |
tree.create_node('B', 'b', parent='a') | |
tree.create_node('C', 'c', parent='a') | |
tree.create_node('D', 'd', parent='b') | |
tree.create_node('E', 'e', parent='b') | |
tree.create_node('F', 'f', parent='c') |
from bisect import bisect_left | |
# Source https://docs.python.org/2/library/bisect.html | |
def index(a, x): | |
'Locate the leftmost value exactly equal to x' | |
i = bisect_left(a, x) | |
if i != len(a) and a[i] == x: | |
return i | |
raise ValueError |
{ | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, | |
"node": true, | |
"amd": true | |
}, | |
"settings": { | |
"ecmascript": 6, | |
"jsx": true |
# [MUST] Define user information which will be recorded in any newly created commits | |
[user] | |
name = Mond Wan | |
email = [email protected] | |
# [OPTIONAL] Define personal working preferences | |
[core] | |
# for window, use true | |
# for linux, MacOS, use input | |
autocrlf = input | |
editor = vim |