Rust 程序设计语言 简体中文版 1.85.0阅读专门介绍程序设计的书籍。 如何阅读本书 本书大体上假设你按从头到尾的顺序阅读。后面的章节建立在前面章节概念的基础上。前面的 章节可能不会深入介绍部分主题,而是留待后续章节重新讨论。 本书分为两类章节:概念章节和项目章节。在概念章节中,我们学习 Rust 的某个方面。在项 目章节中,我们应用目前所学的知识一同构建小型程序。第二、十二和二十一章是项目章节; 其余都是概念章节。 第一章介绍如何安装 std::io; use rand::Rng; fn main() { println!("Guess the number!"); let secret_number = rand::thread_rng().gen_range(1..=100); println!("The secret number is: {secret_number}"); println!("Please trait,它定义了随机数生成器应实现的 方法,想使用这些方法的话,此 trait 必须在作用域中。第十章会详细介绍 trait。 接下来,我们在中间还新增加了两行。第一行调用了 rand::thread_rng 函数提供实际使用的 随机数生成器:它位于当前执行线程的本地环境中,并从操作系统获取 seed。接着调用随机 数生成器的 gen_range 方法。这个方法由 use rand::Rng0 码力 | 562 页 | 3.23 MB | 1 月前3
人工智能安全治理框架 1.0工 智能学科同步发展,依托学校、科研机构等加强人工智能安全设计、开发、治 理人才的培养,支持培养人工智能安全前沿基础领域顶尖人才,壮大无人驾驶、- 12 - 人工智能安全治理框架 智能医疗、类脑智能、脑机接口等领域安全人才队伍。 5.9 建立健全人工智能安全宣传教育、行业自律、社会监督机制。 面向政府、企业、社会公用事业单位加强人工智能安全规范应用的教育培训。 加强人工智能安全风险及 (b)服务提供者应在合同或服务协议中,以使用者易于理解的方式,告 知人工智能产品和服务的适用范围、注意事项、使用禁忌,支持使用者知情选 择、审慎使用。 (c)服务提供者应在告知同意、服务协议等文件中,支持使用者行使人 类监督和控制责任。 (d)服务提供者应让使用者了解人工智能产品的精确度,在人工智能决 策有重大影响时,做好解释说明预案。 (e)服务提供者应检查研发者提供的责任说明文件,确保责任链条可以 追溯到递归采用的人工智能模型。0 码力 | 20 页 | 3.79 MB | 1 月前3
Tornado 6.5 Documentationdifferent from most Python web frameworks. It is not based on WSGI, and it is typically run with only one thread per process. See the User’s guide for more on Tornado’s approach to asynchronous programming. While interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe. The only method in Tornado that is safe to call from other threads is IOLoop.add_callback. You can also use IOLoop.run_in_executor to asynchronously run a blocking function on another thread, but note that the function passed to run_in_executor should avoid referencing any Tornado objects.0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.5 Documentationnot based on WSGI [https://wsgi.readthedocs.io/en/latest/], and it is typically run with only one thread per process. See the User’s guide for more on Tornado’s approach to asynchronous programming. While interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe. The only method in Tornado that is safe to call from other threads is IOLoop.add_callback. You can also use IOLoop.run_in_executor to asynchronously run a blocking function on another thread, but note that the function passed to run_in_executor should avoid referencing any Tornado objects.0 码力 | 437 页 | 405.14 KB | 3 月前3
Julia 1.12.0 RC1Accessing Data through a Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 28.16 Thread-safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 28.17 More Multi-threading: Julia's multi-threading provides the ability to schedule Tasks simultaneously on more than one thread or CPU core, sharing memory. This is usually the easiest way to get parallelism on one's PC or on multiple threads By default, Julia starts up with 2 threads of execution; 1 worker thread and 1 interactive thread. This can be verified by using the command Threads.nthreads(): julia> Threads.nthreads(:default)0 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta4Accessing Data through a Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 28.16 Thread-safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 28.17 More Multi-threading: Julia's multi-threading provides the ability to schedule Tasks simultaneously on more than one thread or CPU core, sharing memory. This is usually the easiest way to get parallelism on one's PC or on multiple threads By default, Julia starts up with 2 threads of execution; 1 worker thread and 1 interactive thread. This can be verified by using the command Threads.nthreads(): julia> Threads.nthreads(:default)0 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta3Accessing Data through a Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 28.16 Thread-safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 28.17 More Multi-threading: Julia's multi-threading provides the ability to schedule Tasks simultaneously on more than one thread or CPU core, sharing memory. This is usually the easiest way to get parallelism on one's PC or on multiple threads By default, Julia starts up with 2 threads of execution; 1 worker thread and 1 interactive thread. This can be verified by using the command Threads.nthreads(): julia> Threads.nthreads(:default)0 码力 | 2057 页 | 7.44 MB | 3 月前3
julia 1.12.0 beta1Accessing Data through a Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 28.16 Thread-safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 28.17 More Multi-threading: Julia's multi-threading provides the ability to schedule Tasks simultaneously on more than one thread or CPU core, sharing memory. This is usually the easiest way to get parallelism on one's PC or on multiple threads By default, Julia starts up with 2 threads of execution; 1 worker thread and 1 interactive thread. This can be verified by using the command Threads.nthreads(): julia> Threads.nthreads(:default)0 码力 | 2047 页 | 7.41 MB | 3 月前3
julia 1.13.0 DEVAccessing Data through a Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 28.16 Thread-safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 28.17 More Multi-threading: Julia's multi-threading provides the ability to schedule Tasks simultaneously on more than one thread or CPU core, sharing memory. This is usually the easiest way to get parallelism on one's PC or on multiple threads By default, Julia starts up with 2 threads of execution; 1 worker thread and 1 interactive thread. This can be verified by using the command Threads.nthreads(): julia> Threads.nthreads(:default)0 码力 | 2058 页 | 7.45 MB | 3 月前3
Julia 1.11.6 Release NotesAccessing Data through a Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 28.16 Thread-safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 28.17 More Multi-threading: Julia's multi-threading provides the ability to schedule Tasks simultaneously on more than one thread or CPU core, sharing memory. This is usually the easiest way to get parallelism on one's PC or on multi-threading features. 25.1 Starting Julia with multiple threads By default, Julia starts up with a single thread of execution. This can be verified by using the command Threads.nthreads(): julia> Threads.nthreads()0 码力 | 2007 页 | 6.73 MB | 3 月前3
共 18 条
- 1
- 2













