极客时间对于推广渠道会有返利优惠,比如山月在极客时间买了一门课,再把课程分享给好友购买,这时极客时间会向山月返利20元左右。
而我现在做了一个返利平台,你可以在上边通过山月的链接购买课程,此时极客时间会向我返利。为了共同学习,而你可以添加我的微信 (shanyue94),我将把极客时间给我的返利发一个红包全部返给你

# Pre 2017

# Articles

# 2017/01/05

  • vim
    • lightline solarized
  • shell
    • $#
      • arguments length
    • $*
      • arguments list
    • $@
      • arguments list
    • difference between '' and ""
      • '' 原样输出
      • "" 解释变量
    • $[3 * 4 + 9]
      • 直接在shell中进行数学计算
  • javascript
    • use strict
  • zsh-themes
    • muse
    • cloud
    • wuffers
    • peepcode
    • simple
    • lambda
    • dieter

# 2017/01/10

  • tmux
    • -s / server, session
      • tmux new -s shanyue

# 2017/01/13

  • git
    • count commit
      • git shortlog --sumary --numbered
      • git shortlog -sn

# 2017/01/14

  • ansible
    • get started

# 2017/01/17

  • docker
    • Dockerfile arguments
    • docker build | memory cpu build-arg
    • ENV always overwride ARG
    • HEALTHCHECK
  • curl -L www.zhihu.com
    • 追踪重定向后的地址

# 2017/01/18

# 2017/01/19

  • ansible
    • 幂等性
    • ansible-playbook sites.yml
    • ansible-playbook sites.yml --list-hosts
    • ansible-playbook sites.yml --list-tags -i(--inventory-file)
    • Action Shorthand
  • linux
    • sudo -H
    • sudo --preserve-env
      • 在 sudo 模式下,可以使用普通用户的配置,比如 ~ 下的一系列配置
  • css

# 2010/01/22

  • git
    • git-hooks
      • pre-commit
        • 在提交之前可以进行一些lint的检查
  • css (think)
    • rem(root) & em
      • .container(font-size: 20px) > .row(font-size: 2em) > .item(font-size: 2em, height: 2em)
        • 求.item(height)是多少px
    • border and center
    • flex(align-items: center) flex-item(align-self: stretch)

# 2017/01/24

  • git-hooks (review 2017/01/22)
    • pre-commit
    • patch
    • reset
    • revert
    • working/stage/repositry
  • ansible
    • handlers
    • file
  • proctocal
    • icmp (internet control message protocal)
      • 一种为query message,一种为 error message,一般所使用的 ping 发的是 ECHO_REQUEST 包
  • shell
    • iptables
  • react
    • life cycle
  • graphql

# 2017/01/25

  • ansible
    • 回滚
    • root /etc/hosts
  • docker
    • portainer set user
      • 只需要在 Dockerfile 中指定 User 即可,id -u 可以查看本机的user id
  • git
    • submodule
  • css
    • background
      • background-origin
      • background-clip
      • background-attachment
      • background-blendmode

# 2017/01/26

  • ansible
    • ProxyCommand
    • ansible_user / ansible_port / ansible_host / ansible_connection
  • network
    • route
    • nc

# 2017/01/27

  • http
    • pragma: no-cache
    • from memory cache / from disk cache
  • Command Line API
    • copy
    • monitor
    • monitorEvents

# 2017/01/28

# 2017/01/29

# 2017/01/30

  • event
    • pagehide / pageshow / visibilitychange / bfcache browser backward mechanism
  • html
    • window.opener
    • target="_blank" 漏洞
  • ES6
    • class and proptype

# 2017/02/01

  • containing block
    • position
      • sticky
  • writing mode
    • horizontal-tb
    • vertical-lr
    • vertical-rl
  • css
    • text-transform
    • text-orientation
      • upright
      • mixed
  • github
    • img

# 2017/02/02

  • json web token

# 2017/02/03

  • vim
    • emmet
  • CSS function
    • attr
      • a:empty::after{ content: attr(href) }
      • CSS Values Level 3
    • calc
      • CSS Values Level 3
      • inline-block + calc incorrect left-right layout
  • baseline
  • ::after
    • Selectors Level 3
  • inline-block space
    • white-space-collapsing: discard (Text Level 4)
  • FormData
  • ansible
    • yum
  • YAML
    • --- seperate directives from document content

# 2017/02/04

  • ARP(Address Resolution Protocal)
    • basic concept
      • arp cache
      • A (ip, MAC) B (ip) broadcast -> local newwork
    • arp spoofing
  • css3
    • all: unset
  • ansible
    • file
    • get_url
    • yum
    • apt
    • template
  • ansible
    • file mode 0755 why 0

# 2017/02/06

  • tcpdump
    • tcpdump host :ip
    • tcpdump 'tcp port 80'
  • wireshark
  • Progressive Web Apps
    • Cache Storage
    • Service Worker
      • Web Worker
      • App Cache 从html5.1中移除
    • Manifest
      • orientation
      • theme_color
    • Notification Api
    • Push Api
  • ansible
    • ansible-pull
    • Roles
    • ansible-galaxy

# 2017/02/07

  • nslookup
  • dig
  • ansible
    • pretask
    • posttask
    • inventory_hostname
    • local_action
    • notify / handle
  • grid
    • grid-auto-columns

# 2017/02/09

# 2017/02/10

  • git
    • git clean -d -fx ""
  • content-box
  • css
    • .row>.column*3
      • .row height: 100px, .column: 100% (100px)
      • .row height: auto(100px), .column:first-child: 100px (撑高父级) .column: 100% (0px)
      • think: height (多列登高)
    • min-height not work but work with height
  • webpack
    • webpack-dev-server source

# 2017/02/11

# 2017/02/13

  • css
    • property
      • initial / inherit / unset
    • svg
      • glyph
      • missing-glyph
  • ansible
    • tags / always
    • verbose / -vvv more / -vvvv debug
  • git

# 2017/02/14

# 2017/02/15

# 2017/02/16

  • git
    • .git/info/exclude
    • dir
      • info
      • hooks
      • refs
      • logs
      • objects
    • tips
      • git hash-object :file
      • git cat-file -p :commit-ish
      • git remote set-url origin :url
      • git add -p
      • git whatchanged --since "2 days ago"
      • git stash save -u | git stash save --include-untracked
      • git clean -x -d -n remove untrcked + ignore
      • git clean -X -d -n remove only ignore
    • commit-ish
      • md5 128bit
      • sha1 160bit -> echo hello, world | shasum
      • sha256 256bit
      • sha512
  • gerrit
  • pre git
    • diff / patch
    • CVS (Concurrent Versions System)
    • svn (Subversion)
    • git -> BitKeeper (2005)

# 2017/02/17

  • git
    • concept
      • git cat-file -t <commit-ish> -> type
      • git cat-file -p <commit-ish> -> content
      • tree
      • blob
      • tag
      • commit
    • tips
      • git show <commit-ish>
      • git show <branch-name>:<file-name>
      • git rebase -i | reword -> commit-ish 会发生改变 修改以前的commit
      • git commit --no-verify
      • git commit -n
      • git bisect | git checkout HEAD~7
      • git reset <file>
      • git shortlog
      • git cherry -vv
      • git status -sb -> --short --branch
      • git log --oneline
      • git ls-files
      • git ls-files -s
      • git ls-tree HEAD
      • git reflog show master
    • objects
      • HEAD
      • master
      • refs/heads/master
  • shell
    • gawk
    • wc
  • react
    • react.cloneElement()
  • vim
    • q -> recording

