Java
iteye_15448
这个作者很懒,什么都没留下…
展开
-
Guice
Guice (from Google Bob Lee's IoC) Dependency Injection, DI Inversion of Control, IoC It's another IoC container, which like a cousin of Spring IoC. [list][*]Spring uses xml, provide IoC, Aop ...2007-11-26 10:41:02 · 108 阅读 · 0 评论 -
XMPP introduction
XMPP is Extensible Messaging and Presence Protocol (XMPP), a set of open XML technologies for presence and real-time communication developed by the Jabber open-source community in 1999. XMPP is a...2009-03-18 16:00:02 · 114 阅读 · 0 评论 -
Unable to load default SVN client
在 Eclipse 3.4(Gandymede) 里面安装 Subclipse 时出错: [color=red]Unable to load default SVN client.[/color] 解决办法: 安装时,选择下面2项: [list] [*]JavaHL Adapter [*]Subclipse [/list]...2008-11-12 11:04:50 · 84 阅读 · 0 评论 -
File Size
[code="java"]public static void main(String[] args) throws IOException { File file = new File("F:"); if (file.exists()) { prt("Total:", file.getTotalSpace()); prt("Usable:"...2009-09-01 15:25:58 · 146 阅读 · 0 评论 -
Credit Card
[code="java"]//e.g. (20, 20), (13, 26) static void prtCreditCardBill(int billDate, int payLimit) { Calendar c = Calendar.getInstance(); int year = c.get(Calendar.YEAR); c.set(year, 0, ...2009-09-01 16:05:54 · 134 阅读 · 0 评论 -
Get machine name from IP
[code="java"]public static void main(String[] args) throws Exception { String addr = getMachineNameFromIP("192.168.1.159"); System.out.println(addr); } static String getMachineNameFromIP...2009-09-01 16:07:29 · 152 阅读 · 0 评论 -
File Writer
[code="java"]public static void testWriter() throws FileNotFoundException { PrintWriter pw = new PrintWriter(new OutputStreamWriter(new FileOutputStream("PrintWriter.txt", false))); for (int...2009-09-01 16:09:31 · 90 阅读 · 0 评论 -
MatchFinder
[code="java"]public class MatchFinder { //static List matchNames = new ArrayList(); static List nonMatchNames = new ArrayList(); public static void main(String[] args) throws Exceptio...2009-09-01 16:21:02 · 326 阅读 · 0 评论 -
Eclipse dropins
You can also use an own extra dropins folder: simply add a parameter into eclipse.ini: -Dorg.eclipse.equinox.p2.reconciler.dropins.directory= /your_path/e34shared_dropin2009-09-03 14:32:34 · 205 阅读 · 0 评论 -
Singleton Sample(1)
[code="java"]public class Singleton { private static class SingletonHolder { static Singleton instance = new Singleton(); } public static Singleton getInstance() { r...2009-03-10 21:41:59 · 70 阅读 · 0 评论 -
Eclipse plug-ins:
1) Maven http://m2eclipse.codehaus.org/ Update site: http://m2eclipse.sonatype.org/update/ 2) Subversion http://subclipse.tigris.org/ Update site: http://subclipse.tigris.org/update...2009-03-08 11:31:59 · 264 阅读 · 0 评论 -
Note on Singleton
[code]//From Google - Bob Lee. (Jeremy Manson, Brian Goetz) public class Singleton { private static class SingletonHolder { static Singleton instance = new Singleton(); } pu...2007-11-26 10:47:52 · 57 阅读 · 0 评论 -
Java Persistence API: JPA
Java Persistence API, or JPA Java 里面已经有很多的优秀的持久化 framework 了: EJB, JDO, Hibernate, iBatis, and Toplink... Java Persistence API (JPA) 是 J2EE 5里面的一个持久化标准. 起初是作为 JSR 220 的一个部分: EJB 3.0. 为了简化 EJB e...2008-01-19 19:32:38 · 74 阅读 · 0 评论 -
一个 DAO 的实现方法
对 ORM 的讨论永远都没有结束... 每个人都有不同的思路, 不同的实现. 之所以引入ORM, 我认为是: 1) 减少复杂度, 抽象出了公共的持久层. 比如把一个对象保存到数据库. 传统的 JDBC 方法, 需要insert into ...语句. 事实上, 生成这些 CRUD 的 Sql 的过程是重复的. 因此 ORM 给我们做了这些重复的工作. 2) 解决了多...2008-02-04 14:19:06 · 260 阅读 · 0 评论 -
Top Five Java Technologies to Learn in 2008
From: http://www.theserverside.com/news/thread.tss?thread_id=48270 Carlos Perez has posted his list of the top five Java-based technologies to learn in 2008. They are: • OSGi (a specification fo...2008-02-15 12:42:33 · 98 阅读 · 0 评论 -
OSGi Intro
[b]Features:[/b] modularity dynamic,” Plug and Play” extensionable these features are supported by OSGI, the meaning is that you don’t need realize those features yourself, what yo...2008-12-26 11:42:37 · 95 阅读 · 0 评论 -
OSGi Note
Create OSGi environment outside Eclipse. ------------------------------------------------------------------------------ 1) Create folder and files: [code="java"]C:\equinox │ run.bat │ ├─confi...2009-01-09 01:11:21 · 75 阅读 · 0 评论 -
Ant task
Copy task with Ant build.xml [code="java"] ...2008-03-22 00:55:06 · 73 阅读 · 0 评论 -
递归删除文件内容
今天突然发现, 很多 html 文件的末尾多了一行, [code="java"][/code] 不知道什么时候中的招,很久没有写有关IO方面的代码, 今天顺便温习一下, 用Java 写段代码删掉它. [code="java"] public class FileUtils { public static void main(String[] args) throws E...2008-05-05 13:16:15 · 96 阅读 · 0 评论 -
Delete sub folder(FileUtils)
[code="java"]public class FileUtils { /** Delete all specified subFolder, e.g. delete all bin directory of c:/testApp. */ public static void deleteSubFolder(String sPath, String subFoldName,...原创 2013-11-28 18:03:19 · 193 阅读 · 0 评论