一个通常的函数调用的例子://声明(一般头文件中)void MyFun(int x);
//此处的申明也可写成:void MyFun( int );int main(int argc, char* argv[]){ MyFun(10);
//这里是调用MyFun(10);函数 return 0;}v...
分类:
其他好文 时间:
2014-07-22 23:06:16
阅读次数:
239
function trimStr(str){ return
str.replace(/(^\s*)|(\s*$)/g,"");}用的时候就是直接 var 变量=trimStr(需要去空格的字符串);
分类:
Web程序 时间:
2014-05-01 15:47:26
阅读次数:
347
Given a strings, partitionssuch that every
substring of the partition is a palindrome.Return the minimum cuts needed for a
palindrome partitioning ofs...
分类:
其他好文 时间:
2014-05-01 14:47:09
阅读次数:
409
#include "stdio.h"/*int* set(int a,int *c){int
*b;b=malloc(sizeof(int)*3);c[0]=a;c[1]=1+a;c[2]=2+a;b[0]=13;b[1]=14;b[2]=15;return
b;}*/char *set(void)...
分类:
编程语言 时间:
2014-05-01 13:56:31
阅读次数:
306
1、return
View();返回值类型:System.Web.Mvc.ViewResult将视图呈现给响应的View()结果。注释View()类的此方法重载将返回一个具有空ViewName属性的ViewResult对象。如果你正在编写控制器操作的单元测试,则需为那些不采用字符串视图名称的单元测试...
分类:
其他好文 时间:
2014-05-01 13:34:10
阅读次数:
399
Reverse digits of an integer.Example1:x = 123,
return 321Example2:x = -123, return -321Have you thought about this?Here are
some good questions to ask...
分类:
其他好文 时间:
2014-05-01 01:20:59
阅读次数:
334
Android调试Source Not Found的错误原因及解决办法!...
分类:
移动开发 时间:
2014-04-29 13:48:21
阅读次数:
362
- (CGFloat)folderSizeAtPath:(NSString *) folderPath
{
NSFileManager * manager = [NSFileManager defaultManager];
if (![manager fileExistsAtPath:folderPath])
{
return 0;
...
分类:
移动开发 时间:
2014-04-29 13:36:20
阅读次数:
379
当油量不够时从走过的油站中选最大加油量的
#include
#include
#include
#include
using namespace std;
#define MAX_N 10005
struct node{
int dist,fuel;
}t[MAX_N];
bool cmp(const node &a,const node &b)
{
return a.dist<b.dis...
分类:
其他好文 时间:
2014-04-28 10:44:43
阅读次数:
335
微软bing搜索每天都会换一张壁纸,而且分辨率都高,很适合当做壁纸,写了一个python去获取张壁纸,代码很简单
import urllib
import re
import time
def getHtml(url):
return urllib.urlopen(url).read()
def getImgUrl(html):
reg=re.compile(r'(http:/...
分类:
编程语言 时间:
2014-04-27 21:31:06
阅读次数:
558