02 2017 档案

摘要:引出:写个类A,声明类A指针指向NULL,调用类A的方法会有什么后果,编译通过吗,运行会通过吗? 看到这个的时候,一定以为运行会报错吧。 但是奇迹般的,编译器输出了:base fun 在看这个代码,还以为会输出base fun么,又错了,运行报错! 为什么会是这个结果? 可以发现,一个是虚函数,一个 阅读全文
posted @ 2017-02-06 12:51 扫地猿 阅读(5948) 评论(0) 推荐(3)
摘要:Apache的主配置文件:/etc/httpd/conf/httpd.conf默认站点主目录:/var/www/html/Apache服务器的配置信息全部存储在主配置文件/etc/httpd/conf/httpd.conf中,这个文件中的内容非常多,用wc命令统计一共有1009行,其中大部分是以#开 阅读全文
posted @ 2017-02-06 09:11 扫地猿 阅读(2350) 评论(0) 推荐(0)
摘要:heap并不属于STL容器组件,它分为 max heap 和min heap,在缺省情况下,max-heap是优先队列(priority queue)的底层实现机制。 而这个实现机制中的max-heap实际上是以一个vector表现的完全二叉树(complete binary tree)。 二叉堆( 阅读全文
posted @ 2017-02-04 14:28 扫地猿 阅读(3354) 评论(0) 推荐(0)
摘要:功能描述:根据文件描述词来操作文件的特性。 文件控制函数 fcntl -- file control头文件: #include <unistd.h> #include <fcntl.h> 函数原型: int fcntl(int fd, int cmd); int fcntl(int fd, int 阅读全文
posted @ 2017-02-04 09:31 扫地猿 阅读(1723) 评论(0) 推荐(0)
摘要:1.closesocket(一般不会立即关闭而经历TIME_WAIT的过程)后想继续重用该socket:BOOL bReuseaddr=TRUE;setsockopt(s,SOL_SOCKET ,SO_REUSEADDR,(const char*)&bReuseaddr,sizeof(BOOL)); 阅读全文
posted @ 2017-02-04 09:14 扫地猿 阅读(3786) 评论(0) 推荐(0)
摘要:先查看MySQL是否安装:yum list installed mysql*(yum方式),rpm -qa | grep -i mysql(rpm方式) 卸载MySQL: yum方式下:yum yum remove mysql mysql-server mysql-libs compat-mysql 阅读全文
posted @ 2017-02-03 17:00 扫地猿 阅读(328) 评论(1) 推荐(0)
摘要:systemctl start firewalld.service#启动firewallsystemctl stop firewalld.service#停止firewallsystemctl disable firewalld.service#禁止firewall开机启动 systemctl st 阅读全文
posted @ 2017-02-03 16:33 扫地猿 阅读(3176) 评论(0) 推荐(0)