1.对多线程的支持是Java语言的一大优势,Java对线程的控制主要集中在对线程的同步和协作上,Java使用的同步机制是监视器。监视器java监视器支持两种线程:互斥和协作。java虚拟机通过对象锁来实现互斥,允许多个线程在同一个共享数据上独立而不干扰地工作。协作则通过object类的wait方法....
分类:
编程语言 时间:
2014-05-15 01:55:47
阅读次数:
297
戳我去解题You are climbing a stair case. It
takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In
how many distinct ways can you ...
分类:
其他好文 时间:
2014-05-15 01:55:06
阅读次数:
251
Substrings
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1571 Accepted Submission(s): 459
Problem Description
XXX has an arra...
分类:
其他好文 时间:
2014-05-15 01:35:46
阅读次数:
338
使用execAndWait拦截器可以在等待较长时间的后台处理中增加等待页面。实现如下图所示的效果: 1)struts.xml主要部分 1000 50
/wait.jsp /rs.jsp ...
分类:
其他好文 时间:
2014-05-14 23:46:33
阅读次数:
377
注入:之所以鸡肋就是该漏洞利用安装文件 重新生成 配置文件 写入可执行代码鸡肋1: 具有破坏性
动作非常大 重新写了配置文件 数据库连接文件鸡肋2: 有一定安全常识的站长都会删掉 install 目录虽然鸡肋 但也有优点 : 不受
magic_quotes_gpc 、 webserver 影响
分类:
Web程序 时间:
2014-05-14 22:39:18
阅读次数:
600
Best Time to Buy and Sell Stock1Say you have an
array for which theithelement is the price of a given stock on dayi.If you were
only permitted to comp...
分类:
其他好文 时间:
2014-05-14 22:36:11
阅读次数:
353
对于sleep()方法,我们首先要知道该方法是属于Thread类中的。而wait()方法,则是属于Object类中的。sleep()方法导致了程序暂停执行指定的时间,让出cpu该其他线程,但是他的监控状态依然保持者,当指定的时间到了又会自动恢复运行状态。在调用sleep()方法的过程中,线程不会释放...
分类:
编程语言 时间:
2014-05-14 22:28:53
阅读次数:
375
//Processing date
struct tm time;
std::string date;
char dateBuff[128] = {0};
time.tm_year = atoi(md_date.getString().substr(0,4).c_str()) - 1900;
time.tm_mon = atoi(md_date.getString().subs...
分类:
其他好文 时间:
2014-05-14 21:52:15
阅读次数:
248
点击打开链接
Fibonacci Tree
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 975 Accepted Submission(s): 289
Problem Description
...
分类:
其他好文 时间:
2014-05-14 20:18:47
阅读次数:
366
Total Accepted: 8400 Total Submissions: 38235 My Submissions
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profi...
分类:
其他好文 时间:
2014-05-14 19:39:53
阅读次数:
275