- 博客(27)
- 收藏
- 关注
原创 Docker篇之一:概念,初始化
概念Image 镜像: 文件系统Container 容器:事例化的镜像Respository 仓库:部署在云端,支持多个服务器(docker)拉imagedocker安装以及使用//移除已经添加过的模块sudo apt-get remove docker docker-engine docker.io//更新源sudo apt-get update//允许apt通过Https更新sudo apt-get install apt-transport-https ca-c
2021-11-22 15:58:58
220
原创 C++特性之tuple/bitset
tuple是一个超级pair类型的模版,pair类型智能有两个成员,但是tuple能够有任意数量的成员例子:#include <iostream> #include <tuple>using namespace std;int main(void) { tuple<int ,int ,double> tp(1, 2, 1.2); cout << "the first data is " << get<
2021-11-09 21:48:45
592
原创 C++特性之智能指针(shared_ptr,auto_ptr)
这位仁兄写的挺好,附链接:1. shared_ptr是Boost库所提供的一个智能指针的实现,shared_ptr就是为了解决auto_ptr在对象所有权上的局限性(auto_ptr是独占的),在使用引用计数的机制上提供了可以共享所有权的智能指针.2. shared_ptr比auto_ptr更安全3. shared_ptr是可以拷贝和赋值的,拷贝行为也是等价的,并且可以被比较,这意味这它可被放入标准库的一般容器(vector,list)和关联容器中(map)。智能指针(auto_ptr
2021-11-02 16:26:29
232
原创 C++特性之强制类型转换
static_cast <类型说明符> (表达式) 用于一般表达式的类型转换 int a ; double d= 3.1415; a = static_cast<int> (d);reinterpret_cast <类型说明符> (表达式) 用于非标准的指针数据类型转换,例如将void*转换为char*const_cast <类型说明符> (表达式)将const表达式转换为非常量类型,常用于将cons...
2021-11-02 10:36:41
94
原创 C++特性之using
引用命名空间using namespace std;重载父类函数 引用基类成员名称class Base {public : u_int8 base_func{ return size; };protect: u_int8 size;}class Sub : private Base {public : using Base::base_func(); using Base::size;}int main() { ...
2021-11-02 09:22:14
245
原创 C++特性之std::thread
Example :auto function = [] { std::cout << " hello world " << std::endl;}std::thread thread1(function); if(thread1.joinable()) { thread1.join();}thread1.get_id();std::thread::hardware_concurrency() << std::endl; s...
2021-10-29 14:50:46
110
原创 C++特性之auto/decltype,返回类型后置
auto推导变量类型auto i= 10;decltype推导表达式类型int func() {return 0;}decltype(func()) c; //c为int返回类型后置传统定义方式 int ret(int a, int b);C++11之后 auto ret(int a, int b)->int;
2021-10-29 09:37:15
170
原创 CommonAPI
CommonAPI TutorialCommonAPI C++ Tutorial - CommonAPI C++ - ConfluencePlease follow the below link to the 10 minutes test.Home · GENIVI/capicxx-core-tools Wiki · GitHubCommonAPI C++ is strongly related to the interface description language ...
2021-10-20 13:40:07
288
原创 ubuntu16.04 env build
// must , otherwise the python install failedsudo apt-get install zlib1g-devubuntu16.04如何正确安装python3.6.5? - 知乎install cmakesudo apt install libssl-devVim安装YouCompleteMe汇总_jilong407的博客-优快云博客install gccVim安装YouCompleteMe汇总_jilong407的博客-C..
2021-10-19 14:00:47
132
原创 UDPNM 以太网网络管理
软件逻辑相对清晰,需要仔细阅读该图详解UDPNM测试 - 知乎硬件上需要满足可以通过以太网唤醒可以查阅相关供应商PHY data sheet :Low power signal detect(LPSD)我们通常在做以太网唤醒时,需要设计LPSD,软件上需要通过udp广播报文...
2021-10-19 09:17:03
2895
原创 linux进程启动耗时以及先后顺序
systemd-analyze blame // 列举出每个服务的启动耗时systemd-analyze plot > bootup.svg //图形化展示启动耗时
2021-10-13 14:31:31
209
原创 Could NOT find Boost (missing: Boost_INCLUDE_DIR log log_setup system thread)
CMake Error at /usr/local/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Boost (missing: Boost_INCLUDE_DIR log log_setup system thread)cmake .. -DBoost_DEBUG=ONif you using the cross compile evn, pl...
2021-10-12 15:10:34
5378
1
原创 Linux移动光标快捷键
看到相关童鞋复制了一长串命令之后,发现需要修改中间的几个单词,一直按着移动键等很久很久。。。直接上快捷键1. 跳到头 ctrl + a2. 跳到尾 ctrl + e3. 往前/后快速移动 option+左右光标(MAC下)Ctrl + 左右光标(Windows下)...
2021-10-09 17:18:19
196
原创 CMake深入理解find_package
官方文档:cmake-modules(7) — Ccmake-modules(7) — C1. 系统预定义模块可以查看上述链接,存在CURL,则find_package(CURL)2. 非系统预定义模块依赖于cmake编译的库find_package(YOUR_LIB)回顾find_package从上述两个例子有一个疑问,他是如何找到对应路径的?find_package — CMake 3.21.3 Documentation...
2021-10-09 17:12:53
104
原创 Git初始化以及相关命令使用
创建自己的ssh密钥ssh-keygen -t rsa -b 4096 -C "long.ji@nio.com"执行命令之后会生成密钥和公钥Your identification has been saved in /home/yourself/.ssh/id_rsa.Your public key has been saved in /home/yourself/.ssh/id_rsa.pub.复制公钥,并保存在github账号设置里面User Setting -&g...
2021-10-09 14:28:18
84
原创 Vim安装YouCompleteMe汇总
vim --verisonvim --version | grep pythondpkg -l | grep vimapt-get remove vim-common vim-runtime vim-tinyexport http_proxy=***export https_proxy=***git clone https://github.com/vim/vim.git./configure --with-features=huge \ ..
2021-10-03 18:52:14
231
原创 Vim无法粘贴到terminal之外
查看vim是否支持clipboardvim --version | grey clipboard如果+clipboard,则输入以下命令即可复制"+yy如果-clipboard,则需要安装vim-gtksudo apt install vim-gtk
2021-10-03 11:51:59
164
原创 YouCompleteMe unavailable: requires Vim compiled with Python (3.6.0+) support
root cause :the vim installed is not support python 3.6.0+solution :reinstall the vim with python31. git clone https://github.com/vim/vim.git2. /configure "add your configration" --with-python3-command=python3
2021-10-02 17:02:15
724
原创 Vim快捷键开启/关闭NERDTree
添加如下代码在 ~/.vimrcmap <F5> :NERDTree<cr>map <F5> :NERDTreeToggle<cr>
2021-10-02 15:47:55
992
原创 [syslog-ng] error: skipping "folder/syslog" because parent directory has insecure permissions
Logrotate 执行失败Log :error: skipping "/user/log/syslog" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config...
2019-09-12 16:14:29
1887
原创 [Beginning] 起点
知识就像是过往经历一样,隔得时间太久不去回忆,可能就淡忘了希望从这里开始,记录工作的经验...予人玫瑰,手留余香......---土豆,一个又土又逗的人类...
2017-11-01 10:24:45
120
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人