HTML5在路上——HTML5开发者日暨W3C中国6周年庆典

大会官网传送门

Node.js代码阅读笔记之libeio

这个库全称貌似为enhanced IO或者evented IO,用多线程实现了异步IO操作,为什么不用libev实现?因为libev用epoll,不支持regular file。没错,eio就是给fs模块用的。

从demo.c看如何使用:

翻开代码,有个demo.c,操作很多,常用文件io都包括了。精简一下代码,得到一个minidemo.c:

int respipe [2];
void
want_poll (void)
{
char dummy;
printf ("want_poll ()\n");
write (respipe [1], &a[......]

Read more

Reading node.js’source code (2): uv overview

After peered the entry of Node.js, I think I have to read source code deeply in order to understand how does it working.

Beside the v8 engine, the most important is libuv. libuv as a platform layer for Node, its purpose is to abstract IOCP on Windows and libev on Unix systems. Of course, we pay a[......]

Read more

HTML5 Tetris

I wrote a classic tetris program just for touching the canvas component of HTML5.
Unfortunately, I have not run the javascript code by embedding into article successfully
so, Here is the link:
http://www.codingguy.net/tetris.html
notice: there are several bugs and the experience is so terrible :[......]

Read more

Reading node.js’source code (1)

Now we will read Init() which be called at first in Start()

Init(), as the name, is responsible for following work:

  • Parse command line arguments
  • Prepare v8 runtime
    • Set v8 flags (like stack size limit)
    • Set fatal error handler
  • Prepare signal handler
  • uv init

Reading node.js’source code (0)

Node.js is not a single project as there are several components.
You can find them under NODEJS_SOURCE/deps:
http_parser, openssl, uv, v8, zlib

And of course, the source under NODEJS_SOURCE/src is the core of Node.js project. So I start to read the source code at this point. No matter whether i[......]

Read more

Example of Binder Device Access

As well-known, binder driver is the core component of Android IPC mechanism. Either client side or service side use binder lib to complete the communication as usual. But we can also access binder driver directly. Here is an example, we open binder device and get version number var ioctl():

/*[......]

Read more

HOW-TO of Android NDK

How to force the display of build commands:
——————————————-

Do “ndk-build V=1″ and actual build commands will be displayed. This can be used to verify that things are compiled as you expect them to, and check for bugs in the NDK build system.

(The V=1 trick comes f[......]

Read more

09年初写的Android Recovery

找到了以前写的老文档,09年初写的,不管内容怎样,贴出来晒晒~

—————————————————————-

Android Recovery

Android Recovery: 功能简介

Android支持Recovery模式。在某些操作之后,系统会自动重启并进入到Recovery模式,用户按组合键开机(HOME+POWER),也可进入Recovery模式。该模式提供如下功能:

1、擦除用户数据

恢复系统到出厂模式,即擦除用户数据和缓存数据。

2、系统升级

系统升级的概[......]

Read more

[转] Execution in the Kingdom of Nouns

Forward from: http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html

They’ve a temper, some of them—particularly verbs: they’re the proudest—adjectives you can do anything with, but not verbs—however, I can manage the whole lot of them! Impenetrability! That’s what I say!
— Hum[......]

Read more