上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 499 下一页
摘要: A baisc iter: #[test] fn main() { let my_fav_fruits = vec!["banana", "custard apple", "avocado", "peach", "raspberry"]; let mut my_iterable_fav_fruits 阅读全文
posted @ 2024-03-22 16:10 Zhentiw 阅读(55) 评论(0) 推荐(0)
摘要: function thankYouTag(arrayOfStrings,firstExpression, secondExpression, ...) { console.log( arrayOfStrings, // ["This is the first one ", " This is ano 阅读全文
posted @ 2024-03-22 02:50 Zhentiw 阅读(23) 评论(0) 推荐(0)
摘要: Symbol.for("key") Checks if a symbol with the key "key" already exists in the globals symbol registry. If yes, it returns the existing symbol, otherwi 阅读全文
posted @ 2024-03-22 02:39 Zhentiw 阅读(23) 评论(0) 推荐(0)
摘要: Difference betwen require and import require can be called conditionally, while the import statement cannot import statements are hoisted, but require 阅读全文
posted @ 2024-03-19 15:45 Zhentiw 阅读(23) 评论(0) 推荐(0)
摘要: Generator can run with for .. of and ..., which will only emit yield values For example: function* count() { yield 1; yield 2; return 3; } for (const 阅读全文
posted @ 2024-03-13 19:42 Zhentiw 阅读(29) 评论(0) 推荐(0)
摘要: Create a new User instance would create a new login function in memory each time? class User { constructor(username) { this.username = username; } log 阅读全文
posted @ 2024-03-13 19:09 Zhentiw 阅读(39) 评论(0) 推荐(0)
摘要: use std::sync::mpsc; use std::thread; use std::time::Duration; fn main() { let (tx, rx) = mpsc::channel(); thread::spawn(move || { let vals = vec![ St 阅读全文
posted @ 2024-03-12 22:16 Zhentiw 阅读(30) 评论(0) 推荐(0)
摘要: A channel has two halves: a transmitter and a receiver. The transmitter half is the upstream location where you put rubber ducks into the river, and t 阅读全文
posted @ 2024-03-12 22:12 Zhentiw 阅读(31) 评论(0) 推荐(0)
摘要: Arc<T> is a type like Rc<T> that is safe to use in concurrent situations. The a stands for atomic, meaning it’s an atomically reference counted type. 阅读全文
posted @ 2024-03-12 16:05 Zhentiw 阅读(25) 评论(0) 推荐(0)
摘要: We ofter use movewith closures passed to thread::spawnbecase the closure will then take ownership of the values it uses from the environment, thus tra 阅读全文
posted @ 2024-03-12 15:34 Zhentiw 阅读(31) 评论(0) 推荐(0)
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 499 下一页