码迷,mamicode.com
首页 >  
搜索关键字:integer    ( 14932个结果)
加载ImageView的图片
最近遇到了一个问题,当写一个自定义属性控件的时候,设置的属性传入的图片可以改变。 开始的思路是:自定义的属性为integer类型,那么调用处写如对应图片在res下的id,但是当clean的时候,这个id有可能会改变,所以不能传入id。 所以现在更改为:在设置的自定义属性的地方传入res下对应图片的名字,那么再加载此图片,但是遇到了问题,没有方法直接通过名字来获取对应图片的对象。 下面就介绍加...
分类:其他好文   时间:2014-12-29 18:26:43    阅读次数:122
ecshop商品列表页,循环显示当前分类的二级分类以及分类下的商品
1.includes\lib_goods.php,在最末尾添加几个function/** * 获得指定分类下的子分类 * * @access public * @param integer $cat_id 分类编号 * @return array */ function get_children_tree($cat_id) { if ($cat_id >0 )...
分类:其他好文   时间:2014-12-29 16:56:39    阅读次数:223
性能优化:使用SparseArray代替HashMap<Integer,Object>
HashMap是java里比较常用的一个集合类,我比较习惯用来缓存一些处理后的结果。最近在做一个Android项目,在代码中定义这样一个变量,实例化时,Eclipse却给出了一个 performance 警告。 ? 意思就是说用SparseArr...
分类:其他好文   时间:2014-12-29 15:42:15    阅读次数:143
poj 3233 Matrix Power Series
Matrix Power Series Time Limit: 3000MS   Memory Limit: 131072K Total Submissions: 15997   Accepted: 6840 Description Given a n × n matrix A and a positive integer k, ...
分类:其他好文   时间:2014-12-29 15:24:28    阅读次数:160
poj 3070 Fibonacci
Fibonacci Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9769   Accepted: 6959 Description In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = F...
分类:其他好文   时间:2014-12-29 15:23:38    阅读次数:107
LintCode-Heapify
Given an integer array, heapify it into a min-heap array.For a heap array A, A[0] is the root of heap, and for each A[i], A[i * 2 + 1] is the left chi...
分类:Windows程序   时间:2014-12-29 10:15:48    阅读次数:335
[转]Delphi中进行延时的4种方法
1、挂起,不占CPUsleep2、不挂起,占cpuprocedure Delay(msecs:integer);varFirstTickCount:longint;beginFirstTickCount:=GetTickCount;repeatApplication.ProcessMessages;...
分类:Windows程序   时间:2014-12-29 00:52:46    阅读次数:251
kk Exercise 6.1 Convert an integer to words
Exercise 6-1. write a program that will prompt for and read a positive integer less than1,000 from the keyboard, and then create and output a string t...
分类:其他好文   时间:2014-12-28 23:33:48    阅读次数:190
【LeetCode】First Missing Positive 解题报告
【题目】 Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and use...
分类:其他好文   时间:2014-12-28 22:21:58    阅读次数:242
String to Integer (atoi)
题目描述:Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see be...
分类:其他好文   时间:2014-12-28 18:06:00    阅读次数:167
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!