lost_alien的博客
lost_alien · 共 36 篇文章
【翻译】10 Interview questions on Singleton Pattern in Java
原文地址: http://www.dzone.com/links/r/top_10_interview_questions_on_singleton_pattern_i.html Singleton pattern is one of the most common patterns available and it’s also used heavily in Java. This is also one of my favorite interview question and has lots of interesting follow-up to digg into details …
2011-03-14 10:49 · java/corejava · 评论(0)
【翻译】Exercise for Object-Oriented Programming Concepts
原文地址: http://extreme-java.blogspot.com/2011/02/exercise-for-object-oriented.html For all those programmers who are new to Java and have read some book but need some Java exercise or Java Tutorial can use this first write up to begin writing Java programs. You can read the steps and accordingly writ…
2011-03-03 14:31 · OOAD · 评论(0)
【翻译】Hello World with Apache Commons Digester
原文地址: http://kushanxp.blogspot.com/2011/02/hello-world-with-apache-commons.html This example will shows how to get started with Apache Commons Digester. What is Apache Commons Digester? Simply, you can use this to read a XML file against a particular pattern (say, particular tag in XML file) and if…
2011-03-03 13:46 · java/corejava · 评论(0)
【翻译】Hello World with Java Architecture for XML Binding - JAXB
原文地址: http://kushanxp.blogspot.com/2011/03/hello-world-with-java-architecture-for.html What is JAXB? JAXB (Java Architecture for XML Binding) facilitates you to read or write to a XML file. since XML involves with Java everywhere, It will be very useful when working with Java. Here I'm assuming you…
2011-03-03 13:24 · java/corejava · 评论(0)
【翻译】Abstract Classes Have Constructors
In Java , we have default constructors provided for classes by the compiler (in case one is not declared). The abstract classes can't be instantiated by using the new operator because they don't provide full implementation of all the methods. Then does it make sense to have constructors inside abst…
2011-02-28 12:59 · java/corejava · 评论(0)
【翻译】Why String is immutable in Java
原文地址: http://javarevisited.blogspot.com/2010/10/why-string-is-immutable-in-java.html This is one of the most popular interview question on String in Java which starts with discussion of What is immutable object , what are the benefits of immutable object , why do you use it and which scenarios do y…
2011-02-28 11:27 · java/corejava · 评论(0)
【翻译】java verbose options
原文链接: http://extreme-java.blogspot.com/2011/01/java-verbose-options-for-running.html There are basically three sub parameters with the javac verbose parameter: verbose参数有三个基本的子参数: -verbose:class -verbose:gc -verbose:jni To give you an idea of the number of classes loaded when you fire the java comm…
2011-02-28 09:53 · java/corejava · 评论(0)
如何判断iframe中的页面加载完毕
2010-11-18 17:28 · javascript · 评论(0)
用javascript判断上传图片的大小
<input type="file" id="file" /> <script type="text/javascript"> var f = document.getElementById('file'); f.onchange = function(){ var i = new Image() , f_val = f.value , isImg = /jpg|gif/i.test( (f_val.match(/\.(\w+)$/)[0]).toLowerCase() ) , num_tmp = 0; i.src = f_val; if(!isImg){ alert('图片格式不对,请选择…
2010-08-17 14:49 · javascript · 评论(0)
使用word2007时遇到的一个奇怪问题
打开一个doc文档后,如果在编辑期间切换到别的窗口,那么切回来时,就无法使用鼠标改变光标的位置了。。。。上网查了查,最后确定是 powerdesigner12.5的word插件导致的问题,解决方法如下: 先从 Word 左上角菜单打开 Word Options,如果可以切换到 Add-ins 的设置上,则将Sybase - Power Designer 12.5 的 COM 加载删除掉,问题解决; 如果无法切换到 Add-ins ,则关闭Word,打开注册表键 HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word 将 Options 改名…
2010-08-17 14:25 · 其它 · 评论(0)
MANIFEST.MF文件的Class-Path
刚才准备给一个小程序打成jar文件来运行,在弄MANIFEST.MF文件的Class-Path属性是费了些功夫,总结一下,文件内容大概如下: Manifest-Version: 1.0 Class-Path: . abc-parser_lib/ abc-parser_lib/htmlcleaner2_1.jar Main-Class: cn.hjj.abc.NewsParser 如果Class-Path需要分行写,那么要注意,第一行的最后要留一个空格,下一行的开头要留一个空格,如果第三行不是Class-Path的内容了,则第二行末尾不用留空格。 真是怪异啊。。。
2010-04-17 19:13 · 评论(0)
gwt与hibernate集成时遇到的问题
------------------------3月25日------------------------------------- 老是报这么个异常: com.google.gwt.user.client.rpc.SerializationException: Type 'org.hibernate.collection.PersistentBag' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be…
2010-03-25 16:38 · GWT · 评论(1)
在windows系统上通过xmanager远程控制RHEL5
通过xmanager远程控制linux,网上的教程很多。但是具体到 RHEL5,就会有些出入。 拿我遇到的情况来说,RHEL5的/etc/X11/目录下没有xdm文件夹(可能网管装系统的 时候没给装上)。所以要安装,如果通过yum来安装的话,一般情况下是不行的,要先 更改 yum 的源才可以。改源的方式网上很多。改好后执行: yum install xorg-x11-xdm 根据提示一步一步走,最后就安装好了。 然后是关于更改gdm配置方面的出入。我的RHEL5的/etc/X11/目录下没有gdm目录,因为只有 老版本的gdm才放在这个目录下,较新的版本一般放在/etc/目录下,而且配置文件…
2010-03-19 16:07 · linux · 评论(0)
导入.dmp文件时遇到的一个问题
在pl/sql developer中导入.dmp文件怎么都不行,看了下log,发现导入的过程中,表都被跳过了,可是我的数据库里没有这些表啊,权限也够,怎么也不行呢? 最后实在没办法了,尝试在命令行里用imp命令导,也不行,后来加了个参数ignore=y,搞定。。。。 这是为什么呢?
2010-03-06 19:31 · 数据库/oracle · 评论(0)
查看各表空间的使用情况
今天要建库倒表了,首先查看数据库各个表空间的情况: SELECT c.tablespace_name tablespace_name, ROUND(a.bytes/1048576,2) total_size,ROUND((a.bytes-b.bytes)/1048576,2) used_size, ROUND(b.bytes/1048576,2) free_size, ROUND(b.bytes/a.bytes * 100,2)||'%' free_pct FROM (SELECT tablespace_name,SUM(a.bytes) bytes FROM sys.DBA_DATA_FI…
2010-02-12 09:14 · 数据库/oracle · 评论(0)