码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or ...
分类:其他好文   时间:2016-03-28 21:50:30    阅读次数:218
leetcode:Minimum Subarray
1、 Given an array of integers, find the subarray with smallest sum. Return the sum of the subarray. For [1, -1, -2, 1], return -3 2、 1、只需要求出最小值 2、利用su ...
分类:其他好文   时间:2016-03-28 18:48:02    阅读次数:141
网络连接异常处理工具
public class NetStateUtils { /** * 对网络连接状态进行判断 * * @return true, 可用; false, 不可用 */ public static boolean isNetworkConnected(Context context) { if (con ...
分类:其他好文   时间:2016-03-28 16:49:30    阅读次数:124
多重背包问题
多重背包就是完全背包的一个特例 最容易的思想就是转化为01背包去遍历书写 杭电2191 #include<stdio.h> #include<string.h>int max(int x,int y){ if(x>y) return x; else return y;}int main(){ int ...
分类:其他好文   时间:2016-03-28 13:41:21    阅读次数:119
php不常用而又实用的函数
一、时间:1、xdebug_time_index():这xdebug自带的执行时间函数;2、自己拓展的方法及调试:functionmicrotime_float(){list($usec,$sec)=explode("",microtime());return((float)$usec+(float)$sec);}$time_start=microtime_float();usleep(100);$time_end=microtime_float();..
分类:Web程序   时间:2016-03-28 12:05:28    阅读次数:291
【python小练】0010
第 0010 题:使用 Python 生成类似于下图中的字母验证码图片 思路: 1. 随机生成字符串 2. 创建画布往上头写字符串 3. 干扰画面 code: Notes: 1. string.ascii_letters,大小写英文字母集合字符串 2. random.choice():Return ...
分类:编程语言   时间:2016-03-28 02:17:21    阅读次数:440
内存管理
MemoryManage.h #include<string> #include<list> #include<assert.h> #include"TypeTraits.hpp" #include<iostream> usingnamespacestd; structBlockInfo { void*_ptr; string_file; int_line; BlockInfo(void*ptr=0,char*file="",intline=0)// ..
分类:其他好文   时间:2016-03-28 00:29:21    阅读次数:208
Combinations
Combinations Total Accepted: 10949 Total Submissions: 36507My Submissions Given two integers n and k, return all possible combinations of k numbers ou ...
分类:其他好文   时间:2016-03-27 21:01:51    阅读次数:218
关于 bounds 和 frame
-(CGRect)frame{ return CGRectMake(self.frame.origin.x,self.frame.origin.y,self.frame.size.width,self.frame.size.height);}-(CGRect)bounds{ return CGRec ...
分类:其他好文   时间:2016-03-27 19:26:32    阅读次数:131
常用算法之快速幂
#include <stdio.h>long long quickPow(long long a, long long b)///快速幂, a的b次方{ long long c = 1; while(b) { if(b&1)c=c*a; b=b/2; a=a*a; } return c;}int m ...
分类:编程语言   时间:2016-03-27 17:36:28    阅读次数:150
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!