- 浏览: 725387 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (1044)
- 数据结构 (36)
- UML与设计模式 (42)
- c++ (87)
- rust (36)
- Qt (41)
- boost模板元编程 (43)
- Linux (77)
- 汇编 (4)
- 其它 (2)
- 烹饪 (3)
- unix c / socket (73)
- 软件工程 (4)
- shell (53)
- Python (37)
- c++ primer 5th(c++11) (22)
- 数据库/MySQL (27)
- 数据存储 (4)
- lisp (7)
- git (4)
- Utility (3)
- CDN与DNS (54)
- Http (53)
- php (7)
- nginx/lua/openresty (41)
- redis (11)
- TCP/IP (16)
- 互联网 (6)
- kernel (2)
- go (34)
- 区块链 (43)
- 比特股 (13)
- 以太坊 (23)
- 比特币 (23)
- 密码学 (10)
- EOS (53)
- DAG (1)
- docker (1)
- filecoin (7)
- solidity (64)
- ipfs (8)
- 零知识证明 (1)
- openzeppelin (3)
- java (1)
- defi (7)
最新评论
fn longest<'info>(x: &'info str, y: &'info str) -> &'info str { if x.len() > y.len() { x } else { y } } //传入的和返回的有相同的生命周期,不然调用在{}如果传入的没了,返回的跳出{}还存在就会有问题 // fn longest2<'a>(x: &str, y: &str) -> &'a str { // let result = String::from("really long string"); // result.as_str() // } use std::fmt::Display; fn longest_with_an_announcement<'a, T>( x: &'a str, y: &'a str, ann: T, ) -> &'a str where T: Display, { println!("Announcement! {}", ann); if x.len() > y.len() { x } else { y } } fn main() { let s = longest("aaa","bbbb"); println!("longest:{}",s); let string1 = String::from("long string is long"); let result; { let string2 = String::from("xyz"); result = longest(string1.as_str(), string2.as_str()); println!("The longest string is {}", result); longest_with_an_announcement(string1.as_str(), string2.as_str(),"aaa"); } } longest:bbbb The longest string is long string is long Announcement! aaa
发表评论
-
模式匹配
2022-03-27 17:35 141fn main() { //if let ... -
rust mutex
2022-03-27 12:14 190use std::sync::{Arc,Mutex}; ... -
rust channel
2022-03-27 11:58 205use std::sync::mpsc; use std ... -
rust智能指针
2022-03-26 12:31 190Box,Rc,RefCell都是不可变借用,只不过RefCel ... -
test框架
2022-03-25 10:18 189#[derive(Debug)] struct Rect ... -
hashmap
2022-03-24 11:11 150use std::collections::HashMap ... -
rust map
2020-08-18 16:02 465fn test_map(){ let a=[1, ... -
rust call
2020-08-13 10:27 311fn call<F>(clousure:F) ... -
rust闭包
2020-08-12 11:00 210返回闭包 fn returns_closure() -&g ... -
rust cell
2020-08-06 11:47 207fn test_cell(){ use std: ... -
rust引用记数
2020-08-06 11:10 277fn test_ref(){ use std:: ... -
rust内存泄漏
2020-08-03 10:20 427原因主要有三种: 1.线程崩溃,析构无法调用 2.使用引用记数 ... -
rust as类型转换
2020-07-24 10:34 539fn testAs(){ let a = 1u3 ... -
rust 线程 spawn
2020-07-24 10:03 263use std::thread; use std::ti ... -
rust println!
2020-07-20 11:09 300fn testPrintln(){ printl ... -
rust trait
2020-07-16 20:27 242使用trait可以让不用的类型实现同一个行为,定义函数的默认实 ... -
rust 范型
2020-07-15 20:00 242fn testOption(){ let i : ... -
rust 优先队列BinaryHeap
2020-07-15 09:22 789Rust提供的优先队列是基于二叉最大堆实现的 fn te ... -
rust set
2020-07-15 09:23 454HashSet<K>和BTreeSet<K& ... -
rust map
2020-07-15 09:23 292BTreeMap是有序的,HashMap是无序的 fn ...
相关推荐
Flutter的flutter_plugin_android_lifecycle插件是一个Flutter插件,用于访问Android Lifecycle objects。它可以帮助其他Flutter插件在Android上更好地集成。 要使用flutter_plugin_android_lifecycle插件,需要将...
androidx-lifecycle-common-2.1.0.jar
androidx-lifecycle-livedata-2.0.0.aar
androidx-lifecycle-livedata-core-2.0.0.aar
Dell Lifecycle Controller 是一种先进的嵌入式系统管理技术 , 借助这种技术 , 可以通过 integrated Dell Remote Access Controller (iDRAC) 来实现远程服务器管理。在使用 Lifecycle Controller 的情况下 ...
dell 14G 服务器通过 F10 Lifecycle 安装windows系统。最新2021-08-26更新
带Lifecycle的iDrac控制器固件v2.63.60.61,firmimg.d7用于iDrac网页控制台更新,exe用于windows
本框架使用Retrofit2+Rxjava2+Rxandroid+okhttp3+Lifecycle 的MVP网络框架,精简Google官方AAC(Android Architecture Components)框架,实现APP生命周期的管理
androidx-lifecycle-runtime-2.1.0.aar
In this report you’ll learn about the evolution of the Microsoft Security Development Lifecycle (SDL) and the progress Microsoft has made in using the SDL and security science to reduce ...
androidx lifecycle 2.3.0 资源包
Dell_Lifecycle_Controller_Integration_3.0.0 用于更新dell 11g 网络服务器的lifecycle controller integration
Agile Product Lifecycle Management AdministratGuide
viewModel,liveData,lifecycle的简单使用demo。 代码极其简洁易懂
PLM资料。英文的Product Lifecycle Management产品生命周期的教材
Professional Application Lifecycle Management with Visual Studio 2013 英文mobi 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
vRealize Suite Lifecycle Manager技术白皮书.pdf
Android官方activity-lifecycle生命周期例子,参考网页: http://developer.android.com/training/basics/activity-lifecycle/index.html 方便了解Activity生命周期,提供了非常形象的说明。生动讲解。可以结合官网...
delphi IOS lifecycle 生命周期 后台 http://blogs.embarcadero.com/pawelglowacki/2013/09/30/40067