principle:
- always show the first and the lastest page
- show two preview pages and two next pages of current page
<= 8
1 2 3 4 5 6 7 8
function re (node, prevNode) { | |
node.next = prevNode.id | |
const prePreNode = findPrev(prePreNode) | |
if (prePreNode === null) { | |
prevNode.next = null | |
} else { | |
re(prevNode, prePreNode) | |
} | |
} |
var s = 'abcde' | |
// s.substr(1/*start*/, 3/*count*/) // bcd | |
s.substring(1/*start*/, 3/*end(not included)*/) // bc, not changed | |
s.slice(1/*start*/, 3/*end(not included)*/) // bc, not changed | |
s.slice(1,3) === s.substring(1,3) | |
var a = ["a", "b", "c", "d", "e"] | |
a.slice(1/*start*/, 3/*end(not included)*/) // ['b', 'c'], not changed |
// parse search query | |
const params = new URLSearchParams('?a=b'); | |
params.get('a') | |
// querySelector with attribute | |
document.querySelector('div:not([data-role="head"])') | |
// online matrix | |
const matrix = new Array(10).fill(0).map((v, i) => (new Array(10).fill(0).map((vv, ii) => `r${i}c${ii}`))) |
principle:
<= 8
1 2 3 4 5 6 7 8
$ git remote add theirusername [email protected]:theirusername/reponame.git
$ git fetch theirusername
$ git checkout -b mynamefortheirbranch theirusername/theirbranch
@font-face { | |
font-family: "Hiragino Sans"; | |
src: local(HiraginoSans-W0); | |
font-weight: 100; | |
} | |
@font-face { | |
font-family: "Hiragino Sans"; | |
src: local(HiraginoSans-W1); | |
font-weight: 200; | |
} |
Map | Action |
---|---|
<F1> | Causes Netrw to issue help |
<cr> | Netrw will enter the directory or read the file |
<del> | Netrw will attempt to remove the file/directory |
- | Makes Netrw go up one directory |
a | Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide) |
c | Make browsing directory the current directory |
C | Setting the editing window |
d | Make a directory |
Working in Kyoto
Explain how each css property related to line breaking works.
Video & Slide: https://www.dotconferences.com/2018/11/florian-rivoal-line-breaking
// https://adventofcode.com/2018/day/8 | |
// https://jsfiddle.net/keipixel/fuyhq4az/ | |
const data = '2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2' | |
// { | |
// meta: [1, 1, 2], | |
// children: [ | |
// { | |
// meta: [10, 11, 12], | |
// children: [] |
const json2str = (target) => { | |
switch (typeof target) { | |
case 'number': | |
return isNaN(target) ? 'null' : target.toString() | |
case 'boolean': | |
return target.toString() | |
case 'string': | |
return `"${target}"` | |
case 'object': | |
if (target === null) { |