You are given a grid of numbers. A snake sequence is made up of adjacent numbers such that for each number, the number on the right or the number belo...
分类:
其他好文 时间:
2014-10-09 14:15:14
阅读次数:
197
当用户触摸屏幕的时候,会产生许多手势,例如down,up,scroll,filing等等。 一般情况下,我们知道View类有个View.OnTouchListener内部接口,通过重写他的onTouch(View?v,?MotionEvent?event)方法,我们可以处...
分类:
其他好文 时间:
2014-10-09 13:46:19
阅读次数:
193
title
描述
Follow up for ”Remove Duplicates”: What if duplicates are allowed at most twice? For example, Given sorted array A = [1,1,1,2,2,3],
Your function should return length = 5, and A is no...
分类:
其他好文 时间:
2014-10-09 03:14:48
阅读次数:
163
归并排序可以有两种思路----top-down 和 bottom-up
top-down:
递归实现,将数组分成两半,分别处理;再合并。
伪代码如下:
split ( A[], l, r)
{
if ( r - l < 2) return;
m = (r + l) / 2;
split ( A, l, m); //split A[l…m-1]
split ( A, m, r); /...
分类:
其他好文 时间:
2014-10-09 02:51:37
阅读次数:
222
在自定义Dialog时显示的界面中老是有黑色的边框,下面就介绍使用style去除黑色边框方法。
首先在values/styles定义自定义样式:
@null
@drawable/actionbar_item_background
true
true
@null
#FFF
@d...
分类:
移动开发 时间:
2014-10-09 01:46:19
阅读次数:
226
第一篇我们就google官方给出的Navigation Drawer demo做了一个简单的介绍,细心的童鞋可能已经发现问题了,google虽然是在support v4中添加的这个控件,但是他给的demo中却使用了ActionBar!ActionBar是...
分类:
其他好文 时间:
2014-10-09 00:10:57
阅读次数:
236
导入一个Maven项目之后发现有一个如下的错误:
Project configuration is not up-to-date with pom.xml. Run project configuration update
其实这个问题解决非常简单:
在项目上右键——【Maven】——【Update Project Configuration……】
这时会打开一...
分类:
其他好文 时间:
2014-10-08 18:05:35
阅读次数:
129
====================问题描述==================== 我想在Activity里面用DrawerLayout+Fragment做抽屉菜单,然后在右侧第一个Fragment里面包含ActionBar结果项目运行后,Activity的OnCreate运行到super.o...
分类:
其他好文 时间:
2014-10-08 17:59:55
阅读次数:
166
你可以通过模拟器的启动选项和控制台命令来控制模拟环境的行为和特性。一旦模拟器启动,你就可以通过键盘和鼠标来“按” 模拟器的按键,从而操作模拟器。下面的表格总结了模拟器按键可键盘按键之间的映射关系。模拟器按键 键盘按键后退ESC菜单F1或Page Up开始F2或Page Down呼叫F3挂断F4电源按...
分类:
移动开发 时间:
2014-10-08 12:45:05
阅读次数:
272
====================问题描述==================== 有关actionBar自定义样式...我希望自定义ActionBar中Tab标签页标题的字体样式,应该是在style.xml中添加android:actionBarTabTextStyle样式吧?但是实际却并没...
分类:
其他好文 时间:
2014-10-08 12:41:55
阅读次数:
279