最近因项目需求,需要在存储卡查找文件,经测试发现部分手机挂载路径查找不到,这里分享一个有效的方法。
/**
* 获取所有存储卡挂载路径
* @return
*/
public static List getMountPathList() {
List pathList = new ArrayList();
final String c...
分类:
移动开发 时间:
2015-07-02 19:31:00
阅读次数:
172
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
返回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模式下返回的断言
#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
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
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
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
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
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
// 实现一个函数,求字符串的长度
#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