上一页 1 ··· 168 169 170 171 172 173 174 175 176 ··· 307 下一页
摘要: 1.open 打开文件使用open打开文件后一定要记得调用文件对象的close()方法。比如可以用try/finally语句来确保最后能关闭文件。 file_object = open('D:\test.txt') try: all_the_text = file_object.read( ) fi 阅读全文
posted @ 2014-07-27 18:22 emanlee 阅读(464) 评论(0) 推荐(0) 编辑
摘要: #include #include char* asctime2(const struct tm *timeptr){ static const char wday_name[][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ... 阅读全文
posted @ 2014-07-25 11:39 emanlee 阅读(5808) 评论(0) 推荐(0) 编辑
摘要: PyDev for Eclipse, 经过测试,一般在线安装会失败(不能访问某些网站所致)以下为离线安装步骤1 下载 PyDev 2.8.2, 链接:http://sourceforge.net/projects/pydev/files/2 解压 PyDev 2.8.2 文件到 ...\MyEcli... 阅读全文
posted @ 2014-07-24 16:13 emanlee 阅读(2940) 评论(0) 推荐(0) 编辑
摘要: f <- function(start_time) { start_time <- as.POSIXct(start_time) dt <- difftime(Sys.time(), start_time, units="secs") # Since you only want the H:M... 阅读全文
posted @ 2014-07-22 18:13 emanlee 阅读(9210) 评论(0) 推荐(0) 编辑
摘要: cat > WHAT_EVER_YOU_WANT.sh#!/usr/bin/ksh#memory calculatorum=`svmon -G | head -2|tail -1| awk {'print $3'}`um=`expr $um / 256`tm=`lsattr -El sys0 -a 阅读全文
posted @ 2014-07-19 15:11 emanlee 阅读(846) 评论(0) 推荐(0) 编辑
摘要: INSERT INTO table (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1;INSERT 中 ON DUPLICATE KEY UPDATE的使用如果指定了ON DUPLICATE KEY UPDATE,并且插入行后会导致在一个UN... 阅读全文
posted @ 2014-07-19 12:48 emanlee 阅读(32946) 评论(0) 推荐(1) 编辑
摘要: string1.equals(string2) 比较字符串 substring()它有两种形式,第一种是:String substring(int startIndex)第二种是:String substring(int startIndex,int endIndex) 注意:从位置0开始,包含st 阅读全文
posted @ 2014-07-18 17:16 emanlee 阅读(419) 评论(0) 推荐(0) 编辑
摘要: int iValue = new Integer(strValue).intValue();String str = intObj.toString();int number = Integer.parseInt(str);public static Object read(String value... 阅读全文
posted @ 2014-07-18 14:39 emanlee 阅读(219) 评论(0) 推荐(0) 编辑
摘要: use Time::HiRes qw(time);use POSIX qw(strftime);my $t = time;my $date = strftime "%Y%m%d %H:%M:%S", localtime $t;$date .= sprintf ".%03d", ($t-int($t) 阅读全文
posted @ 2014-07-16 15:02 emanlee 阅读(2609) 评论(0) 推荐(0) 编辑
摘要: my $filename='/tmp/tmp.txt';open my $fh, '>', $filename;my $fd = fileno $fh;print readlink("/proc/$$/fd/$fd"); 阅读全文
posted @ 2014-07-15 13:46 emanlee 阅读(270) 评论(0) 推荐(0) 编辑
上一页 1 ··· 168 169 170 171 172 173 174 175 176 ··· 307 下一页