一、显示信息1、Models(模板)private MyDBDataContext _context = new MyDBDataContext(); //定义一个变量取出所有数据 public List Select() { return _con...
分类:
数据库 时间:
2015-07-06 21:17:55
阅读次数:
576
min_element()和max_element
头文件:#include
作用:返回容器中最小值和最大值。max_element(first,end,cmp);其中cmp为可选择参数!
闲言少叙,上代码,一看就懂:
#include
#include
using namespace std;
bool cmp(int a,int b)
{
return a<b;
}
i...
分类:
其他好文 时间:
2015-07-06 19:57:40
阅读次数:
121
Summary Ranges
Given a sorted integer array without duplicates, return the summary of its ranges.
For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"].
Credits:
Special thanks to @...
分类:
其他好文 时间:
2015-07-06 19:49:21
阅读次数:
102
plupload批量上传分片功能,对于文件比较大的情况下,plupload支持分片上传,后台代码如下: /** * * 方法:upLoadSpecialProgramPictrue * 方法说明:本地节目导入 * @return * @autho...
分类:
Web程序 时间:
2015-07-06 19:47:33
阅读次数:
1275
如何使用TP中的公共函数(定义在common/common.php中的函数)(2011-09-30 15:32:09)转载▼标签:杂谈1.在common/common.php 中有个function getName(){return "yangfei";}函数想在任何这个项目中的任何Action中调...
分类:
Web程序 时间:
2015-07-06 19:39:44
阅读次数:
135
辗转相除法 int gcd(int m, int n){ int remainder; while(remainder!= 0){ remiander = m%n; m = n; n = remainder; } return m; }有两整数a和b:① a%b得余数c② 若c=0,则b即为两数的最...
分类:
其他好文 时间:
2015-07-06 19:33:17
阅读次数:
95
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C prog...
分类:
其他好文 时间:
2015-07-06 19:30:44
阅读次数:
115
testGdb.c 1 #include 2 3 int getSum(int a,int b){ 4 printf("a+b=%d\n",a+b); 5 return a+b; 6 } 7 8 int main() 9 {10 int s1=...
分类:
数据库 时间:
2015-07-06 19:30:38
阅读次数:
144
找到dataTables.bootstrap.js(版本3):(此项目中文件名为:dataTableExt.js) 1 $.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings ) 2 { 3 return { 4 ...
分类:
其他好文 时间:
2015-07-06 19:29:44
阅读次数:
200
题目一:写一个函数,输入n,求斐波那契(Fibonacci)数列的第n项。斐波那契数列的定义如下:
效率很低的解法如下:
long long Fibonacci(unsigned int n)
{
if(n
return 0;
if(n==1)
return 1;
return F...
分类:
其他好文 时间:
2015-07-06 18:08:35
阅读次数:
201