官术网_书友最值得收藏!

  • Mastering Node.js
  • Sandro Pasquali
  • 167字
  • 2021-07-21 18:17:11

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "To import modules into your Node program use the require directive."

A block of code is set as follows:

var EventEmitter = require('events').EventEmitter;
var Counter = function(init) {
  this.increment = function() {
      init++; 
      this.emit('incremented', init);
  }

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

var size = process.argv[2];
var totl = process.argv[3] || 100;
var buff = [];
for(var i=0; i < totl; i++) {
  buff.push(new Buffer(size));
  process.stdout.write(process.memoryUsage().heapTotal + "\n");
}

Any command-line input or output is written as follows:

> node process.js 1000000 100 > out.file

New terms and important words are shown in bold.

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

主站蜘蛛池模板: 安阳市| 德惠市| 彰化市| 许昌市| 常熟市| 舞钢市| 张家口市| 黄骅市| 区。| 白朗县| 平武县| 抚顺县| 屏东县| 定南县| 古交市| 娄底市| 乐昌市| 红桥区| 新田县| 家居| 闵行区| 霸州市| 甘孜县| 邯郸县| 广东省| 桐梓县| 若尔盖县| 隆化县| 右玉县| 孟津县| 湘阴县| 塔城市| 扎兰屯市| 正宁县| 都匀市| 曲麻莱县| 本溪| 资兴市| 青神县| 依兰县| 八宿县|