1, .intern() method, return Stringcall .intern() method, will try to add current string into the pool, if the pool already has the string, the method ...
分类:
其他好文 时间:
2014-10-10 00:22:31
阅读次数:
209
char *fun()
{
char str[] = "hello";
return str;
}
这个函数的返回值?以及这个函数在栈上的存储布局
#include
#include
#include
char *fun()
{
char ptr[] = "fda";
int a = 3;
int b = 4; ...
分类:
其他好文 时间:
2014-10-10 00:18:58
阅读次数:
313
Best Time to Buy and Sell Stock I
只能作一次操作时:维护preMin记录之前出现的最小值
代码如下:
int maxProfit(vector &prices) {
if (prices.size() == 0) return 0;
int profit = 0;
int preMin = prices...
分类:
其他好文 时间:
2014-10-10 00:02:08
阅读次数:
204
Two Sum Problem:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indic...
分类:
其他好文 时间:
2014-10-09 23:05:37
阅读次数:
273
int gcd(int a,int b){ int r; while(b!=0) { r=a%b; a=b; b=r; } return a;}
分类:
其他好文 时间:
2014-10-09 23:01:01
阅读次数:
117
结构体相比数组最大特点是,里面可以存放不同类型数值,而数组只能是同种数值。...
分类:
其他好文 时间:
2014-10-09 22:47:27
阅读次数:
206
#pragma mark - 通过控件获取cell-(UITableViewCell*)GetCellFromTableView:(UITableView*)tableView Sender:(id)sender { CGPoint pos = [sender convertPoint:CGPoi....
分类:
其他好文 时间:
2014-10-09 22:41:57
阅读次数:
188
#include #define maxsize 5000char buf[maxsize];char *head = buf;char *new(int size){ //分配元素字长 //可用内存分配完毕 if (maxsize - (buf - head) < size) return ...
分类:
其他好文 时间:
2014-10-09 22:14:27
阅读次数:
173
第一种、直接写子栏目id,用catin{pc:getsql="SELECT*fromv9_newswherestatus=99andcatidin(21,22,23,24,25)orderbyidDESC"num="7"return="data"}{loop$data$r}<li><ahref="{$r[url]}"title="{$r[title]}"target="_blank">{str_cut($r[‘title‘],40)}({date(‘m-d‘,$..
分类:
Web程序 时间:
2014-10-09 20:25:38
阅读次数:
247
import java.util.Scanner;public class hey {/** * @param args */ static int a,b; private static int add(int a,int b) { return a+b; } private static dou...
分类:
编程语言 时间:
2014-10-09 20:21:37
阅读次数:
468