Problem DescriptionAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is o...
分类:
其他好文 时间:
2015-08-29 23:16:15
阅读次数:
245
Problem DescriptionAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is o...
分类:
其他好文 时间:
2015-08-29 23:12:18
阅读次数:
260
取消与关闭要使任务和线程能安全、快速、可靠地停止下来,并不是一件容易的事。Java没有提供任何机制来安全地终止线程(虽然Thread.stop和suspend方法提供了这样的机制,但由于存在缺陷,因此应该避免使用)。但它提供了中断,这是一种协作机制,能够使一个线程终止另一个线程的当前工作。这种协作式的方法是必要的,我们很少希望某个任务、线程或服务立即停止,因为这种立即停止会使共享的数据结构处于不一致...
分类:
编程语言 时间:
2015-08-29 09:47:11
阅读次数:
200
Description 构造,数论,数学
As we know, Rikka is poor at math. Yuta is worrying about this situation, so he asks rikka to have some practice on codeforces. Then she opens the problem B:
Given an integer , she needs to come up with an sequence of integers satis...
分类:
其他好文 时间:
2015-08-27 15:17:45
阅读次数:
155
http://www.csdn.net/article/2013-12-18/2817838-big-data-practice-in-dianping http://www.coderli.com/spring-batch-intro-sample/...
分类:
其他好文 时间:
2015-08-21 21:42:16
阅读次数:
124
D - BillboardCrawling in process... Crawling failed Time Limit:8000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 279...
分类:
其他好文 时间:
2015-08-19 13:19:25
阅读次数:
134
[leetcode]?https://leetcode.com/problems/shortest-word-distance/ For example, Assume that words =?["practice", "makes", "perfect", "coding", "makes"]. Given?word1?=?“coding”,?word2?=?“p...
分类:
编程语言 时间:
2015-08-18 23:00:35
阅读次数:
755
package com.imooc.practice;class Parent{ public Parent(){ System.out.println("Parent构造方法执行!"); } { System.out.println("...
分类:
编程语言 时间:
2015-08-17 23:28:22
阅读次数:
186
基础构建模块委托时创建线程安全类的一个最有效的策略,只需让现有的线程安全类管理所有的状态即可。
平台类库中包含了一个并发构建块的丰富集合,如线程安全的容器与同步工具。5.1 同步容器类分两部分,一是JDK1.0的Vector与Hashtable,另一个是JDK1.2才被加入的同步包装类Collections.synchronizedXxx工厂方法创建的。Collections.synchroniz...
分类:
编程语言 时间:
2015-08-17 19:32:57
阅读次数:
285
下面这个”并发技巧清单“列举了在第一部分(二至五章)中介绍的主要概念和规则。
可变状态是至关重要的(It’s the mutable state,stupid)。
所有的并发问题都可以归结为如何协调对并发状态的访问。可变状态越少,就越容易确保线程安全性。
尽量将域声明为final类型,除非需要它们是可变的。
不可变对象一定是线程安全的。
不可变对象能极大地降低并发编程的复杂性。它们更为简单而且安...
分类:
编程语言 时间:
2015-08-17 19:32:35
阅读次数:
152