03 2012 档案
摘要:/* *计算一个数的二进制中1的个数 */#include int numberOf1InBinary(const unsigned int a);int numberOf1InBinary_Mask(const unsigned int a); int main(int argv , char** argc){ int a = 8 ; printf("the number of 1 in %...
阅读全文
摘要:package test;import java.util.regex.Matcher;import java.util.regex.Pattern;public class RegUtil { /** * 方式一:基本正则表达式实现 * @param str * @param reg * @return */ public static boolean matchMatcher(St...
阅读全文
摘要:今天遇到的问题:写WIFI应用的时候看到Android官方开发文档上写着Context.getSystemService(Context.WIFI_SERVICE).以为直接可以用,可是总是提示Cannot make a static reference to the non-static method getSystemService(String) from the type Context , 搞得我甚是郁闷,原来是这个Context没有实例对象,我测试的时候是这样用的:public void connect(){ WifiManager wifiManager = Con...
阅读全文
摘要:很多时候,是否好好看完一本好书,对一个人的提升往往能达到质的区别刘未鹏:列一下我所认为的,你面试微软前必须要读的十本书: Code: The Hidden Language of Computer Hardware and Software (《编码的奥秘》) Computer System: A Programmer’s Perspective (《深入理解计算机系统》) / Windows ...
阅读全文
摘要:“Just for fun”,我们不需要太多的使命感与焦虑,改变世界也许只是一个顺带的结果。 《代码优化:有效使用内存》(Code Optimization: Effective Memory Usage)((美)Kris Kaspersky)中译本非常深层次的代码优化技术,从硬件的角度来讲代码优化,而且是用C语言实现的。高质量程序设计指南:...
阅读全文
摘要:C语言常用宏定义01: 防止一个头文件被重复包含 #ifndef COMDEF_H #define COMDEF_H //头文件内容 #endif 02: 重新定义一些类型,防止由于各种平台和编译器的不同,而产生的类型字节数差异,方便移植。 typedef unsigned char boolean; /* Boolean value type. */ typedef unsigned long int uint32; /* Unsigned 32 bit value */ typedef unsigned short uint16; /* Unsigned 16 bit value */ .
阅读全文
摘要:Eclipse 编译 Android工程时,提示该错误 :Error generating final archive: Debug certificate expired on xxxxxx(日期) 解决办法: linux:Window--》Preferences--》Android--》Build中Default debug keystore显示了地址“/home/jinli/.android/debug.keystore”,删除此路径下的debug.keystore及 ddms.cfgWindow XP:进入:C:\Documents and Settings\Administrato.
阅读全文
摘要:Why I left GoogleJames WhittakerOk, I relent. Everyone wants to know why I left and answering individually isn’t scaling so here it is, laid out in its long form. Read a little (I get to the punch lin...
阅读全文
摘要:最近打了几天的三国无双6,感觉不错!很久很久以前,一个小学同学带了我到机室玩三国无双。自此,我便喜欢上了这个游戏。现在我玩的游戏内有两个:三国无双和CS。(PS:曾经有些怪我的这个好朋友带我打游戏,但现在想来,若不是他,我的童年又怎么会有欢乐呢。人活着,快乐是最重要的...)因为以前是用专用手柄打的,感觉非常爽。现在的PC版只能用键盘,虽然没什么大碍,但感觉总没那么好。又由于最近在研究蓝牙和And...
阅读全文