关于点的问题是用string.split("[.]") 解决。关于竖线的问题用 string.split("\\|")解决。关于星号的问题用 string.split("\\*")解决。关于斜线的问题用 sring.split("\\\\")解决。关于中括号的问题用 sring.split("\\[...
分类:
其他好文 时间:
2015-01-08 02:06:20
阅读次数:
164
1. 当没有移动操作可使用时. 如果类的设计者把一个类的移动拷贝和移动运算符重载都声明为 delete, 那么你使用的所谓 "移动 构造函数函数/运算符" 实际上还是拷贝运算符.2. 当移动没有拷贝块时有些情况下, 移动并不比拷贝快, 比如 面对 small string optimization ...
分类:
移动开发 时间:
2015-01-08 00:56:59
阅读次数:
298
通过WebClient从Web服务器下载文件,并保存到wp8手机应用程序的独立存储。
我们可以通过利用webClient_DownloadStringCompleted来获得下载完成所需要的时间,用Stopwatch得到下载的总时间。通常我们都将上传、下载作为异步事件来处理,以便不阻止主线程。
String url = "http://172.18.144.248:8080/upload/...
分类:
Web程序 时间:
2015-01-07 23:40:23
阅读次数:
392
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without
repeating letters for "abcabcbb" is "abc", which the length is 3. Fo...
分类:
其他好文 时间:
2015-01-07 23:40:19
阅读次数:
305
通过键盘输入100以内正整数的加、减运算式,请编写一个程序输出运算结果字符串。
输入字符串的格式为:“操作数1 运算符 操作数2”,“操作数”与“运算符”之间以一个空格隔开...
分类:
其他好文 时间:
2015-01-07 23:39:44
阅读次数:
374
函数reverse_string(char * string)
实现:将参数字符串中的字符反向排列。
要求:不能使用C函数库中的字符串操作函数。
#include
#include
#define SWAP(a,b,c) ((c)=(a),(a)=(b),(b)=(c))
void reverse_string(char * s)
{
char *p=s;
char t...
分类:
编程语言 时间:
2015-01-07 23:36:54
阅读次数:
262
使用unset方法消除数组中的元素
验证代码:
echo "unset数组变量";
$arr=array("name"=>"HOUSE","value"=>6.3);
unset($arr["value"]);
var_dump($arr);
验证结果:
array (size=1)
'name' => string 'HOUSE' (length=5)
总结:...
分类:
其他好文 时间:
2015-01-07 23:36:50
阅读次数:
235
http://codeforces.com/problemset/problem/19/C
Once Bob saw a string. It contained so many different letters, that the letters were marked by numbers, but at the same time each letter ...
分类:
其他好文 时间:
2015-01-07 23:36:29
阅读次数:
221
function GetDeviceType(var OsName, BrowserName: string; var IsMobileDevice: Boolean): string;var I: Integer; BrowserInfo: string; OSTypes, BrowserT...
分类:
移动开发 时间:
2015-01-07 23:32:11
阅读次数:
300
Shell 处理字符串和{}操作1. 获取变量的长度获取字符串长度的方法大概有4种:(以hello world 为例)通过 wc -L $ echo "hello world" | wc -L 11通过expr length string$ expr length "hello world"1...
分类:
系统相关 时间:
2015-01-07 23:23:09
阅读次数:
288