ThinkJS 2.0 中文文档������������ constrcutor ������������������ ������ ES6 �� class���� constrcutor ���� �������ThinkJS ��� init ����� constrcutor ���������� class ���� �������������������������� � �ThinkJS ��������� think JavaScript export default class think.base { /** * ���������������� * @return {} [] */ init(){ ... } } JavaScript �� Babel �� �� async/await �� */yield �� async/await � */yield JavaScript �� async/await ES7 �� ES6 �� class � contructor ���������������������������������� ������ init � ����������������������� � “`js 'use strict'; import Base from './base.js'; export default0 码力 | 238 页 | 1.87 MB | 1 年前3
ubuntu server guidein secure mode. 5.59684|Booting from SBE side 0 on master proc=00050000 5.60502|ISTEP 6. 5 - host_init_fsi 5.87228|ISTEP 6. 6 - host_set_ipl_parms 6.11032|ISTEP 6. 7 - host_discover_targets 6.67868|HWAS|PRESENT> OS [ 1280.465061219,5] OPAL: Switch to little-endian OS ln: /tmp/mountroot-fail-hooks.d//scripts/init-premount/lvm2: No such file or directory Internet Systems Consortium DHCP Client 4.4.1 Copyright [ 47.202736] /dev/loop3: Can't open blockdev [ 52.672550] cloud-init[3759]: Cloud-init v. 20.1-10-g71af48df-0ubuntu1 running 'init-local' at Wed, 18 Mar 2020 15:18:07 +0000. Up 51.87 seconds. ...0 码力 | 486 页 | 3.33 MB | 1 年前3
ThinkJS 2.2 中文文档为了统一处理,ThinkJS 提供了 init 方法来代替 constrcutor 方法,该方法不管是在 class 下还 是动态创建类的情况下都可以做到类实例化的时候自动被调用。 export default class think.base { /** * 初始化⽅方法,类实例例化时⾃自动被调⽤用 * @return {} [] */ init(){ ... } await model.select(); return this.success(data); } }); init 方法 ES6 里的 class 有 contructor 方法,但动态创建的类就没有该方法了,为了统一初始化执行的方 法,将该方法统一定义为 init 。 该方法在类实例化的时候自动调用,无需手工调用。 ES6 方式 ```js 'use strict'; class extends Base { init(http){ super.init(http); //调用父类的init方法 ... } } ``` 动态创建类方式 'use strict'; var Base = require('./base.js'); module.exports = think.controller(Base, { init: function(http){0 码力 | 277 页 | 3.61 MB | 1 年前3
ThinkJS 2.1 Documentationif you are not using ES6’s class grammar, you should not use constructor method. ThinkJS provide init method to replace constructor . It will called automatically whether you using class or not. Tips: think.base { /** * Initial method, called when class instanced * @return {} [] */ init(){ ... } } JavaScript Compile by Babel Replace */yield with async/await Upgrading Guide dynamically created do not, in order to perform the initialization uniformly, ThinkJS redefined it as init . This method is automatically called when the class is instantiated, without manually call needed0 码力 | 148 页 | 1.69 MB | 1 年前3
ThinkJS 2.0 Documentationif you are not using ES6’s class grammar, you should not use constructor method. ThinkJS provide init method to replace constructor . It will called automatically whether you using class or not. Tips: think.base { /** * Initial method, called when class instanced * @return {} [] */ init(){ ... } } JavaScript Compile by Babel Replace */yield with async/await Upgrade Guide dynamically created do not, in order to perform the initialization uniformly, ThinkJS redefined it as init . This method is automatically called when the class is instantiated, without manually call needed0 码力 | 141 页 | 1.61 MB | 1 年前3
PyArmor Documentation v5.9.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.5 init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . obfuscated scripts and all the required files are generated: dist/ myscript.py pytransform/ __init__.py _pytransform.so, or _pytransform.dll in Windows, _pytransform.dylib in MacOS pytransform.key following command to obfuscate a package: pyarmor obfuscate --recursive --output dist/mypkg mykpg/__init__.py To import the obfuscated package: cd dist python -c "import mypkg" 2.7 Packing Obfuscated0 码力 | 131 页 | 428.65 KB | 1 年前3
PyArmor Documentation v6.2.8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 6.6 init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . obfuscated scripts and all the required files are generated: dist/ myscript.py pytransform/ __init__.py _pytransform.so, or _pytransform.dll in Windows, _pytransform.dylib in MacOS pytransform.key following command to obfuscate a package: pyarmor obfuscate --recursive --output dist/mypkg mykpg/__init__.py To import the obfuscated package: cd dist python -c "import mypkg" 2.7 Packing Obfuscated0 码力 | 153 页 | 483.38 KB | 1 年前3
ThinkJS 2.2 Documentationif you are not using ES6’s class grammar, you should not use constructor method. ThinkJS provide init method to replace constructor . It will called automatically whether you using class or not. export think.base { /** * Initial method, called when class instanced * @return {} [] */ init(){ ... } } Tips: All ThinkJS class will extend the base class think.base . The latest version dynamically created do not, in order to perform the initialization uniformly, ThinkJS redefined it as init . This method is automatically called when the class is instantiated, without manually call needed0 码力 | 156 页 | 2.62 MB | 1 年前3
PyArmor Documentation v6.4.4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 6.6 init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . obfuscated scripts and all the required files are generated: dist/ myscript.py pytransform/ __init__.py _pytransform.so/.dll/.dylib The extra folder pytransform called Runtime Package, it’s required 7 PyArmor Documentation, Release 6.4.0 pyarmor obfuscate --recursive --output dist/mypkg mykpg/__init__.py To import the obfuscated package: cd dist python -c "import mypkg" 2.7 Packing Obfuscated0 码力 | 167 页 | 510.99 KB | 1 年前3
Apache Wicket 10.x Reference GuideWicketFilter <init-param>applicationClassName org.wicketTutorial.WicketApplication init-param> specifies which page to use as a homepage for our application. Another important method is init(): protected void init() 9 This method is called when our application is loaded by the web server (Tomcat, void init() { super.init(); // add your configuration here } } Since this is a very basic example of a Wicket application, we don’t need to specify anything inside the init method0 码力 | 336 页 | 7.16 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100













