Named Optional Parameters - JavaScript Style
Named Optional Parameters - JavaScript Style Brian Davidson (briandavidson@meta.com) Summary C++ developers often run into the situation where we have multiple parameters in a function with the same to use to Is there a way to make C++ function calls clear through naming, similar to python or javascript? def send(source=None, destination=None): send(source=from, destination=to) send(source=from) overloaded function arguments forming a clear function call Inspiration: Javascript The anonymous object parameters of javascript provide a readable function API. logger({one:0.9999}); > 0.9999 logger({one:"one"0 码力 | 1 页 | 3.17 MB | 5 月前3JavaScript & DOM
05.JavaScript & DOM 19 décembre 2023 Développement web il3 JavaScript & DOM HE-Arc (DGR) 2022 JavaScript hier • Page web = HTML (+ CSS + JavaScript) • Exécuté par le browser (client) • Interprété exécutées par le navigateur – DHTML : rollovers, validation de formulaires, … JavaScript aujourd’hui • Page web = HTML + CSS + JavaScript • Compilation JIT • HTML5, AJAX, bookmarklets • One Page Apps • Implémentations ECMA-262 14th edition8 – Support9 des différentes implémentations – Conversions avec BabelJS10 • JavaScript : implémentation Firefox (réf. MDN) • Variantes (à transpiler) : – Typescript11 : variante fortement0 码力 | 10 页 | 91.95 KB | 1 年前3ThinkJS 2.0 中文文档
//����������������session await this.session('userInfo', result); return this.success(); } } JavaScript ��������������� �������� ������ ���� REST �� �� thinkjs �������� REST ��������������� REST �� ES6/7 ������������ JavaScript Promise��� learn-es2015 ������� ��������� �������� � express/koa �� � sails �� ThinkJS ��� ES6/7 ���� ECMAScript 6 �� � JavaScript ���� ES2015 �� ECMAScript global.formatDate = obj => { ... } JavaScript ����� // src/common/bootstrap/middleware.js think.middleware('replace_image', http => { ... }); JavaScript src/common/config 'use strict'; /**0 码力 | 238 页 | 1.87 MB | 1 年前3ThinkJS 2.1 Documentation
free and open source programming language designed by Microsoft. TypeScript is a typed superset of JavaScript that it has some useful function in large project such as optional static type. ThinkJS 2.1 has user infomation await this.session('userInfo', result); return this.success(); } } JavaScript Supports TypeScript Supports variant project structures and environments Supports Abundant Database formatDate = obj => { ... } JavaScript Register Middlewares // src/common/bootstrap/middleware.js think.middleware('replace_image', http => { ... }); JavaScript src/common/config 'use strict';0 码力 | 148 页 | 1.69 MB | 1 年前3ThinkJS 2.2 Documentation
free and open source programming language designed by Microsoft. TypeScript is a typed superset of JavaScript that it has some useful function in large project such as optional static type. ThinkJS 2.1 has variant project structures and environments Supports Abundant Database Type Automatic Updating JavaScript ThinkJS has a mechanism that could automatically update codes after source files being modified src/common/config src/common/controller src/common/runtime src/home src/home/logic JavaScript JavaScript JavaScript 'use strict'; /** * logic * @param {} [] * @return {} [] */ export0 码力 | 156 页 | 2.62 MB | 1 年前3ThinkJS 2.0 Documentation
user infomation await this.session('userInfo', result); return this.success(); } } JavaScript Supports variant project structures and environments Supports abundant database type Automatic formatDate = obj => { ... } JavaScript Register Middlewares // src/common/bootstrap/middleware.js think.middleware('replace_image', http => { ... }); JavaScript src/common/config 'use strict'; strict'; /** * config */ export default { //key: value }; JavaScript src/common/controller src/common/runtime src/home src/home/logic 'use strict'; /** * logic * @param {} [] * @return0 码力 | 141 页 | 1.61 MB | 1 年前3ThinkJS 1.2 中文文档
install -‐g thinkjs-‐cmd -‐-‐registry=http://r.cnpmjs.org Bash thinkjs -‐v JavaScript 如果能看到下⾯面的字符,说明已经安装成功了。 更新 ThinkJS,分成 2 种,⼀一种是更新系统的 ThinkJS 版本,更新后后续创建项⺫⽬目时使⽤用新版的 ThinkJS。另⼀一种 __dirname; global.APP_DEBUG = true; // 是否开启 DEBUG 模式 require('thinkjs'); JavaScript 配置⽂文件 module.exports = { // 配置项: 配置值 port: 8360, // 监听的端⼝口 'think_', // 数据库表前缀 }; JavaScript 函数⽂文件 global.getDate = function(){return 'xxx';}; global.getSliceUrl = function(url, length){return '';} JavaScript App/Lib/Controller/Home/IndexController0 码力 | 104 页 | 1.29 MB | 1 年前3The Node.js Handbook
2022 3. How to install Node.js 4. How much JavaScript do you need to know to use Node? 5. Differences between Node and the Browser 6. The V8 JavaScript Engine 6.1. Other JS engines 6.2. The quest autocomplete 11.2. Exploring JavaScript objects 11.3. Explore global objects 11.4. The _ special variable 11.5. The Up arrow key 11.6. Dot commands 11.7. Run REPL from JavaScript file 12. Node, accept Job Queue 29. Understanding process.nextTick() 30. Understanding setImmediate() 31. Discover JavaScript Timers 31.1. setTimeout() 31.1.1. Zero delay 31.2. setInterval() 31.3. Recursive setTimeout0 码力 | 161 页 | 1.66 MB | 1 年前3MuPDF 1.23.0 Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 6 MuPDF & Javascript 81 6.1 Class A-Z Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . want to work from and do: npm install mupdf • To verify your installation you can then create a JavaScript file as such: const mupdf = require("mupdf"); console.log(mupdf); • Save this file as “test.js” The following JavaScript sample demonstrates how to load a local document and then print out the page count. Ensure you have a valid PDF for “my_document.pdf” file alongside this JavaScript sample before0 码力 | 245 页 | 817.74 KB | 7 月前3MuPDF 1.25.0 Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 7 MuPDF & Javascript 85 7.1 Class A-Z Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . want to work from and do: npm install mupdf • To verify your installation you can then create a JavaScript file as such: const mupdf = require("mupdf"); console.log(mupdf); • Save this file as “test.js” The following JavaScript sample demonstrates how to load a local document and then print out the page count. Ensure you have a valid PDF for “my_document.pdf” file alongside this JavaScript sample before0 码力 | 259 页 | 1.11 MB | 7 月前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100