2011年8月4日

64位Windows系统,32位Python, 判断系统是32位还是64位

摘要: 正确方法: A: ) def is64Windows(self): return 'PROGRAMFILES(X86)' in os.environ def getProgramFiles32(self): if self.is64Windows(): return os.environ['PROGRAMFILES(X86)'] else: return os.environ['PROG... 阅读全文

posted @ 2011-08-04 19:19 Cheney Shen 阅读(1363) 评论(0) 推荐(0) 编辑

2011年7月19日

实现类似Andriod Grid效果的列表视图

摘要: 类似ListView滚动卡的问题 阅读全文

posted @ 2011-07-19 20:33 Cheney Shen 阅读(134) 评论(0) 推荐(0) 编辑

eclipse 项目中双击.bat文件的执行路径

摘要: @echo on set pa = %cd% echo %pa% 最后得到的是eclipse文件夹的路径 比如D:\eclipse 阅读全文

posted @ 2011-07-19 19:18 Cheney Shen 阅读(880) 评论(0) 推荐(0) 编辑

Google Chrome 浏览器命令行开关参考 Chrome Command Line Switches

摘要: http://src.chromium.org/svn/trunk/src/chrome/common/chrome_switches.cc 阅读全文

posted @ 2011-07-19 15:16 Cheney Shen 阅读(533) 评论(0) 推荐(0) 编辑

2011年7月13日

Using the XPath Wrappers

摘要: 1. Click current project and find Header Search Paths files double-click on the entry filed. 2. Click the + button and add ${SDKROOT}/usr/include/libxml2 to the paths 3. Then in the Linking subsection... 阅读全文

posted @ 2011-07-13 22:27 Cheney Shen 阅读(132) 评论(0) 推荐(0) 编辑

2011年7月12日

【转】为Xcode 4挑选自己喜欢的字体和颜色(Panic Sans)

摘要: 根据我自己的经验,白底色的编辑器是比较伤眼睛的。在使用编辑器的时候,我会尽量选择暗底色的主题。TextMate 里有不少不错的主题,但xcode中缺省的暗底色主题比较一般。我稍微改动了一下,做了一个新的出来,大概效果如下: 如果需要,可以从这里下载:DarkCity.xccolortheme。然后拷贝到/Developer/Library/PrivateFrameworks/XcodeEdit.f... 阅读全文

posted @ 2011-07-12 16:16 Cheney Shen 阅读(1545) 评论(0) 推荐(0) 编辑

2011年7月11日

Windows eclipse 3.7 Unable to load default SVN Client

摘要: Backgroud:Windows 7, Eclipse 3.7 (indigo), Pydev 2, SubclipseQuestion:Everytime I try to connect to my repository server I get the error, "Unable to load default SVN Client". Solution:Install Subclipse from http://subclipse.tigris.org/update_1.6.x and check all the sub optionsnot http://su 阅读全文

posted @ 2011-07-11 19:27 Cheney Shen 阅读(1611) 评论(0) 推荐(0) 编辑

2011年4月16日

用位数组计算整数中1的个数

摘要: //// main.c// bitcounts//// Created by Cheney Shen on 11-4-16.// Copyright 2011年 __MyCompanyName__. All rights reserved.//#include <stdio.h>static int bitcounts[] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4};int bitcount(unsigned int u) { int n = 0; for(; u != 0; u >>= 4) n += bitc 阅读全文

posted @ 2011-04-16 03:25 Cheney Shen 阅读(326) 评论(0) 推荐(0) 编辑

任意进制的转换函数

摘要: //// main.c// baseconv//// Created by Cheney Shen on 11-4-16.// Copyright 2011年 __MyCompanyName__. All rights reserved.//#include <stdio.h>#include <limits.h>#include <string.h>char* baseconv(unsigned long long, int);int main (int argc, const char * argv[]){ printf("the result 阅读全文

posted @ 2011-04-16 02:56 Cheney Shen 阅读(284) 评论(0) 推荐(0) 编辑

位数组实现用筛法(Sieve of Eratosthnes)计算素数

摘要: //// main.c// bitarray//// Created by Cheney Shen on 11-4-16.// Copyright 2011年 __MyCompanyName__. All rights reserved.//#include <stdio.h>#include <limits.h>#include <string.h>#include <time.h>#define BITMASK(b) (1 << ((b) % CHAR_BIT))#define BITSLOT(b) ((b) / CHAR_BIT 阅读全文

posted @ 2011-04-16 01:57 Cheney Shen 阅读(426) 评论(0) 推荐(0) 编辑

导航