`
zwhc
  • 浏览: 258369 次
  • 性别: Icon_minigender_1
  • 来自: 福州
社区版块
存档分类
最新评论
文章列表
刚才看org.springframework.core.AttributeAccessorSupportTests 看到这个,有点奇怪。 protected void setUp() throws Exception { this.attributeAccessor = new AttributeAccessorSupport() { }; } 仔细看了一下,原来是个抽象类。 做了个 demo 如下。 这种用法,嗯嗯,不评价。 package test; public class Test01 { private static void ...
AOP Alliance 解散了? 今天到 aopalliance http://aopalliance.sourceforge.net/motivations.html 上 转了一下。奇怪,spring 不在里面。 看到这句话:and many others (email me[renaud@aopsys.com] to add a new one) 嗯,这个组织的联系人是 renaud@aopsys.com,他做了个 aop 的实现 jac。 可是,到 www.aopsys.com 一看,不对劲啊,怎么象是个招聘网站啊。 难道,AOP Alliance 解散了?
http://aopalliance.sourceforge.net/motivations.html AOP Alliance (Java/J2EE AOP standards) Motiviations Aspect-Oriented Programming (AOP) is a programming technique that will be able to enhance several existing middleware environments (such as J2EE), or development environements (e.g. JBuilder, Ecli ...
log4j 是怎么取到行号的 我使用的是 log4j_1.2.15,在其源代码上进行分析。 修改 examples 目录下的 MyPatternLayout.java //Layout layout = new MyPatternLayout("[counter=%.10#] - %m%n"); Layout layout = new MyPatternLayout("[counter=%.10#]%L - %m%n"); 让其输出行号。 修改 org/apache/log4j/spi/LocationInfo.java 加入 ...
java -Xrunhprof:help      HPROF: Heap and CPU Profiling Agent (JVMTI Demonstration Code) hprof usage: java -agentlib:hprof=[help]|[<option>=<value>, ...] Option Name and Value  Description                    Default ---------------------  -----------                    ------- heap=dum ...
常量池里的 String 常量被更改后 这个贴子很不错http://www.iteye.com/topic/625756 因为提出了个令人迷惑的问题。在其基础上,我做了个 demo 如下。 呵呵,好玩吧。 package test; import java.lang.reflect.Field; /** * http://www.iteye.com/topic/625756 * */ public class TestStr { private static void test07() { try { Field f = "a ...
在 java 里,对 string 对象进行赋值,发生什么情况呢? package test; public class TestStr { private static void test02() { String str01 = "aaa"; System.out.println(str01); str01 = "bbb"; System.out.println(str01); str01 = "aaa1"; System.out.println(str01); } ...
J2ME 七巧板图库 七巧板查看器 总共有 2233 种图案。 使用方式: 1、按 6 键查看下一个图案; 2、按 # 键显示图案解答; 3、按星键切换图案的显示模式: 共三种模式: a)没有边的黑色板块 b)白色边的黑色板块 c)黑边 http://code.google.com/p/qiqiao/ 在 移动 MM 上的地址。 http://www.mmarket.com/1007/100000014100522100000009900300000014478.html 嗯,上个月下载量排名第 20。这个月到目前为止,下载量超过 1 万了。 ================ ...
http://www.anarres.org/projects/jcpp/ JCPP - A Java C Preprocessor Introduction The C Preprocessor is an interesting standard. It appears to be derived from the de-facto behaviour of the first preprocessors, and has evolved over the years. Implementation is therefore difficult. JCPP is a complete, ...
对 http://www.iteye.com/topic/650762 的代码做一些修改。 原来的代码,主要用鼠标,很麻烦。 package house; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Point; import java.awt.Rectangle; impor ...
新代码 package test; /** * http://www.cn-cuckoo.com/2010/04/20/are-you-one-of-the-10-percent-of-programmers-who-can-write-a-binary-search-1530.html * * 二分查找 * 2010-04-21 12:00 至 2010-04-21 12:36 * */ public class BinarySearch { /** * 会出现死循环 * @param data * @param value ...
本程序用于显示 java class 文件的结构。 1、程序先以 UE 十六进制编辑模式的显示方式显示 class 文件。 2、然后,显示各个字节对应的含义。 如, [debug] code:03 3C 84 01 01 B1 [debug] iconst_0 [debug] istore_1 [debug] iinc [debug] return 第一行表示程序代码的字节码,以后四行,是这些字节码对应的指令。 ------------------------------------------------------ 本程序改自 jclasslib_windows_3_0。 ---- ...
iload_<n> Load int from local variable The <n> must be an index into the local variable array of the current frame (§3.6). The local variable at <n> must contain an int. The value of the local variable at <n> is pushed onto the operand stack. istore_<n> Store int into ...
package test; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; public class UEHex { /** * 测试一下,二进制字符在 ue 里怎么显示。 * 结果: 0x00 - 0x1f 都是显示 . */ private static void test01() { try { File f = new File( "chars.bin"); File ...
10 亿个数取中位数 1、取 16*1024 个数,生成一个 TreeMap 。取得最大值 max 和最小值 min。 2、构造一个1024个元素的计数数组 T[i],对最初的 1024 个数按区间计数; 对 min 和 max 进行 1024 个等分,各等分值为 N[i]。 当数据 N[a]<data<=N[a+1] 时, T[a]++; 3、将大于 N[512-8] 且小于 N[512+8] 的数放入一个新的 TreeMap。 4、开始读取之后的数据,执行2 和 3的操作; 5、根据区间计数,获知中位数处于N[x]区间。 如果正好处于 N[512-8] 且小于 N[512 ...
Global site tag (gtag.js) - Google Analytics