上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 75 下一页
摘要: 1、反序列化Json对象示例示例代码View Code #include <iostream>#include <string>#include "json/json.h" int main(void){ std::string strValue = "{\"key1\":\"value1\",\"array\":[{\"key2\":\"value2\"},{\"key2\":\"value3\"}, 阅读全文
posted @ 2011-11-08 17:47 浪里飞 阅读(4564) 评论(0) 推荐(0) 编辑
摘要: 1、下载工具JsonCpphttp://sourceforge.net/projects/jsoncpp/files/sconshttp://sourceforge.net/projects/scons/files/scons/2.1.0/scons-2.1.0.tar.gz说明:① 安装JsonCpp需要下载JsonCpp和Scon还需要机器上有python② scons又是一个牛叉的工具,功能和GNU make一样,又比make简单多了。scons是python工具,需要先安装好python。2、先安装scons① 解压缩tar -zxvf scons-2.0.1.tar.gz② 设置环境 阅读全文
posted @ 2011-11-08 16:47 浪里飞 阅读(6845) 评论(0) 推荐(0) 编辑
摘要: 1、long long为64bit,unsigned long long,如果unsigned int 范围不够时,便会排上用场。printf("%ll",llpr);printf("%llu",ullpr)。 2、cgi输出网页时,有的地方要用"\r\n",而有的地方用"\r\n\r\n",要仔细辨认,加以区分。 3、把自己做的东西细节也要搞清楚。 4、每一步都进行打lo... 阅读全文
posted @ 2011-11-05 19:30 浪里飞 阅读(1935) 评论(0) 推荐(0) 编辑
摘要: 在尝试通过ajax获取别的网站的数据进行分析时,发现如果有中文,则会出问题。分析发现,AJAX在接收responseText或responseXML的值的时候是按照UTF-8的格式来解码的,如果服务器段发送的数据不是UTF-8的格式,那么接收responseText或responseXML的值有可能为乱码。 FireFox 的XMLHttpRequest对象支持override... 阅读全文
posted @ 2011-11-04 08:58 浪里飞 阅读(970) 评论(0) 推荐(0) 编辑
摘要: 1、表达式书写:[2] regex_ip="(2[0-4][0-9]|25[0-5]|1[0-9][0-9]|[1-9]?[0-9])(\.(2[0-4][0-9]|25[0-5]|1[0-9][0-9]|[1-9]?[0-9])){3}" 意思是 (0-255)(点号 0-255)3次 echo "123.1.1.1" |grep -E "$regex_ip" ... 阅读全文
posted @ 2011-11-01 15:05 浪里飞 阅读(7452) 评论(1) 推荐(0) 编辑
摘要: 1、在执行crontab命令时,与直接在shell中执行程序有点区别,要引起注意。如ps aux | grep file 直接在shell中执行,则搜索范围只在top中当前执行的进程,而写入crontab执行,则crontab中所有语句也成为了搜索范围。 count = `ps aux | grep file | wc -l` 2、写的脚本前面加/bin/sh 如果要... 阅读全文
posted @ 2011-10-31 08:48 浪里飞 阅读(2433) 评论(0) 推荐(0) 编辑
摘要: 1、head - output the first part of files head [OPTION]... [FILE]... 2、option ① -c, --bytes=[-]N:print the first N bytes of each file; ② -n, --lines=[-]N:print the first N lines instead of the fi... 阅读全文
posted @ 2011-10-31 08:32 浪里飞 阅读(921) 评论(0) 推荐(0) 编辑
摘要: 1、tail - output the last part of files tail [OPTION][+/-num]... [FILE]... 2、option ① -f,:output appended data as the file grows; ② -s, :with -f, sleep for S seconds (default 1.0) betwe... 阅读全文
posted @ 2011-10-31 08:23 浪里飞 阅读(3430) 评论(0) 推荐(0) 编辑
摘要: 1、本地可以运行system命令,可是通过cgi调用时却不执行,没有执行cgi中重定向命令。初始分析出是权限问题。 2、解决方法: 1)给cgi加权限 chmod +s my.cgi 2)配置apache以使其可执行cgi <IfModule !mpm_netware_module> <IfModule !mpm_winnt_module> # If... 阅读全文
posted @ 2011-10-27 08:37 浪里飞 阅读(2044) 评论(1) 推荐(0) 编辑
摘要: 1、secureCRT session中的设置 1)Session Option→选字体(新宋体,or others),字符集选Chinese_GB2312 2)vim /etc/sysconfig/i18n LANG="zh_CN.UTF-8" 3)vi ~/.bash_profile export LANG=zh_CN.UTF-8 2、vim中 在1设置的基础上: 1):s... 阅读全文
posted @ 2011-10-24 09:30 浪里飞 阅读(569) 评论(0) 推荐(0) 编辑
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 75 下一页