摘要: 1.括号字符串 https://www.cnblogs.com/BlueBlueSea/p/14030412.html 2.二分应用题 https://www.cnblogs.com/BlueBlueSea/p/14030538.html 3.DFS+BFS共同可解 https://www.cnbl 阅读全文
posted @ 2020-11-24 15:14 lypbendlf 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 转自:https://blog.csdn.net/zxpoiu/article/details/117258047 1.介绍 使用c++ string类不可避免会带来很多不必要的拷贝,拷贝多了必然影响性能。因此在很多高性能C++框架的实现中,都会使用StringPiece类作为string类的wra 阅读全文
posted @ 2024-04-28 23:50 lypbendlf 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 转自:chatgpt 1.介绍 find_package(Protobuf) 是 CMake 中用于查找和加载 Protocol Buffers 的模块。它的作用是在 CMake 配置过程中查找安装在系统中的 Protocol Buffers 库,并将相关信息存储在 CMake 变量中,以供后续的构 阅读全文
posted @ 2024-04-27 21:29 lypbendlf 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 1.例子 message ProtoSrc { message Feature { repeated float data = 1; } Feature feature = 1; } int main(int argc, char const *argv[]) { auto src = ProtoS 阅读全文
posted @ 2024-04-27 20:39 lypbendlf 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 转自:https://zhuanlan.zhihu.com/p/76578547 1.插入元素 > rpush mylist A # 从右侧插入 (integer) 1 > rpush mylist B (integer) 2 > lpush mylist first (integer) 3 > l 阅读全文
posted @ 2024-04-22 10:22 lypbendlf 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 转自:https://blog.csdn.net/sevenjoin/article/details/88314531,讲的很好。 1.介绍 若针对一个类没有显式地定义构造函数,那么编译器会隐式的为这个类生成一个默认构造成员函数。 默认构造函数就是在调用时不需要显示地传入实参的构造函数。 假如用户定 阅读全文
posted @ 2024-04-21 22:18 lypbendlf 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 1.介绍 #命令行指定c++11 g++ --std=c++11 ./seqid.cpp -o seqid #cmake中指定c++编译 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11") 阅读全文
posted @ 2024-04-14 21:15 lypbendlf 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 1.C++ to pb 1.1 map嵌套对象结构 //pb数据结构 message Inner { repeated string codes = 1; map<string, string> ext = 2; }; message Outer { map<int32, Inner> uint2I 阅读全文
posted @ 2024-04-14 20:29 lypbendlf 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 转自:https://juejin.cn/post/6933180767656738824 1.介绍 代码 -> 词法语法分析 -> 语义分析 -> 中间代码生成 -> 目标代码生成 编译器:中间代码生成。编译器会尝试对中间代码进行优化,通过减少无效或冗余的代码、计算强度优化等手段,以助于减少最终生 阅读全文
posted @ 2024-04-14 19:57 lypbendlf 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 1.介绍 # 查看安装的所有软件【带简介】 # dpkg -l|grep ifupdown iH ifupdown 0.8.10ubuntu1.2 amd64 high level tools to configure network interfaces #使用apt查看已安装版本 # apt l 阅读全文
posted @ 2024-04-14 19:32 lypbendlf 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 转自:https://www.codedump.info/post/20200605-how-to-read-code-v2020/ https://www.zhihu.com/question/21186887,https://boholder.github.io/blogs/learn-from 阅读全文
posted @ 2024-04-14 14:19 lypbendlf 阅读(2) 评论(0) 推荐(0) 编辑