码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
QT读文件夹内所有文件名
void monizhuzhan::filenameInDir(){ //判断路径是否存在 QDir dir(path); if(!dir.exists()) return; //查看路径中后缀为.cfg格式的文件 QStringList filters; filters<<QString("*.....
分类:其他好文   时间:2015-07-10 13:26:24    阅读次数:141
乘法逆元+排列组合模板
妈妈呀我终于会写乘法逆元+排列组合了。 1 void exgcd(int a,int b,int&x,int&y){ 2 if(b==0){x=1;y=0;return;}exgcd(b,a%b,x,y);int t=x;x=y;y=t-a/b*y; 3 } 4 int qpow(int x...
分类:其他好文   时间:2015-07-10 13:08:42    阅读次数:142
go 语言学习笔计之结构体
go 语言中的结构体方法结构体名称的大小写有着不同的意义: 小写表示不能被别的包访问package mainimport "fmt"type Rect struct { width,height int}func (r *Rect) area() int { return r.width*r.hei...
分类:编程语言   时间:2015-07-10 12:53:15    阅读次数:141
IOS图片压缩上传服务器终极解决方案
我最终才去的方案如下: /** * 动态发布图片压缩 * * @param source_image 原图image * @param maxSize 限定的图片大小 * * @return 返回处理后的图片 */ - (NSData *)resetSizeOfImageData:(UIImage *)source_image maxSize:(NSInteg...
分类:移动开发   时间:2015-07-10 11:32:34    阅读次数:312
leetCode 41.First Missing Positive (第一个丢失的正数) 解题思路和方法
First Missing Positive  Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in ...
分类:其他好文   时间:2015-07-10 11:27:12    阅读次数:92
随机数
1. 取某个范围的任意数public static String getRandom(int min, int max){Random random = new Random();int s = random.nextInt(max) % (max - min + 1) + min;return S...
分类:其他好文   时间:2015-07-10 11:17:52    阅读次数:95
有return的情况下try catch finally的执行顺序(转)
结论:1、不管有木有出现异常,finally块中代码都会执行;2、当try和catch中有return时,finally仍然会执行;3、finally是在return后面的表达式运算后执行的(此时并没有返回运算后的值,而是先把要返回的值保存起来,管finally中的代码怎么样,返回的值都不会改变,任...
分类:其他好文   时间:2015-07-10 11:02:17    阅读次数:97
bzoj1085骑士精神 A*
A*搜索 实际上只有空格再走 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #define rep(i,l,r) for(int i=l;ians) return 0;34 ret...
分类:其他好文   时间:2015-07-10 10:56:12    阅读次数:136
关于this的例子解说:引用高级程序第三版中的代码 this在ECMA中介绍的比较复杂。很多我都没看懂。
var name = "The Window";var object = {name : "My Object",getNameFunc : function(){return function(){return this.name; //这里之所以是全局对象是因为调用函数getNameFunc()...
分类:其他好文   时间:2015-07-10 10:55:44    阅读次数:120
[LeetCode][Java] Letter Combinations of a Phone Number
题目: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Input...
分类:编程语言   时间:2015-07-10 09:41:01    阅读次数:181
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!