当模块的文件名是index.js,加载模块时可以使用模块所在目录的路径代替模块文件路径,以下两条语句等价。
var cat = require('/home/user/lib/cat');
var cat = require('/home/user/lib/cat/index');
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| machine github.com | |
| login technoweenie | |
| password SECRET | |
| machine api.github.com | |
| login technoweenie | |
| password SECRET |
当模块的文件名是index.js,加载模块时可以使用模块所在目录的路径代替模块文件路径,以下两条语句等价。
var cat = require('/home/user/lib/cat');
var cat = require('/home/user/lib/cat/index');
Here is our DOM
body
|
|-h1
| |
| |-"Traversing the ..."
|
|-h2
| |
Debian
cd /tmp
# 下载源码
git clone https://github.com/madeye/shadowsocks-libev.git
# 开始编译
cd shadowsocks-libev
./autogen.sh
./configure --prefix=/usr && make
make install| function callback(a, b) { | |
| return function() { | |
| console.log('sum = ', (a+b)); | |
| } | |
| } | |
| var x = 1, y = 2; | |
| document.getElementById('someelem').addEventListener('click', callback(x, y)); |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # last command | |
| !! | |
| # last command beginning with xyz | |
| !xyz | |
| # print rather than excuting last command | |
| !!:p | |
| # the end of previous command |