org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from ServletContext resource [/WEB-INF/modules/applicationContext-dao.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'. Caused b ...
2008-04-29

Groovy还是JRuby [zz]

关键字: groovy jruby
Groovy还是JRuby? 这也是我经常问自己的问题. 现在看看别人的讨论. [zz] http://blog.csdn.net/hivon/archive/2008/04/25/2328189.aspx
2008-04-28

奇异的ClassFormatError

关键字: classformaterror
java.lang.ClassFormatError: Invalid pc in LineNumberTable in class file .... 代码在开发的Eclipse上怎么都是正常的, 但一旦将其编译成jar文件后,进入改代码对应的功能页面后,就抛这个错误.[无论开发还是测试的电脑上都会有] 上网查了下,应该是源代码的行数过多造成的. 这个类的代码有6k多行,不停的重构,不停的测试,终于在3.5k的时候不抛异常了.[具体jdk可以支持多少行就不清楚了] 终于知道pc是什么意思了,在编译过后的.class文件中,可以看到类似下面的内容. 189 return ...
2008-04-25

project life cycle [只是一张图]

关键字: project life cycle image
偶翻出来,还是蛮有感触的. 见附件:
2008-04-25

GEF显示网格和吸附功能

关键字: gef grid snap
GraphicalEditor中,需要申明要开启网格和吸附功能. protected void configureGraphicalViewer() { ... viewer.setProperty(SnapToGrid.PROPERTY_GRID_ENABLED,Boolean.TRUE); // 网格功能可用 viewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE,Boolean.TRUE); // 网格可视 viewer.setProperty(SnapToGeometry.P ...
2008-04-22

GEF中的ROLE [zz]

关键字: gef role
[zz from http://wz.csdn.net/url/989477/] COMPONENT_ROLE 大多数EditPart应该有这个基本的Role,一个component在它的parent中,并且可以从它的parent中删除。更一般地,它可以是只涉及此EditPart的任何事物(不涉及view,因为它是non-graphical的)。在Logic例子中,LEDEditParts在Component Role中有一个知道怎样增加LED对象的值的专门EditPolicy。 CONNECTION_ROLE ConnectionEditPart应该具有的基本Role(而不是COMP ...
2008-04-12

得到特定URL网页的源代码

关键字: url source code
public class WebSpider { public static void main(String[] args) throws Exception { String urlString = "http://lggege.javaeye.com/blog/173840"; URL url = new URL(urlString); Object contentObj = url.getContent(); if (contentObj instanceof InputStream) { new InputStreamReader ...
2008-04-12

vi编辑器的web练习页面

关键字: vi
http://www.masswerk.at/jsuix/index.html 提供了虚拟的vi编辑器,可以在上面做练练手.
单例模式(Singleton) 鼎鼎大名的Singleton模式,就是为了在一个JVM内只有一个实例对象存在. public class SingletonClass { // 饿汉式单例模式 private static SingletonClass action = new SingletonClass (); private SingletonClass () { } public static SingletonClass getInstance() { return action; } } 上面就是Single ...
2008-04-10

我们需要assert吗[二]

关键字: assert
/** * Internal constructor for already-normalized pathname strings. * The parameter order is used to disambiguate this method from the * public(File, String) constructor. */ private File(String child, File parent) { assert parent.path != null; asser ...