01 2012 档案

摘要:小宝哥哥技术文章首页博问闪存新随笔联系订阅-->管理随笔- 21 文章- 184 评论- 1strcat memset strcpy strncat等等的总结1.strcat 原型:extern char *strcat(char *dest,char *src); 用法:#include <string.h> 功能:把src所指字符串添加到dest结尾处(覆盖dest结尾处的'\0')并添加'\0'。 说明:src和dest所指内存区域不可以重叠且dest必须有足够的空间来容纳src的字符串。 返回指向dest的指针。 举例: // strc 阅读全文
posted @ 2012-01-29 13:32 张兰云 阅读(503) 评论(0) 推荐(0)
摘要:1 reinterpret_cast'reinterpret_cast'转换一个指针为其它类型的指针。它也允许从一个指针转换为整数类型。反之亦然。(译注:是指针具体的地址值作为整数值?)这个操作符能够在非相关的类型之间转换。操作结果只是简单的从一个指针到别的指针的值的二进制拷贝。在类型之间指向的内容不做任何类型的检查和转换。如果情况是从一个指针到整型的拷贝,内容的解释是系统相关的,所以任何的实现都不是方便的。一个转换到足够大的整型能够包含它的指针是能够转换回有效的指针的。代码:class A {};class B {};A * a = new A;B * b = reinter 阅读全文
posted @ 2012-01-12 17:56 张兰云 阅读(245) 评论(0) 推荐(0)
摘要:push_back: append character to stringerase: erase characters from string string str ("This is an example phrase."); string::iterator it; str.erase (10,8); cout << str << endl; // "This is an phrase."substr: string str="We think in generalities,but we live in deta 阅读全文
posted @ 2012-01-11 17:39 张兰云 阅读(442) 评论(0) 推荐(0)
摘要:http://sourceforge.net/projects/cppcheck/files/ 阅读全文
posted @ 2012-01-10 11:54 张兰云 阅读(152) 评论(0) 推荐(0)
摘要:启动activity: Intent intent=new Intent(this, SignInActivity.class); startActivity(intent);创建一个发邮件的activity Intent intent=new Intent(Intent.ACTION_SEND); intent.putExtra(Intent.EXTRA_EMAIL,recipientArray); startActivity(intent); Figure 1. The activity lifecycle 阅读全文
posted @ 2012-01-09 12:40 张兰云 阅读(189) 评论(0) 推荐(0)
摘要:Bourne-Again Shell Bourne-Again Shell,即bash,是一个开源的GNU项目,旨在替换Bourne Shell。Bourne-Again Shell由Brian Fox开发,现在已经成为最流行的Shell之一,被广泛应用在Linux、Darwin、Windows和Cygwin之上。 除了支持脚本的向后兼容性,bash还吸收了Korn Shell和C Shell的一些特性。例如,命令历史记录,命令行编辑,目录堆栈,很多实用的环境变量,命令行自动完成,等等。 Bash继续发展了一些新的特性,如支持正则表达式和关联数组。 虽然一些特性是bash独有的,但我们仍然可以 阅读全文
posted @ 2012-01-06 09:51 张兰云 阅读(467) 评论(0) 推荐(1)
摘要:遇到的问题是zhanglanyun@zhanglanyun:~$ adb push hello /data/hellofailed to copy 'hello' to '/data/hello': Permission denied然后查找资料,运行命令如下# adb shel# su#mount# mountrootfs / rootfs ro 0 0tmpfs /dev tmpfs rw,mode=755 0 0devpts /dev/pts devpts rw,mode=600 0 0proc /proc proc rw 0 0sysfs /sys sy 阅读全文
posted @ 2012-01-03 14:20 张兰云 阅读(14587) 评论(2) 推荐(0)
摘要:读sdk帮助文档的时候,发现sdk已经提供了说明。使用这种方式就可以避免adb pull下来的文件权限为root。 详见:docs/guide/developing/device.html If you're developing on Ubuntu Linux, you need to add a rules file that contains a USB configuration for each type of device you want to use for development. Each device manufacturer uses a different v 阅读全文
posted @ 2012-01-03 12:47 张兰云 阅读(1905) 评论(0) 推荐(0)