101OIO | 12 十二月, 2008 12:25
http://hi.baidu.com/liyangzhao/blog/item/24628f36a93851320b55a9f5.html
http://www.ibm.com/developerworks/cn/linux/l-initrd.html
Open
# mkdir temp ; cd temp
# cp /boot/initrd-2.6.14.2.img initrd-2.6.14.2.img.gz
# gunzip initrd-2.6.14.2.img.gz
# cpio -i --make-directories < initrd-2.6.14.2.img
Make
$ find ./ | cpio -H newc -o > /boot/new-initrd.cpio
1354 blocks
$ cd /boot
$ gzip new-initrd.cpio
$ mv new-initrd.cpio.gz new-initrd.img
101OIO | 08 十二月, 2008 19:25
做了一个调用malloc 分配memory 的小程序.
执行之后,top/ ps -A -o pcpu,pmem,cmd
发现memory 没有分配。
在malloc 后面添加 memset ,memory 才被分配
101OIO | 07 十二月, 2008 22:23
101OIO | 04 十二月, 2008 15:41
please refer to:
http://tips.webdesign10.com/how-to-take-a-screenshot-on-ubuntu-linux
import MyScreenshot.png
or
sleep 10; import -window root MyScreenshot2.png
101OIO | 03 十二月, 2008 20:08
refer to http://www.linux-usb.org/gadget/file_storage.html
Create a windows FAT32 partition.
>fdisk /dev/XXX
Add filesystem
>mkfs.vfat /dev/XXXY
connect your usb mass storage device and host PC(windows) with mini USB.
insert module
>modprobe g_file_storage file=/dev/XXXY removable=y
#The 'removable=1' argument is required to make the device operate as a well known flash disk. If it is omitted Windows will recognize the device as a hard disk and it has to be assigned a drive letter manually.
Now you can see new device tip on your host PC
101OIO | 26 十一月, 2008 22:59
101OIO | 25 十一月, 2008 11:22
在Src 目录下new 几个新的目录和文件,Make 就出现上面的Error 了。
〔问题原因〕
应该是在Make的过程中没有找到 指定的file。
〔解决方法〕
可以在Makefile.am 或者 Makefile 中 加入 VPATH(搜索path)
例如:
VPATH = base utils engineer
101OIO | 23 十一月, 2008 16:48
>abld build winscw udeb
...
Convert files...
之后就no response
[解决方法]
close Emulator and comand line windows , then try again
101OIO | 23 十一月, 2008 16:38
ActivePerl-5.6.1.638
S60-SDK-200634-3.1
Carbide.c++_v1.3
Building an application(HelloWord) for the emulator from the CLI
>bldmake bldfiles
>abld build winscw udeb
ERROR: Unable to identify a valid CodeWarrior for Symbian OS installation
我觉得这个错误提示可能有些问题,它可能需要某个IDE的env setting, 而不一定是CodeWarrior
[解决方法]
windows menu : [开始]->Carbide c++ -> Configure environment for winscw command line
或者是 from command line
cd ..NokiaCarbide.c++ v1.3x86Buildenv_switchenv_update.exe
101OIO | 21 十一月, 2008 17:33
函数的使用范围应该得到最大程度的限制,而不是default 的 globle。
如果不想 global ,就应该在前面加上static (only 在本源文件中使用)
#这个以前没有注意到
#参考来源 <Expert C programming> deep c secrets
# Too Much Default Visibility
101OIO | 21 十一月, 2008 14:22
False:
如果你想在你的Callback 之后继续把signal 传递给system继续处理
True:
如果你想到此为止(不再把signal 传递给system继续处理)
101OIO | 20 十一月, 2008 15:43
101OIO | 20 十一月, 2008 15:38
101OIO | 20 十一月, 2008 11:14
全局静态变量与 全局变量的区别在于全局静态变量只能在被本源文件中使用。
[header.h]
static int i = 0;
void setStatic();
[s1.c]
#include <stdio.h>
#include "header.h"
int main(int argc, char *argv[])
{
setStatic();
printf("%d %dn",&i, i);
return 0;
}
[s2.c]
#include <stdio.h>
#include "header.h"
void setStatic()
{
i = 1;
printf("%d %dn",&i, i);
}
gcc header.h s1.c. s2.c
./a.out
就可以看到 s1 和 s2 中i 具有不同的地址空间,也就是两个不同的变量。
查看全文101OIO | 17 十一月, 2008 13:35
| « | 一月 2009 | » | ||||
|---|---|---|---|---|---|---|
| 一 | 二 | 三 | 四 | 五 | 六 | 日 |
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |