上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 55 下一页
同:都是为了线程安全异:synchronized是利用锁的机制,使变量或代码块在某一时该只能被一个线程访问。而ThreadLocal为每一个线程都提供了变量的副本,使得每个线程在某一时间访问到的并不是同一个对象,这样就隔离了多个线程对数据的数据共享。而Synchronized却正好相反,它用于在多个... Read More
posted @ 2014-04-29 11:03 等风来。。 Views(429) Comments(1) Diggs(1) Edit
同步 1)同步方法 2)同步块 21) 实例变量 22) 类变量 锁定的内容 1)锁定类的某个特定实例 2)锁定类对象(类的所有实例) 一。同步类实例:同步方法 这两种写法的效果是一样的,锁定的都是类实例对象。 如果有一个实例对象demo,有两个线程: thread1,thread2,都调用了dem Read More
posted @ 2014-04-29 00:03 等风来。。 Views(1457) Comments(0) Diggs(0) Edit
happens-beforerelation on memory operations such as reads and writes of shared variables. The results of a write by one thread are guaranteed to be ... Read More
posted @ 2014-04-28 23:27 等风来。。 Views(272) Comments(0) Diggs(0) Edit
Intrinsic Locks and Synchronization Intrinsic Locks and Synchronization Synchronization is built around an internal entity known as the intrinsic(固有的, Read More
posted @ 2014-04-28 23:13 等风来。。 Views(458) Comments(0) Diggs(0) Edit
背景: dst 前景: src PorterDuff.Mode.CLEAR清除画布上图像 PorterDuff.Mode.XOR取两层图像的非交集部门PorterDuff.Mode.SRC显示上层图像PorterDuff.Mode.DST显示下层图像PorterDuff.Mode.S... Read More
posted @ 2014-04-23 17:03 等风来。。 Views(243) Comments(0) Diggs(0) Edit
一。彩色深度标准通常有以下几种:(1)8位色,每个像素所能显示的彩色数为2的8次方,即256种颜色。(2)16位增强色,16位彩色,每个像素所能显示的彩色数为2的16次方,即65536种颜色。(3)24位真彩色,每个像素所能显示的彩色数为24位,即2的24次方,约1680万种颜色。(4)32位真彩色... Read More
posted @ 2014-04-13 17:59 等风来。。 Views(209) Comments(0) Diggs(0) Edit
you can mark the areas that should be stretched by drawing pixels along the left and top borders. You can also mark the area that should hold the content by drawing pixels along the right and bottom borders. Read More
posted @ 2014-04-12 15:53 等风来。。 Views(153) Comments(0) Diggs(0) Edit
在Android中,对图片的处理需要使用到Matrix类,Matrix是一个3 x 3的矩阵,他对图片的处理分为四个基本类型:1、Translate2、Scale3、Rotate4、Skewcamera.save() 这句话是将当前的摄像头位置保存下来,以便变换进行完成后恢复成原位,接下来调用cam... Read More
posted @ 2014-04-08 16:49 等风来。。 Views(416) Comments(0) Diggs(0) Edit
一。总体流程1):管理员在后台修改积分规则2):数据被写入数据表creditrule 中,并将数据写入缓存文件data/data_creditrule.php 中3):用户发表文章或者进行其他操作的时候,通过getreward函数来获取奖罚积分 4):将数据写入用户数据库表space中,从而增加或减少用户积分二。具体文件1):UCHOME积分变动提示是通过footer.htm的showreward()来监控2):showreward()在source/script_common.js中function showreward() { if(Cookie.get('reward_notic Read More
posted @ 2014-04-03 23:39 等风来。。 Views(293) Comments(0) Diggs(0) Edit
1.android:clipChildren Defines whether a child is limited to draw inside of its bounds or not. This is useful with animations that scale the size of ... Read More
posted @ 2014-04-03 17:36 等风来。。 Views(149) Comments(0) Diggs(0) Edit
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 55 下一页
------------------------------------------------------------------------------------------------------------ --------------- 欢迎联系 x.guan.ling@gmail.com--------------- ------------------------------------------------------------------------------------------------------------