从网上学习了MAT插件来查看内存使用情况,分析之后发现手上的应用对本地图片这边的内存损耗很大,查了相关资料之后发现,如果采用setImageBitmap、setImageResource这些来加载本地资源,会产生较大的损耗。因为这些方法在完成 decode 后,最终都是通过 Java 层的 crea...
分类:
移动开发 时间:
2015-01-29 19:21:44
阅读次数:
213
原题地址动态规划题,注意0导致的小陷阱。代码: 1 int numDecodings(string s) { 2 if (s.empty() || s[0] '9') return 0; 3 4 int sum = s[s.length() - 1...
分类:
其他好文 时间:
2015-01-29 14:00:55
阅读次数:
150
在Google的开发文档的guide的menu里面,提到上下文菜单的两种形式。
There are two ways to provide contextual actions:
In a floating context menu. A menu
appears as a floating list of menu items (similar to a dialog...
分类:
其他好文 时间:
2015-01-29 12:50:54
阅读次数:
143
源码来源:TI DM8168EZSDK OMX examples decode_display
基本执行流程如下:
ilclient.c //主体程序文件
↓
void IL_ClientInputBitStreamReadTask (void*threadsArg);...
分类:
其他好文 时间:
2015-01-27 21:54:49
阅读次数:
392
How many ways
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3268 Accepted Submission(s): 1930
Problem Description
这是一个简单的生存游戏,...
分类:
其他好文 时间:
2015-01-27 20:25:56
阅读次数:
170
NOTE:看来Android文档过来做个笔记,并没有详细去写这些东西。BitmapFactory提供的decode方法直接去decode的话,会造成oom异常。要设置BitmapFactory.Options 的inJustDecodeBounds为true。将图片信息decode出来,此时并没有真...
分类:
其他好文 时间:
2015-01-27 20:16:19
阅读次数:
200
Largest palindrome product
Problem 4
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the largest p...
分类:
编程语言 时间:
2015-01-27 09:34:40
阅读次数:
223
今天给一个小程序写后台,通过调用百度翻译API实现翻译功能。
调用百度API的url为'http://openapi.baidu.com/public/2.0/translate/dict/simple?client_id=你的KEY&q=要查的汉语&from=zh&to=en';
申请步骤详见点击打开链接
以上是前期准备工作
===============================...
Decode WaysA message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded me...
分类:
其他好文 时间:
2015-01-26 20:47:54
阅读次数:
163