N (1 i (1 i
Each monkey is looking to his left toward those with higher index numbers. We say that monkey i "looks up" to monkey j if i ij. For each monkey i, we would like to know the index of th...
分类:
其他好文 时间:
2015-07-06 21:50:51
阅读次数:
153
ApplicatonContext.xml中的配置:
classpath:hibernate/hibernate.cfg.xml
PROPAGATION_RE...
分类:
编程语言 时间:
2015-07-06 21:49:41
阅读次数:
136
Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
思路:对两个已排序的单链表合并。算法上比较简单,与归并排...
分类:
编程语言 时间:
2015-07-06 21:48:48
阅读次数:
166
在用vector排序的时候,发现sort()函数有一个问题,sort排序只会返回排序后的结果,不会返回每个排序后的结果在原来的编号。//template
bool cmp(const pair &x,const pair &y)
{
return x.second > y.second;
}
//template
void sortVector(vector &value, vector...
分类:
编程语言 时间:
2015-07-06 21:48:37
阅读次数:
133
元组
数组合并了相同类型的对象,而元组合并了不同类型的对象.
.NET 4定义了8个泛型Tuple类和一个静态的Tuple类,他们用作元组的工厂.
元组是一种数据结构,通过逗号分隔
Tuple最多能到7,也可以通过嵌套的元组中的对象创建八个或多个元素的元组在Rest属性中的Tuple 对象。
案例:
//一个元素的元组
Tuple test = new Tup...
本次目的:需求是为一幅图像寻找里边的所有圆,并将这些圆保存到数据库中。
所以数据库的设计为,对于一幅图像,
保存它的图片名(图片统一保存在某个目录下,所以只需要保存图片名)
保存它里边的所有圆的信息,因为每幅图像中圆个数未知,所以采用List保存所有圆
圆为自定义类型,包括圆心(x,y)以及半径radius
自定义类型Circle如下图所示,我将Circle存在包c里边。
圆里边有变量x,y记...
分类:
Web程序 时间:
2015-07-06 21:48:54
阅读次数:
138
luasocket 拓展库提供了tcp 模块,该模块提供一些操作,非常简单.但是不知道为什么源代码中的例子有错误.
简单写了一个luasocket tcp 协议的例子,代码如下:
tcpsample.lua 代码:
--绑定地址和端口号
host = host or "127.0.0.1"
port = port or 8080
--创建tcp对象,方式和udp创建类似,通过meta...
分类:
其他好文 时间:
2015-07-06 21:48:16
阅读次数:
278
题目:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ 2 2
/ \ / 3 4 4 3
...
分类:
编程语言 时间:
2015-07-06 21:48:44
阅读次数:
139
Bad Hair Day
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 14989
Accepted: 4977
Description
Some of Farmer John's N cows (1 ≤ N ≤ 80,000) are having a ...
分类:
其他好文 时间:
2015-07-06 21:49:40
阅读次数:
112
1. 描述 最近有一个项目需要将IP摄像机的画面嵌入到web网页中,考虑到减少开发成本,使用vlc插件播放摄像头提供的RTSP流。在videolan wiki的官网详细介绍了关于vlc web plugin的使用方法。
有一点需要注意的是,vlc2.2.0以前的版本,wiki上提供的方法却不再适用。原因是vlc的last一个版本中没有axvlc.cab文件了,最新的的一个在0.9.2版本对...
分类:
Web程序 时间:
2015-07-06 21:48:16
阅读次数:
427
题目:
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
解题:...
分类:
编程语言 时间:
2015-07-06 21:49:34
阅读次数:
132
#include
int max_2(int a,int b)
{
return a>b?a:b;
}
int max_4(int a,int b,int c,int d)
{
int m;
m = max_2(a,b);
m = max_2(m,c);
m = max_2(m,d);
return m;
}
int main()
{
int a,b,c,d;
printf("p...
分类:
其他好文 时间:
2015-07-06 21:46:40
阅读次数:
99
Description
You are given a list of numbers A1A2 .. AN and M queries. For the i-th query:
The query has two parameters Li and Ri.The query will define a function Fi(x) on the domain [Li, Ri] ∈...
分类:
其他好文 时间:
2015-07-06 21:48:51
阅读次数:
92
最近写纯技术的文章比较少,主要是确实觉得没什么好些的,CURD写多了,也没意思。由于这两年的经历,觉得程序员不应该太过局限于技术,特别是天朝的程序员。更应该注重视野的拓展和思维方法的培养。因为天朝的程序员上升的路径有限,而带点管理的岗位都需要其它学科的支持,比如心理学等。而项目经理,产品经理,系统分析,系统架构CTO这些岗位,都需要有比较宽广的视野、开放的思维等软实力。而培养软实力,掌握必要的心理...
分类:
其他好文 时间:
2015-07-06 21:47:16
阅读次数:
194
#include
void move(char x,char y)
{
printf("%c->%c\n",x,y);
}
//将n个盘子从1中借助2移动到3
void hanoi(int n,char one,char two,char three)
{
if(n==1)
move(one,three);
else
{
hanoi(n-1,one,two,three);
mo...
分类:
其他好文 时间:
2015-07-06 21:46:33
阅读次数:
111
遗留物或搬移物检测是智能视频监控中的一项基本功能,基本上是智能视频监控领域的必备功能。然而,在实际应用中漏报或误判率依然很高。常见的遗留物或搬移物检测算法主要分为两类,一类是先检测,再根据检测前景在场景中的停留时间来判定是否为遗留物或搬移物;另一类,则是先检测,然后采用跟踪方法来判断是否为遗留物或搬移物,该类方法由于目标跟踪本身存在的难点,在实际应用的场景受到了很大的限制。本文介绍主要介绍第一类方法。...
分类:
其他好文 时间:
2015-07-06 21:46:57
阅读次数:
240
1.安装JDK /Android SDK,配置环境变量
下载地址: http://www.androiddevtools.cn/
2.下载安装eclipse
下载地址:http://www.eclipse.org/downloads/
3.安装Appium,配置环境变量
下载地址:https://testerhome.com/topics/680
出现问题:
1.环境配置
2...
分类:
移动开发 时间:
2015-07-06 21:48:30
阅读次数:
135