# 2017/02/18

  • multi-column-layout
  • git
    • git reset -> index
    • git reset --hard -> 清空 working tree & index & repo
    • git reset --soft -> 清空 repo
    • git reset --mixed -> 清空 index & repo
    • git checkout -> 清空 working-tree
    • git diff
      • --name-only
        • 只显示更改的文件名称
      • --name-status
        • 显示更改文件的名称以及状态
    • git ls-files
    • how-to-use-git-bisect (opens new window)
    • git checkout <commit>
    • git diff-index
  • FE Think
    • 项目启动期定好 state 和 router ,定好 webpack, eslint。
    • 项目启动期定好一些基本组件,如常见的组件 Tooltip, Modal, Alert
    • 否则技术债很多,比如后加的 eslint 形同虚设,中期难以迁移 webpack,难以 hmr,proxy,最重要是缓存的一些问题,以及各种形式的消息提示框。
  • FP
    • compose
  • Git Flow Think +

# 2017/02/21

  • react
    • state is evil
  • git
    • git checkout HEAD~10 -> detached HEAD refers to a valid commit
  • npm
    • types

# 2017/02/22

  • css
    • font
    • selection background-color 不符
    • line-height: 1.5em 根据什么为基准

# 2017/02/23

  • 论表格中的tooltip与层叠上下文
  • git
    • git push stratety
      • central workflow
      • non-central workflow
      • upstream / simple
  • css
    • ::after 权重

# 2017/02/24

  • git
    • follow
    • git log need display date -> git log --pretty=medium
    • tips
      • git log -p <file>
      • git log --first-parent
      • git log master...develop
      • git tag --list
      • git describe -> v1.1.0-5-<hash>
      • git rm <file>
      • git checkout <commit-ish> -- <file>
      • .git/info/exclude : core.excludesfile
      • git archive -o tips.zip HEAD
      • git rev-list master
      • git rev-parse refs/tags/v3.0.2
      • git revert HEAD
      • git clone --bare
      • git commit --allow-empty
      • git show-ref
      • git gc
      • git
  • 密码学大事件!研究人员公布第一例SHA-1哈希碰撞实例 (opens new window)

# 2017/02/25

  • git
    • git checkout -b test master
    • git log master..develop
    • git log master...develop

# 2017/02/27

  • git
  • go
    • defer
  • html
    • html entity encode

# 2017/02/28

  • cache
    • cache-control
    • age
  • gulp
    • gulp-rev
  • FP +

# 2017/03/01

靡不有初鲜克有终

  • gulp
    • gulp 4.0
  • FP
    • Category Theory 范畴论
    • HOC
    • Partical Function
    • compose
    • curry
    • Point-Free Style

# 2017/03/02

# 2017/03/03

  • js
  • FP
    • curry
    • Constant -> Referential Transparency
    • Category +

# 2017/03/05

宠辱不惊,闲看庭前花开花落。去留无意,漫看天边云卷云舒。

  • FP
    • ES6 ...args 无法确定个数 arity 为0
    • declarative programing 声明式编程
    • imperative programing 命令式编程
    • functor
      • Container.of
      • Container.prototype.of

# 2017/03/06

岁月本长,而忙者自促;天地本宽,而狭者自碍;风花雪月本闲,而扰攘者自冗。

  • FP
  • docker
    • aufs

# 2017/03/07

  • primitive
  • FP
    • lift

# 2017/03/08

# 2017/03/09

  • js
    • tc39
  • git
    • rebase --onto target
      • 话说这个功能就像 chery pick 一样
    • rebase -s
      • 据说指定 strategy 可以直接 pull amend后的
    • grep && ag

# 2017/03/10

因过竹院逢僧话,又得浮生半日闲。

  • webpack 热替换图片

# 2017/03/13

揣而锐之,不可长保。

  • https://github.com/gotwarlost/istanbul
  • https://github.com/remy/nodemon
  • mocha
  • nodeunit
  • webpack
    • yargs 解析命令行,就像是 python 的 argparse
    • CommonsChunkPlugin
    • ChunkManifestWebpackPlugin
  • npm
    • npm link webpack // symbol link
  • debug
    • node-inspector

# 2017/03/14

三十功名尘与土,三千里路云和月。

  • Array.from(new Map())
  • node-inspector
    • 不是控制台,而是使用页面模拟一个控制台,不好使,比如监视某个变量
  • sock-js webpack里用到的,貌似原生库? sockjs-client
  • 举个栗子 setState 不能放到 componentWillMount 里边,失败告终...
  • react class 的 this bind
  • network
    1. 多域名:cdn 缓存 与 cookie 带宽
    2. what-happend-when
    3. 长轮询在服务器 cache,websockets 双向通信的二进制协议,sse content-type: event-stream 的文本协议。
    4. request and response
    • DNT 不要追踪用户信息
    • Cache-Control 缓存控制
    • Transfer-Encoding
    • Etag 协商缓存 If-Modified-Since
    • X-Frame-Options 不允许嵌入 iframe
    1. method
    • GET
    • PUT
    • POST
    • DELETE
    • HEAD
    • OPTIONS
  • vim
    • 重新加载 :Agbuffer :bufdo e
  • webpack 2.x
    • optimize

      creat-react-app 优化后仅有46kb (报的并不是 实际大小,而是需要gzip后的大小),而vue-cli 优化后有 90+ kb

      • devtool: cheat-module-eval-source-map
      • 1.97 mb native
      • 1.81 mb webpack -p 即 --optimize-minimize (UglifyJsPlugin) --define process.env.NODE_ENV
      • uglifyjs 报错 (opens new window)
      • 1.80 mb UglifyJsPlugin 与 DefinePlugin 写到配置文件,自定义配置
      • 4.06 kb / 1.80 mb 把所有三方库都放到 commons 后
      • 1.46kb / 141kb 设置 devtool: ''
      • gzip
    • plugins
      • html-webpack-plugin
      • webpack-manifest-plugin 就像 gulp 的 gulp-rev
      • extract-text-webpack-plugin
      • react-dev-utils/InterpolateHtmlPlugin
      • compression-webpack-plugin
      • webpack-bundle-analyzer
      • friendly-errors-webpack-plugin
  • chalk

# 2017/03/15

# 2017/03/16

  • webpack
    • CommonsChunkPlugin manifest : how to work? 工程化思考
    • MultiChunks
    • TreeShake
    • node-debug
      • 多开浏览器还是挺酷的
  • linux
    • ps -ef
      • ppid parent pid
      • stime start time
      • time
      • tty

# 2017/03/17

  • webpack
    • Object.defineProperty(__webpack_require__, '__esModule', { value: true })
    • jsonp 控制多 chunk

# 2017/03/18

  • vim
    • Ctrl+P 如何查看隐藏文件
    • 使当前标签页变为分屏页

# 2017/03/20

  • vim
    • = 缩进对于 object 出现问题

# 2017/03/21

  • CC By 4.0
  • webpack
    • plugin apply(compile)
    • Compiler => Tapable => Object
    • WebpackOptionsApply

# 2017/03/22

