??xml version="1.0" encoding="utf-8" standalone="yes"?>国产人成在线视频,日本在线免费观看一区,一个人免费视频www在线观看http://www.aygfsteel.com/colorfire/category/47202.htmlzh-cnSat, 19 Mar 2011 09:39:35 GMTSat, 19 Mar 2011 09:39:35 GMT60py2exe使用说明http://www.aygfsteel.com/colorfire/archive/2011/03/04/345730.htmlcolorfirecolorfireFri, 04 Mar 2011 08:39:00 GMThttp://www.aygfsteel.com/colorfire/archive/2011/03/04/345730.htmlhttp://www.aygfsteel.com/colorfire/comments/345730.htmlhttp://www.aygfsteel.com/colorfire/archive/2011/03/04/345730.html#Feedback0http://www.aygfsteel.com/colorfire/comments/commentRss/345730.htmlhttp://www.aygfsteel.com/colorfire/services/trackbacks/345730.htmlpy2exe

colorfire 2011-03-04 16:39 发表评论
]]>
perld文ghttp://www.aygfsteel.com/colorfire/archive/2010/12/01/339530.htmlcolorfirecolorfireWed, 01 Dec 2010 09:37:00 GMThttp://www.aygfsteel.com/colorfire/archive/2010/12/01/339530.htmlhttp://www.aygfsteel.com/colorfire/comments/339530.htmlhttp://www.aygfsteel.com/colorfire/archive/2010/12/01/339530.html#Feedback0http://www.aygfsteel.com/colorfire/comments/commentRss/339530.htmlhttp://www.aygfsteel.com/colorfire/services/trackbacks/339530.html 1#!/usr/bin/perl
 2print "This is aaa file handler.\n";
 3if(open(MYFILE,"Radius20101101-001.txt")){
 4    while($line=<MYFILE>){
 5        @array=split("Identifier=",$line);
 6        @array=split("\t",$array[1]);
 7        print $array[0];
 8        print ("\n");
 9    }
10    close(FD);
11}

colorfire 2010-12-01 17:37 发表评论
]]>
perl中神奇的splithttp://www.aygfsteel.com/colorfire/archive/2010/12/01/339529.htmlcolorfirecolorfireWed, 01 Dec 2010 09:36:00 GMThttp://www.aygfsteel.com/colorfire/archive/2010/12/01/339529.htmlhttp://www.aygfsteel.com/colorfire/comments/339529.htmlhttp://www.aygfsteel.com/colorfire/archive/2010/12/01/339529.html#Feedback0http://www.aygfsteel.com/colorfire/comments/commentRss/339529.htmlhttp://www.aygfsteel.com/colorfire/services/trackbacks/339529.html Z么讲perl的第三个参数很神奇啦.主要在于split的第三个参数.
我们知道split是工作在列表的环?他会装输入的数据,多分割几?在徏立结果列?然后q回.接着,会返回第三个参数内的数据,其它的都扔弃.
W三个参C定要非常心,Z?如下的程?我们只需要前二个参数.我们注意W三个参?br />
#!/usr/bin/perl
while(<DATA>){
  
my ($aa, $dd= split(/\s+/, $_, 2);
    
print "$aa  || $dd ||\n";

}

__DATA__
1xxxxxxx  2xxxxxx 3xxxxxx 4xxxxx
1xxxxxxx  2xxxxxx 3xxxxxx 4xxxxx
1xxxxxxx  2xxxxxx 3xxxxxx 4xxxxx
1xxxxxxx  2xxxxxx 3xxxxxx 4xxxxx
1xxxxxxx  2xxxxxx 3xxxxxx 4xxxxx 

如果splitW三个参数是写的2的话,输出如下l果
11xxxxxxx  || 2xxxxxx 3xxxxxx 4xxxxx
2||
31xxxxxxx  || 2xxxxxx 3xxxxxx 4xxxxx
4|| 
5


如果split是写?的话,输出如下l果
11xxxxxxx  || 2xxxxxx ||
21xxxxxxx  || 2xxxxxx || 
3


q主要是因ؓ,如果惛_得前2个字D?字段记数?.因ؓ需要给文g切成3?拿出前二?不然都给最后面部分做一份了.
转自q望技术论坛?br />
W三个参数在大数据量情况下还是可以提高不速度?

colorfire 2010-12-01 17:36 发表评论
]]>
安装perl的crc32模块http://www.aygfsteel.com/colorfire/archive/2010/11/29/339333.htmlcolorfirecolorfireMon, 29 Nov 2010 08:41:00 GMThttp://www.aygfsteel.com/colorfire/archive/2010/11/29/339333.htmlhttp://www.aygfsteel.com/colorfire/comments/339333.htmlhttp://www.aygfsteel.com/colorfire/archive/2010/11/29/339333.html#Feedback0http://www.aygfsteel.com/colorfire/comments/commentRss/339333.htmlhttp://www.aygfsteel.com/colorfire/services/trackbacks/339333.html因ؓ要写一个相关的perl脚本Q需要crc32函数Q默认的perl又不带,没办法只好安装一个:

  1. 下蝲Q?br /> wget -c http://search.cpan.org/CPAN/authors/id/S/SO/SOENKE/String-CRC32-1.4.tar.gz
  2. 安装Q?br /> tar zxvfp String-CRC32-1.4.tar.gz
    cd String-CRC32-1.4
    perl Makefile.PL
    make
    make test #q里没什么提C错误就恭喜?)
    make install
  3. 使用(来自官方)Q?

      use String::CRC32;

      
