岚天逸见

上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 79 下一页

2016年5月12日 #

测试setsockopt设置超时是否生效代码

摘要: // 测试setsockopt设置超时是否生效代码#include #include #include #include #include #include #include #include // 编译:// g++ -g -o x x.cppint main(){... 阅读全文

posted @ 2016-05-12 14:55 岚天逸见 阅读(1202) 评论(0) 推荐(0)

2016年5月1日 #

mac windows蓝牙问题

摘要: 如果是win7、win8或win10三者的64位版本,可以下载驱动解决:http://file2.mydrivers.com/2014/notebook/apple_broadcom_bluetooth_5040_win64.zip或:http://drivers.m... 阅读全文

posted @ 2016-05-01 21:37 岚天逸见 阅读(342) 评论(0) 推荐(0)

2016年4月15日 #

java thrift返回List异常

摘要: 对于下段代码:public List hmget(String key, List fields) throws org.apache.thrift.TException{ JedisCluster jedis_cluster = RedisClusterPro... 阅读全文

posted @ 2016-04-15 15:28 岚天逸见 阅读(820) 评论(0) 推荐(0)

2016年4月14日 #

log4j日志文件路径设置

摘要: 假设有如下标准化的目录结构:$HOME|-- log|-- conf|-- bin|-- lib|-- datajar包放在lib目录,启动脚本放在bin目录,日志文件放在log目录,配置文件放在conf目录(包括log4j的配置文件log4j.properties)... 阅读全文

posted @ 2016-04-14 10:08 岚天逸见 阅读(1595) 评论(0) 推荐(0)

2016年4月6日 #

passwd: Have exhausted maximum number of retries for service

摘要: 使用命令passwd修改密码时,遇到如下问题:# echo 'utf8'|passwd zhangsan --stdinChanging password for user zhangsan.passwd: Have exhausted maximum number ... 阅读全文

posted @ 2016-04-06 16:06 岚天逸见 阅读(3732) 评论(0) 推荐(0)

2016年4月5日 #

将单个文件上传到多机器工具

摘要: // 使用示例:// ./mooon_upload -h=192.168.10.11,192.168.10.12 -p=6000 -u=root -P='root123' -s=./abc -d=/tmp/// 表示将本地的文件./abc上传到两台机器192.168.... 阅读全文

posted @ 2016-04-05 17:02 岚天逸见 阅读(108) 评论(0) 推荐(0)

2016年4月1日 #

批量远程执行shell命令工具

摘要: 使用示例(使用了默认用户root,和默认端口号22):./mooon_ssh --h=192.168.4.1,192.168.4.2 -P=password -c='cat /etc/hosts'#include "mooon/net/libssh2.h" // 提供... 阅读全文

posted @ 2016-04-01 09:50 岚天逸见 阅读(272) 评论(0) 推荐(0)

2016年3月30日 #

基于zookeeper的主备切换方法

摘要: 继承CZookeeperHelper即可快速实现主备切换: https://github.com/eyjian/libmooon/blob/master/include/mooon/net/zookeeper_helper.h zookeeper的ZOO_EPHEMERAL节点(如果ZOO_EPHE 阅读全文

posted @ 2016-03-30 10:26 岚天逸见 阅读(1922) 评论(0) 推荐(0)

2016年3月28日 #

代码的演变随记

摘要: 1) 使用sizeof操作符替代魔鬼数字if (s1.substr(0, 10) == s2)改成:if (s1.substr(0, sizeof("YYYY-MM-DD")-1) == s2)2) 长的放后头if (s2 == s1.substr(0, sizeof... 阅读全文

posted @ 2016-03-28 14:19 岚天逸见 阅读(172) 评论(0) 推荐(0)

2016年3月23日 #

svn错误:Can't convert string from 'UTF-8' to native encoding

摘要: 如果文件名包含了中文,当执行“svn up .”遇到如下错误时:svn: Can't convert string from 'UTF-8' to native encoding:svn: docs/?\228?\188?\129?\228?\184?\154?\23... 阅读全文

posted @ 2016-03-23 10:36 岚天逸见 阅读(326) 评论(0) 推荐(0)

上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 79 下一页

导航