码迷,mamicode.com
首页 >  
搜索关键字:end    ( 30778个结果
n张牌判断是否是顺子
将大小王看成0 排序 然后求出0的个数 如果0的个数大于差值且不为对子就返回true #include //n张牌判断是否是顺子 using namespace std; int partition(int *number,int start,int end){ int temp = number[start]; while(start < end){ while(start ...
分类:其他好文   时间:2014-08-12 13:38:24    阅读次数:142
Hadoop集群内存过高,HDFS存储慢
2014-08-12HDFS存储过慢,内存过高而且不释放网络方面:使用 netstat-n |awk'/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' 查看网络情况:情况如下: CLOSE_WAIT 102 FIN_WAIT2 2 ESTABLIS...
分类:其他好文   时间:2014-08-12 13:07:14    阅读次数:601
js中substring和substr的用法
js中substring和substr的用法substring 方法用于提取字符串中介于两个指定下标之间的字符substring(start,end)开始和结束的位置,从零开始的索引参数 描述 start 必需。一个非负的整数,规定要提取的子串的第一个字符在 stringObject 中的位置。.....
分类:Web程序   时间:2014-08-12 13:05:54    阅读次数:180
OC之KVC的使用
KVC简介KVC(KeyValueCoding)也就是所谓的键/值编码,键/值编码中的基本调用是-ValueForKye:和-setValue:forKey:。例子:定义个Student类,Student.h头文件如下:#import<Foundation/Foundation.h> //学生类 @interfaceStudent:NSObject { NSString*name; intage; } @end..
分类:其他好文   时间:2014-08-12 10:31:34    阅读次数:233
[leetcode]Binary Tree Maximum Path Sum
Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the be...
分类:其他好文   时间:2014-08-11 21:13:02    阅读次数:219
PHP 生成Word文档
'; } function save($path) { echo ""; $data = ob_get_contents(); ob_end_clean(); $this->wirtefile($path, $data); } function wirtefile($...
分类:Web程序   时间:2014-08-11 11:54:22    阅读次数:199
gzip: stdin: unexpected end of file
gzip: stdin: unexpected end of filetar: Unexpected EOF in architar: Unexpected EOF in archivevetar: Error is not recoverable: exiting now从网上下载了一个tar的文...
分类:其他好文   时间:2014-08-11 11:35:22    阅读次数:320
delphi 窗体添加背景图片
var ??Bmp:?TBitmap; procedure?TForm1.FormCreate(Sender:?TObject); begin ??Bmp?:=?TBitmap.Create; ??Bmp.LoadFromFile(‘D:\test.bmp‘); ??Brush.Bitmap?:=?Bmp; end; procedure?TForm1.Fo...
分类:Windows程序   时间:2014-08-11 03:10:41    阅读次数:306
vector
#include //从小到大排列#include#includeusing namespace std;int main(){ int i,x; vectormy ; for(i=1;i>x; my.push_back(x); } sort(my.begin(),my.end()); f...
分类:其他好文   时间:2014-08-10 18:34:30    阅读次数:188
简单的日志系统
參考glog写了现有的Logging系统。直接有enum LoggingEnum{LOG_INFO,LOG_DBBUG,LOG_ERROR,LOG_WARNNING,LOG_END};几种等级的日志,实时刷到console上,异步延迟写到日志上,建立队列缓存日志,时间一到一起刷到file,好了,看下...
分类:其他好文   时间:2014-08-10 15:22:20    阅读次数:297
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!