- 博客(15)
- 收藏
- 关注
原创 在Weblogic Server App 下通过JNDI name 获取 DataSourse
public String getString() { String cacheLogFlag = null; Connection con = null; try { InitialContext ic = new InitialContext(); DataSource ds = (DataSource) ic.lookup(XXConstants.DA...
2010-02-25 20:00:35
168
我的常用 linux 命令
1) 在linux下如何查看文件夹大小进入文件夹里面du -h 查看每一个文件的大小 or du -sh 文件夹名 查看当前文件夹大小 单位是K/M/G, h-human readable ordu -ks 查看当前所在文件夹大小du -ks 文件夹名 查看当前指定文件夹大小 2)...
2009-09-30 16:37:17
101
UNIX下用Java 代码调用一个shell command 并取得执行结果
public class Test { public static void main(String[] args) throws Exception { try { //execute shell command: df -k . Process fileSystemDfInfo = Runtime.getRuntime().exec("df -k .");...
2009-08-25 10:22:16
155
Oracle 中 NULL 和 空字符窜 ''
SELECT SYSDATE FROM DUAL WHERE '' is null;SYSDATE---------19-AUG-09SELECT SYSDATE FROM DUAL WHERE '' = NULL;no rows selectedSQL> SELECT SYSDATE FROM DUAL WHERE '' = '';no rows ...
2009-08-19 09:35:10
119
重温 Thinking in Java 9 - Dynamic proxies
Proxy is one of the basic design patterns. It is an object that you insert in place of the "real" object in order to provide additional or different operations-these usually involve communication with...
2009-08-13 15:47:55
104
重温 Thinking in Java 8 - Reflection
If you don't know the precise type of an object, RTTI will tell you. However, there's a limitation: The type must be known at compile time in order for yo uto detect it using RTTI and to do something ...
2009-08-13 15:47:08
119
重温 Thinking in Java 7 - instanceof vs Class equivalence
instanceof vs Class equivalence /* When you are querying for type information, there's an important different between either form of instanceof(that is, instanceof or isInstance(), which p...
2009-08-13 00:02:07
135
重温 Thinking in Java 6 - Registered factories
Registered factories A problem with generating objects of the Pets hiearachy is the fact that every time you add a new type of Pet to the hierarchy you must remember to add it to the entries i...
2009-08-12 23:39:37
107
重温 Thinking in Java 5 - The Class object
To understand how RTTI works in Java, you must first know how type information is represented at run time. This is accomplished through a special kind of object called the Class object, which contains...
2009-08-12 23:38:37
132
重温 Thinking in Java 4 - Type information
import java.util.List;import java.util.Arrays;abstract class Shape { void draw() { System.out.println(this + ".draw()"); } abstract public String toString(); }class Circle...
2009-08-12 23:35:05
96
重温 Thinking in Java - 3 The this keyword
class Banana { void peel(int i){ //do something }}public class BananaPeel { public static void main(String[] args){ Banana a = new Banana(), b = new Banana(); a.peel(1...
2009-07-31 11:12:11
103
重温 Thinking in Java - 2 Method Overloading
Distinguishing overloaded methodsIf the methods have the same name, how can Java know which method you mean? There's a simple rule: Each overload method must take a unique list of argument types....
2009-07-26 11:24:19
99
重温 Thinking in Java - 1 Everything is an object
Everything in Java is an object.You manipulate objects with references.Although you treat everything as an object, the identifier you manipulate is actually a “reference” to an object.That...
2009-07-26 11:23:46
179
原创 加强Java基础
不经意间的一回头,工作已有4个年头,眨眼之间被我混过去了 在学校的时候只在大一的时候学过C,大四上的时候学过C++,学的都不好。在大四下的时候用MFC给导师做过一个项目,启蒙项目,当时对导师那个感激啊 工作后就发现那个项目仅仅是把功能实现而已,很多东西都考虑不到,没办法自己当时什么都不会。 进公司后开始是分在 .Net 部门,上了几天的C#,刚准备学习案例就被告知 .Net...
2009-07-06 17:48:27
109
Apache Fileupload Exception
Error Message:<Jun 25, 2009 5:44:55 PM SGT> <Error> <org.apache.struts.upload.CommonsMultipartRequestHandler> <000000> <Failed to parse multipart requestorg.apache.com...
2009-07-06 17:05:35
362
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人