- 博客(50)
- 资源 (2)
- 收藏
- 关注
转载 android am start
转自:http://d.hatena.ne.jp/minghai/20080809/p1 to launch galley:adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/DCIM/Camera/IMG_19700102_015616.jpg -t image/jpeg2008-0
2012-01-20 13:23:53
1903
转载 深入理解extern "C"
http://www.cnblogs.com/lichkingct/archive/2009/07/21/1527893.html一、从C与C++编译连接方式深入理解extern "C".C和C++对函数的处理方式是不同的.被extern "C"修饰的变量和函数是按照C语言方式编
2011-07-07 17:42:04
407
转载 C++中const用法总结
http://www.cnblogs.com/lichkingct/archive/2009/04/21/1440848.html1. const修饰普通变量和指针const修饰变量,一般有两种写法:const TYPE value;TYPE const value;这两种写法在
2011-07-07 17:19:15
417
原创 android show dialog
<br /><br />用于响应点击dialog 之外的区域<br />public void showProgressDialog(){<br /> if(mPd == null || !mPd.isShowing()){<br /> if(mPd == null){<br /> mPd = new ProgressDialog(this){<br /> public boolean dispatch
2011-02-24 17:03:00
1339
原创 hibernate选项不见了
<br />公司的笔记本,内存从1G升级到1.5G, hibernate选项竟然不见了。 电源管理选项卡里面也没有,bios很简陋,什么都没有。<br />折腾很久后,查到了解决方法。<br /> <br />开始菜单的运行里面输入"cmd"然后进入命令行,再输入"powercfg /h on",可以打开休眠功能.果然有效, 哈哈。
2010-06-24 10:11:00
1345
原创 fastcall, stdcall
#include struct pt_test{ int a; char b; int c; int d; char e;};int __attribute__((regparm(3))) fastcall_test2(struct pt_test reg){ printf("fastcall2, reg.a=%c, b=%c, c=%c, d=%c, e=%c/n", reg.a, reg.b, reg.c, reg.d, re
2010-06-23 18:27:00
843
转载 c语言宏定义的连接符##和#转字符串
<br />转自: http://cww0403.bokee.com/6889144.html<br /><br />(一)宏定义中的## 连接符与# 符 <br />## 连接符号由两个井号组成,其功能是在带参数的宏定义中将两个子串(token)联接起来,从而形成一个新的子串。但它不可以是第一个或者最后一个子串。所谓的子串(token)就是指编译器能够识别的最小语法单元。具体的定义在编译原理里有详尽的解释,但不知道也无所谓。同时值得注意的是#符是把传递过来的参数当成字符串进行替代。下面来看看它们是怎样工作
2010-06-18 10:51:00
797
原创 adb shell am start -n com.google.android.contacts/.ContactsActivity
adb shell am start -n com.google.android.contacts/.ContactsActivity
2010-05-27 18:20:00
4314
原创 内存对齐和char d[0], char *d
#include #include int main(){ struct aa{ int a; int b; char c; char d[0]; };#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) //
2010-05-19 17:06:00
1679
1
原创 useful scripts for memo
for i in res/drawable/thumb_???.pngdobasename=`echo $i | cut -d/ -f 3|cut -d. -f 1`echo $basenameindex=`echo $basename|cut -d_ -f2`echo $indexsvn mv res/drawable/$basename.png res/drawable
2010-04-22 14:48:00
563
原创 Notes on Logical Address: segment selector/descriptor/table
Segment Selector: 16-bitfield ==> segment identifier ━┓ ┣━ LogicalAddress
2010-02-04 17:43:00
1152
原创 可启动镜像
当一个文件的第511, 512个字节是0x55, 0xaa时,就被认为是x86 boot sector #dd if=/dev/zero of=test.bin bs=512 count=1然后用hexedit将0x1fe位置设为0x55, 0x1ff位置设为0xaa #file test.bintest.bin: x86 boot sector
2010-02-03 15:03:00
548
原创 dd
dd的时候,当source小于target的时候,加上conv=notrunc就不会把target截短了。如:dd if=joy.bin of=tinix.img conv=notrunc joy.bin就只覆盖tinix.img的前半部分,后面的数据不会变。
2010-02-03 14:54:00
450
转载 INT 10
INT 10h / AH = 0 - set video mode.input:AL = desired video mode.these video modes are supported:00h - text mode. 40x25. 16 colors. 8 pages.03h - text mode. 80x25. 16 colors. 8 pages.13h - graphical
2010-02-02 15:46:00
1141
转载 Linux设备驱动编程之内存与I/O操作(转)
转至: http://dev.yesky.com/412/2639912.shtml 对于提供了MMU(存储管理器,辅助操作系统进行内存管理,提供虚实地址转换等硬件支持)的处理器而言,Linux提供了复杂的存储管理系统,使得进程所能访问的内存达到4GB。 进程的4GB内存空间被人为的分为两个部分--用户空间与内核空间。用户空间地址分布从0到3GB(PAGE_OFFSET,在0x86
2009-10-22 14:45:00
500
转载 C++ this指针用法 详解(转)
有下面的一个简单的类: class CNullPointCall{public: static void Test1(); void Test2(); void Test3(int iTest); void Test4();private: static int m_iStatic; int m_iTest;};
2009-10-22 10:26:00
2261
转载 浅谈 Google Skia 图形处理引擎
转至: http://yp.oss.org.cn/software/show_resource.php?resource_id=192 2008 年九月,Google 宣布以改良过的 WebKit 为核心的网络浏览器 Chrome,揭露了众多新特征,比方说崭新的 [V8] JavaScript (ECMAscript) 执行引擎,或许因为太亮眼,掩蔽了所使用另一个开放原始码项目 [sk
2009-09-18 14:14:00
1507
原创 android上用opengl画线
android上用opengl画线/* ** ** Copyright 2006, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in comp
2009-09-17 17:45:00
4460
2
原创 a useful bash script, making use of IFS
IFS=$,/r/nfor i in `adb shell ls /proc/ |grep [1-9].*`doecho /proc/$i/maps:--------adb shell cat /proc/$i/mapsdoneunset IFS
2009-09-17 13:13:00
452
原创 android graphics related modules
frameworks/base/opengl/libs/ ==> libEGL.SO libGLESv1_CM.sofram
2009-09-16 14:30:00
3218
原创 Declare and Definition
声明”向计算机介绍名字,它说,“这个名字是什么意思”。而“定义”为这个名字分配存储空间。无论涉及到变量时还是函数时含义都一样。无论在哪种情况下,编译器都在“定义”处分配存储空间。对于变量,编译器确定这个变量占多少存储单元,并在内存中产生存放它们的空间。对于函数,编译器产生代码,并为之分配存储空间。函数的存储空间中有一个由使用不带参数表或带地址操作符的函数名产生的指针。定义也
2009-09-04 17:35:00
489
原创 Getting grub into a disk image
dd if=/dev/zero of=disk.img bs=1024k count=500 parted disk.img mklabel msdos parted disk.img mkpart primary ext2 0 500 parted disk.img set 1 boot on parted disk.img mkfs 1 ext2 fdi
2009-05-22 15:20:00
361
原创 typeof operator
http://gcc.gnu.org/onlinedocs/gcc/Typeof.html typeof is a way to refer to the type of an expression, supported by gcce.g.#define max(a, b)/({typeof(a) _a = (a);/typeof(b) )_b =(b);/_a>_b
2009-04-10 12:55:00
409
原创 delete event和destroy信号
0. 有关g_signal和gtk_signal Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4
2009-02-11 16:36:00
3720
1
原创 modal dialog 的实现; mainloop的嵌套; g_object_notify的使用方法
modal dialog 的实现gtk中,modal dialog的实现一般是说通过g_main_loop的嵌套来实现的。但最近发现并非如此。是否为modal dialog, 主要由是否调用如下函数控制: 1、gtk_window_set_modal(window, TRUE);而这个函数主要做几件事情: (1)、向window manager设置_NET_WM_STATE ato
2009-02-10 12:45:00
2636
原创 const at the end of function and passing const object in a function call
#include Class B{ public: virtual void print() const { cout }};class A{ public: virtual void print(const B* b) const {
2009-01-23 13:45:00
525
转载 C++中extern “C”含义深层探索
引用自:http://blog.youkuaiyun.com/yydrewdrew/archive/2007/04/03/1550409.aspx1.引言 C++语言的创建初衷是“a better C”,但是这并不意味着C++中类似C语言的全局变量和函数所采用的编译和连接方式与C语言完全相同。作为一种欲与C兼容的语言,C++保留了一部分过程式语言的特点(被世人称为“不彻底地面向对象”),因
2009-01-08 09:03:00
446
原创 how to setup svn repos
how to setup svn repos:1. svnadmin create /home/ted/backup/svn/repos2. /home/ted/backup/svn/repos/conf里面是配置文件 修改好配置文件后,启动svnserver: svnserve -d -r /home/ted/backup/svn/ netstat -lnp | grep
2009-01-07 15:46:00
584
原创 about user time in X domain
_NET_WM_USER_TIME property: this property stores an Xserver time which represents the time of the last user input event received for this window(gdk_x11_set_user_time(GdkWindow *window, guint32 times
2008-12-10 14:27:00
468
原创 gtk中Gource注册过程和将xevent加入本地队列后处理
<!-- @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } --> <!-- @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in }
2008-10-04 16:33:00
1029
原创 notes on GMainLoop and GSource
<!-- @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } --> It is possible to create new instances of GMainLooprecursively. This is often used i
2008-09-27 16:57:00
1008
1
原创 gobject reference count summary
<!-- @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } H3 { margin-bottom: 0.08in } --> Goal: provide a flexible model based onreference counting wh
2008-09-27 13:56:00
655
原创 gobject instantiation
<!-- @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } --> MamanBar *bar = g_object_new(MAMAN_TYPE_BAR, NULL);first instantiation of an object,
2008-09-27 13:42:00
700
转载 use glib-genmarshal to create marshalers
<!-- @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } --> When splitting widget iconview( the one modified by us) out of gtk, we have to face a problem tha
2008-07-10 16:48:00
947
原创 notes on rpmbuild
edit "~/.rpmmacros"%_topdir /mnt/sda3/rpmbuild/ -->specifying rpmbuild top dir. According to current config, RPMS, SOURCES... will be placed under /mnt/sda3/rpmbuild%debug_package %{nil}
2008-06-02 11:16:00
537
原创 gdk pixbuf collections
<!-- @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } --> (1) Creating slidesbase = gdk_pixbuf_new_from_file (argv[1], NULL); result = create_slide (
2008-05-26 13:22:00
1856
1
转载 基于GTK+和X-window的GUI在嵌入式Linux中的应用
嵌入式 Linux 下 GUI 的选择,对大多数开发人员来说是一个需要权衡对比的过程。选择 GTK+ 运行在 X 系统上,然后 X 系统运行在嵌入系统的 framebuffer 上,这会是一个很好的选择。
2008-04-23 21:31:00
731
Booting Linux-The History and the Future.pdf
2009-05-28
Linux 3D Graphics Programming.pdf
2009-02-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人