Comprehensive Rust(简体中文) 202412. 30 6.2.1 for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.2.2 loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.3 break 和 continue println! 前面的 ; 即可查看编译器错误。 6.2 循环控制 Rust 中有三个循环关键字:while、loop 和 for: while The while keyword works much like in other languages, executing the loop body as long as the condition is true. fn main() { let let mut x = 200; while x >= 10 { x = x / 2; } println!("Final x: {x}"); } 6.2.1 for The for loop iterates over ranges of values or the items in a collection: fn main() { for x in 1..5 { println0 码力 | 359 页 | 1.33 MB | 10 月前3
Node.js Manual & Documentation零隔离 Addenda: Package Manager Tips 附录:包管理技巧 Addons 扩展插件 process 进程 o Event: 'exit' 事件:'exit' o Event: 'uncaughtException' 事件:'uncaughtException' o Signal Events 信号事件 o process.stdout emitter.addListener(event, listener) emitter.on(event, listener) emitter.once(event, listener) emitter.removeListener(event, listener) emitter.removeAllListeners(event) emitter.setMaxListeners(n) setMaxListeners(n) emitter.listeners(event) emitter.emit(event, [arg1], [arg2], [...]) Event: 'newListener' 事件:'newListener' Buffers 缓冲器 o new Buffer(size) o new Buffer(array) o0 码力 | 153 页 | 1.21 MB | 1 年前3
支持10万TPS的高性能服务间通信解读Pool Thread Thread Thread Thread Event Loops Event Loop TcpClientConnection Vertx Message Buffer CAS Message queue socket.write(composite buffer) Event Loop TcpClientConnection Vertx Message com/apache?q=servicecomb servicecomb.apache.org 提供端Provider Event Loops Event Loop Executors Executor Event Loop Event Loop Event Loop Queue Thread Pool Logic Logic Queue Logic Logic Executor0 码力 | 7 页 | 1.58 MB | 1 年前3
PyWebIO v1.7.1 使用手册PyWebIO 0.2 Battery pywebio_battery — PyWebIO battery Functions list 实现文档 服务器-客户端通信协议 Command Event Indices and tables 索引 模块索引 搜索页面 Discussion and support Need help when use PyWebIO? Make a new parameter pywebio.platform.run_event_loop(debug=False) 运行 asyncio 事件循环 See also: Integration coroutine-based session with Web framework debug – Set the debug mode of the event loop. See also: https://docs output import * from pywebio.platform.flask import webio_view from pywebio.platform import run_event_loop from pywebio.session import run_asyncio_coroutine async def hello_word(): put_text('Hello0 码力 | 151 页 | 7.47 MB | 1 年前3
PyWebIO v1.8.2 使用手册PyWebIO 0.2 Battery pywebio_battery — PyWebIO battery Functions index 实现文档 服务器-客户端通信协议 Command Event Indices and tables 索引 模块索引 搜索页面 Discussion and support Need help when use PyWebIO? Make a new parameter pywebio.platform.run_event_loop(debug=False) 运行 asyncio 事件循环 See also: Integration coroutine-based session with Web framework debug – Set the debug mode of the event loop. See also: https://docs output import * from pywebio.platform.flask import webio_view from pywebio.platform import run_event_loop from pywebio.session import run_asyncio_coroutine async def hello_word(): put_text('Hello0 码力 | 160 页 | 7.48 MB | 1 年前3
PyWebIO v1.8.1 使用手册PyWebIO 0.2 Battery pywebio_battery — PyWebIO battery Functions list 实现文档 服务器-客户端通信协议 Command Event Indices and tables 索引 模块索引 搜索页面 Discussion and support Need help when use PyWebIO? Make a new parameter pywebio.platform.run_event_loop(debug=False) 运行 asyncio 事件循环 See also: Integration coroutine-based session with Web framework debug – Set the debug mode of the event loop. See also: https://docs output import * from pywebio.platform.flask import webio_view from pywebio.platform import run_event_loop from pywebio.session import run_asyncio_coroutine async def hello_word(): put_text('Hello0 码力 | 158 页 | 7.48 MB | 1 年前3
PyWebIO v1.8.0 使用手册PyWebIO 0.2 Battery pywebio_battery — PyWebIO battery Functions list 实现文档 服务器-客户端通信协议 Command Event Indices and tables 索引 模块索引 搜索页面 Discussion and support Need help when use PyWebIO? Make a new parameter pywebio.platform.run_event_loop(debug=False) 运行 asyncio 事件循环 See also: Integration coroutine-based session with Web framework debug – Set the debug mode of the event loop. See also: https://docs output import * from pywebio.platform.flask import webio_view from pywebio.platform import run_event_loop from pywebio.session import run_asyncio_coroutine async def hello_word(): put_text('Hello0 码力 | 157 页 | 7.48 MB | 1 年前3
PyWebIO v1.8.2 使用手册PyWebIO 0.2 Battery pywebio_battery — PyWebIO battery Functions list 实现文档 服务器-客户端通信协议 Command Event Indices and tables 索引 模块索引 搜索页面 Discussion and support Need help when use PyWebIO? Make a new parameter pywebio.platform.run_event_loop(debug=False) 运行 asyncio 事件循环 See also: Integration coroutine-based session with Web framework debug – Set the debug mode of the event loop. See also: https://docs output import * from pywebio.platform.flask import webio_view from pywebio.platform import run_event_loop from pywebio.session import run_asyncio_coroutine async def hello_word(): put_text('Hello0 码力 | 158 页 | 7.48 MB | 1 年前3
PyWebIO v1.8.2 使用手册PyWebIO 0.2 Battery pywebio_battery — PyWebIO battery Functions index 实现文档 服务器-客户端通信协议 Command Event Indices and tables 索引 模块索引 搜索页面 Discussion and support Need help when use PyWebIO? Make a new parameter pywebio.platform.run_event_loop(debug=False) 运行 asyncio 事件循环 See also: Integration coroutine-based session with Web framework debug – Set the debug mode of the event loop. See also: https://docs output import * from pywebio.platform.flask import webio_view from pywebio.platform import run_event_loop from pywebio.session import run_asyncio_coroutine async def hello_word(): put_text('Hello0 码力 | 160 页 | 7.48 MB | 1 年前3
PyWebIO v1.7.1 使用手册parameter pywebio.platform.run_event_loop(debug=False) 运行 asyncio 事件循环 See also: Integration coroutine-based session with Web framework 参数 debug –Set the debug mode of the event loop. See also: https://docs output import * from pywebio.platform.flask import webio_view from pywebio.platform import run_event_loop from pywebio.session import run_asyncio_coroutine async def hello_word(): put_text('Hello . webio_view(hello_word), methods=['GET', 'POST', 'OPTIONS']) # thread to run event loop threading.Thread(target=run_event_loop, daemon=True).start() app.run(host='localhost', port=80) 最后,使用 PyWebIO 编写的协程函数不支持0 码力 | 127 页 | 1.73 MB | 1 年前3
共 557 条
- 1
- 2
- 3
- 4
- 5
- 6
- 56













