- 博客(13)
- 资源 (4)
- 收藏
- 关注
原创 Linux 网络设置(防火墙,组播转发,wifi热点)
1、 iptables 配置防火墙,实现路由和网关等功能http://baike.baidu.com/view/504557.htmhttp://www.cnblogs.com/JemBai/archive/2009/03/19/1416364.htmlhttp://linux.ccidnet.com/pub/html/tech/iptables/index.htmhttp://l
2013-02-27 18:47:04 3081
原创 Android优化技巧
1、去掉锁屏功能:1)、在frameworks/base/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java修改:------------------------------------------- /** * External apps (like the phone app) ca
2013-02-25 19:25:32 1343
原创 编译Android4.0.4
1、搭建Android4.0.4编译环境;按照 http://developer.mips.com/android/android-porting-guide/ 的guide下载和编译source code;2、在build/envsetup.sh中加入如下代码:export TARGET_TOOLS_PRFIX=mips-linux-gnu-export USE_CCACHE=1
2013-02-25 16:23:10 1282
原创 define的作用域
1、#define的作用域问题:#include#includevoid toDefine(){#define TEST}void testDefine(){#ifdef TEST printf("Defined \n");#else printf("not defined \n");#endif}void main(void){
2013-02-20 09:32:49 2535
原创 不使用第三方变量交换x,y
经典面试题整理1、不使用第三方变量交换x,y1. x ^=y y ^=x x ^=y2. x=x+y y=x-y x=x-y3. x=x-y y=y+x x=y-x4. x=y-x y=y-x x=x+y5.x=x*y y=x/y x=x/y6.x=y/x y=y/x x=x*y2、死锁产生的原因及四个必要条件产生死锁的原因主要是:(1) 因为系统资源不足。
2013-02-19 13:40:33 747
原创 GNU 的入口和出口配置函数的使用以及函数调用栈追踪
1、gcc参数-finstrument-functions,__cyg_profile_func_enter 函数和__cyg_profile_func_exit 函数的使用://#define _GNU_SOURCE #include #include #include //#define __USE_GNU#include __attribute__((no_ins
2013-02-19 10:30:03 915
原创 排序算法实现(C/C++)
1、冒泡排序: 和快速排序一样属于交换排序的一种#include#include#include#define LEN 10int generate_array(char *array){ int i=0; srand((unsigned)time(NULL)); for(i=0;i<LEN;i++){
2013-02-19 07:56:09 506
原创 书
已读:1、《总裁日记》2、《浪潮之巅》3、《异类--不一样的成功启示录》4、《拆掉思维的墙--原来我还可以这样活》5、《乔布斯传》6、《Facebook效应》7、《大数据时代》8、《第五项修炼》9、《这个历史挺靠谱》未读:2、技术1)、linux内核修炼之道2)、深入理解LINUX内核3)、Linux内核设计与实现4)、Linux
2013-02-18 09:42:09 532
原创 Linux快捷命令
1、!! 执行上一条命令2、!cd 执行上一天cd的命令 cd可以换为其他命令3、cd - 更改到上一次的目录4、sudo !!以root账户执行上一条命令
2013-02-17 15:37:43 519
原创 技术网站
1、IBM DeveloperWorkshttp://www.ibm.com/developerworks/cn/ 2、Intel® Developer Zonehttp://software.intel.com/zh-cn 3、ChinaUnixhttp://www.chinaunix.net/4、51CTOhttp://www.51cto.com/
2013-02-16 22:29:01 703
原创 执行shell命令并读取执行结果——popen()的用法
1、popen()#includevoid call(){ FILE* fp = popen("ls", "r"); char buffer[1024]; int bytes_read = fread(buffer, 1, sizeof(buffer), fp); pclose(fp); if(bytes_r
2013-02-06 10:16:33 5561
原创 ioctl在socket中的一些用法和示例
一、获取以下例程通过ioctl获取设备"eth0"的IP/掩码/硬件址#include "stdio.h"#include "stdlib.h"#include "string.h"#include "net/if.h"#include "arpa/inet.h"#include "linux/sockios.h"int main(int argc,char *argv[]
2013-02-02 17:35:01 1134
原创 解决变参数问题:va_list、va_start、vsnprintf、va_end的使用方法和实例
1、va_list、va_start、vsnprintf、va_end的使用方法和实例#include void test_char(const char* format, ...){ char buf[512]; va_list args; va_start(args, format); vsnprintf(buf, sizeof(buf), form
2013-02-02 15:27:35 1578
html解析器ixml
2013-08-15
设计模式可复用面向对象软件的基础
2012-05-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人