码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
js自定义Map
function Map() { ??? this.elements = new Array(); ?//得到map的大小 ??? this.size = function() { ??????? return this.elements.length; ??? } ?//判断是否为空 ??? this.isEmpty = f...
分类:Web程序   时间:2014-07-22 08:37:36    阅读次数:369
尾递归
尾递归是把递归的一部分放到当层求解, 以缓解递归的栈压力, 我用快排举例说明: 1: 普通快排 void qsort(int *ar, int l, int r){ if(l>=r) return ; int mid = partion(ar, l ,r); qsort(ar, l, mid); qsort...
分类:其他好文   时间:2014-07-22 08:25:36    阅读次数:183
FFT小结
先上模板 1 #include 2 #include 3 const int P=(1>=1,t=t*t%mod)if(k&1)f=f*t%mod;return f;} 6 int a[1j)tmp=x[i],x[i]=x[j],x[j]=tmp;13 for(l=k>>1;(j^=...
分类:其他好文   时间:2014-07-22 08:19:37    阅读次数:416
oralce 判断ip是否在ip段里
oracle方法 CREATE?OR?REPLACE?FUNCTION?IpToLong(ip?in?varchar2) return?number?is?? p1?number;? p2?number;? p3?number; ??begin?? ????p1?:=?instr(ip,?‘.‘,?1,?1);?? ???...
分类:其他好文   时间:2014-07-22 08:13:37    阅读次数:203
JS文件加载:比较async和DOM Script
async与script动态加载都能使文件异步加载,本文叙述它们对页面渲染和load加载的影响方面。目前我用demo.js作为执行文件操作.代码:var now = function() { return +(new Date()); }var t_s = now();while(now() - t...
分类:Web程序   时间:2014-07-21 10:02:47    阅读次数:330
素数槽csuoj
超时代码:#include using namespace std;//写一个函数判断是否是素数bool isPrime(int num){int i=2;//coutnum)return true; else return false;}int main(){ int T; cin>>...
分类:其他好文   时间:2014-07-21 10:01:49    阅读次数:246
Maximum Cardinality Bipartite Matching: Augmenting Path Algorithm
http://www.csie.ntnu.edu.tw/~u91029/Matching.html 1 int nx,ny; 2 int mx[N],my[N]; 3 bool vy[N]; 4 bool g[N][N]; 5 6 int decode(int x,int y) {return...
分类:其他好文   时间:2014-07-21 09:38:46    阅读次数:210
TreeSet排序,存储自定义对象,自定义比较器示例
|--TreeSet:可以对Set集合中的元素进行排序。 底层数据结构是二叉树。 保证元素唯一性的依据:compareTo方法return 0....
分类:其他好文   时间:2014-07-21 09:16:34    阅读次数:1526
UITextView 点return 隐藏键盘
iOS开发中,发现UITextView没有想UITextField中textFieldShouldReturn:这样的方法,那么要实现UITextView return键隐藏键盘,可以通过判断输入的字符是不是回车符来实现。首先,声明要实现UITextView 的delegate。@interface...
分类:其他好文   时间:2014-07-20 21:31:57    阅读次数:224
LeetCode——Remove Nth Node From End of List
Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the...
分类:其他好文   时间:2014-07-20 15:27:41    阅读次数:216
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!