Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Update (2014-11-02):The si...
分类:
其他好文 时间:
2015-04-16 19:18:21
阅读次数:
110
char buf1[] = {0x31,0x32,0x33,0x00,0x51,0x52,0x53,0xaa,0xbb,0xcc,0x00}; int a=0xabcd6799; int b=0x88991122; int d=0x12345678; int c=si...
分类:
其他好文 时间:
2015-04-16 17:02:50
阅读次数:
120
$str=preg_replace("/\s+/", " ", $str); //过滤多余回车$str=preg_replace("//si","",$str); //注释$str=preg_replace("//si","",$str); //过滤DOCTYPE$str=preg_replace(...
分类:
Web程序 时间:
2015-04-16 12:24:17
阅读次数:
145
- (void)centerImageAndTitle:(float)spacing{ // get the size of the elements here for readability CGSize imageSize = self.imageBtn.imageView.frame.si.....
分类:
其他好文 时间:
2015-04-16 12:03:26
阅读次数:
180
随手写了个进制转换的,低级但也有几点注意的:#include#include#includeusing namespace std;stack si;/*这里采用空间换时间的做法,而且可以扩展成任意想要的表示法*/char c_arr[36]={'0','1','2','3','4','5','6'...
分类:
其他好文 时间:
2015-04-15 00:50:26
阅读次数:
178
1. C++static has three methods to use.a. external no need to add static. but it is stored statically.b. internal need to add static. it si stored stat...
分类:
其他好文 时间:
2015-04-14 00:25:11
阅读次数:
230
借助matlab对chipscope采集的数据进行分析,希望对大家有用!1、首先按平时一样用chipscope对数据进行采样!不过为了方便以后导入matlab查看,这里我们建议查看采样信号要使用bus总线方式,这个不多说了,应该都会的。2、点击file->export选项,弹出一个export si...
分类:
其他好文 时间:
2015-04-13 20:26:23
阅读次数:
352
1 // double 浮点类型2 /* 条件表达式的形式:3 表达式1?表达式2:表达式34 如果1的值是turn,(也就是说,条件成立),那么就去计算2,并以他的值作为整个条件表达式的值;5 如果1的值是false,那么就计算3,并以他的值作为整个条件表达式的值*/6 //double si.....
分类:
其他好文 时间:
2015-04-12 19:22:15
阅读次数:
125
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
For example:
Given the following binary tree,
1...
分类:
其他好文 时间:
2015-04-11 17:52:51
阅读次数:
109
题解:
一句话 (a,b)(a,b) 可以理解成一个线段 (a,n?b](a,n-b] 。
然后排个序去下重,最后一个线段的权值 xx 就是表示 这 xx 人互不冲突,一起算。
然后动态规划求若干条不相交线段的权值最大值,最后用总人数减去就行了。
fif_i 表示有 ii 人时最大权值。
fseqi→ r=max ( fsi→ r , fsi→ l+si→ x...
分类:
其他好文 时间:
2015-04-10 15:38:30
阅读次数:
123