上一页 1 ··· 90 91 92 93 94 95 96 97 98 ··· 469 下一页
摘要: `namespace` is manily for the left over from the days where we’d refer to libraries through a single global variable. With this in mind, let’s not giv 阅读全文
posted @ 2022-08-08 18:23 Zhentiw 阅读(16) 评论(0) 推荐(0) 编辑
摘要: When working with function parameters, we know that “inner scopes” have the ability to access “outer scopes” but not vice versa function receiveFruitB 阅读全文
posted @ 2022-08-08 17:59 Zhentiw 阅读(31) 评论(0) 推荐(0) 编辑
摘要: Assume we have the following code: interface HasId { id: string } interface Dict<T> { [k: string]: T } function listToDict<T>(list: T[]): Dict<T> { co 阅读全文
posted @ 2022-08-08 17:54 Zhentiw 阅读(22) 评论(0) 推荐(0) 编辑
摘要: const fruits = { apple: { color: "red", mass: 100 }, grape: { color: "red", mass: 5 }, banana: { color: "yellow", mass: 183 }, lemon: { color: "yellow 阅读全文
posted @ 2022-08-07 01:48 Zhentiw 阅读(310) 评论(0) 推荐(0) 编辑
摘要: Add to global commands Add #! /usr/bin/env node to index.js chmod +x index.js Run ./index.js to test. ln -s <full_path_to_index.js_file>/index.js /usr 阅读全文
posted @ 2022-08-05 21:01 Zhentiw 阅读(16) 评论(0) 推荐(0) 编辑
摘要: Our CLI can be run from anywhere on the system but we have a critical error. The script is trying to find a data.json file that is relative to where i 阅读全文
posted @ 2022-08-05 20:57 Zhentiw 阅读(77) 评论(0) 推荐(0) 编辑
摘要: There are a handful of ways you can read and write to the File System in Node.js. We will look at readFileSync, readFile, and a promise based version 阅读全文
posted @ 2022-08-05 20:25 Zhentiw 阅读(22) 评论(0) 推荐(0) 编辑
摘要: Node.js projects have two ways that you can import and export code into different files. This is through CommonJS (CJS) and ECMAScript modules (ESM). 阅读全文
posted @ 2022-08-05 19:50 Zhentiw 阅读(22) 评论(0) 推荐(0) 编辑
摘要: Assumption: Run the testing code only if when the condition is match, otherwise, test will be ignored @Test void runTestIf() { System.out.print("Curre 阅读全文
posted @ 2022-08-04 18:28 Zhentiw 阅读(22) 评论(0) 推荐(0) 编辑
摘要: // This is an input class. Do not edit. class Node { constructor(value) { this.value = value; this.prev = null; this.next = null; } } // Feel free to 阅读全文
posted @ 2022-08-04 01:17 Zhentiw 阅读(25) 评论(0) 推荐(0) 编辑
上一页 1 ··· 90 91 92 93 94 95 96 97 98 ··· 469 下一页