##Detect Dom elements resize:
https://github.com/sdecima/javascript-detect-element-resize
http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
##Detect Dom node insertion:
css3 animation: | |
http://codepen.io/anon/pen/rOMaJp?editors=110 | |
http://codepen.io/anon/pen/meEKLm?editors=110 | |
http://codepen.io/anon/pen/vNXNaj?editors=110 | |
Flex three columns layout: | |
http://codepen.io/anon/pen/NGgNZG?editors=110 |
var fs = require('fs'); | |
var lame = require('lame'); | |
var Speaker = require('speaker'); | |
fs.createReadStream(process.argv[2]) | |
.pipe(new lame.Decoder()) | |
.on('format', function (format) { | |
this.pipe(new Speaker(format)); | |
}); |
##Detect Dom elements resize:
https://github.com/sdecima/javascript-detect-element-resize
http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
##Detect Dom node insertion:
分离 用于展示效果的 css className 和 javascript 用来绑定或附加效果的 css className | |
css 命名: | |
prefixName-block-element--modifier | |
e.g. | |
qm-header-title | |
qm-header-title--highLight | |
qm-header-navList |
通过entity relation diagram 设计数据库 | |
1. 表中属性唯一,不重复 | |
2. 属性完全只依赖于主键 | |
3. 表中不含非关键字信息 | |
索引是用来定位的 |
http://stackoverflow.com/questions/26882177/react-js-inline-style-best-practices |
Nice answer on stackoverflow to the question of when to use one or the other content-types for POSTing data, viz. application/x-www-form-urlencoded
and multipart/form-data
.
“The moral of the story is, if you have binary (non-alphanumeric) data (or a significantly sized payload) to transmit, use multipart/form-data
. Otherwise, use application/x-www-form-urlencoded
.”
Matt Bridges' answer in full:
The MIME types you mention are the two Content-Type
headers for HTTP POST requests that user-agents (browsers) must support. The purpose of both of those types of requests is to send a list of name/value pairs to the server. Depending on the type and amount of data being transmitted, one of the methods will be more efficient than the other. To understand why, you have to look at what each is doing
# This script is used for ubuntu Trusty 14.04 | |
sudo apt-get update | |
sudo apt-get install apt-transport-https ca-certificates -y | |
sudo apt-get install vim -y | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
sudo touch /etc/apt/sources.list.d/docker.list | |
sudo echo 'deb https://apt.dockerproject.org/repo ubuntu-trusty main' > /etc/apt/sources.list.d/docker.list | |
sudo apt-get update | |
sudo apt-get purge lxc-docker |
However, if you have a normal parent div with a background, the lower element will be hidden. In this case, give the parent relative positioning and a z-index of 1. See: jsbin.com/juputice/3/edit |
function co(GenFunc) { | |
return function(cb) { | |
var gen = GenFunc() | |
next() | |
function next(err, args) { | |
if (err) { | |
cb(err) | |
} else { | |
if (gen.next) { | |
var ret = gen.next(args) |