码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
Android获取所有存储卡挂载路径
最近因项目需求,需要在存储卡查找文件,经测试发现部分手机挂载路径查找不到,这里分享一个有效的方法。 /** * 获取所有存储卡挂载路径 * @return */ public static List getMountPathList() { List pathList = new ArrayList(); final String c...
分类:移动开发   时间:2015-07-02 19:31:00    阅读次数:172
Android 与 IIS服务器身份验证
1)基础验证: 1 /** 2 * 从服务器取图片 3 * 4 * @param url 5 * @return 6 */ 7 public void getHttpBitmap(final String url) { 8 ...
分类:移动开发   时间:2015-07-02 19:03:04    阅读次数:141
iOS 根据Date获取x分钟前/x小时前/昨天/x天前/x个月前/x年前
返回x分钟前/x小时前/昨天/x天前/x个月前/x年前 - (NSString *)timeInfo { return [NSDate timeInfoWithDate:self]; } + (NSString *)timeInfoWithDate:(NSDate *)date { return [self timeInfoWithDateString:[self st...
分类:移动开发   时间:2015-07-02 17:36:48    阅读次数:151
在Debug模式下中断, 在Release模式下跳出当前函数的断言
在Debug模式下中断, 在Release模式下返回的断言 #define UXY_ASSERT_RETURN_ON_RELEASE( __condition, __desc, ... ) metamacro_if_eq(0, metamacro_argcount(__VA_ARGS__)) (UXY_ASSERT_1(__condition, __desc,...
分类:其他好文   时间:2015-07-02 17:34:29    阅读次数:105
JavaScript封装Ajax(类JQuery中$.ajax()方法)
ajax.js(function(exports, document, undefined){ "use strict"; function Ajax(){ if(!(this instanceof Ajax)) return; return this; } Ajax.prototype = { init: functi...
分类:编程语言   时间:2015-07-02 17:32:51    阅读次数:161
[Leetcode]-Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 题目:合并两个排序后的单链表,要求合并之后也是排序好的 思路:递归合并 /** * Definition fo...
分类:其他好文   时间:2015-07-02 15:50:31    阅读次数:177
[LeetCode]Number of 1 bits
4ms C AC CODE..int hammingWeight(uint32_t n) { int i; unsigned int t; int c = 0; for(i=0;i= (1<<31)) c++; return c;}
分类:其他好文   时间:2015-07-02 15:30:19    阅读次数:129
Leetcode 27 Remove Element
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat...
分类:其他好文   时间:2015-07-02 15:25:15    阅读次数:113
LeetCode:Factorial Trailing Zeroes
Factorial Trailing ZeroesGiven an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.Cred...
分类:其他好文   时间:2015-07-02 13:49:59    阅读次数:101
【c语言】实现一个函数,求字符串的长度
// 实现一个函数,求字符串的长度 #include #include int my_strlen(char const *p) { int count = 0; assert(p != NULL); while(*p) { count++; p++; } return count; } int main() { char *p = "zhaoyaqian"; p...
分类:编程语言   时间:2015-07-02 12:21:28    阅读次数:140
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!