转载“http://www.taoz11.com/archives/300.html”linux下直接下载源码,在服务器上编译即可,发现windows下有4个版本:VC9
x86 Non Thread SafeVC9 x86 Thread SafeVC6 x86 Non Thread SafeVC6...
本文转载至目录3第1章创建和运行请求51.1.创建一个同步请求51.2.创建一个异步请求51.3.使用程序块(blocks
)61.4.使用队列61.5.在委托方法中处理多个请求的成功和失败71.6.关于ASINetworkQueues71.7.取消一个异步请求81.8.安全处理委托在请求完成前释放...
分类:
Web程序 时间:
2014-05-27 15:57:50
阅读次数:
348
1 public class PrintChar implements Runnable { 2
private char charToPrint; 3 private int times; 4 5 public PrintChar(char c, int
t) { 6 ...
分类:
其他好文 时间:
2014-05-26 20:17:55
阅读次数:
265
线程同步:用来协调多个线程访问同一资源 /* * 线程同步的例子 * */public class
Test { public static void main(String[] args) { //创建两个线程并执行同一条语句 Run r=new
Run(); Thread t1=new Thre...
分类:
编程语言 时间:
2014-05-26 20:05:26
阅读次数:
358
Thread,Handler,Looper三个重量级对象是如何绑定到一起的,以及消息是如何在Handler和Looper中存在和传播的。
分类:
移动开发 时间:
2014-05-26 19:49:42
阅读次数:
350
1.主线程不能捕获到子线程的异常package Thread.Exection;import
java.util.concurrent.ExecutorService;import
java.util.concurrent.Executors;public class ExeceptionThrea...
分类:
编程语言 时间:
2014-05-26 19:41:48
阅读次数:
411
一个简单的猜扑克游戏,很适合初学者,点击TextView扑克由反面变为正面,未点击的TextView有透明效果,点击再玩一次按钮,运行洗牌程序undefined
详细说明:http://android.662p.com/thread-876-1-1.html
分类:
移动开发 时间:
2014-05-26 19:11:35
阅读次数:
337
A Stack is a data-structure that You can only add
an element to the top of the Stack, andYou can only read or remove an element
also from the top.Plea...
分类:
编程语言 时间:
2014-05-26 17:10:21
阅读次数:
540
将另外一个线程join到当前线程,则需要等到join进来的线程执行完才会继续执行当前线程。package
Thread.join;class Sleeper extends Thread { private int duration; public
Sleeper(String name...
分类:
编程语言 时间:
2014-05-25 22:17:16
阅读次数:
363
java.lang.Thread的sleep()方法能使当前线程暂停运行一段时间(单位毫秒)。需要注意的是,sleep()方法的参数不能为负,否则会抛出IllegalArgumentException异常。
除此之外,还有另一个方法sleep(long millis, int nanos),该方法可用于使当前线程暂停millis毫秒nanos纳秒。需要注意的是,参数nanos的取值范围为...
分类:
编程语言 时间:
2014-05-25 21:32:07
阅读次数:
269