发布时间:2013-04-24 09:57:53
perl中想使用其它文件中的配置,可以使用require命令,egb.pl : 点击(此处)折叠或打开$abc = 5;a.pl: 点击(此处)折叠或打开require "b.pl";print "$abc\n";perl a.pl 的输出: 5.........【阅读全文】
发布时间:2013-04-17 15:42:16
在perl中进行编码的转换可以用如下方法:点击(此处)折叠或打开use Encode;use Encode::Guess;while (<>){ chomp; my $enc1 = guess_encoding($_, qw/gbk/);.........【阅读全文】
发布时间:2013-04-17 14:36:34
Encode:perl -p -e 's/([^\w\-\.\@])/$1 eq "\n" ? "\n":sprintf("%%%2.2x",ord($1))/eg' filenameDecode:perl -p -e 's/%(..)/pack("c", hex($1))/eg' filename必要时转一下码: perl -p -e 's/%(..)/pack("c", hex($1))/eg' filename | iconv -f utf-8 -t gb18030......【阅读全文】
发布时间:2013-01-21 14:16:16
#include "iostream"#include "unistd.h"#include "vector"using namespace std;string pathName = ""; string fileName = ""; string separator = ""; vector<int> field;int getOpt(int argc,char *argv[]){ int ch = 0; opterr = 0; while((ch = getopt(argc,argv,"p:f:s:k:h")) != -1) { .........【阅读全文】
发布时间:2013-01-15 16:26:11
1. 在~/目录下面配置 .screenrc文件,文件的内容:#se the startup messagestartup_message off term linux##use ` as the Global Key## escape ``##set a biger bufferdefscrollback 4096#设置状态栏hardstatus alwayslastline shelltitle "$|bash"caption always "%?%F%{-b 4w}%?.........【阅读全文】