
dynamic language
iteye_4120
这个作者很懒,什么都没留下…
展开
-
metaprogramming
One of the most under-used programming techniques is writing programs that generate programs or program parts. Learn why metaprogramming is necessary and look at some of the components of metaprogramm...原创 2008-09-12 18:57:32 · 137 阅读 · 0 评论 -
groovy dynamic bean: Expando
groovy提供了一个动态bean:Expando,它可以简化我们对于bean的操作。 def fred=new Expando() fred.age=20 fred.birth = { fred.age++ } fred.birth() println fred.age2008-10-07 14:58:36 · 163 阅读 · 0 评论 -
grails environment
grails提供了3种运行的环境,分别是development, test, production。比如数据库等资源可以配置以后在不同的环境中有不同的数据源和配置。 运行某环境的方法为:grails prod run-app or: grails -Dgrails.env=prod run-app ...2008-10-09 17:22:17 · 174 阅读 · 0 评论 -
python获取执行路径的方法
def current_path(): path=os.path.realpath(sys.path[0]) if os.path.isfile(path): path=os.path.dirname(path) return os.path.abspath(path) else: call...原创 2012-11-19 16:47:25 · 152 阅读 · 0 评论