ListView是Android中最常用的控件之一,随着时代发展,RecyclerView有取代它的趋势,但是在一些老代码中,ListView依然扮演着重要的作用。项目中遇到一个需求,需要监听ListView在滑动时滑动的Y轴坐标。这个需求在RecyclerView中computeVerticalS...
分类:
其他好文 时间:
2015-07-15 06:30:46
阅读次数:
118
1.安装jre?http://www.oracle.com/technetwork/java/javase/下载好jre的tar包 tar -zxvf jre-1.x.tar 2.设置环境变量 vim /etc/profile JRE_HOME=/data/jre PATH=$PATH:$JRE_HOME/bin CLASSPATH=./$JRE_HOME/lib...
分类:
其他好文 时间:
2015-07-15 01:23:45
阅读次数:
129
RF是目前比较流行的自动化测试框架,有很多公司都尝试在用。它是一个通用的验收测试和验收测试驱动开发的自动化测试框架(ATDD),它具有易于使用的表格来组织测试过程和测试数据。...
分类:
其他好文 时间:
2015-07-15 01:21:53
阅读次数:
127
查看系统版本:
cat /etc/redhat-release
cat /proc/version
uname -a
cat /etc/issue
查看64位还是32位:
getconf LONG_BIT
file /bin/ls...
分类:
其他好文 时间:
2015-07-15 01:20:48
阅读次数:
211
桥接模式属于结构型设计模式。
设计意图:将抽象部分与实现部分分离,使它们都可以独立的变化。
一看到设计意图,大家可能有些发懵,我们看到的继承和接口不都是抽象和实现分离的吗?尤其是接口和抽象类都是这样的实现啊!那怎么还有这么个桥接的分离呢?
我们先来看个例子。
例如:汽车品牌内置导航仪,我们希望实现,每个品牌的导航仪都可以在任何一个牌子的汽车上安装并启动。
汽车品牌有两个:宝马、奔驰。...
分类:
其他好文 时间:
2015-07-15 01:21:58
阅读次数:
188
在忙的时候,时间总是过的飞快,转眼就半个多月了,也没有顾得上来这歇歇,本打算上周六回家,继续这一篇,一回家倒头就睡,竞然也顾不上了,这半个月也都不知道干了些啥,开会就开了11天,借当下流行的话,我也是醉了。
闲话少说,还是穿回2012年吧,第三个客户。...
分类:
其他好文 时间:
2015-07-15 01:20:23
阅读次数:
146
小总结:所用技术:01.C/S架构,数据存储在XML文件中02.简单工厂模式03.继承和多态04.解析XML文档技术05.深入剖析内存中数据的走向06.TreeView控件的使用核心:通过该项目,我们对业务流程有一个整体把控。对继承和多态有深入的了解下面是类图:主界面图:核心思路: 1 1.首先在频...
分类:
其他好文 时间:
2015-07-15 01:18:51
阅读次数:
378
Well, a classic and interesting problem. The recursion is simplyf(n) = f(n - 1) + f(n - 2), which means that we can either climb ton - 1and then climb...
分类:
其他好文 时间:
2015-07-15 01:16:29
阅读次数:
193
You are givennk-digit integers. You have to rearrange the digits in the integers so that the difference between the largest and the smallest number wa...
分类:
其他好文 时间:
2015-07-15 01:17:15
阅读次数:
244
/* map 向量可以存东西与数的大小无关,只与数的数目有关 */#include#include#include#includeusing namespace std;mapa;int main(){ for(int i = 0; i <= 32000; i++){ a[...
分类:
其他好文 时间:
2015-07-15 01:16:32
阅读次数:
96
(一)巴什博奕(Bash Game):只有一堆n个物品,两个人轮流从这堆物品中取物,规 定每次至少取一个,最多取m个。最后取光者得胜。 显然,如果n=m+1,那么由于一次最多只能取m个,所以,无论先取者拿走多少个, 后取者都能够一次拿走剩余的物品,后者取胜。因此我们发现了如何取胜的法则:如果 n=(...
分类:
其他好文 时间:
2015-07-15 01:17:04
阅读次数:
155
#/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT #/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT 然后保存: #/etc/rc.d/init.d/iptables save 再查看...
分类:
其他好文 时间:
2015-07-15 01:16:50
阅读次数:
205
Number Triangles经典DP。自控老师曾经用了一节课讲这道题。。我以为我早就懂了,居然听不懂那一堆奇怪的公式。果然自控是天书。#include using namespace std;const int N = 1004;int f[N][N], dp[N][N];int main(){...
分类:
其他好文 时间:
2015-07-15 01:15:46
阅读次数:
96
DescriptionAlex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One long winter evening he came up with a game and de...
分类:
其他好文 时间:
2015-07-15 01:14:57
阅读次数:
232
Pascal Code12345678910111213141516171819202122232425262728293031323334353637unitUpperCaseAndLowerCase;interfaceusesWinapi.Windows,Winapi.Messages,Syst...
分类:
其他好文 时间:
2015-07-15 01:16:14
阅读次数:
243
Problem StatementGiven a large array of non-negative integer numbers, write a function which determines whether or not there is a number that appears ...
分类:
其他好文 时间:
2015-07-15 01:13:26
阅读次数:
333
Pascal Code1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556unitGetOverload;interfaceusesWinapi....
分类:
其他好文 时间:
2015-07-15 01:15:32
阅读次数:
109