$crc = crc32(“some string”);
      
$crc = crc32(“some string”, initvalue);

      
$somestring = “some string”;
      
$crc = crc32($somestring);
      
print $crc.\n”;

      
#open(SOMEFILE, “location/of/some.file”);
      #$crc = crc32(*SOMEFILE);
      #close(SOMEFILE);

  1. q行Q?br /> perl t.pl
    4182587481

pȝ要部|到AIXq_

问题Q?br /> make~译报错Q提C:cc_r not foundQ编译器找不刎ͼ那就手动指定一下,cc_r应该是在/usr/vac/bin目录下?br /> #vi MakeFile 扑ֈCC = cc_r Ҏ(gu) /usr/vac/bin/cc_rQ然后执行make
提示Q?nbsp;The license for the Evaluation version of IBM XL C/C++ for AIX, V10.1 compiler product has expired. 我去Q过期了。。。这家伙q没免费的。?br />
另找办法Qcc_r不让用就用gcc吧?br />
AIX Toolbox downloadQ?/span>http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html 中免费下载?br /> ?c)式安?#rpm –ivh gcc-4.2.0-3.aix5.3.ppc.rpm 
把cc_r替换为gccQ执行make~译。报错一大堆Q各U的~译选项cd不符?br />

解决Ҏ(gu)
|上搜的Q?br />

现在AIX自带的perl实例因ؓ不是用gcc~译的,所以不可以在其基础上用gcc~译安装相关模块Q?br />

需要从|上下蝲perl的源代码Q用gcc~译安装一份新的perl实例Q?br />

现在AIX自带的perl实例因ؓ不是用gcc~译的,所以不可以在其基础上用gcc~译安装相关模块Q?br />

需要从|上下蝲perl的源代码Q用gcc~译安装一份新的perl实例Q?/span>


那就去perl下最新的源码包吧Q?/span>http://www.perl.com/
指定~译器和目录 #sh Configure -de -Dcc=gcc –Dprefix=/opt/perl-5.10
#make
#make install

讄PATH环境变量Qexport PATH=/opt/perl-5.10/bin:$PATH (注意把新的perl实例的bin路径讄在前面,是因为系l中原有的perl实例q存在,可以做到优先使用新的perl实例)
#perl -version 认一下最新的版本

然后再去~译String-CRC32?br /> #perl MakeFile.pl
#make
#make install

安装完成Q测试成功。这一大圈l的?br />



colorfire 2010-11-29 16:41 发表评论
]]>
Python扚w更新文g修改旉http://www.aygfsteel.com/colorfire/archive/2010/08/24/329828.htmlcolorfirecolorfireTue, 24 Aug 2010 11:09:00 GMThttp://www.aygfsteel.com/colorfire/archive/2010/08/24/329828.htmlhttp://www.aygfsteel.com/colorfire/comments/329828.htmlhttp://www.aygfsteel.com/colorfire/archive/2010/08/24/329828.html#Feedback0http://www.aygfsteel.com/colorfire/comments/commentRss/329828.htmlhttp://www.aygfsteel.com/colorfire/services/trackbacks/329828.html 本地模拟试准备脚本

import os,sys,time,re
##########################################################
#
#Reset The ModifyDate of AAA File With FileName.                ##
#
#For Example: filename is AAA_01_20100703_2130_0683.TXT##
#
#Auther:qiuwg Date:2010-08-24                                                    ##
#
#########################################################
def list_file_dir(level,rootpath):
    
for path in os.listdir(rootpath):
        absolutely_path 
= os.path.join(rootpath,path)
        
if os.path.isdir(absolutely_path):
            list_file_dir(level
+1, absolutely_path) 
        
else:
            modify_file_date(absolutely_path)

def modify_file_date(file):
    idx
=file.rfind("/")
    path
="./"
    filename
=file
    
if idx > -1:
        path
=file[:idx+1]
        filename
=file[idx+1:]
    
#mt=os.path.getmtime(filename)
    expression=r"^AAA_\d{2}_\d{8}_\d{4}_\d{4}.TXT$"
    
if re.match(expression,filename):
        temp
=filename.split("_");
        
print path+filename+" modifydate >> "+temp[2]+temp[3]
        temptime
=time.strptime(temp[2]+temp[3],'%Y%m%d%H%M')
        mtime
=time.mktime(temptime)
        os.utime(path
+filename,(mtime,mtime))

if __name__ == "__main__":
    list_file_dir(
1,"/ldata/fuse-udr-split/")
    
print "Handed Over"

增加了文件名正则匚wQ和递归目录查找?

colorfire 2010-08-24 19:09 发表评论
]]>
վ֩ģ壺 Ѯ| | | ɽ| | ʼ| ղ| ɽ| | ʡ| ͷ| | | | ˫Ѽɽ| | ʷ| | | | ˮ| ˮ| | | տ| ɽ| | ֶ| ̨| ɽ| ϲ| ϳ| | ¡| | ϳ| ־| | | ʯ| |