Tomcat里的cpappend.bat
摘要: 在Tomcat的發(fā)行包中有一個(gè)bat文件很有意思.
可以把指定的參數(shù)添加到classpath里面.
和bat腳本for一起配合,可以實(shí)現(xiàn)自動(dòng)的把某個(gè)目錄下的jar包都放到classpath里.
閱讀全文
[ZZ]Groovy Goodness: Using Lists and Maps As Constructors
摘要:
Constructors in Groovy can be invoked in a classic Java way, but we can also use lists or maps to create objects. Groovy supports an explicit coersion of a list to a constructor with the as keyword. Or we can rely on the implicit coersion when Groovy looks at the type of the variable to automatically convert the list to the right constructor call.
閱讀全文
[ZZ]Groovy Goodness: Using the Inject Method
摘要: Groovy has some features and methods we can categorize as functional programming. The inject() method is a so called higher-order function. Other languages call it a fold, reduce or accumulate. The inject() method processes a data structure with a closure and builds up a return value. The first parameter of the inject() method is the first value of the intermediary results of the second parameter: the closure. When we use the inject() we don't introduce any side effects, because we build up the
閱讀全文
下劃線分割字符串轉(zhuǎn)換成駝峰式字符串
摘要: 下劃線分割字符串轉(zhuǎn)換成駝峰式字符串的groovy腳本
閱讀全文
django useful tip
摘要: 最近在用django做一下項(xiàng)目, 我也是第一次使用django, 也是第一次比較正式的使用Python. 本文將記錄一下使用django過程中遇到的一下問題和解決辦法. 不斷更新!
閱讀全文
如何在window系統(tǒng)中讓py文件可以直接執(zhí)行
摘要: 正常情況下你如果是用安裝文件安裝的Python, 那么安裝時(shí)會(huì)給你設(shè)置好這樣的功能. 但是有時(shí)候你可能不小心改了配置, 或者不是用安裝包安裝的. 這是如果你在控制臺(tái)直接輸入:
xxx.py arg1 arg2 這樣的命令, 就不會(huì)顯示"xxx.py"不是內(nèi)部或外部命令,也不是可運(yùn)行的程序或批處理文件。
比如你要用 django-admin.py startproject mysite 來建立項(xiàng)目.
閱讀全文