2005-10-31

Read/Write Lock

关键字: reader-write-lock
public class SomeContainer { private Set elements; private ReadWriteLock globalLock; private Lock readLock; private Lock writeLock; SomeContainer() { elements = new HashSet(); globalLock = new ReentrantReadWriteLock(); readLock = globalLock.readLock(); writeLock = globalLock.writeLock(); } publ ...
i can confirm this. i copied the following file to $JAVA_HOME/bin as javaw.exe.manifest, and i magically got windows XP styles for all UI elements. this is good enough for me :) --snip---     version="1.0.0.0"   processorArchitecture="X86&quo ...
在看公司的代码时,发现一段奇妙的代码。 情景:         1) CalcManager 用command line运行。他能够产生Calculator Process。        2) Calculator Process Sevice进程, 以Window 进程的形式存在。 需求:        CalcManager 能够管理他生长的Calc ...
在看公司的代码时,发现一段奇妙的代码。 情景:         1) CalcManager 用command line运行。他能够产生Calculator Process。        2) Calculator Process Sevice进程, 以Window 进程的形式存在。 需求:        CalcManager 能够管理他生长的Calc Process。 也就是说CalcManagerShutdown的时候Calc Process也要能自动Shutdown。 如果我们提供一个exit的button在GUI上面的话  上面实现起来非常顺, 在exit 的action上先Shu ...
  • 16:00
  • 浏览 (325)
  • 评论 (0)
2005-10-06

How are Servlet paths mapped?

关键字: servlet-path
补充点基础知识. Path mappings are used to map a URI to a contexts, handlers and servlets. The following types of mapping are supported and applied in the order presented. Absolute Mapping Path Spec: /pathWill match: /path path=/path info=Will not match: / ...
2005-10-03

Java中的字符编码

关键字: java-charset
计算机本来只认识0和1, 但我们却被java中的乱码搞得焦头烂额. IE.    new String(rs.getString("name").getBytes("ISO-8859-1"),"GBK"); 读取数据库的内容.首先我们需要知道你的source的编码格式,  然后用source的编码格式得到bytes (rs.getString("name").getBytes("ISO-8859-1")), 再将这些bytes转换成需要 ...
dengyin2000
搜索本博客
我的相册
4d063000-8eef-365d-8346-f210ccfd5265-thumb
VB-seamless
共 13 张
存档
最新评论