这里只是把解析的数据当日志打出来了 非常简单的xml解析方式 1 package
com.example.demo.service; 2 3 import java.io.IOException; 4 import
java.io.InputStream; 5 6 import ...
分类:
其他好文 时间:
2014-05-23 04:12:53
阅读次数:
308
Given an input string, reverse the string word
by word.For example,Given s = "the sky is blue",return "blue is sky the". 1
Class Solution{ 2 public: ....
分类:
其他好文 时间:
2014-05-23 02:59:21
阅读次数:
260
使用ViewPager作为一个页面进行切换,里面可以存放很多View,但有时在操作View时不小心滑动一下就有可能跳到下一页,这并不是我们想要的,这里就需要重写ViewPager修改它的滑动条件
效果图
程序目录结构
BTViewPager.java
package com.example.viewpagerdemo;
import android.content.Con...
分类:
移动开发 时间:
2014-05-23 02:24:13
阅读次数:
297
package com.example.android_http;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler...
分类:
其他好文 时间:
2014-05-23 01:41:36
阅读次数:
253
【题目】
Given a collection of numbers, return all possible permutations.
For example,
[1,2,3] have the following permutations:
[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1].
【题意】
给定一个数组,生成所有的全排列
【思路】
递归,类DFS...
分类:
其他好文 时间:
2014-05-23 01:08:26
阅读次数:
194
作用域:在一定的空间范围内能够使用。
生存周期:在一定的时间范围内存在。
example:
int f(int x){
static int k=0;
x+=k++;
return x;
}
求f(f(2));
这个结果是2,其中上例中k是一个静态局部变量,它的作用域就是本函数体内部,而它的生存周期确实一直有效,也就是说该变量一旦声明了之后,在内存开辟了一个单元用来存放它,只有在...
分类:
其他好文 时间:
2014-05-22 22:45:05
阅读次数:
261
【题目】
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
For example,
[1,1,2] have the following unique permutations:
[1,1,2], [1,2,1], and [2,1,1].
【题意】
给定一个候选数集合,候选集中可能存在重复数,返回所有的排列
【思路】
...
分类:
其他好文 时间:
2014-05-22 17:32:17
阅读次数:
247
这个问题真是把我折腾的够呛:
package com.example.tupian;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import android.os.Bundle;
import android.os.Handler;
import android.os.Messag...
分类:
其他好文 时间:
2014-05-22 17:03:39
阅读次数:
241
首先我们先看第一个界面吧,使用将手机中的图片扫描出来,然后根据图片的所在的文件夹将其分类出来,并显示所在文件夹里面的一张图片和文件夹中图片个数,我们根据界面元素(文件夹名,
文件夹图片个数,文件夹中的一张图片)使用一个实体对象ImageBean来封装这三个属性package com.example....
分类:
微信 时间:
2014-05-22 16:01:54
阅读次数:
574
参考别人的code, 看似不难的题,其实挺费事的。思想还是:From this example, we
can see that in the first position of the resulting combinations we can chose
number 1-5. Assume t...
分类:
其他好文 时间:
2014-05-21 14:24:04
阅读次数:
241