/*功能,给出两个字符串,找出一处最长相同的部分*/char *longestsame(char*,char*);int main(){ char *a = "aaaabbcccc"; char *b = "bccc"; char *ret = longestsame(a,b); print...
分类:
其他好文 时间:
2014-12-10 00:25:01
阅读次数:
261
先上jquery源码: 1 grep: function( elems, callback, inv ) { 2 var retVal, 3 ret = [], 4 i = 0, 5 length = elems.length; 6 i...
分类:
其他好文 时间:
2014-12-09 21:22:12
阅读次数:
373
- (NSString*)checkCarrier
{
NSString *ret = [[NSString alloc]init];
CTTelephonyNetworkInfo *info = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [info subsc...
分类:
其他好文 时间:
2014-12-09 19:43:45
阅读次数:
161
题目简述给定一个大小为 n的序列(nr; 4 int n; 5 ll DP(int i, int mask) 6 { 7 if (i == -1) return 1; 8 ll &ret = dp[i][mask]; 9 if(ret!=-1) return ret;10 ...
分类:
其他好文 时间:
2014-12-09 19:12:49
阅读次数:
235
connect($host, $port); if ($ret === false) { die($redis->getLastError()); } $ret = $redis->auth($user . "-" . $pwd . "-" . $dbname); if (...
分类:
Web程序 时间:
2014-12-09 17:35:43
阅读次数:
280
这道题是水题,当时直接贪心就过了。
多阶段决策,其实应该用dp,他人的代码使用Vector进行预处理。
#include
#include
#include
#include
#include
using namespace std;
int n, a[12];
double dp[1<<12];
double cal(int a, int b, int c){
if(a+b<=c) ret...
分类:
其他好文 时间:
2014-12-09 09:27:28
阅读次数:
160
mu4e启动conkeror首先在mu4e中如果想打开一个链接,用Alt - Enter或者写为 M- Ret, 此时默认conkeror浏览器会启动,图标是firefox。显示快捷键列表C-h b输入一个键,然后解释其功能C-h k打开向导C-h t页面管理关闭当前缓冲q在新buffer打开新页面C-x C-f在新窗口打开新页面C-u C-x C-f切换bufferC-x b 会弹出一个mini...
分类:
其他好文 时间:
2014-12-04 23:13:42
阅读次数:
190
原文:http://thecodeship.com/patterns/guide-to-python-function-decorators/仅此做一个中文翻译:我们知道,python在方法def的使用上,有一些非常强大的功能。譬如,将方法传给一个变量:def sayHI(name): ret...
分类:
编程语言 时间:
2014-12-03 20:47:24
阅读次数:
192
输入:cin>>(相当于scanf)#include using namespace std;int main(){ int number;cout>number; //输入数字cout<<"hello"<<number<<"lll"<<endl; //输出hello+number里面的东西ret....
分类:
编程语言 时间:
2014-12-03 19:05:39
阅读次数:
248
public JsonResult ReturnTest() { return Json(new {myMsg ="hello world"}, "text/html; charset=UTF-8"); //没问题 //ret...
分类:
Web程序 时间:
2014-12-02 17:15:51
阅读次数:
400