- 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.
推薦閱讀
- The Complete Rust Programming Reference Guide
- 三維圖形化C++趣味編程
- Mastering AndEngine Game Development
- Apex Design Patterns
- C#程序設計基礎:教程、實驗、習題
- Elasticsearch Server(Third Edition)
- 零基礎輕松學SQL Server 2016
- WordPress 4.0 Site Blueprints(Second Edition)
- Access 2010數據庫應用技術(第2版)
- 貫通Tomcat開發
- C語言程序設計
- 算法超簡單:趣味游戲帶你輕松入門與實踐
- 零基礎PHP從入門到精通
- Mastering XenApp?
- 讀故事學編程:Python王國歷險記