DeDe

博客园 首页 联系 订阅 管理

2011年12月15日

摘要: 错误描述:ext/gd/libgd/gdkanji.o: In function `do_convert':/home/sh/php-5.2.17/ext/gd/libgd/gdkanji.c:350: undefined reference to `libiconv_open'/home/sh/php-5.2.17/ext/gd/libgd/gdkanji.c:365: undefined reference to `libiconv'/home/sh/php-5.2.17/ext/gd/libgd/gdkanji.c:381: undefined reference 阅读全文
posted @ 2011-12-15 15:28 DeDe 阅读(1189) 评论(0) 推荐(0) 编辑

2011年11月13日

摘要: 错误原因libevent冲突,解决办法,把lievent安装到单独的目录,重新安装。详细步骤参考: 分别把memcached和libevent下载回来,放到/tmp目录下: # cd /tmp # wget http://www.danga.com/memcached/dist/memcached-1.2.6.tar.gz # wget http://www.monkey.org/~provos/ libevent-1.4.8-stable.tar.gz先安装libevent: # tar zxvf libevent-1.4.8-stable.tar.gz # cd libevent-1.4. 阅读全文
posted @ 2011-11-13 13:19 DeDe 阅读(750) 评论(0) 推荐(0) 编辑

2011年11月11日

摘要: 安装memcache扩展在php.ini添加extension_dir = "/usr/local/php/lib/php/extensions/no-debug-zts-20060613/"extension=memcache.so重启nginx,没有生效。解决:nginx服务器修改php.ini后可以执行/usr/local/php/sbin/php-fpm restart让php.ini配置文件生效 阅读全文
posted @ 2011-11-11 19:05 DeDe 阅读(1669) 评论(0) 推荐(0) 编辑

2011年10月5日

摘要: 如果使用grep遇到了内存耗尽的问题,可尝试这个方法:awk 'NR==FNR{a[$1]}NR>FNR && ($1 in a){print $1}' a.txt b.txt > match.txt!!注意:如果a文件太大也可能存在内存耗尽的问题,这个时候尝试把文件a,b的位置互换。awk 'NR==FNR{a[$1]}NR>FNR && ($1 in a){print $1}' b.txt a.txt > match.txt 阅读全文
posted @ 2011-10-05 12:20 DeDe 阅读(1545) 评论(0) 推荐(0) 编辑

2011年9月24日

摘要: 使用反向应用时需要用两个斜杠比如re.search('(\d).*?\1','123123' )#错误re.search('(\d).*?\\1','123123' )#正确 阅读全文
posted @ 2011-09-24 20:01 DeDe 阅读(3285) 评论(0) 推荐(0) 编辑

2011年9月23日

摘要: 1,使用awk找到需要的字段awk -F ',' '{print $2}' input.txt > output.txt解释: 寻找以逗号为分割的第二个字段2,使用awk过滤掉不符合长度的行(包括过滤空行) awk ' length($1)>4' input.txt > output.txt解释:每行的第一个字段长度>4时打印结果3,使用sed去掉不需要的字符 sed 's/todelete//' input.txt> output.txt4,合并文件 cat input1.txt input2.tx 阅读全文
posted @ 2011-09-23 17:02 DeDe 阅读(224) 评论(0) 推荐(1) 编辑

摘要: 需求:从文件A中剔除已经存在于文件B的内容解决:grep -v -F -f B A说明:-v 打印不匹配-F 使用纯文本(非正则)-f 使用文件作为匹配字符(这里使用的B文件)结果:打印存在A且不存在于B的行 阅读全文
posted @ 2011-09-23 16:48 DeDe 阅读(687) 评论(0) 推荐(0) 编辑

2010年1月7日

摘要: var loader:Loader = new Loader();var loaderContext:LoaderContext = new LoaderContext();loaderContext.allowLoadBytesCodeExecution = true;loader.loadBytes(bytes, loaderContext); 阅读全文
posted @ 2010-01-07 10:01 DeDe 阅读(246) 评论(0) 推荐(0) 编辑