// 创建保存照片文件夹
private void CreateFileJPG() {
File file = new File("/sdcard/image");
if (!file.exists()) {
try {
file.mkdirs();
} catch (Exception e) {
// TODO: handle exceptio...
分类:
移动开发 时间:
2014-05-15 06:39:58
阅读次数:
434
利用默认的内存管理函数new/delete或malloc/free在堆上分配和释放内存会有一些额外的开销。
系统在接收到分配一定大小内存的请求时,首先查找内部维护的内存空闲块表,并且需要根据一定的算法(例如分配最先找到的不小于申请大小的内存块给请求者,或者分配最适于申请大小的内存块,或者分配最大空闲的内存块等)找到合适大小的空闲内存块。如果该空闲内存块过大,还需要切割成已分配的部分和较小的空...
分类:
其他好文 时间:
2014-05-15 02:56:28
阅读次数:
227
Launch Eclipse and click Help > Install New Software....
Click Add.... In the Add Repository dialog, set the Name to "Force.com IDE" and the
Location to "http://media.developerforce.com/...
分类:
系统相关 时间:
2014-05-15 02:51:11
阅读次数:
480
大家都知道,在java中的集合Map中按键值key排序比较简单,只需引用集合TreeMap即可,可是怎样实现按value值排序呢?下面我们来测试一下:
public class TestHashMap {
public static void main(String[] args) {
Map map = new HashMap();
map.put("zhangsan", 1);
...
分类:
其他好文 时间:
2014-05-15 02:37:34
阅读次数:
263
1.面向对象直接定义类class People {public: void sayHello() {
printf("hello c oop \n"); }}; People * p = new People();
p->sayHello();使用头文件定义Ml...
分类:
编程语言 时间:
2014-05-15 02:23:54
阅读次数:
440
//创建xhr对象 兼容方式function createXmlHttp() { var
xhobj = false; try { xhobj = new ActiveXObject("Msxml2.XMLHTTP"); // ie
msxml3.0+ } catch...
分类:
Web程序 时间:
2014-05-14 23:07:47
阅读次数:
498
代理普通代理
很多时候,我们使用别人代码往往会发现别人代码的功能并不是十分符合我们的需求,调用别人的方法的时候,总是先new一个对象,然后我们的前处理做完,然后调用别人代码的方法,再加入后处理,这样做往往十分麻烦。代理就为其他类提供了一种控制其对象的方法。代理类和委托类必须实现同一个接口,这样代理....
分类:
编程语言 时间:
2014-05-14 22:33:26
阅读次数:
457
控制台钢琴小程序
static void Main(string[] args)
{
WindowsMediaPlayer wmp = new WindowsMediaPlayer();
wmp.URL=@"f:\all of musics\kukuku\hisaishi joe - ballade.mp3";...
分类:
其他好文 时间:
2014-05-14 20:28:08
阅读次数:
257
1、
??
Distinct Subsequences
Given a string S and a string T, count the number of distinct subsequences of T in S.
A subsequence of a string is a new string which is formed from the original str...
分类:
其他好文 时间:
2014-05-14 20:22:58
阅读次数:
275
目前最完整的,需要注册的动作匹配如下:
IntentFilter intentFilter = new IntentFilter(Intent.ACTION_MEDIA_MOUNTED);
intentFilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED);
intentFilter.addAction(Intent.ACT...
分类:
移动开发 时间:
2014-05-14 14:45:27
阅读次数:
361