Spring's new module - Spring Batch, a much needed module.
Besides the usual web container, ejb container, there are other ways to deploy apps. Batch, Grid, and JMS, besides a simple main() or an ANT task, are other common options. There are several concerns together, one is the deployment, anothe ...
There are several discussion about swapping objects during runtime. For example, we may have a case where we need to swap databases depending on the configuration settings or runtime variables, such as user info.
For database related, Spring 2.0 added two classes to short-circuit this case, Abstr ...
2007-05-13
Another Google question - drop glassballs from a building 5
关键字: glass ball building
Here are some results are the testcases:
1. PathFindTest.test4Ball100Floors():
The result is like this:
path=(f=56, b=3, whole, tried)-->(f=91, b=3, broken, tried)-->(f=71, b=2, broken, tried)-->(f=61, b=1, whole, tried)-->(f=65, b=1, whole, tried)-->(f=68, b=1, whole, tried)-- ...
- 04:01
- 浏览 (286)
- 评论 (0)
- 分类: algorithms
2007-05-13
Another Google question - drop glassballs from a building 4
关键字: glass ball building
The test cases are divided into 3 classes.
The first one is just a pinpoint test class that contains some corner cases:
java 代码
package glassball;
import junit.framework.TestCase;
import java.util.List; &n ...
- 03:42
- 浏览 (247)
- 评论 (0)
- 分类: algorithms
2007-05-13
Another Google question - drop glassballs from a building 3
关键字: glass ball building
The next step is to find the actually path of floors that we are going through to find the breaking floor. Here is the code to do that.
java 代码
package glassball;
import java.util.List;
import java.util.ArrayList; ...
- 03:33
- 浏览 (286)
- 评论 (0)
- 分类: algorithms
2007-05-13
Another Google question - drop glassballs from a building 2
关键字: glass ball building
Here is the code following the logic from the previous post:
java 代码
package glassball;
import java.util.List;
import java.util.ArrayList;
/**
* Google  ...
- 03:02
- 浏览 (270)
- 评论 (0)
- 分类: algorithms
2007-05-12
Another Google question - drop glassballs from a building 1
关键字: glass ball building
Here is the question:
原题: 有一个100层高的大厦,你手中有两个相同的玻璃围棋子。从这个大厦的某一层扔下围棋子就会碎,用你手中的这两个玻璃围棋子,找出一个最优的策略,来得知那个临界层面。
I copied and pasted the above since I can't type Chinese most of the time. A google yield a few articles that I copied too:
为了得到两个棋子的最优策略,我们先简化问题,看看一个棋子的情况。如果手中只有一个棋子,为了得知临界层面,你只有一 ...
- 04:43
- 浏览 (313)
- 评论 (0)
- 分类: algorithms







评论排行榜