- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { NSCharacterSet*cs; cs.....
分类:
其他好文 时间:
2014-12-26 18:15:12
阅读次数:
212
程序源码:public String getSplitStr(int num) { StringBuffer buf = new StringBuffer(); int i=0; for (Object o : item) { i++; String temp=""; if(o==...
分类:
编程语言 时间:
2014-12-26 18:01:23
阅读次数:
234
今天碰到一个问题,用node.js 执行shell命令时,会碰到有空格的目录和文件名。
按照常识应该要escape,当然可以自己写escape,但是要想处理复杂的escape,不是那么容易的。那么系统有没有提供呢?
google后发现可以使用
child_process.execFile(file, [args], [options], [callback])
中的args数组来帮自己...
分类:
Web程序 时间:
2014-12-26 16:44:11
阅读次数:
185
http://acdream.info/problem?pid=1019
Problem Description
Now we have a long long string, and we will have two kinds of operation on it.
C i y : change the ith letter to y.
Q i j : check whet...
分类:
编程语言 时间:
2014-12-26 16:41:35
阅读次数:
338
好长时间没写C++了,今天写了个很简单的String类,竟然调试了半天,最终发现了一个十分隐蔽的陷阱,写出来供大家分享。
C++中类的拷贝构造函数的作用就是通过类的一个对象来实例化另一个对象。下面是我写的一个MyString类,头文件MyString.h:
#include
using namespace std;
class MyString
{
public:
MyString();...
分类:
编程语言 时间:
2014-12-26 16:41:10
阅读次数:
171
类型是程序的基础。类型告诉我们数据代表什么意思以及可以对数据执行那些操作。C++语言定义的几种类型:字符型整型浮点型还支持自定义数据类型数据类型确定了数据和操作在程序中的意义i=i+j;int:5=2+3;string:hello world = hello + world;2.1.基本内置类型计算...
分类:
编程语言 时间:
2014-12-26 16:30:58
阅读次数:
266
System.Windows.Forms.DialogResult result = MessageBoxEx.Show("保存成功", Language.String.Hint, MessageBoxButtons.OK, MessageBoxIcon.Information); ...
分类:
其他好文 时间:
2014-12-26 16:19:55
阅读次数:
146
要使用GridPanel,首先要定义Store,而在创建Store的时候必须要有Model,因此我们首先来定义Model:Ext.define("Gpsdata", {
extend: "Ext.data.Model",
fields: [
{ name: 'gpstime', type: 'string' },
{ name: 'gpstemp',...
分类:
数据库 时间:
2014-12-26 14:41:30
阅读次数:
510
Substring
时间限制:1000 ms | 内存限制:65535 KB
难度:1
描述
You are given a string input. You are to find the longest substring of input such that the reversal of the substring is also a substrin...
分类:
其他好文 时间:
2014-12-26 14:40:43
阅读次数:
236
直接上代码:String reg = "\\D+(\\d+)$"; //提取字符串末尾的数字:封妖塔守卫71 == >> 71 String s = monster.getMonsterName(); Pattern p2 = Pattern.compile(reg); Matcher ...
分类:
编程语言 时间:
2014-12-26 14:33:36
阅读次数:
1464