arm-linux

http://armboard.taobao.com/

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 51 下一页

2010年9月25日

摘要: 有4个函数用于字节序的转换。分别针对2字节和4字节。单个字节自然没有字节序的问题。htonl(3) - Linux man pageNamehtonl, htons, ntohl, ntohs - convert values between host and network byte orderSynopsis#include <arpa/inet.h>uint32_t htonl(uint32_t hostlong);uint16_t htons(uint16_t hostshort);uint32_t ntohl(uint32_t netlong);uint16_t ntoh 阅读全文
posted @ 2010-09-25 17:47 arm-linux 阅读(367) 评论(0) 推荐(0) 编辑

2010年9月23日

摘要: 原文链接:http://androidguy.blog.51cto.com/974126/216490大家也许都知道做工艺器或是工厂里做生产某些产品的模具模具。如做一个金属的五角星,只要将钢水罐到五角星的模具模具里就可以很容易地制做五角星。 我们也可以将类比喻成做五角星的模具。而生产出的一个个五角星就是一个个对象。 为了建立不同的对象(有的是金属的、有的塑料的,等等),可通过向模具里灌入不同的液态材料就可以制做。这也相当于向类的构造方法中传入不同的参数(相当于不同的液态材料)。 还有就是接口,如果说类是对象的抽象,那么接口就是类的抽象。我们也可以将接口看成是制做这个五角星模具的规格列表(相当于 阅读全文
posted @ 2010-09-23 21:18 arm-linux 阅读(338) 评论(0) 推荐(0) 编辑

2010年9月20日

摘要: Ruby, Io, PHP, Python, Lua, Java, Perl, Applescript, TCL, ELisp, Javascript, OCaml, Ghostscript, and C Fractal BenchmarkI've always enjoyed fractals, and was curious if scripting languages were up to the task. I wrote a very simple Mandelbrot set generator for my test. Rather than optimizing for 阅读全文
posted @ 2010-09-20 18:24 arm-linux 阅读(816) 评论(0) 推荐(0) 编辑

摘要: 一、定义:struct device_driver结构体被定义在/include/linux/device.h,原型是: 124struct device_driver { 125 const char * name; 126 struct bus_type * bus; 127 128 struct kobject kobj; 129 struct klist klist_devices; 130 struct klist_node ... 阅读全文
posted @ 2010-09-20 10:37 arm-linux 阅读(3701) 评论(0) 推荐(0) 编辑

2010年9月18日

摘要: 尽管我们不能转变制度,也不必定能够转变别人,但我们可以转变自己,因为没有人能够禁止我们不断前进,如果失败或者失意,那只能怪我们自己无能,怪我们自己不擅长学习,不能怪别人没有给您机会,更不能怪这个社会...... 善意的建议:楼主没有必要抗议!甚至是强烈抗议。也没有必要将自己大二开端创业的经历“摆”出来,自满对自己的成长不利,因为今后的路还长。我也不会吸收您的寻衅或者与任何人展开没完没了的争辩,“特例是并非能够广而推之的范例”,我仅仅是闲来无事之时“瞎”掺合而以。因为我总不能将自己在很多年前当工人的时候就有钱购置8万元的PC机,而且用汇编在PC机上写“窗口软件的经历来告诉年轻人或者教训大学生吧! 阅读全文
posted @ 2010-09-18 20:43 arm-linux 阅读(644) 评论(0) 推荐(2) 编辑

2010年9月16日

摘要: 1. 制作patchdiff -crN Component_org Component > 01_Component_xxx.patch2. 打patchpatch -pl < ./01_Component_xxx.patch3. 使用quilt 管理patch#tar xvjf prj-0.1-patches.tar.bz2 Component/# quilt push -a <== 打series所有补丁# quilt pop -a <== 退出补丁# quilt diff >xxx.patch 合并所有补丁 阅读全文
posted @ 2010-09-16 19:44 arm-linux 阅读(1728) 评论(0) 推荐(0) 编辑

摘要: Android 加速度传感器的类型是 Sensor.TYPE_ACCELEROMETER 通过 android.hardware.SensorEvent 返回加速度传感器值。 加速度传感器返回值的单位是加速度的单位 m/s^2(米每二次方秒),有三个方向的值分别是 values[0]: x-axis 方向加速度 values[1]: y-axis 方向加速度 values[2]: z-axis 方向加速度 其中x,y,z方向的定义是以水平放置在的手机的右下脚为参照系坐标原点(如下图) x 方向就是手机的水平方向,右为正 y 方向就是手机的水平垂直方向,前为正 y 方向就是手机的空间垂... 阅读全文
posted @ 2010-09-16 19:26 arm-linux 阅读(3903) 评论(0) 推荐(0) 编辑

摘要: 有的时候,使用sudo apt-get install可能导致意想不到的错误,尤其是中途中断了安装时,错误信息为:Errors were encountered while processing:ttf-dustinkhangmankdeedukdeE: Sub-process /usr/bin/dpkg returned an error code (1)此时可以这样解决:cd /var/lib/dpkgsudo mv info info.baksudo mkdir info重新安装,在此为:sudo apt-get --reinstall install ttf-dustin khangm 阅读全文
posted @ 2010-09-16 17:08 arm-linux 阅读(1209) 评论(0) 推荐(1) 编辑

摘要: 浅析dev目录下设备文件mknod节点gid,uid和mode的如何方便设置init=>handle_device_fd 收到uevent信息=>handle_device_event=>static void handle_device_event(struct uevent *uevent){.../* are we block or char? where should we live? */if(!strncmp(uevent->path, "/block", 6)) {block = 1;base = "/dev/block/&q 阅读全文
posted @ 2010-09-16 10:35 arm-linux 阅读(1314) 评论(0) 推荐(0) 编辑

2010年9月15日

摘要: /system/core/init初始化程序1.执行sigaction函数,对SIGCHILD信号进行处理。实际上暂时屏蔽2.设置umask来清空后面创建文件的mask3. 创建文件系统mount point & mount 内存文件系统4. open_devnull_stdio 0 1 2 is the fd. They are all the file descriptor of /dev/__null__5.open /dev/__kmsg__ as log fd.6.parse_config_file首先打开/init.rc然后读出所有的数据到内存,然后调用parse_conf 阅读全文
posted @ 2010-09-15 12:38 arm-linux 阅读(878) 评论(0) 推荐(0) 编辑

上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 51 下一页