create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
Inline-block | |
1. For inline-block for ie8 to work, <!DOCTYPE html> has to be declared, as well as <meta http-equiv="X-UA-Compatible" content="IE=edge">for correct rendering mode. Has to be first loading element in head. | |
2. inline-block may cause width problem. Use max-width: 100% or inherit to fix. | |
3. Try use *display: inline; *zoom:1; or float: left/right(works same as zoom), because ie8 treat inline-block as block element in cerntain condition. This supports ie6+ | |
4. inline-block may stack or overlap on each other even they are in same line, to fix it use margin-right: 1px if possible, otherwise, use #3 tip above | |
5. Align to bottom: Inline or inline-block elements can be aligned to the bottom of block level elements if the line-height of the parent/block element is greater than that of the inline element.* | |
6. Using 'vertical-align: baseline' would stack inline-block element instead of align them. | |
Float and img width | |
.float > img, If img has max-width: 100% in IE8, it will be 0 width. image won't be seen. |
1. Height and max-height at 100%; | |
2. HTML may need 100% to expand all the way to viewport height(browser height), because viewport is the hidden container of <html>; | |
IF a child want to use 100% of container's height, then you may need height: 1px to container if the container | |
doesn't have height property but a min-height. http://jsfiddle.net/aUDnn/1/?utm_source=website&utm_medium=embed&utm_campaign=aUDnn | |
3. > *:target {} // this might be a good way for animation. | |
4. What :nth-child(an+b) does is it divides the container’s children into a elements (the last group taking the remainder), | |
and then selects the bth element of each group. So, li:nth-child(3n+1) will divide the list items into 3 groups, put the |
var throttle = (function () { | |
return function (fn, delay) { | |
delay || (delay = 100); | |
var last = +new Date; | |
return function () { | |
var now = +new Date; | |
if (now - last > delay) { | |
fn.apply(this, arguments); | |
last = now; | |
} |
class Car { | |
constructor(options) { | |
this.doors = options.doors || 4; | |
this.state = options.state || "brand new"; | |
this.color = options.color || "silver"; | |
} | |
} | |
class Truck { | |
constructor(options) { |
var module = (function() { | |
var _private = { | |
i:5, | |
get : function() { | |
console.log( "current value:" + this.i); | |
}, | |
set : function( val ) { | |
this.i = val; | |
}, |
http://webdesign.tutsplus.com/tutorials/comprehensive-guide-when-to-use-em-vs-rem--cms-23984 | |
rem and em units are computed into pixel values by the browser, based on font sizes in your design. | |
em units are based on the font size of the element they’re used on. | |
rem units are based on the font size of the html element. | |
em units can be influenced by font size inheritance from any parent element | |
rem units can be influenced by font size inheritance from browser font settings. | |
Use em units for sizing that should scale depending on the font size of an element other than the root. | |
Use rem units for sizing that doesn’t need em units, and that should scale depending on browser font size settings. |
mysql -u root -p epg < epg.sql |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
Libuv has a default thread pool size of 4, and uses a queue to manage access to the thread pool - the upshot is that if you have 5 long-running DB queries all going at the same time, one of them (and any other asynchronous action that relies on the thread pool) will be waiting for those queries to finish before they even get started.
Note, however, that tuning UV_THREADPOOL_SIZE may make more sense for a standalone application like a CLI written in Node.js. If you are standing up a bunch of Node.js processes using the cluster module then I would be surprised if tuning UV_THREADPOOL_SIZE was particularly beneficial for you. But if your application resembles the web tooling benchmarks then tuning UV_THREADPOOL_SIZE may help with performance.
const http = require("http"); | |
const net = require("net"); | |
const server = http.createServer((req, res) => { | |
req.resume(); | |
res.end("hello"); | |
}); | |
server.keepAliveTimeout = 6 * 1000; | |
server.headersTimeout = 4 * 1000; |