本文为那些不错的Android开源项目第一篇——个性化控件(View)篇,主要介绍Android上那些不错个性化的View,包括ListView、ActionBar、Menu、ViewPager、Gallery、GridView、ImageView、ProgressBar及其他如Dialog、Toa...
分类:
移动开发 时间:
2014-08-12 18:35:34
阅读次数:
331
Problem Description
Mery has a beautiful necklace. The necklace is made up of N magic balls. Each ball has a beautiful value. The balls with the same beautiful value look the same, so if two or more ...
分类:
其他好文 时间:
2014-08-12 17:29:44
阅读次数:
253
题意:有两堆牌s1,s2,牌数都为c,将s2,s1按给定规则相互交叉组成一堆牌s12,
再将s12最底下的c块给s1,最顶端的c块给s2,依此循环下去,
现在输入s1和s2的初始状态 以及 预想的最终状态s12,
问s1 s2经过多少次洗牌之后,最终能达到状态s12,若永远不可能相同,则输出"-1"。
分析:直接简单模拟此规则就行,关键是如何判断是否永远不可能达到预想的s12,
若s1和s2在洗牌后的状态,是前面洗牌时已经出现过的一个状态,且这个状态不是预想的状态S12,
就说明无论怎样再洗牌都不可能达到S...
分类:
其他好文 时间:
2014-08-12 17:17:24
阅读次数:
249
ViewAnimator实例源码小Demo+Tab例子,仅供学习~
例子中主要有ImageSwitcher、TextSwitcher、ViewFilpper、Tabs(ActionBar)的使用
源码下载地址:http://yunpan.cn/QacbksIx2Snme (提取码:acc0)...
分类:
其他好文 时间:
2014-08-12 17:16:34
阅读次数:
174
actionbar使用的一些技巧,希望能帮助到需要的朋友...
分类:
其他好文 时间:
2014-08-12 17:16:14
阅读次数:
139
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 space i...
分类:
其他好文 时间:
2014-08-12 16:40:14
阅读次数:
157
http://acm.hdu.edu.cn/showproblem.php?pid=1505题意:R为被占位置,F为空位,求出最大子空矩阵大小*3.思路:1、悬线法,记录每个位置的悬线能到达的左边和右边最远位置。然后维护面积最大值。每个点计算一次。这是我第一个扫描法的题,从上由下扫描,up[i][j...
分类:
其他好文 时间:
2014-08-12 16:07:34
阅读次数:
172
Beat 'Em Up Game Starter Kit (横版格斗游戏) cocos2d-x游戏源码出售...
分类:
其他好文 时间:
2014-08-12 00:42:33
阅读次数:
268
bnu36907 Subpalindromes
字符串hash+线段树
题意:给一个字符串(
1)将指定位置的字符改为c
2)询问l-r的子串,是否是回文串。
解法 :区间维护pl和pr,表示从左到右的hash和从右到左的hash,然后在up和query中合并区间,最后判断pl和pr是否相等即可。
#include
#include
#include
#include
#inc...
分类:
其他好文 时间:
2014-08-11 21:29:52
阅读次数:
301
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?思路...
分类:
其他好文 时间:
2014-08-11 20:48:22
阅读次数:
220