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
list集合转换JSON出错误意思是:对象”是一个数组。使用jsonarray代替。解决方法:将JSONObject替换为JSONArray代码:JsonConfig jsonConfig = new JsonConfig();jsonConfig.setCycleDetectionStrategy(CycleDetectionStrategy.LENIENT);JSONArray json = ...
分类:
Web程序 时间:
2014-04-29 13:43:21
阅读次数:
1280
- (CGFloat)folderSizeAtPath:(NSString *) folderPath
{
NSFileManager * manager = [NSFileManager defaultManager];
if (![manager fileExistsAtPath:folderPath])
{
return 0;
...
分类:
移动开发 时间:
2014-04-29 13:36:20
阅读次数:
379
NSPredicate:对self每个对象通过谓词进行筛选,判断是否与条件相匹配。原理和用法都类似于SQL查询中的where,作用相当于数据库的过滤取。主要用于从集合中分拣出符合条件的对象,也可以用于字符串的正则匹配
第一、contains 判断
NSArray *array = [[NSArray
alloc]initWithObjects:@"beijing",@"s...
分类:
其他好文 时间:
2014-04-29 13:32:23
阅读次数:
375
当油量不够时从走过的油站中选最大加油量的
#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
Object.prototype.toString & typeof
Object.prototype.toString 获取某个对象属于哪种内置类型
typeof 得到某个对象的类型
区别:
举个例子:
var arr = new Array();
typeof(arr); //object
Object.prototype.toString.call(arr); //[Object Array]...
分类:
其他好文 时间:
2014-04-28 10:33:42
阅读次数:
279
php中奖概率算法,可用于刮刮卡,大转盘等抽奖算法。用法很简单,代码里有详细注释说明,一看就懂
<?php
/*
* 经典的概率算法,
* $proArr是一个预先设置的数组,
* 假设数组为:array(100,200,300,400),
* 开始是从1,1000 这个概率范围内筛选第一个数是否在他的出现概率范围之内,
* 如果不在,则将概率空间,也就是k的值减去刚刚的那个数字的概...
分类:
Web程序 时间:
2014-04-28 10:13:42
阅读次数:
390
微软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