上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 23 下一页
摘要: 1:先安装一个 xinetd: yum install xinetd; 2:然后修改 /etc/xinetd.d/daytime-stream和 /etc/xinetd.d/ daytime-dgram 中的disable为no;(注意:修改之前必须将daytime-stream 和daytime- 阅读全文
posted @ 2020-08-29 14:17 He_LiangLiang 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 循环引用: 引用计数是一种便利的内存管理机制,但它有一个很大的缺点,那就是不能管理循环引用的对象。一个简单的例子如下: #include <string> #include <iostream> #include <boost/shared_ptr.hpp> #include <boost/weak 阅读全文
posted @ 2020-08-28 09:48 He_LiangLiang 阅读(175) 评论(0) 推荐(0) 编辑
摘要: boost::scoped_ptr虽然简单易用,但它不能共享所有权的特性却大大限制了其使用范围,而boost::shared_ptr可以解决这一局限。顾名思义,boost::shared_ptr是可以共享所有权的智能指针,首先让我们通过一个例子看看它的基本用法: #include <string> 阅读全文
posted @ 2020-08-28 09:33 He_LiangLiang 阅读(123) 评论(0) 推荐(0) 编辑
摘要: boost::scoped_ptr和std::auto_ptr非常类似,是一个简单的智能指针,它能够保证在离开作用域后对象被自动释放。下列代码演示了该指针的基本应用: #include <string> #include <iostream> #include <boost/scoped_ptr.h 阅读全文
posted @ 2020-08-28 09:13 He_LiangLiang 阅读(160) 评论(0) 推荐(0) 编辑
摘要: C++11使用emplace_back代替push_back 转载地址:https://blog.csdn.net/yockie/article/details/52674366 结论:在C++11情况下,果断用emplace_back代替push_back 阅读全文
posted @ 2020-07-21 19:30 He_LiangLiang 阅读(254) 评论(0) 推荐(0) 编辑
摘要: C++语言编程中,类的拷贝主要是通过拷贝构造函数和赋值函数来进行,再者就是为拷贝专门实现的成员方法。由于拷贝构造函数和赋值函数在用户为提供的情况下是由C++编译器自动生成的,而且是public成员,因此默认的C++类都有拷贝功能。 一个默认的C++类所拥有的成员函数: class Empty{}; 阅读全文
posted @ 2020-07-11 11:44 He_LiangLiang 阅读(585) 评论(0) 推荐(0) 编辑
摘要: 对于C++最新特性的for循环,需要掌握其使用方法。 不要抗拒新知识、新特性、新用法。积极去学习+掌握,会带来更高的开发效率。 for : 获取到的是map的迭代器。通过 first, second来获取key,val的值。 #include <iostream> #include <string> 阅读全文
posted @ 2020-07-08 14:40 He_LiangLiang 阅读(6210) 评论(0) 推荐(0) 编辑
摘要: 分配一个m*n的数组(m行,n列) vector<vector<int>> dp(m, vector<int>(n)); 阅读全文
posted @ 2020-07-07 19:23 He_LiangLiang 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 本地(win10)起了客户端,连到了远端服务器。需要知道本地客户端的端口号是多少,方便后面去抓包。 服务器端口是:9889 , ip: 10.88.0.191 在cmd输入如下命令: netstat -an | findstr 9889 就可以看到我们客户端的端口号了。 主要是配合 findstr 阅读全文
posted @ 2020-07-03 16:56 He_LiangLiang 阅读(640) 评论(0) 推荐(0) 编辑
摘要: hiredis 的应用程序出错。 ./example-libevent: error while loading shared libraries: libhiredis.so.0.14: cannot open shared object file: No such file or directo 阅读全文
posted @ 2020-07-01 11:44 He_LiangLiang 阅读(1115) 评论(0) 推荐(0) 编辑
摘要: 介绍了C++ for 循环的5种用法。通过这里的案例,也可以熟悉对string 容器的使用。可以通过[] 来访问string 对象。 for each std::for_each for in for : for #include <iostream> #include <map> #include 阅读全文
posted @ 2020-06-28 20:51 He_LiangLiang 阅读(11393) 评论(0) 推荐(3) 编辑
摘要: 问题描述: vs2017下无法使用 for each 1.严重性 代码 说明 项目 文件 行 禁止显示状态 错误 C4496 使用了非标准扩展“for each”: 替换为 ranged-for 语句 2.严重性 代码 说明 项目 文件 行 禁止显示状态 错误 C2760 语法错误: 意外的令牌“标 阅读全文
posted @ 2020-06-28 20:32 He_LiangLiang 阅读(1683) 评论(0) 推荐(0) 编辑
摘要: Iterators and Generators Iterables An object is deemed iterable if it has an implementation for the Symbol.iterator property. Some built-in types like 阅读全文
posted @ 2020-06-28 15:51 He_LiangLiang 阅读(451) 评论(0) 推荐(0) 编辑
摘要: toLocalString() 是我个人比较喜欢的 let time = new Date(); console.log("toDateString:", time.toDateString()); console.log("toString:", time.toString()); console 阅读全文
posted @ 2020-06-24 16:04 He_LiangLiang 阅读(3323) 评论(0) 推荐(0) 编辑
摘要: tar glibc-2.31.tar.gz cd glibc-2.31 mkdir build cd build ../configure --prefix=/usr/local/glibc-2.31 --with-headers=/usr/include make -j4 make install 阅读全文
posted @ 2020-06-22 14:10 He_LiangLiang 阅读(5719) 评论(1) 推荐(0) 编辑
摘要: wget https://ftp.gnu.org/gnu/make/make-4.2.tar.gz tar -zxf make-4.2.tar.gz cd make-4.2 ./configure --prefix=$HOME/local make make install 可以在 ~/.bash_ 阅读全文
posted @ 2020-06-22 14:07 He_LiangLiang 阅读(2443) 评论(0) 推荐(0) 编辑
摘要: 转载:https://www.tutorialspoint.com/c_standard_library/c_function_calloc.htm 描述 C库函数void * calloc(size_t nitems,size_t size)分配请求的内存并返回指向它的指针。malloc和call 阅读全文
posted @ 2020-06-19 16:24 He_LiangLiang 阅读(336) 评论(0) 推荐(0) 编辑
摘要: redis http://try.redis.io/ Please type HELP for one of these commands: DECR, DECRBY, DEL, EXISTS, EXPIRE, GET, GETSET, HDEL, HEXISTS, HGET, HGETALL, H 阅读全文
posted @ 2020-06-19 14:09 He_LiangLiang 阅读(237) 评论(0) 推荐(0) 编辑
摘要: centos7 安装xinetd,telnet 安装方式:yum [root@master ~]# yum list |grep telnettelnet-server.x86_64 1:0.17-59.el7 @base telnet.x86_64 1:0.17-59.el7 base [root 阅读全文
posted @ 2020-06-18 20:26 He_LiangLiang 阅读(722) 评论(0) 推荐(0) 编辑
摘要: 永久显示行号 在xshell终端,输入下面的 命令 echo "set number" >> ~/.vimrc 这将在 ~/.vimrc 文件末尾添加一行 set number。 阅读全文
posted @ 2020-06-18 19:28 He_LiangLiang 阅读(202) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 23 下一页