windows下面可以主线程while loop接受input;但是觉得很丑。
linux没办法这样,可以用注册信号的办法。实现起来也不难:
#include "stdio.h"
#include "unistd.h"
#include "signal.h"
#include "error.h"
volatile bool isStop = false;
static void handl...
分类:
其他好文 时间:
2014-04-29 13:42:21
阅读次数:
418
Mrs Little likes digits most of all. Every year she tries to make the best number of the year. She tries to become more and more intelligent and every year studies a new digit. And the number she make...
分类:
其他好文 时间:
2014-04-29 13:13:21
阅读次数:
309
第三方组件是针对某种软件在应用功能上的不足或缺陷,而由软件编制方以外的其他组织或个人开发的相关组件。这种组件不是Java官方提供的,也不是由软件使用者编写的组件。使用成熟的第三方组件进行开发会提高开发的效率,减少出错的可能。
Apache公司(http://commons.apache.org)针对Java提供了很多的功能强大的组件,除了Apache公司以外,还会有很多的公司、组织和个人会提供一...
分类:
其他好文 时间:
2014-04-28 10:14:43
阅读次数:
338
出现“CHECK_NRPE: Error - Could not complete SSL handshake.”的错误。
问题解决的步骤:
1. 确保openssh , openssl, openssl-devel版本一致。
在centOS 上,可以运行:
yum install openssl openssl-devel
2. nagios监控端的允许地址和...
分类:
其他好文 时间:
2014-04-27 22:18:19
阅读次数:
988
When Vito Maretti writes an important letter he encrypts it. His method is not very reliable but it’s enough to make any detective understand nothing in that letter. Sheriff doesn’t like such state
...
分类:
其他好文 时间:
2014-04-27 21:45:00
阅读次数:
459
本文将基于hbase 0.98.1讲解其在linux集群上的安装方法,并对一些重要的设置项进行解释,本文原文链接:,转载请注明出处!1. 安装与配置1.1. 前置条件确保已经安装了hadoop并保证hadoop运行正常。关于hbase与hadoop的版本依赖关系,请参考: https://hbase.apache.org/book/configuration.html#hadoop 关于java...
分类:
其他好文 时间:
2014-04-27 21:33:59
阅读次数:
462
" checking for SSL headers... configure: error: Cannot find ssl headers"
原因是缺少openssl-devel,安装这个库就可以解决问题。
yum -y install openssl-devel...
分类:
其他好文 时间:
2014-04-27 21:32:05
阅读次数:
283
相信其它的地方大家都懂,这里重点说下面红色粗体部分 参数设置必须与系统的 ulimit -Sn 参数一致,并且 php-fpm.conf,nginx,conf中的设置要一致,否则会出现诸多历史遗留问题以及不和谐的ERROR WRING问题以下是nginx.conf里的一些 配置信息,重点说红色部分#user nobody;
user www www;
worker_processes auto...
分类:
Web程序 时间:
2014-04-27 21:21:06
阅读次数:
734
Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'!
解决方法:
setenforce 0...
分类:
移动开发 时间:
2014-04-27 21:18:05
阅读次数:
450
MyBatis 在编码中的最大的改变就是将一个最常用的 API 由 SqlMapClient 改为SqlSessionFactory。另外,类型处理器接口也由原来的 TypeHandlerCallback 改为了 TypeHandler。最后 DataSourceFactory 也进行了调整,移动到 org.apache.ibatis.datasource 包下,其中的方法也作了微调。总之,代码层面公开的部分改动较少,不会给开发者造成较大的移植成本。...
分类:
其他好文 时间:
2014-04-27 21:11:00
阅读次数:
477