Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function ...
分类:
其他好文 时间:
2015-01-27 13:19:46
阅读次数:
141
水题Description The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which f...
分类:
其他好文 时间:
2015-01-27 12:59:41
阅读次数:
109
现在我们来实现一个这样的效果: 屏幕向右滑动超过二分之一屏幕宽度时,松手时,activity从右边滑出;当不够二分之一时,松手之后按,activity回到原来的位置:
首先就是OnTouchEvent了,里面很简单就一个move 和up
@Override
public boolean onTouchEvent(MotionEvent event) {
switch (event.ge...
分类:
其他好文 时间:
2015-01-27 11:10:49
阅读次数:
226
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, w...
分类:
编程语言 时间:
2015-01-27 09:28:10
阅读次数:
160
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2015-01-27 00:10:41
阅读次数:
257
To exit Vim type :q! trash all changes :wq save the changesTo delete from the cursor up to the next word type: dwTo delete from the cursor to the ...
分类:
系统相关 时间:
2015-01-26 22:20:20
阅读次数:
182
关于actionbar的overlay模式请参考 如何让android的actionbar浮动且透明 一文。这篇文章讲的是如何在这种模式下让actionbar不遮住顶部的内容。这 一般是这样的场景,在一个ListView显示图片的界面中,当ListView向下滑动的时候,actionbar是是浮动在...
分类:
移动开发 时间:
2015-01-26 20:59:08
阅读次数:
433
The Sultan's Successors
The Sultan of Nubia has no children, so she has decided that the country will be split into up to k separate parts on her death and each part will be inherited by...
分类:
其他好文 时间:
2015-01-26 17:04:34
阅读次数:
277
需要在AndroidManifest.xml中设置 android:theme="@style/Theme.AppCompat"如果提示找不到,请按下图设置:至于如何引入的方法,请看前一篇。一。使用图片作为背景 直接在代码中引用图片即可public class MainActivity exte.....
分类:
移动开发 时间:
2015-01-26 16:58:05
阅读次数:
223
题目:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty spac...
分类:
编程语言 时间:
2015-01-26 16:57:37
阅读次数:
161