上一页 1 ··· 202 203 204 205 206 207 208 209 210 ··· 337 下一页
摘要: if __name__ == '__main__':#第一种: 三个单引号 print ''' aaaaaaaaaaaaaaaa bbbbbbbbbbbbbb'''#第二种: 三个双引号 print """aaaaaaaaaaaaaaaa bbbbbbbbbbbbbb"""#第三种: \结尾 pr... 阅读全文
posted @ 2014-04-18 17:12 emanlee 阅读(5935) 评论(0) 推荐(0)
摘要: sort是在Linux里常用的一个命令,用来排序的 # man sort 1 sort的工作原理 sort将文件的每一行作为一个单位,相互比较,比较原则是从首字符向后,依次按ASCII码值进行比较,最后将他们按升序输出。 [rocrocket@rocrocket programming]$ cat 阅读全文
posted @ 2014-04-11 07:28 emanlee 阅读(2494) 评论(0) 推荐(0)
摘要: 1. 利用 to_number CREATE OR REPLACE FUNCTION isnumeric (str IN VARCHAR2) RETURN NUMBER IS v_str FLOAT; BEGIN IF str IS NULL THEN RETURN 0; ELSE ... 阅读全文
posted @ 2014-04-03 20:24 emanlee 阅读(2775) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2014-04-02 12:59 emanlee 阅读(595) 评论(0) 推荐(0)
摘要: echo "Cfoo'barxml" | sed "s/'/::/g" | sed 's/::/\\:/g' | sed "s/:/'/g" 替换单引号为 \'------------------------sed 替换单引号'echo "mmm'sss" > testcat test把test内容... 阅读全文
posted @ 2014-03-24 15:03 emanlee 阅读(28930) 评论(4) 推荐(0)
摘要: 双引号:awk '{print "\""}' #放大:awk '{print " \" "}'使用“”双引号把一个双引号括起来,然后用转义字符\对双引号进行转义,输出双引号。单引号:awk '{print "'\''"}' # 放大: awk '{print " ' \ ' ' " }'使用一个双引... 阅读全文
posted @ 2014-03-24 14:30 emanlee 阅读(49454) 评论(0) 推荐(1)
摘要: Sys.Date( ) returns today's date. 显示当前日期date() returns the current date and time. 显示当前日期和时间# print today's datetoday <-Sys.Date()format(today, format= 阅读全文
posted @ 2014-03-22 18:53 emanlee 阅读(23311) 评论(0) 推荐(0)
摘要: import os os.path.isfile('test.txt') # 如果不存在就返回False os.path.exists(directory) # 如果目录不存在就返回Falseos.makedirs(targetDir) os.path.join(targetDir, fi... 阅读全文
posted @ 2014-03-21 21:25 emanlee 阅读(838) 评论(0) 推荐(0)
摘要: 生成字符串变量str='python String function' 字符串长度获取:len(str)例:print '%s length=%d' % (str,len(str))连接字符串sStr1 = 'strcat'sStr2 = 'append'sStr1 += sStr2print sS 阅读全文
posted @ 2014-03-21 21:20 emanlee 阅读(40556) 评论(1) 推荐(4)
摘要: 1.格式化输出整数python print也支持参数格式化,与C言的printf似,strHello = "the length of (%s) is %d" %(Hello World,len(Hello World))print strHello#输出果:the length of (Hello... 阅读全文
posted @ 2014-03-21 18:57 emanlee 阅读(846) 评论(0) 推荐(0)
上一页 1 ··· 202 203 204 205 206 207 208 209 210 ··· 337 下一页