三月 13th, 2010
不少开发人员的内存已经突破4G,不少都是6G内存啦,大家基本上会安装64位的操作系统,如64位的Windows 7。如果我们想让IDEA更快一点,通常给其分配更多的内存,但是32位的系统,你指定给其分配1.2G左右的内存。所以我们需要让IDEA运行在64位的JDK上,这样就可以使用更多的内存。首先我们要下载64位的JDK。接下来我们需要一个64位的idea.exe程序,这个在http://jetbrains.net/devnet/docs/DOC-1185有,下载idea.zip,解压后会有一个idea64.exe。接下来我们要设置一下环境变量,IDEA_JDK指向64位JDK安装目录,这样我们就可以让IDEA运行在64位的JDK上,速度会快不少,下面是个人的配置(我使用G1的垃圾收集器):
-Xms2G
-Xmx2G
-Xverify:none
-XX:MaxPermSize=200m
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:MaxGCPauseMillis=50
-XX:GCPauseIntervalMillis=200
-XX:SurvivorRatio=6
-Dsun.awt.keepWorkingSetOnMinimize=true
-Didea.is.internal=true
Posted in 技术 | No Comments »
三月 13th, 2010
不少开发人员的内存已经突破4G,不少都是6G内存啦,大家基本上会安装64位的操作系统,如64位的Windows 7。如果我们想让IDEA更快一点,通常给其分配更多的内存,但是32位的系统,你指定给其分配1.2G左右的内存。所以我们需要让IDEA运行在64位的JDK上,这样就可以使用更多的内存。首先我们要下载64位的JDK。接下来我们需要一个64位的idea.exe程序,这个在http://jetbrains.net/devnet/docs/DOC-1185有,下载idea.zip,解压后会有一个idea64.exe。接下来我们要设置一下环境变量,IDEA_JDK指向64位JDK安装目录,这样我们就可以让IDEA运行在64位的JDK上,速度会快不少,下面是个人的配置(我使用G1的垃圾收集器):
-Xms2G
-Xmx2G
-Xverify:none
-XX:MaxPermSize=200m
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:MaxGCPauseMillis=50
-XX:GCPauseIntervalMillis=200
-XX:SurvivorRatio=6
-Dsun.awt.keepWorkingSetOnMinimize=true
Posted in 技术 | No Comments »
三月 13th, 2010
IntelliJ IDEA会对项目下的所有JavaScript都进行索引,这个机制可以让我们实现些动态提示。论坛里面有一个哥们问题,如果在JS中实现对Opera特定属性和方法的提示,当然IDEA还没有考虑任何浏览器,这个功能是不会有的,但是我们可以创建一个meta js文件,让IDEA索引该文件,然后就可以实现代码提示啦。如新建一个opera_meta.js,然后输入以下代码:
window.opera = {
xxxx : function() {}
}
这样我们就可以实现Opera特定函数的提示啦。相关的讨论在: http://www.intellij.org.cn/bbs/viewtopic.php?t=1609&start=0
Posted in 技术 | No Comments »
三月 11th, 2010
我们知道Ruby是弱类型语言,所以要实现变量类型的精准判别方便代码提示,我们就需要使用特定的annotation。如果要实现block变量的类型感知,进行代码提示,那有点困难的。不过IDEA提供一个扩展机制,你可以通过一个简单的脚本来设定block变量类型,从而达到代码提示的目的,如下图:

你会发现,file变量能够感知到它的类型为’RIO::Rio’,从而给给出该类的变量和函数提示,相当强大,你的效率也会高很多。
RubyMine的Extension机制可以让我们写代码更高效,主要是代码提示和导航,对不存在的一些函数和变量能够提示给你,减少不必要的错误。
个人在GitHub上建立了一个RubyMine的Extension库,将常见的一些gem形成RubyMine的extension,这我们在使用这些gem时就非常便捷了,欢迎访问: http://github.com/linux-china/rubymine_extensions
Posted in 技术 | No Comments »
三月 10th, 2010
ExtJS 3.2 Beta发布,主要包括: MultiSort,Transitions和Composite Fields等,具体的信息请访问: http://www.extjs.com/blog/2010/03/09/announcing-ext-js-3-2-beta-multisort-transitions-and-composite-fields/。 之前以为3.2的版本会添加对Mobile等移动设备支持,好像没有看到。希望3.2发布的时候,能够看到Ext Designer。
Posted in 新闻 | No Comments »
三月 9th, 2010
Ehcache provides a simple caching API for building high-performance data caches, and serves as a plug-in cache for Hibernate, the object/relational persistence and query service. The Ehcache 2.0 enhancements will further entrench it as the de facto caching industry standard for maximizing application throughput and performance and eliminating database bottlenecks.
- Easier configuration -Ehcache now supports fully-coherent distributed caching as a Hibernate Second-Level Cache, as well as directly through the Ehcache API, using one common jar file that is JVM vendor-agnostic. Switching between local and distributed implementations is done with a simple configuration change, and without the need for Java agents or boot jars.
- Write-behind- A new Ehcache API supports write-behind caching with guaranteed asynchronous batching of updates to the database that reduces database load and improves application latency.
- JTA – New JTA support enables Ehcache to participate as a XA resource in transactions coordinated by a transaction manager alongside other XA resources like databases and message queues.
- Fast loading – Optimized bulk-loading enables fast cache warming and rapid application start-up.
- Management- A new management feature provides dynamic configuration for Ehcache, whereby cache parameters like TTI and TTL can be changed on the fly via the Terracotta management console or any JMX-compliant tool.
Ehcache目前有Terracotta负责开发,Terracotta是专业级的开源软件开发商,还包括Quartz,Terracotta for Spring等产品。
Posted in 新闻 | No Comments »
三月 8th, 2010
Zen Coding是解决HTML和CSS快速编写的问题,但是其缩写代号已经已经成为规范,如table+,link:css,img:src等,非常容易阅读和理解。虽然是HTML需要的,但是在Wiki中也需要,如在wiki中创建一个table,也是需要规范的,如果使用table+作为简写,代替wiki的table创建过程,那就简单多啦,而且也容易记住。个人就参考了Zen Coding,将Google Code中wiki形成和Zen Coding一样的规范,这样写Wiki也快速多啦。同样可以扩展一下,可以用到其他Wiki编写上,如Github上等,Zen Coding确实起了规范的作用。
Posted in 技术 | No Comments »
三月 5th, 2010
GAE/J SDK带的样例都是基于Ant的,但是就目前来说,大多数Java开发人员都在使用Maven,而且对比Ant,Maven的项目管理更加方便。gae-maven-plugin就是一个Maven的插件,来解决GAE/J的项目开发。GAE/J带的各种Ant Task,gae-maven-plugin都有实现,而且添加更多的功能。如果你在开发GAE/J应用,应该考虑使用Maven来管理。
Posted in 技术 | No Comments »