原创 關於jenkins更新後, job description只顯示html代碼的問題

相信很多人在jenkins 更新到1.553版本(及以上版本)後,發現自己之前在job description寫好的html代碼,都失效了,現在顯示的都是html源碼。 我看了1.553版本changelog,發現有以下改動(見標紅) W

原创 Remote Windows®-command executor for Linux

 Winexe                              Remote Windows®-command executor http://sourceforge.net/p/winexe/winexe-waf/ci

原创 抓取騰訊股票信息

根據http://blog.csdn.net/ustbhacker/article/details/8457341上的提示,我把他的程序改了一下,主要實現了顯示自定義我的股票,通過設置購買價格和持有量,來粗略計算自己的盈利。 use u

原创 python正則表達式的註釋方法

學過正則都知道,那簡直是天書,爲了提高正則的可讀性,正則表達式中提供了X(VERBOSE): 詳細模式。這個模式下正則表達式可以是多行,忽略空白字符,並可以加入註釋。 例如: import re str = 'python regex'

原创 perl獲取時間

sub getDate { my $DATE = "0"; # Get the date ($day, $month, $year, $hour, $min, $sec) = (localtim

原创 Oracle spool 用法小結

關於SPOOL(SPOOL是SQLPLUS的命令,不是SQL語法裏面的東西。) 對於SPOOL數據的SQL,最好要自己定義格式,以方便程序直接導入

原创 expect error invalid command name

問題: expect “xxxxx” send “awk 'BEGIN{FS=[ ,]} { print $2+$4 }' file\r ” 這時候send地方會報錯 invalid command name 但是手動複製send命令去真

原创 在python中怎麼生成html格式的郵件併發送

Requirement: python modules: html (生成html頁面) Envelopes (發郵件) email preview: (因爲email中的html格式比較特殊,經常需要預覽一下效果) http:

原创 使用clonedigger來檢查python中的重複代碼

安裝Clonedigger $ sudo pip install clonedigger $ clonedigger -help Usage: To run Clone Digger type: python clonedigger.py

原创 Tracing a Program As It Runs

 Tracing a Program As It Runs, 當一個python程序stuck住了,我們就可以用pdb-attach上該進程,並用該文章用的方法來進行debug。

原创 學習GIT

使用心得 階段性修改需要暫存,又不想commit,使用 git stage/add 查看文件改動 git diff                         顯示當前工作區的文件和stage區文件的差異git diff --stag

原创 如何自動化測試圖形化程序

在自動化測試中,經常會遇到一些程序需要運行在X windows環境下。 通常我會在shell腳本中用以下方法來運行腳本: setup_vnc() { # start vnc number from 10 to avoid c

原创 Python 中的排序

早在學習perl的時候就總結過排序問題 Schwartzian Transform(施瓦茨變換) 現在,我們來看看在python中如何實現: Schwartzian transform的中心思想就是Decorate-Sort-Undec

原创 Practice In Python UT & Coverage

The Benefits of Writing Unit Test Unit tests prove that your code actually works. You get a low-level regression-tes

原创 打印函數的入參

def fn(name,value): print "name : %(name)r, value: %(value)r" % locals()