Android中的Handler, Looper, MessageQueue和Thread前几天,和同事探讨了一下Android中的消息机制,探究了消息的发送和接收过程以及与线程之间的关系。虽然我们经常使用这些基础的东西,但对于其内部原理的了解,能使我们更加容易、合理地架构系统,并避免一些低级错误。...
分类:
移动开发 时间:
2014-12-14 23:59:42
阅读次数:
377
原文链接 http://bbs.chinaunix.net/thread-1810167-1-1.htmlgrep命令是linux下的行过滤工具,其参数繁多,下面就一一介绍个个参数的作用,希望对大家有所帮助。grep -- print lines matching a pattern (将符合样式的...
分类:
其他好文 时间:
2014-12-14 19:58:44
阅读次数:
958
一、Thread.sleep(long)与object.wait()/object.wait(long)的区别sleep(long)与wait()/wait(long)行为上有些类似,主要区别如下:1.Thread.sleep(long)是属于Thread类的静态方法。其基本语义是使当前运行的线程暂...
分类:
编程语言 时间:
2014-12-14 18:25:53
阅读次数:
158
题意: c表示矩阵内01 互换,q表示单点查询。#include#include#include#includeusing namespace std;const int maxn = 1000+5;#define lson l,mid,rt>1; inbuild(root,lson); ...
分类:
其他好文 时间:
2014-12-14 17:08:16
阅读次数:
177
Easy Touch 教程转自:http://www.unitymanual.com/thread-31332-1-1.html1.import “Easy Touch 3”的资源包2.创建人物模型3.创建地形4.添加一个Joystick的实例 :Hedgehog Team->Easy Touch-...
分类:
编程语言 时间:
2014-12-14 17:05:05
阅读次数:
155
7. actor
http://www.scala-lang.org/docu/files/actors-api/actors_api_guide.html#
Scala中处理并发,有很多选择:
l actor消息模型,类似Erlang,首选,Lift和akka也实现了自己的actor模型。
l Thread、Runnable
l java.uti...
分类:
其他好文 时间:
2014-12-14 15:53:24
阅读次数:
283
public classHandlerThreadextends ThreadClass OverviewHandy class for starting a new thread that has a looper.The looper can than be used to create han...
分类:
移动开发 时间:
2014-12-14 13:14:20
阅读次数:
143
[代码片段]京东二级菜单http://www.eoeandroid.com/thread-535651-1-4.html[代码片段]仿58同城的区域选择效果http://www.eoeandroid.com/thread-496528-1-1.html[代码片段]android 中如何实现左边 树形...
分类:
移动开发 时间:
2014-12-14 13:10:26
阅读次数:
158
AsyncTask——异步任务个人认为这是翻译比较好的一次。。Class Overview//类概述AsyncTask enables proper and easy use of the UI thread. This class allows to perform background oper...
分类:
移动开发 时间:
2014-12-14 13:06:22
阅读次数:
221
我当初查看OOM源代码的时候很奇怪:怎么遍历以父进程为首的进程链表,使用的是do_each_thread函数,这个名称,特别的怪异,而且有时候也会出现for_each_task,明明是在遍历进程,而不是线程。原来在linux内核源码中都是使用thread或者task标志进程,而不是使用process进程这个..
分类:
系统相关 时间:
2014-12-14 07:16:39
阅读次数:
161