对已知中文字符串进行分割,以“(”和“)”来截取字符串;str1="白雪皑皑雪橇行,胡子老人把人惊(落花无声)";print(str1);num1 = string.find(str1,'(')num2 = string.find(str1,')')print(num1,":",num2);prin...
分类:
其他好文 时间:
2015-03-10 16:45:24
阅读次数:
303
一直不清楚MS诸多产品的安装目录下为什么总有个名为1033或者2052的目录搜索一下才知道,原来叫LCID(Locale ID,区域性标识符)常见的如:1033表示英语(美国),2052表示中文(简体)计算公式:primary language(主语言低位)+ 1024 *sub-language(...
分类:
其他好文 时间:
2015-03-10 11:59:42
阅读次数:
132
假设我们要做一个计算器程序var calculator = { add: function( x, y ){ return x + y; }, sub: function( x, y ){ return x - y; }}// 调用calculat...
分类:
编程语言 时间:
2015-03-08 01:20:06
阅读次数:
181
1.基本的Observer模式var Observer = function(){ this.list = [];}Observer.prototype.sub = function(func){ this.list.push(func);}Observer.prototype.pub ...
分类:
编程语言 时间:
2015-03-06 16:49:47
阅读次数:
185
1.新建一工程2.添加"部件" ms windows common controls 6.03.将StatusBar控件加至窗体中4.右键点击该控件,选"属性",可设置其外观,窗格数,字体及图片5.通过代码可改变状态栏中的显示内容如Private Sub Form_KeyDown(KeyCode A...
分类:
其他好文 时间:
2015-03-06 14:08:16
阅读次数:
130
Max SumProblem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,...
分类:
其他好文 时间:
2015-03-05 19:19:15
阅读次数:
161
2015年2月推出的Raspberry Pi2不能用以前的方法安装Lazarus,当安装fpc时出现下面的问题停止安装。从http://otapi.com/2015/02/10/raspberry-pi-2-freepascal-lazarus-and-delphi/找到解决方法:1.安装sub.....
分类:
Web程序 时间:
2015-03-04 16:14:20
阅读次数:
223
把 /usr/share/libtool/config/config.guess 覆盖到相关软件自带的config.guess把 /usr/share/libtool/config/config.sub 覆盖到相关软件自带的config.sub./configure --enable-shared ...
分类:
系统相关 时间:
2015-03-04 12:37:11
阅读次数:
215
菜单是常用的用户界面元素,在Android系统里提供了3种类型的菜单。(1)选项菜单(options menu):按设备上Menu 键显示的菜单。(2)上下文菜单(context menu):长按特定界面view显示,跟具体的 view 绑定在一起,类似PC上鼠标右键菜单。(3)子菜单(sub me...
分类:
移动开发 时间:
2015-03-03 20:08:09
阅读次数:
221
Point: not necessarily contigous max sub array, at least one element should be selected:def maxSubarrCont(arr, n): ret = arr[0] curr = arr[0] ...
分类:
其他好文 时间:
2015-03-03 16:34:35
阅读次数:
127