個人經驗嗬,與大家分享:-)
如果要選中一個單詞、段落或者任意篇幅的文字,傳統的方法是,從開始處按住鼠標左鍵,拖動鼠標一直到結束的地方再抬起。如果篇幅太長,手很累有木有?下麵說說我的辦法:【選中單詞】鼠標雙擊英文單詞,單詞選中了有木有?如果是中文的話,該辦法隻能選中一個字。【選中任意篇幅】從開始處單擊一下鼠標左鍵,按下SHIFT鍵,再到結束[
閱讀全文]
一直在找這類工具,今天終於找到了MPRESS:
http://www.matcode.com/mpress.htm
試了試,感覺很好用!
2015.06.25[
閱讀全文]
比如,想刪除文件sample.txt的4和6行之間的內容,保存為newtxt.txt,可以這樣:
解法1)sed'4,6d'sample.txt>newtxt.txt
[注:如果是windows環境,請安裝GitBashforwindows]
解法2)用UltraEdit打開文件sample.txt,創建並運行宏:
ColumnModeOff
HexOff
GotoLine41
Loop3
SelectLine
DeleteLine
EndLoop
最後保存為newtxt.txt。
解法3)用python:
withopen("n:\\deskt...[
閱讀全文]
說到Office自動化,就避免不了與組件Microsoft.Office.Interop打交道。
這個鏈接總結得很全:
http://www.bettersolutions.com/csharp/CVN390/QR544112423.htm
2015.02.05[
閱讀全文]
具體步驟就是:
首先,添加一個manifest文件到.NET項目。添加新項目>選“ApplicationManifestFile”。
或者,直接創建一個空白的文件“app.manifest”。
其次,按如下修改它:
===============================================
requestedExecutionLevellevel="requireAdministrator"uiAccess="false"
===============================================
詳見鏈接...[
閱讀全文]
MultiplekeyeventcombinationSolution[
閱讀全文]
Thebuilt-inversionwithRedHat6.2ispython2.6.6.OntopoftheOS,Iinstalledpython2.7.3.However,thenewlyinstalledversionhasanissue:Thepythoninterpretershelldoesnotsupportrecallofthelastcommand.Thefollowingarethestepstofixit:
1)Inyour~/.bashrc,addvariable"PYTHONSTARTUP":
exportPYTHONSTARTUP=$HOME/.pythonstartup
2)Putyourpythoncodein$HOME/.pythonstartup,like:
importrlcompleter
...[
閱讀全文]
默認情況下,按Tab或者Shift+Tab鍵時會自動Focus到該滑動條上。如何才能禁止它呢?
下麵的方法值得一試:
1)首先初始化UI時:
self.m_slider.Bind(wx.EVT_SET_FOCUS,self.onFocus)
2)在處理該事件時:
defonFocus(self,event):
#print"slideronfocus"
self.m_nextButton.SetFocus()
event.Skip()
那個m_nextButton是希望Focus的下一個control。
【結語】還是希望能有一個...[
閱讀全文]
~~~~~~~~~~~Step1:wxWidgets~~~~~~~~~~~~~~~~
1)DownloadsourcearchiveofwxWidget3.0.1(wxWidgets-3.0.1.tar.bz2,size19.1MB)fromsourceforge.net
https://sourceforge.net/projects/wxwindows/files/3.0.1/wxWidgets-3.0.1.tar.bz2
orfromhttp://www.wxwidgets.org/downloads/
Toexpandtarball,use"tar-xvf"
2)Followtheguidetocompileandinstall:
http://wiki.wxwidgets.org/Compiling_and_ge...[
閱讀全文]
##########Myexamplepythonscript################################
##Purpose:ToshowhowtowriteStringIOobjecttoanimagefile
##Date:2014-06-22
###############################################################
fromPILimportImage
fromStringIOimportStringIO
#Readsourceimage
im=Image.open("n:\\desktop\\s.png")
#Initiateabufferobject(empty)
fil=StringIO()
#Savet...[
閱讀全文]