public static String lcs(String a, String b){ int aLen = a.length(); int bLen = b.length(); if(aLen==0 || bLen==0) return ""; if(a.char...
分类:
其他好文 时间:
2014-07-22 22:49:15
阅读次数:
194
ecshop把AJAX事件和JSON解析的模块放在common/transport.js之中,可以说它也有自己封装的一套工具,这其实是很正常的。 ? 但恰恰的,在封装JSON各种方法的同时对object的模型进行了重写,这个就跟jQuery冲突了。...
分类:
Web程序 时间:
2014-07-22 09:03:06
阅读次数:
298
Pipes have no names, and their biggest disadvantage is that they can be used ?only?between processes that have a parent process in common. Two unrelated processes can-? not create a pipe betwee...
分类:
其他好文 时间:
2014-07-21 10:36:45
阅读次数:
237
1、安装samba(CentOS Linux):yum install samba system-config-samba samba-client samba-common 2、创建www账号 ?/usr/sbin/groupadd www/usr/sbin/useradd -g www www mkdir -p /data/ chown -R www:www /...
分类:
其他好文 时间:
2014-07-21 10:32:32
阅读次数:
263
Guava 是一个 Google 的基于java1.6的类库集合的扩展项目,包括 collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, 等等. 这些高质量的 API 可以...
分类:
其他好文 时间:
2014-07-21 10:14:58
阅读次数:
180
每一个集成环境都缺不了一个中控服务器我们这里姑且叫它操控服务器(supcon)吧,今天介绍一下,该lab-bill-davidey清单里的公共服务(common)模块supcon服务器。工程化平台就是在这里,ssh免密码登录集成环境的所有主机,这里存放所以的管理脚本。ssh免密码配置如下:sudoser..
分类:
其他好文 时间:
2014-07-20 15:41:31
阅读次数:
250
题意:求最长递增子序列
AC代码:#include
#include
#include
using namespace std;
int dp[1010],a[1010];
int main()
{
int i,j,n;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;...
分类:
其他好文 时间:
2014-07-20 10:28:31
阅读次数:
235
并查集(Union-find Sets)是一种非常精巧而实用的数据结构,它主要用于处理一些不相交集合的合并问题。一些常见的用途有求连通子图、求最小生成树的 Kruskal 算法和求最近公共祖先(Least Common Ancestors, LCA)等。
使用并查集时,首先会存在一组不相交的动态集合 S={S1,S2,?,Sk},一般都会使用一个整数表示集合中的一个元素。
每个集合可能包含一个...
分类:
其他好文 时间:
2014-07-19 23:23:29
阅读次数:
378
Least Common Multiple
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 29480 Accepted Submission(s): 11136
Problem Description
The le...
分类:
其他好文 时间:
2014-07-19 23:14:59
阅读次数:
244
Longest Ordered Subsequence
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 32192
Accepted: 14093
Description
A numeric sequence of ai is ordered if
a1 a2...
分类:
其他好文 时间:
2014-07-19 11:11:54
阅读次数:
159