2017年2月9日
摘要: 1) panic() 做了什么? 2)recover() 做了什么? recover()之后的panic() 不会再次激发defer函数执行 3)在defer 函数内部panic()呢? 照旧。和在普通函数中无区别 4)和Cjump比较 阅读全文
posted @ 2017-02-09 08:08 keniee 阅读(488) 评论(0) 推荐(0) 编辑
  2016年4月26日
摘要: 今天试验了ubuntu 上最新的snap 软件格式。snap 软件格式确实比以前的.debian 格式有很大的不同。 官方文档如 https://developer.ubuntu.com/en/snappy/build-apps/your-first-snap/ 介绍了webcam-webui.sn 阅读全文
posted @ 2016-04-26 14:03 keniee 阅读(318) 评论(0) 推荐(0) 编辑
  2016年4月22日
摘要: 我测试使用了微软最新发布的build,里面的linux subsytem for windows。 该子系统可以在windows 系统上运行很多的linux 原生应用。例如git, apt-get, 一些bash 命令等等。 一些命令,例如top 用不了。因为terminal支持不好。我不清楚如果直 阅读全文
posted @ 2016-04-22 20:24 keniee 阅读(371) 评论(0) 推荐(0) 编辑
  2013年10月16日
摘要: this is a great passage on android 2D animation.http://www.360doc.com/content/13/0102/22/6541311_257754535.shtml# 阅读全文
posted @ 2013-10-16 16:19 keniee 阅读(184) 评论(0) 推荐(0) 编辑
  2013年9月18日
摘要: 本文是android窗口管理系列文章之一。下面这篇文章介绍了 wms是如何计算activity窗口大小的。写的很详细清晰。http://blog.csdn.net/luoshengyang/article/details/8479101这篇文章简化了上面的文章,方便快速的理解。我秉承这样的观点,我们应该尽量强调是什么?做什么用的?其次才是过程。过程容易遗忘,只有内在的联系可以记住。当说明是什么的时候,我们应该尽量避免大篇幅的贴代码。代码更倾向于说明流程,而不是本质。首先说明一下,为什么需要wms来计算activity 窗口的大小?客户端代码不能自己计算么?客户端在作图过程中,不是有measur 阅读全文
posted @ 2013-09-18 18:02 keniee 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 学习目的:我阅读过网络上相关的资料,有一些过分的简略,另外一些,直接在分析代码,而忽略了思路的介绍,容易让人无所适从。交代清楚是什么,比交代清楚过程更重要。首先要侧重交代一下重要的实体,做什么的?之间的大概关系。更细节的,需要交代一下流程。 1) wms是android service中最复杂的一部分。理解它,对于理解android显示过程以及整个的工作流程,大有裨益。2) 不需要深入到每一行代码。首先需要知道它的作用,它和外部模块的交互作用;更进一步的,需要了解里面关键的数据结构和代码。windows manager窗口管理要解决的问题是什么?1)z-order的计算。需要计算哪些窗口应该显 阅读全文
posted @ 2013-09-18 11:47 keniee 阅读(515) 评论(0) 推荐(0) 编辑
  2013年8月30日
摘要: http://blog.csdn.net/xiaominghimi/article/details/6099194里面有一个关键点 ,就是如果在xml中注册了surfaceview那么一定要提供两个参数的构造函数。更多地有关surfaceview应用的文章,看这里http://www.oschina.net/android/204/ 阅读全文
posted @ 2013-08-30 18:17 keniee 阅读(175) 评论(0) 推荐(0) 编辑
  2013年8月29日
摘要: 1) how to use the gitbub https://help.github.com/2)I want to create a project , like tomcat, however, it can answer some questions from babies.here are the steps.2.1 i already downloaded cocos2d-x code and make it work sucessfully refer to my previous passage.2.2) then I create my own repo in githu. 阅读全文
posted @ 2013-08-29 10:54 keniee 阅读(300) 评论(0) 推荐(0) 编辑
  2013年8月26日
摘要: canvas中包含了作图的方法。 完成作图过程,最基本的四大组件是,canvas, bitmap, drawing prmitive, paint. 其中canvas是画布,包含了作图的方法。作图方法最终需要保存在bitmap当中。 作图的图元,如矩形,轨迹,字,bitmap(是一个图形),paint相当于颜料,它指定了作图的颜色和作图的风格。利用canvas作图,有几种方法,一般而言,用户使用view布局作图,这种方法适合对性能不敏感,并且控件不需要动态改变的情况。如果用户需要自己作图,如video game。则有两种方法。1)可以直接利用view,重载onDraw方法,调用canvas的d 阅读全文
posted @ 2013-08-26 18:36 keniee 阅读(462) 评论(0) 推荐(0) 编辑
  2013年8月25日
摘要: there is a long jounery toward activity to show itself.the last steps that are most interesting are1) add view to wms.this is the best picture I have ever get to describe the process.1) a decor view is registed to wms. decor view works as the root of the view hierachy, it's actually a viewgroup 阅读全文
posted @ 2013-08-25 11:25 keniee 阅读(369) 评论(0) 推荐(0) 编辑