`
agile_boy
  • 浏览: 548317 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
  Yesterday,I upgraded my mac os port from 1.8 to 1.9,and the bash-completion upgraded also.   As the result is my grails bundle can not work again,especially execute the commands,and there is nothing to tip   From analysing the the grails bundle codes,I find out the reason: /opt/local/etc/bash_co ...
   如题,此文是Grails的作者的一篇文章,无奈被墙,同时也为自己做个备份。 原文URL:http://graemerocher.blogspot.com/2010/04/reading-i18n-messages-from-database.html In a recent consulting engagement, a client wanted to know how to go about reading i18n messages from the database rather than static properties files (the default in ...
   Osgi的美眼在此就不多罗嗦了,这里先把所用到的一些框架罗列一下: spring spring-dm equinox   其实在osgi中访问其他服务,本来应该跟其他java app差不多的,可是Osgi的ClassLoader机制,会经常导致ClassNotFound的异常。现在结合我在Osgi中访问Ejb的服务和Spring的集成,做一个简单小结:    在实现spring的bean的setter的时候,最好不要有异常,否则spring的提示只是bean初始化错误,根本看到真正的异常 Osgi的Import-Package很重要,比较头痛的还是第三方的osgi jar,比如sp ...
原文url:http://axixmiqui.wordpress.com/2008/03/11/adventures-in-grails-ws-security-part-2/     Integrating acegi It turned out that initial integration of acegi with xfire + WSS was even easier than hooking up WSS for xfire in Grails. Though I can’t claim much original work here. In his blog ...
转载是因为此文网站被墙了。   The next step in rewriting the application was to secure the web services with WS-Security. In this post I get a grails version of the xfire wss example of User Token Authentication up and running. To do this I use (of course) the grails xfire plugin. After creating a gr ...
  刚办了联通的iPhone的3G业务,目前看来还不错.在通过Mac的iTune同步Ringtones的时候,发现空空如也,因此就G啊,发现Window下有不少专门的制作软件,还发现iTune本身就支持AAC的转换,因为本人是Mac,因此就摸索了一下.   在iTune的音乐中选择你要转换的歌曲 右键选择"Get Info"->"Options" 设置"Start Time"和"Stop Time",前面的Checkbox也要勾上 在"Advanced"菜单中执行"Create ...
  5.1期间,受塔迦活佛师父的邀请,参加了其辩经,虽然对辩经知之甚少,但是这几天跟阿喀们和藏族同胞的相处,还是深有感触的,比如:坦诚相待,给我们最好的礼节,深受荣幸!   在此确实想说的另外一个主题:阿喀们的学习,关于对和错.   比如:'人为财死,鸟为食亡',在他们的理念中,这是错误的,因此他们就不去接受,不去学习.虽然在一点意义上没有真正的"对和错",因为对和错是相对的.但是他们的这样求学精神,确实让我很是有启发!   最后,藏民对待自然,对待身边事物的也让我感动,比如:农业区的藏民,对待牛羊,他们基本上是不杀的,而且就算是自然的死亡,也不会"物尽其用&quo ...
  IntelliJ的Git插件还是不错的,而且已经集成到了开源版本中,但是如果你的Git如果有一个Repository Center,那你是要经常执行Git的push/pull的。   在InetelliJ中,默认打开的Git工程,是不能够Commit And Push的,要解决需要手工设置一下Branch,右键你的module: Git => Current Branch,选择相应的Tracked Branch,就OK了。
  在Scala中,你如果使用了泛型的话,那你在Pattern Matching的时候要注意了,因为会有类型擦除的问题:non variable type-argument String in type pattern is unchecked since it is eliminated by erasure,这是由于JVM导致的。   不过Scala也提供了Manifest这样的类来处理这样问题,详细请参考:How do I get around type erasure on Scala? Or, why can’t I get the type parameter of my colle ...
IDEA的Inspector对serialVersionUID检测默认是关闭的,因此如果你的class是Serialization,那么需要重新设置一下(IDEA 9.0): Setting->Inspections->Serialization issues->Serializable class without ’serialVersionUID’ 选上以后,在你的class中:Alt+Enter就会提示自动创建serialVersionUID了。
Remark: For changes in the .emacs file to take effect, you need to restart emacs or type "M-x eval-buffer <ret>"   Q: What does fontlocking do ? A:  Font Lock mode is a minor mode, always local to a particular buffer, which highlights (or "fontifies") using va ...
  Scala2.8的Beta终于发布了,变化可是真大啊,除了官方提到的外,在一些Object的方法也有不少的小改动,在此将碰到的简单罗列一下: Source.getLines,增加了缺省换行的参数,因此调用需要加上括号,.getLines() Array更像Java的Array,比如subArray方法没有了,不过可以Array.tabulate来替代,比如Array.tabulate(len-3){splits(_)}
  做了一个Grails的小应用测试一下,发现相比1.1.1,确实有很多变化,比如内嵌了Tomcat等,详细可以参考Grails 1.2的发布说明。   这里说得是1.2的一个与IDE相关的变化,在1.2中,默认只是生成了eclipse的工程文件,而Netbean,IntelliJ,Textmate等默认是没有自动生成的,还好在1.2的发行版本中新增了一个相关的命令:integrate-with,用法如下: grails integrate-with --eclipse --intellij --textmate --ant 详细的更深入的用法参考官方的命令手册,比如自定义IDE模板等。
  Scala中,基本上不用java方式的XXX.class,取而代之的是classOf[XXX],都是为了强类型的需要,因此在Scala中对泛型等要求还是比较高的。   而Patter Matching是Scala不可缺少的一个特性,但是呢,没法直接match classOf[XXX]的形式(至少在2.7中,编译器是不允许的),如果非要用呢,间接方法如下: val IntCls = classOf[Int] .... xxx match { case IntCls => .... } 注:IntCls的I一定要大写,否则scala将认作变量。
Partial Function   说白了,就是不需要全部参数的函数,通常用来做变量或者别的函数的参数使用,比如: def concatUpper(s1: String, s2: String): String = (s1 + " " + s2).toUpperCase val c = concatUpper _ println(c("short", "pants")) val c2 = concatUpper("short", _: String) println(c2("pants ...
Global site tag (gtag.js) - Google Analytics