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
Celery v4.0.0 DocumentationOptimization What to do now? Using Celery in your Application Our Project Project layout: proj/__init__.py /celery.py /tasks.py proj/celery.py from __future__ import absolute_import, unicode_literals itself as the current app (but not if the set_as_current argument was disabled) 4. Call the app.on_init() callback (does nothing by default). The app.task() decorators don’t create the tasks at the point = current_app Instead it should take the app as an argument: class Scheduler(object): def __init__(self, app): self.app = app Internally Celery uses the celery.app.app_or_default() function0 码力 | 2106 页 | 2.23 MB | 1 年前3
Celery 3.0 DocumentationOptimization What to do now? Using Celery in your Application Our Project Project layout: proj/__init__.py /celery.py /tasks.py proj/celery.py from __future__ import absolute_import, unicode_literals itself as the current app (but not if the set_as_current argument was disabled) 4. Call the app.on_init() callback (does nothing by default). The app.task() decorators don’t create the tasks at the point = current_app Instead it should take the app as an argument: class Scheduler(object): def __init__(self, app): self.app = app Internally Celery uses the celery.app.app_or_default() function0 码力 | 2110 页 | 2.23 MB | 1 年前3
Celery v5.0.0 DocumentationOptimization What to do now? Using Celery in your Application Our Project Project layout: proj/__init__.py /celery.py /tasks.py proj/celery.py from celery import Celery app = Celery('proj', itself as the current app (but not if the set_as_current argument was disabled) 4. Call the app.on_init() callback (does nothing by default). The app.task() decorators don’t create the tasks at the point = current_app Instead it should take the app as an argument: class Scheduler(object): def __init__(self, app): self.app = app Internally Celery uses the celery.app.app_or_default() function0 码力 | 2309 页 | 2.13 MB | 1 年前3
Celery v5.0.1 DocumentationOptimization What to do now? Using Celery in your Application Our Project Project layout: proj/__init__.py /celery.py /tasks.py proj/celery.py from celery import Celery app = Celery('proj', itself as the current app (but not if the set_as_current argument was disabled) 4. Call the app.on_init() callback (does nothing by default). The app.task() decorators don’t create the tasks at the point = current_app Instead it should take the app as an argument: class Scheduler(object): def __init__(self, app): self.app = app Internally Celery uses the celery.app.app_or_default() function0 码力 | 2313 页 | 2.13 MB | 1 年前3
Celery v5.0.2 DocumentationOptimization What to do now? Using Celery in your Application Our Project Project layout: proj/__init__.py /celery.py /tasks.py proj/celery.py from celery import Celery app = Celery('proj', itself as the current app (but not if the set_as_current argument was disabled) 4. Call the app.on_init() callback (does nothing by default). The app.task() decorators don’t create the tasks at the point = current_app Instead it should take the app as an argument: class Scheduler(object): def __init__(self, app): self.app = app Internally Celery uses the celery.app.app_or_default() function0 码力 | 2313 页 | 2.14 MB | 1 年前3
Celery v5.0.5 DocumentationOptimization What to do now? Using Celery in your Application Our Project Project layout: proj/__init__.py /celery.py /tasks.py proj/celery.py from celery import Celery app = Celery('proj', itself as the current app (but not if the set_as_current argument was disabled) 4. Call the app.on_init() callback (does nothing by default). The app.task() decorators don’t create the tasks at the point = current_app Instead it should take the app as an argument: class Scheduler(object): def __init__(self, app): self.app = app Internally Celery uses the celery.app.app_or_default() function0 码力 | 2315 页 | 2.14 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
PyArmor Documentation v6.2.7Child Project Project Configuration File Man Page Common Options obfuscate licenses pack hdinfo init config build info check banchmark register download runtime Understanding Obfuscated Scripts Global 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 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" Packing Obfuscated Scripts0 码力 | 159 页 | 123.91 KB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100













