public class MaxSubSeqSum {
/**
* 算法1,穷举搜索
*/
public static final int maxSubSeqSum1(int seq[]) {
int length = seq.length;
int sum = 0;
for (int i = 0; i < length; i++) {
for (int j = i;...
分类:
其他好文 时间:
2014-08-10 15:46:40
阅读次数:
221
A so juicy and interesting problem! Recommend to everyone!A final solution may not jump into your mind immediately, of course, DP is not a trivial top...
分类:
其他好文 时间:
2014-08-10 15:37:00
阅读次数:
209
传送门:http://poj.org/problem?id=3420Quad TilingTime Limit: 1000MSMemory Limit: 65536KDescriptionTired of the Tri Tiling game finally, Michael turns to a...
分类:
其他好文 时间:
2014-08-10 15:20:20
阅读次数:
290
从Http请求中获取客户端ip和端口 import?javax.servlet.http.HttpServletRequest;
import?org.apache.log4j.Logger;
public?final?class?InternetProtocol?{
private?static?Logger?log?=?Logger....
分类:
其他好文 时间:
2014-08-10 13:12:30
阅读次数:
741
centos设置一 需求: Ssh使普通用户登陆后锁定到特定的目录下二 系统平台:CentOS release 6.3 (Final) x86_64OpenSSH_5.3p1OpenSSL 1.0.0-fips三 实现过程: 根据sshd_config的man中所述,实现chroot功能需要配置"C...
分类:
其他好文 时间:
2014-08-09 23:13:59
阅读次数:
377
/**
* 模拟点击某个指定坐标作用在View上
* @param view
* @param x
* @param y
*/
public void clickView(View view,float x,float y)
{
long downTime = SystemClock.uptimeMillis();
final MotionEvent downE...
分类:
移动开发 时间:
2014-08-09 18:49:28
阅读次数:
276
在PHP5的面向对象程序设计中提供了一些常见的关键字,用来修饰类、成员属性或成员方法,使他们具有特定的功能,例如final、static、const等关键字。还有一些比较实用的魔术方法,用来提高类或对象的应用能力,例如__call()、__toString()、__autoload等。
分类:
Web程序 时间:
2014-08-09 18:12:08
阅读次数:
472
private static class ThisHandler extends Handler {
private final WeakReference wrActivity;
@Override
private void handleMessage() {
MainActivity act = wrActivity.get();
...
分类:
移动开发 时间:
2014-08-09 15:56:48
阅读次数:
410
把这两个功能封装起来,经常使用到。private static Uri photoUri; public static final int NONE = 0; public static final int PHOTOHRAPH = 1;// 拍照 public static final int P...
分类:
移动开发 时间:
2014-08-09 11:33:37
阅读次数:
300
通过关键字Final我们可以使变量成为常量。这意味着无法再给这个变量赋值,不然编译器就会报错。 class MyClass{ final double E = 2.72; // run-time constant 运行常量 final static double C = 3e8; // compil...
分类:
编程语言 时间:
2014-08-09 04:52:36
阅读次数:
280