# 2017/03/23

功夫,两个字,一横一竖,赢的站着,输的躺下。

  • https
    • www.baidu.com 为什么访问的是 https 而非 http
    • www.zhihu.com 为什么没有设置 STS,仍然跳到 https?
  • Do Not Track [https://www.zhihu.com/question/20615448]
    • 不跟踪用户信息,浏览器设置,将会设置一个 DNT: 1 的请求头
  • javascript
    • '' && 3
    • Boolean('')
  • vim
    • emmet class in jsx 应该是 className,jsx 插件是否能解决?

# 2017/03/24

  • react
    • setState 连续多次,如何渲染
  • webpack
    • 控制css被引入的顺序 module DFS

# 2017/03/26

  • vim
    • 关于 tmux 下vim主题的问题
      • 背景显示不全,切换 term: screen-256color 解决问题

# 2017/03/27

  • css
    • difference between unset, initial, inherit
    • all: unset
      • color color 貌似也被排除在外
      • style style 自身也有样式,display 初始值为 inline,而浏览器默认设置为 none
      • unicode-bidi 排除在外
      • direction 排除在外
  • javascript
    • eventloop, macrotask and microtask

# 2017/03/28

# 2017/03/30

  • JS
    • typeof x => x // function subtype
    • difference between function and arrow function
      • f.prototype / this / class
      • arguments / caller
    • Array.isArray(Array.prototype) // true
      • 为什么不是 object !!!!!!
      • Number.prototype // Number
      • String.prototype // String
    • difference between function and object
      • function // callable object

# 2017/03/31

  • JS
    • String
      • s1 = new String('hello'); s1[0] = 'A' // 'hello'
      • s2 = 'hello'; s2[0] = 'A' // 'hello'
  • css
    • div: default: block; initial: inline;
      • 浏览器 UA 默认为 block,其实初始值是 inline !!!

# 2017/04/01

  • JS
    • String
      • string 是 immutable,因此任何方法无法改变其本身
      • Array.prototype.reverse.call(s) 无法使其逆置,因为修改了自身
      • this 不能赋值
    • Number
      • IEEE 754 64-bit binary
      • 0o363 // octal
      • 0b111 // binary
      • 0x127 // hexadecimal
      • 0.1 + 0.2
        • Number.EPSILON 2^-52
        • Number.MAX_SAFE_INTEGER 2^53 - 1
        • Number.isSafeInteger
      • 如何判断一个数是整数

# 2017/04/05

  • css
    • vertical-align: middle 给图片设置!

# 2017/04/06

# 2017/04/07

  • countdown
    • 倒计时 多次计时
  • react
    • defaultProps 给 location.state 赋予默认值
  • css
    • vertical-align (opens new window)
    • font-family
      • 华文细黑:STHeiti Light [STXihei]
      • 华文黑体:STHeiti
      • 华文楷体:STKaiti
      • 华文宋体:STSong
      • 华文仿宋:STFangsong
      • 儷黑 Pro:LiHei Pro Medium
      • 儷宋 Pro:LiSong Pro Light
      • 標楷體:BiauKai
      • 蘋果儷中黑:Apple LiGothic Medium
      • 蘋果儷細宋:Apple LiSung Light
      • Windows的一些:
      • 新細明體:PMingLiU
      • 細明體:MingLiU
      • 標楷體:DFKai-SB
      • 黑体:SimHei
      • 宋体:SimSun
      • 新宋体:NSimSun
      • 仿宋:FangSong
      • 楷体:KaiTi
      • 仿宋_GB2312:FangSong_GB2312
      • 楷体_GB2312:KaiTi_GB2312
      • 微軟正黑體:Microsoft JhengHei
      • 微软雅黑体:Microsoft YaHei
      • 隶书:LiSu
      • 幼圆:YouYuan
      • 华文细黑:STXihei
      • 华文中宋:STZhongsong
      • 华文仿宋:STFangsong
      • 方正舒体:FZShuTi
      • 方正姚体:FZYaoti
      • 华文彩云:STCaiyun
      • 华文琥珀:STHupo
      • 华文隶书:STLiti
      • 华文行楷:STXingkai
      • 华文新魏:STXinwei

# 2017/04/10

  • Dr. cleaner
  • autojump
  • nunjucks

# 2017/04/11

  • yarn.lock
  • template engine
    • nunjacks
    • jinja2
  • Number IEEE754

# 2017/04/12

  • tree
  • emmet
    • $$$$@2015
  • downloads
    • content-disposition:attachment;
  • browsersync

# 2017/04/14

  • emmet
  • git submodule
    • untracked content
  • http status code
    • 422 Unprocessable Entity -> github star error
  • git
    • ssh git@github.com
    • 更改以前commit的author
      • git filter-branch

# 2017/04/18

  • ps
    • ps 取 hex 色
  • browsersync
  • 关于 react + webpack 中可以使用 node 的模块其中原理

# 2017/04/19

  • curl -O :url
    • 直接下载文件
  • browser_sync
    • Get: Content-Type: application/octet-stream
    • Post: Content-Type: text/html

# 2017/04/20

  • node
    • 一个程序,输出 1:n,思考为什么会卡,如何不卡
    • 使其后台前台切换
    • less 使其 buffer,并不会再终端限制行数

# 2017/04/21

  • css @supports
    • 很大程度解决了关于 IE8 CSS 的兼容问题 !
    • filter

# 2017/04/24

  • vim
    • copy # V + !pbcopy
    • vim --version
  • javascript you dont't know
    • compilation
      • Tokening / Lexing
      • Parsing # AST
      • Code Generation
    • compiler
      • LHS
      • RHS
        • Not LHS
    • let
      • for (let i=0; i<10; i++) {}
      • let i; for (i=0; i<10; i++) { let j = i }
    • function declaration and function expression
    • functions first
    • Principle of Least Privilege

# 2017/04/25

  • js you dont't know
    • IIFE
    (function(){
      foo = 3
    
      function foo () {
        console.log('hello, world.')
      }
    
      console.log(foo)
    })()
    
    console.log(foo)
    

# 2017/04/26

  • git
    • 列举某个 commit 以后的所有 log
    • 统计 commit 总数
      • git rev-list --count --all
    • log 只显示增改信息
      • git log --stat
    • 统计 merge commit 间有多少文件改动
      • git diff :commit1 :commit2
    • 统计 merge commit 间有多少个commit
    • cheery-pick merge commit
  • open-terminal-here-in-mac-os (opens new window)

# 2017/04/27

  • licecap
  • sessionStorage
    • 什么才叫 session
  • js you dont know
    • this

      'use strict';
      var a = 10;
      console.log(this.a);
      

      Reminder: regardless of how you get to a function invocation using the default binding rule, the strict mode status of the contents of the invoked function making the this reference -- not the function call-site -- determines the default binding value: either the global object if in non-strict mode or undefined if in strict mode.

# 2017/04/28

  • web server (opens new window)
  • SuperSimpleCI (opens new window)
  • You-Dont-Know-JS
    • DMT # Object.create(null)
    • difference between Object.create(null) and {}
      • Object.create(null) # {}
      • {} # {proto: {}}
    • Hard Binding
      • foo.bind({ a:3 }).bind({ a: 4})
    • Soft Binding # Todo
    • Lexical this
    • js 中方法和函数可以相互转化的,那么python呢
      • a.run = types.MethodType(run, a)
      • a.run = functools.partial(run, a)

# 2017/04/30

# 2017/05/02

  • You-Dont-Know-JS
    • data descriptor
      • Object.preventExtensions()
      • Object.seal()
      • Object.freeze()
    • accessor descriptor
      • [[get]] get ()
      • [[put]] set ()
    • Symbol.iterator 如何遍历一个对象!
    • 原型模式中 Object.create 与 new 有何异同
      • Object.setPrototypeOf(Bar.prototype, Foo.prototype)
      • Bar.prototype = Object.create(Foo.prototype)
      • Bar.prototype = new Foo() // this 上附带属性,且有副作用

# 2017/05/03

  • You-Dont-Know-JS
    • Object.create
      • {} // 等价于以下
      • Object.create(Object.prototype)
    • _proto_
      • getter / setter
    • proxy && python builit method
    • delegation design pattern
    • ES6 class super not support for modern browser !!!!
  • git
    • git pull --rebase --autostash
    • git config --global --bool pull.rebase true
  • growingIO

# 2017/05/05

  • webpack template
    • nomal
      • IIFE (modules)
      • webpack_require(id=entryModuleId)
        • installModules
        • modules[moduleId].call()
    • jsonp
      • webpackJsonp
      • webpack_require.e(chunkId).then(webpack_require.bind(null, moduleId)).then(module => ...)
      • installedChunks
  • grid
    • justify-content: center; align-content: center;
    • justify-items: center; align-items: center;
  • http

# 2017/05/06

  • http
    • request message
      <method> <request-URL> <version>
      <headers>
      
      <entity-body>
      
    • response message
      <version> <status> <reason-phrase>
      <headers>
      
      <entity-body>
      
    • Get 与 Message Body
      • https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3
      • https://groups.yahoo.com/neo/groups/rest-discuss/conversations/messages/9962
    • nc 与 telnet
    • methods
      • GET
      • HEAD
      • PUT
      • POST
      • TRACE
      • OPTIONS
      • DELETE

# 2017/05/08

谋定而后动,知之而有得到。

  • cache
    • json cache ?
    • connection close
  • http
    • 使用 nc 模拟https请求
      • 无法做到,openssl代替
        • openssl s_client -connect server:443
    • openssl s_client -connect juejin.im:443

      CONNECTED(00000003) 33628:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59.60.1/src/ssl/s23_lib.c:185:

  • ncal
  • deepCopy
    • 循环引用
  • LazyMan

# 2017/05/09

  • react
    • PureComponent (opens new window)
      • class MyComponent extends PureComponent {...}
      • shouldUpdate = !shallowEqual(prevProps, nextProps) || ! shallowEqual(inst.state, nextState);
    • $r.updater
  • scss
    • 循环引用问题
  • webpack
    • webpackMissingModule
  • css
    • :only-child # apply child
  • https
    • HSTS http -> https
      • 只要设置了 HSTS,http 手动输入也会自动变成 https
      • 307 internel redirect 昙花一现,其实应该是 temporary redirect
      • 再次测试:第一次 http 会 301 到 https,并带有STS头,以后http进去会由STS转为307 internel redirect,或者直接不向http发送请求直接转为https

# 2017/05/10

  • http
    • TIME_WAIT delays and port exhaustion
    • 从TCP三次握手说起--浅析TCP协议中的疑难杂症 (opens new window)
    • HTTP/1.1 Persistent Conection 默认保持连接,只有当 Connection: Close 的时候才会关闭,没有这个头也不代表一直在连接中,客户端与服务端都可以关闭闲置的连接。
    • Content-Length 必须一致才能够持久连接
      • 会根据 Content-Length 来截取报文

# 2017/05/11

# 2017/05/16

# 2017/05/17

  • (opens new window)
  • http
    • cookie2 当前的状态 (opens new window)
    • cookie
      • 域名
      • 路径
      • 版本
        • 0
        • 1 (RFC2965)
          • Discard
          • Max-Age
          • port
          • $
      • Http

        无法被js访问

      • Same-Site
      • 缓存
        • Cache-Control: no-store
        • Cache-Control: no-cache
        • Cache-Control: no-cache="Set-Cookie"
        • Cache-Control: max-age=3600, s-maxage=3600
        • Cache-Control: must-revalidate, max-age=0
        • Cache-Control: public
        • 试探性过期算法: LM-Factor
    • nc 发送post请求
    • Host header 的重要性
      • 主要是代理
      • 一个服务器托管了多个网站
    • 422 Unprocessable Entity github star
    • challenge/response
    • Basic Authorization
    • Degist Authorization
      • OAuth

# 2017/05/18

# 2017/05/19

# 2017/05/20

# 2017/05/23

# 2017/05/24

# 2017/05/26

  • vim
    • vertical resize 60 # 设置分割窗口的大小

# 2017/05/27

# 2017/05/28

# 2017/05/30

# 2017/05/31

  • data structure
    • Red Black Tree
    • Associative Array | Map | Dictionary
      • hash table
      • Red Black Tree

# 2017/06/01

  • react
    • this.setState({count: this.state.count + 1})
    • this.setState(prevState => ({ count: prevState.count + 1 }), () => console.log(this.state.count))
  • 赌徒谬论

# 2017/06/04

# 2017/06/05

# 2017/06/06

# 2017/06/07

  • react
    • list > item (window.onresize)
      • 在item的 componentDidMount 中调用了 window.onresize 方法...
  • data-structure
    • B-Tree
      • why: 不同存储级别在访问上的巨大差异
      • 可以看成把平衡二叉搜索树进行多路合并
      • (2, 4) Tree
    • splay-tree
      • Locality
      • 逐层伸展
      • 双层伸展
        • zig-zag / zag-zig
        • zig-zig / zag-zag
          • 不仅能够把最近访问到的点移至根节点,而且还可以使树高缩减一半

# 2017/06/09

# 2017/06/19

杀人放火金腰带,修桥补路无尸骸

  • css

# 2017/06/20

  • array-like -> array
    • Array.prototype.concat.apply([], nodes)
  • a-b-c -> aBC

# 2017/06/21

# 2017/06/23

  • canvas
  • quick-sort

# 2017/06/26

# 2017/06/27

  • vim
    • :! %:p
  • git
    • git submodule foreach git pull origin mastter
    • git submodule update --remote
    • git submodule update --init --recursive
  • quick sort
    • space O(1)
    • time
      • average O(nlogn)
      • O(nlogn)
      • O(n2)
    • unstable
  • 变种快排
    • stable / unstable : G 会向前滚动

# 2017/06/28

  • canvas
    • ring 添加动画
  • confluence
  • jira
  • docker
    • portainer 中console 半分钟挂掉的原因
  • css3
    • border-image 渐变动画

# 2017/06/29

# 2017/06/30

# 2017/07/03

# 2017/07/04

# 2017/07/05

  • tmux/iterm2 ring
  • xmonad
  • 单点登录
  • js
  • data-structure
    • Red Black Tree
      • 红帽子
      • 红鞋子
      • 黑深度
      • 红节点只能由黑孩子
      • lifting
    • 最小生成树
      • Prim
      • Kruskal

# 2017/07/06

# 2017/07/08

  • css
    • flex-grow / width / max-width 冲突

# 2017/07/09

  • svg
    • g.transform
    • defs
    • desc
    • cx
    • cy
    • use
    • path.d
      • M moveto
      • L lineto
        • H
        • V
      • A arc
      • Z closepath
      • C curveto
  • git
    • git merge 没有冲突,git rebase 有冲突

# 2017/07/10

# 2017/07/11

  • jira workflow (opens new window)
    • 目前工作流过于简单,探索一些效率更好的工作流
  • 如何实施 SCRUM (opens new window)
  • git flow
    • 解决bug的时候应该一个bug一个分支,还是一个功能的bug一个分支
  • gitlab
    • 如何在本地生成 merge request (貌似不行)
  • Web Animation Api
    • 解决js中平滑过渡
  • React ComponentsRedirect
    • 比如有一个父组件 Animal,会发送一个请求决定去渲染 Cat,Dog 还是 Pig,最终显示的结果如下 Animal > Cat,那么如何把Animal给去掉,直接显示 Cat
    • React.cloneElement

# 2017/07/12

# 2017/07/15

  • CSP
  • html5
    • script.crossorigin 属性是做什么的,script不是天生支持跨域?
    • values
      • use-credentials
      • annoymous
  • html ref (opens new window)
  • python
    • byte
    • str

# 2017/07/18

  • ga
    • 位置中,如何获得指定国家的城市分布图
      • 地理位置 / 自定义 / 自定义报告
    • 什么是着落页(loading page),有什么用
    • ga 中有该网站每个页面的加载时间,并且与 pagespeed 结合,对每个页面有一个打分
    • traffic origin
      • direct 直接输入网址
      • organic 搜索引擎
      • referral 从其他网站跳过来
  • etl(数据仓库技术)
  • 什么是用户画像 (opens new window)
    • 统计用户的社会属性,行为习惯以及消费行为等以便更好地营销

# 2017/07/19

  • 音频卡顿问题
  • ga
    • timing (hit type)
      • performance timing API
        • performance.timing.fetchStart // 浏览器准备发送请求的时间
        • performance.timing.domContentLoadedEventEnd // DOMContentLoaded
        • performance.timing.loadEventEnd // load
    • PerformanceLongTaskTiming (ga的一个官方示例中代码,具体用来干啥未知)
      • Long Tasks API
    • PerformanceObservel (ga官方示例代码,应该是用来检测性能的)
    • 如何做screen view
    • 如何评测 Engagement (参与度)
      • Page Depth
      • Session Duration
    • ga 是如何判断一个用户是回访用户还是新用户的
      • cookies 中的 clientId 字段进行判断
      • 另一种方法是 fingerprint

# 2017/07/20

  • 如何在同域下的两个标签页中进行通信
    • window 不可以

# 2017/07/22

  • ga
    • ga 是如何做实时统计的
    • ga 是如何统计人口特征的
  • svg
    • viewBox 和 width/height 有什么区别
      • width/height 是实际像素,而viewBox按比例填充,包含元素单位按viewBOx为准
    • property
      • stroke-dasharray
        • % 指以谁的基准 (unit identifier)
      • stroke-dashoffset
    • 如何使用path画一个圆
      • <path d="M 30 5 A 25 25 0 0 0 30 55 A 25 25 0 0 0 30 5" />
    • 如何画一个loading动画图
    • 如何画一个特定角度的弧
      • 好像只能计算得出
  • zhihu

# 2017/07/23

  • canvas + image
    • document.images
    • ctx.getImageData
      • 获取每个像素点的数据

# 2017/07/25

  • svg
    • polyline 与 polygon 有什么区别
      • polygon 自闭合
    • 如何使text居中
    • 关于svg的盒模型
    • svg如何插入图片
      • image(x=0, y=0, width=50, height=50, xlink:href=url)
      • 那在 react 中呢...

# 2017/07/26

  • jira
    • 如何添加 filter
  • store 的更新造成了 componentWillReceiveProps 都执行了一遍
  • ant-design 关于样式的问题
  • webpack 关于 data-url 的问题

# 2017/07/27

# 2017/07/29

  • dns
    • dns 服务器分为哪几种类型
    • dns root name servers 是什么,为什么只有13组
    • 什么是任播 anycast
    • dns 递归解析的过程是什么样子的
    • dns 可以使用tcp不
    • udp 的报文格式是什么样子的
    • opendns/8.8.8.8/114.114.114.114
  • https
    • PKI

# 2017/07/30

  • IP (internet protocal)
    • Package Delivery Model
      • Connectionless
      • Best effort delivery (unreliable)
        • lost / out of order / duplicate / delay
    • How Layer3 Routers Work
      • stop and forward
      • IP Address Lookup (Forwarding Table)
        • RIP / OSPF / BGP
        • Table { IP, Next }
        • 但是如果不在 Table 中怎么办
      • IP/MAC mapping table
      • ASICs 加快查表 (hardware)
      • Wire Speed Forwarding
      • Not Plug-and-Play
    • IP Datagram Header Format
      • id / offset
      • ttl 的作用什么
        • 128,经过128跳就要被扔了
        • 避免成环
        • 如何判断两个host在一个network中
      • Flag
        • Dont Fragment 不能切片
        • 如果不能分片,但是分包很大怎么办
      • Header Cheaksum
      • Type of Service (Tos)
        • Precedence
        • Delay
        • Throughtoutput
        • Fragment
        • R

# 2017/07/31

  • document.domain
  • http
    • 413
  • dhcp
  • pxe/netboot/cobbler
  • ip
    • trackroute 172.16.3.2
    • ip route / route -n
    • 如何知道自己的主机有几台网卡 ip link
  • dns
    • nsad
    • forward / cache / bind
    • dig (domain information groper)
      • dig @server name type
      • FQDN 是什么
      • 域名和路径会不会区分大小写
      • label 最大有多少个字符
    • dig +trace @8.8.8.8 www.smartstudy.com
    • dig @8.8.8.8 www.smartstudy.com

# 2017/08/01

# 2017/08/04

# 2017/08/07

  • 127.0.0.1 与 localhost 的区别
  • rsync
    • rsync -av src/ dest
    • rsync -av src dest
    • rsync -av src/ static dest

# 2017/08/09

  • ~ + .
  • webpack
    • DLLPLUGIN

# 2017/08/10

  • 影响copy速度的原因有哪些
  • user op is not allowed to execute
    • visudo
  • webpack
    • chunkFileName
    • http://engineering.invisionapp.com/post/optimizing-webpack/
  • shell
    • 循环 for do done
      a=(1 2 3 4 5)
      for i in $a; do echo $i; done
      
      • seq 1 10
    • ` and ${}

# 2017/08/12

  • shell
    • pstree
    • ps -efL
      • 查看线程
    • who
      • 查看多少人连接本机
    • tty
      • 伪终端
      • ls /dev/tty*
      • echo hello >> /dev/pts/38
  • node
    • bundlesize
  • jest

# 2017/08/13

  • shell
    • mosh
      • mosh 建立在 UDP 之上,可以不被 timeout 掉
      • 如果登入 server 需要 identity file,可以配置 ~/.ssh/config:IdentityFile
  • webpack errors
    • Uncaught TypeError: (0 , createClass3.default) is not a function
    • code splitting 当按需加载的模块中有css改变时,触发重新编译,但是运行时的代码丢了,导致白屏

# 2017/08/14

  • shell
    • sysctl
      • 查看和设置内核状态
      • ls /proc/sys 也可以查看
    • perf
    • sysdig
    • netstat -rn -> route -r
  • network
    • ICMP
      • query + error message
      • ping -> type ECHO_REQUEST
  • os
    • 关于文件系统的系统调用

# 2017/08/15

# 2017/08/17

  • git
    • 大小写问题
      • 大小写敏感
        • mv test.js Test.js 没有任何反应
      • 大小写不敏感
        • ox x
          • git mv index.js Index.js 增加Index.js,但在暂存区不删除index.js
  • webpack
    • webpack 比 webpack3 re-compile 的时间要多不少
    • iconv-loader: the request of a dependency is an expression
    • hot-update.json 是如何生成的
    • source-map 的原理是什么
  • shell
    • 如何求一个文件的hash值 shasum

# 2017/08/18

  • shell
    • iconv
    • control chrarcter
  • os
    • HFS+ mac的文件系统
      • diskutil info /dev
      • lsblk 列出块级设备
      • mount 挂载文件系统
      • df
  • node
    • npm run prestart

# 2017/08/20

  • jira
    • 如何查看以前的sprint

# 2017/08/22

# 2017/08/23

  • css
    • .row > .col-4 * 12
      • 为什么会挤走

# 2017/08/24

  • koa
    • 返回object,Content-Type 直接为application/json,不像flask那样需要自己设置...
    • 关于版本提示
      • prestart: check-node-version
  • node
    • swig
    • if (!module.parent) app.listen(3000);
    • Math.random().toString(32).slice(2) 生成一个随机字符串
  • git
    • 如何查找更改的文件数
      • git diff HEAD --stat

# 2017/08/25

  • redis
    • redis-cli --scan | HEAD 10 查找redis中的前十项
    • redis-cli --scan --patern re 查找匹配字符串
    • get/set/hget/hset/lpush/rpush/lrange

# 2017/8/27

  • SELinux

# 2017/8/28

  • js/test
    • coverage report
      • statements
      • branch
        • if 分支的个数,偶数
      • functions
        • 函数的个数
      • lines
    • ava
    • nyc
  • w3 与 whatwg 的区别
  • sql
    • varchar && text 的区别
      • https://stackoverflow.com/questions/2023481/mysql-large-varchar-vs-text
      • varchar 存储实际内容,而text存储实际内容的指针
      • varchar 可以有排序规则,text没有

# 2017/8/31

  • curl
    • curl -G uri --data-urlencode 自动编码
      • -G 代表 --get
  • sequelize
    • LIKE
      • {$like: '%a%'}

# 2017/09/04

  • test js
    • 如何测试 promise
    • 如何测试 callback
    • 覆盖率测试的原理如何

# 2017/09/05

  • gitlab
    • 当有人回复mr的时候接受Notification

# 2017/09/06

  • js
    • try { const a = 1; const a = 2 } catch (e) {}
      • 为什么没有捕捉到
        • 因为编译失败

# 2017/09/07

  • sql
    • ANSI sql
    • query to count the number of tables in mysql
      • show tables; select found_rows()
    • how to find all databases in mysql
      • show databases
      • show schemas
    • how to query the autoincrement
      • show table status like :table \G
    • how to get information for a specific table
      • show table status like :table \G
    • check what character encoding a table has
      • show create table :table
      • show table status like :table
    • check what storage engine a table uses
      • show create table :table
      • select table_name, engine from information_schema.tables
    • what is difference between with join and left join?

# 2017/09/08

  • sql
    • how to create/delete a database
      • drop database :db
    • what data types mysql support
      • char (2^8)
      • varchar (2^8)
      • text (2^16)
      • blob (2^16)
      • tinyint (2^8)
      • smallint (2^16)
      • mediumint (2^24)
      • int (2^32)
      • datetime
      • timestamp
      • json (5.7.8)
  • python
    • implementation of True and 1
      • The class bool is a subclass of the class int

# 2017/09/09 植物园

花开有落时,人生容易老。

# 2017/09/12

  • system design
    • load balancer
      • how to keep Session persistence ?
      • layer 4 load balancing
      • layer 7 load balancing
      • what is downstream server
      • how to prevent single point of failure?
        • load balancer
    • what function HAproxy support?
      • random
      • round robin (with weight)
      • cookie / session
    • solid principle
      • what is single responsibility principle?
      • Open closed principle
      • Liskov substitution principle
      • Dependency inversion principle
      • Interface surgregation principle
    • Object Store Service
    • SQL Write Master-Slave / SQL Read Replicas
      • Statement-Based Replication
      • Row-Based Replication
      • Binlog -> Replaylog
    • what difference between varnish and cdn?
      • https://varnish-cache.org/docs/index.html
    • federation

# 2017/09/13

Everything is a trade-off

  • db
    • what is cache locality
      • principle of locality 局部性原理,比如 splay-tree,cache
    • ACID
      • Atomicity
      • Consistency
        • 比如事务
      • Isolation
      • Durablity
    • SQL tuning
      • index
        • B-tree
  • system design
    • how to design a shortening service

# 2017/09/14

# 2017/09/15

  • DOM
    • encodeURI
    • encodeURIComponent
  • js
    • Number.isNaN 与 isNaN 的区别
    • parseFloat 与 Number 的区别

# 2017/09/16

  • mysql 的连接数过小
    • 如何查看连接数
      • SHOW STATUS WHERE variable_name = 'Threads_connected'
      • SHOW VARIABLES;
    • 如何配置最大连接数
      • /etc/mysql/mysql.conf.d/mysqld.cnf -> mysql配置文件
    • 如何禁掉解析client域名
  • shell
    • 设置成vi模式后,无法在编辑模式下删除

# 2017/09/18

  • postman
    • env
  • sequelize
    • attributes.include
      • 可以添加一些计算的属性
    • where object 与 sequelize.fn 共存
      • 好像是不行的
  • sql
    • 在创建表时如果没有指定null规则,则默认为default null -> mysql
    • 如何指定默认时间为当前时间
      • createAt datetime not null default current_timestamp;
        • auto initialized
      • createAt datetime not null default current_timestamp on update current_timestamp;
        • auto update
      • CURRENT_TIMESTAMP()
      • NOW()
      • LOCALTIME
      • LOCALTIME()
      • LOCALTIMESTAMP
      • LOCALTIMESTAMP()
    • 时区问题
      • show global variables like '%time_zone%';
      • UTC / GMT
      • CST
  • js
    • object 略掉 undefined 的数据
      • _.pickBy(o, x => x !== undefined)
    • 解读 lodash.getlodash.result 的源码
      • 先解析路径为 Array
    • 取最大的时间戳
      • sql 如何取最大的时间戳

# 2017/09/19

  • mysql
    • update students set createTime = 1505791922 where id = 14; (1292, u"Incorrect datetime value: '1505791922' for column 'createTime' at row 1")
    • datetime & timestamp diff and similar
      • range
        • datetime 1000 - 9999
        • timestamp 1970 - 2038
    • timestamp 与 datetime 应该如何插入数据
      • insert into t1 (ts) values ('2017-09-19 20:34')
  • js
    • mobx 中的toJS
      • 把 observable 类型转化为 object

# 2017/09/20

  • git
    • 如何查看本分支下是否还有未提交的东西
      • git cherry -v
    • 清除所有 stash
      • git stash clear
  • sql
    • 检索某一列最大的字符长度
      • select name, length(name) as len from students order by len desc limit 1;

# 2017/09/21

# 2017/09/22

  • sql
    • enum
      • shirt enum('xs', 's', 'm', 'l', 'xl');
  • 敏捷
    • 写测试用例 -> 与测试对比 -> 不一致与产品讨论 -> 不可测技术讨论,预想实现 -> 估时(分清边界,熟悉与不熟悉) -> 实现

# 2017/09/25

  • sql
    • show triggers;
    • stored routine
      • 如何查看有多少 procedure 和 function
        • show function status \G
        • show procedure status \G
    • show processlist;
      • 显示多少进程在连接本数据库

# 2017/09/27

  • sql
    • 给数据库表添加注释
      • alter table student comment '测试数据库表'
  • antd 如何替换 iconfont 的cdn地址
    • modifyVars 不起作用
    • iconfont.cn
      • font-face: font-family, src

# 2017/09/29

  • os
    • 取决于硬盘读取数据速度的因素是什么
      • 寻道时间 / 旋转时间 / 读取时间
    • two-phase lock 是如何解决死锁问题的
    • RAID 是什么,RAID-0 到 RAID-5 有什么改进
  • db
    • two-phase lock 是什么
    • ansi sql 的四种隔离级是什么,如何查看mysql默认的隔离级
    • MVVC 如何解决幻读的问题

# 2017/09/30

  • create-react-app
    • react-dev-utils/prepareProxy
    • dotenv
  • jest
    • toMatchSnapshot
  • enzyme
    • .mount 与 .render 的区别

# 2017/09/25 ~ 2017/10/01 (week 35)

  • 存储过程的作用是什么,function 与 procedure 有什么区别

sql 是弱逻辑的,存储过程使 sql 更具逻辑性。 function(User Defined Function) 是自定义函数,必须返回一个值,用在检索数据上,不能更改数据。比如 maxsumconcat 这些,使用 select f(a) 调用。 procedure(Storaged Procedure) 是存储过程,执行一系列命令,使用 call p() 调用。

  • 数据库的四种隔离级是什么,什么是可重复读,幻读

  • 二段锁(2PL)如何解决数据库的死锁问题

  • MVVC 是什么,原理是什么

  • 影响磁盘读取速度的因素有哪些

  • RAID 是什么,RAID 各个级别有什么不同

  • sass 与 less 是否可以配置替换文件中的变量,是否可以在配置文件中预设好变量

# 2017/10/02

  • sql
    • show table status 中的 Avg_row_length 是如何计算出来的,为什么与自己定义的列的存储长度不一致
    • ip 地址和带毫秒的时间戳应该在数据库中怎么存储

# 2017/10/10

  • sql
    • 集成式测试工具
      • ab
      • JMeter
    • Rtree
    • Prefix Index
      • Index Selectivity
        • 使前缀的选择性接近全列的选择性
        • 不能使用 order 和 group
    • explain
      • rows 访问了多少行
      • type 使用什么样的访问类型
        • Full Table Scan
        • Index Scan
        • Range Scan
        • Unique Index Lookup
        • Constant

# 2017/10/14

  • sql
    • show index from :table
      • cardinality
    • explain
      • select_type (opens new window)
        • 使用json格式输出
          • explain format=json select * from student
        • select_type
          • dependent subquery
            • select 中的查询,依赖于外部查询
          • primary
          • derived
          • simple
        • rows
        • filtered
        • type
          • const
            • 当查询主键时
          • ref
            • 当查询索引时
          • range
            • 当查询索引并且是范围时
          • index
          • all
            • 查询非索引时
    • 非规范化
    • 预先计算
    • 缓存
    • index
      • alter table add key (exam_id)
      • alter table add key (exam_id)

# 2017/10/09 ~ 2017/10/15 (week 37)

  • enzyme.mount, enzyme.render,enzyme.shallow 的区别是什么
  • 什么是死锁,常见解决死锁的方案有哪些
  • chai 做为一个断言库,提供了哪些 API
    • expect().to.equal()
    • expect().to.eql() -> expect().to.deep.equal()
    • expect().to.be.null
    • expect().to.be.undefined
    • expect().to.be.empty
    • expect({ a: 1 }).to.have.property('a', 1)
    • expect().to.include()
    • expect().to.satisfy(n => n > 1)
  • 如何获取查询sql所耗费的时间

# 2017/10/16

  • mysql
    • global variables
      • long_query_time // 慢查询
      • slow_query_log
      • slow_query_log_file
      • log_queries_not_using_indexes // 不使用索引的查询
    • if(condition, true_value, false_value)
  • fe
    • css 会阻塞渲染吗
    • js 为什么要放到最后边
    • 资源文件的并发下载
    • 有哪些时间点
    • keyBy 函数

# 2017/10/17

  • docker
    • docker network ls
  • app
    • sequelize 中如何使用存储过程

# 2017/10/20

  • 国学项目8080在nginx中被占
  • 一个各种统计页面的前端store设计
  • db.upsert
    • on duplicate key update
  • sequelize 生成的scheme不会把key带上
  • 数据库测试
  • koa
    • 中间件只提供给个别接口
    • 中间件的response.status是404
    • 请求前后做处理,相当于hook

# 2017/10/21

# 2017/10/16 ~ 2017/10/22 (week 37)

  • 在 container 中如何连接 host 的网络
  • mysql
    • timestamp format

# 2017/10/23

  • Promice.race
  • 如何判断一个对象是空

# 2017/10/26

  • sql enum 返回数字
  • sql
    • 排序规则
    • 时间排序
    • 字符串排序
    • 数字排序

# 2017/10/30 |||

  • canvas
    • shape
      • rect
        • fillRect(x, y, width, height)
        • strokeRect(x, y, width, height)
        • clearRect(x, y, width, height)
      • path
        • beginPath()
        • closePath()
        • fill()
        • stroke()
        • arc(x, y, radius, startAngle, endAngle, antiClockWise)
  • bezier curver

# 2017/10/31 ||

  • koa
    • delegates
  • ab测试

# 2017/11/01 ||

# 2017/11/02 ||

  • js
    • JSON.stringify() 与 Object.prototype.toString() 的区别
  • sql
    • unique key 是否默认有索引
  • -webkit-scrollbar

# 2017/11/03 ||

  • zipkin

# 2017/10/31 ~ 2017/10/05 (week 39)

  • zipkin 如何监测每一个阶段的耗时
  • what's sinon

# 2017/11/06 |||

  • postman debug
  • make
  • canvas
    • dpi
    • createImageData
    • 压缩图片
      • 如何获取图片大小
        • img.naturalWidth
        • img.naturalHeight
      • 如何从 data-url 转化为 Image
        • https://stackoverflow.com/questions/4773966/drawing-an-image-from-a-data-url-to-a-canvas
        • const img = new Image(); img.src = data_url
      • 如何获取图片
        • new FileReader().ReadAsDataURL()
        • URL.createObjectURL(blob)
      • 压缩原理
  • mocha / jest
  • 限速原理

# 2017/11/07

  • 如何测试有副作用的函数
  • index.html 缓存时间
  • FILE / BLOB / ARRAYBUFFER
  • safari 不支持svg透明度,标签icon不支持svg
  • Blob 与 File 大小不一致

# 2017/11/08

  • sql mode
  • API容错性
    • 当字段传过来为空时,当不存在处理
    • 当部分字段传过来错误时,当不存在处理
  • service-worker
  • gitlab
    • gitlab-runner list
    • gitlab-runner register
    • gitlab-runner --debug run

# 2017/11/09

  • Issues
  • mocha
    • growl
  • re
    • www.baidu.com
    • baidu.com

# 2017/11/06 ~ 2017/11/12 (week 40)

  • what's nock
  • mocha 相比,ava 的局限性在哪里
  • code -> 如何把数组分为两者一组,三者一组

# 2017/11/13

  • python
    • encoding -> ''

# 2017/11/14

# 2017/11/15

# 2017/11/16

  • expect([1, 2]).to.include.members([1, 2, 2, 1])
  • 测试数组中所有元素都相等

# 2017/11/17

  • 代码约束与容错性
  • re
    • /[\]/.test('')
    • https://stackoverflow.com/questions/3115150/how-to-escape-regular-expression-special-characters-using-javascript

# 2017/11/19

  • canvas 截屏方案
  • resolution
    • window.devicePixelRatio
      • 物理像素 : CSS 像素
    • DPI -> dot per inch
  • egg
    • egg 对POST参数异常报422的错误
      • 那么对 GET qs 参数异常报什么错误
    • ci 是
  • sql
    • 检索数据并从1开始递增1的方式为每行编号
      • select *, (select count(*) from student s2 where s2.id <= s1.id) no from student s1;
      • set @n = 1; select *, @n := @n + 1 no from student;
  • vim
    • syntastics
      • 如何避免对 html 不执行语法检查
        • let g:syntastic_html_checkers = ['eslint']

# 2017/11/20

# 2017/11/22

  • https://www.zhihu.com/question/25255678/answer/263173570

# 2017/11/23

  • html5
    • 如何从 svg code 转变为图像
      • Blob([data], 'image/svg+xhtml')

# 2017/11/24

  • 解决 HiDPI canvas 失真的问题
    • https://www.html5rocks.com/en/tutorials/canvas/hidpi/

# 2017//11/27

  • generator

# 2017/12/03

  • 80 张牌,有2张2万,从里边抽十张包含两张2万的概率是多少
    • A(78, 8) / A(80, 10)

# 2017/12/04

  • FullScreen API
    • 如何判断浏览器是否最大化或者全屏
    • 如何确定 Element 的大小
    • 全屏模式后无法侦测 page visibilitychange
  • nginx = ws proxy

# 2017/12/05

  • node
    • Buffer
      • const b = Buffer('abc'); b.toString('hex')
    • TypedArray
    • Unit8Array
    • ArrayBuffer
  • org
    • svgwg
    • htmlwg
    • whatwg
    • w3
  • svg
    • gradientUnits
      • userSpaceOnUse
      • objectBoundingBox
      • [https://svgwg.org/svg2-draft/pservers.html#RadialGradientElementFXAttribute]
    • radialGradient(cx, cy, cr, fx, fy, fr)
      • fr 是什么鬼

# 2017/12/06

  • date
    • d.toISOString()
  • android
    • folder
      • app/src/main/res -> 相当于 src/assets 吧
        • drawable
          • 相当于前端应用中的 /assets/images 文件夹吧
        • layout/activity_my.xml
          • 布局,对应 index.html 吧
        • menu
          • 相当于 router.js 吧
        • values
          • 相当于 index.scss 吧
      • app/src/main/java/com.mycompany.myfirstapp/MyActivity.java
        • 相当于 index.js 吧
      • app/src/main/AndroidManifest.xml
        • 项目基本特征与各个组件,相当于 SAP 中的 app.js 吧
      • app/build.gradle
        • 编译配置文件,相当于 SAP 中的 webpack 吧
        • compiledSdkVersion
          • 要编译的目标 Android 版本
        • applicationId
          • 包名
        • targetSdkVersion
          • 最高版本
        • minSdkVersion
          • 最低版本
    • Instant App support
    • sdk
      • android list avd
  • canvas
    • D3.js
    • three.js
    • G2.js

# 2017/12/07

  • Preference API
  • SharedPreference API
    • Context ctx = getActivity()
    • SharedPreferences cache = ctx.getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVITY)
  • android
    • folder
      • gradleScripts
        • build.gradle
      • app/manifests
        • AndroidManifest.xml
      • app/java
      • app/res
        • drable
        • layout
        • menu
        • mipmap
        • values
    • R
    • HAXM Hardware Accelerate Execution Manager
    • 在真实设备上运行
    • android.os.Bundle
    • ConstraintLayout
    • size
      • dp -> 设备独立像素
    • Widgets
      • TextView -> input
        • inputType -> type
        • t.setText('hello, world')
      • Button -> button
        • text
    • Widgets property
      • layout_width -> width
      • layout_height -> height
        • wrap_content -> flex: 1
    • FloatingActionButton
    • Snackbar
    • Intent(Context, ComponentClass) -> props
      • intent.putExtra('a', 3) -> <App a={3}>
      • intent.getStringExtra('a')
      • startActivity(intent)
    • AppCompat
    • 布局
      • declaring-layout (opens new window)
      • 使用 activity 加载布局 -> import 'style.scss'
        • super.onCreate(savedInstance)
        • setContentView(R.layout.main_layout)
      • id -> 不需要全局唯一,但最好做到全局唯一
        • android:id = "@+id/my_button"
        • android:id = "@android:id/my_button"
        • Button btn = findViewById(R.id.my_button)
      • layout
        • LinearLayout
        • ConstraintLayout
      • layout_width
        • wrap_content flex-shrink: 1
        • match_parent flex-grow: 1
    • View 与 ViewGroup 的区别
    • AdapterView
      • Adapter 获取数据 与 React 很像
  • adb
    • adb devices
  • java
    • @override
      • https://stackoverflow.com/questions/5506373/override-annotation
      • 告诉编译器,表示该方法为继承的
    • public static final String EXTRA_MESSAGE = "hello, world"
      • static -> 静态属性
      • final -> 常量
    • gradle

# 2017/12/08

  • 官方教程
    • 无法添加向上导航
    • appCompat
      • v4
      • v7

# 2017/12/09

  • vim
    • 定位到该屏幕最上方
      • HLM
      • zz zt zb
      • c-o, c-i
      • 列出 jump list
        • :ju
      • only
      • tabonly

# 2017/12/11

  • sql
    • 唯一索引,如果有的值为空怎么办
  • firebase

# 2017/12/12

  • 各种版本浏览器
  • 如何删除有外键约束的值
    • Cascade
    • Set null

# 2017/12/13

  • 防止多次提交

# 2017/12/14

  • jsPDF

# 2017/12/21

  • Instent Run
  • 查看系统字体

# 2017/12/22

# 2017/12/24

# 2017/12/26

  • fetch
    • cache mode
      • no-cache
      • reload
  • urlencode

# 2017/12/28

  • 浏览器最多可以打开多少个页面

关于山月

我的项目:
我的微信:shanyue94,欢迎交流
Last Updated: 7/21/2019, 11:25:08 AM