6.ZigZagConversion题目:https://leetcode.com/problems/zigzag-conversion/stringconvert2(strings,intnumRows){
if(s.length()<2||numRows<2)
returns;
intcycle=2*numRows-2;
stringtmp;
stringresult;
for(inti=0;i<numRows;i++)
{
if(i==0||i==numRow..
分类:
Web程序 时间:
2016-08-09 00:48:51
阅读次数:
196
Android程序有很多Activity,比如说主窗口A,调用了子窗口B,如果在B中直接finish(), 接下里显示的是A。在B中如何关闭整个Android应用程序呢?本人总结了几种比较简单的实现方法。 1. Dalvik VM的本地方法 android.os.Process.killProces ...
分类:
移动开发 时间:
2016-07-31 17:22:01
阅读次数:
138
设置风格:Darcula 字体大小 鼠标悬浮,快速文档提示: 代码提示 默认文件编码 Settings –> File Encodings 勾选Transparent native-to-ascii conversion 更改properties files、project Encoding、IDE ...
分类:
移动开发 时间:
2016-07-30 16:26:49
阅读次数:
199
6. ZigZag Conversion 6. ZigZag Conversion Total Accepted: 98584 Total Submissions: 398018 Difficulty: Easy The string "PAYPALISHIRING" is written in a ...
分类:
其他好文 时间:
2016-07-25 18:02:03
阅读次数:
230
Implement function atoi to convert a string to an integer. If no valid conversion could be performed, a zero value is returned. If the correct value i ...
分类:
其他好文 时间:
2016-07-23 07:26:53
阅读次数:
141
ART运行时垃圾收集(GC)过程分析 ART运行时与Dalvik虚拟机一样,都使用了Mark-Sweep算法进行垃圾回收,因此它们的垃圾回收流程在总体上是一致的。但是ART运行时对堆的划分更加细致,因而在此基础上实现了更多样的回收策略。不同的策略有不同的回收力度,力度越大的回收策略,每次回收的内存就 ...
分类:
移动开发 时间:
2016-07-19 15:30:23
阅读次数:
186
1.什么是Zygote?在Android中所有的应用程序进程,以及用来运行系统关键服务的System进程都是有Zygote进程负责创建的,因此我们就叫他受精卵,毕竟它真的和受精卵很类似。我们知道,Android的应用程序是由Java编写的,它们不能直接以本地进程的形态运行在Linux上,只能运行在Dalvik/ART虚拟机中。每个应用程序都运行在各自的虚拟机中,应用程序每次运行都要重新初始化并启动虚...
分类:
其他好文 时间:
2016-07-17 00:55:17
阅读次数:
290
整个文件的布局
文件头
索引区
string_ids
type_ids
proto_ids
field_ids
method_ids
数据区
class_def
class_data_item
code_item
data
附录
测试用的Dex的java代码
参考资料
整个文件的布局整个Dex文件可以分成三部分,文件头、索引区、数据区,如下图所示。 文件头
记录Dex文件的概览、包含文件大小、校验...
分类:
其他好文 时间:
2016-07-17 00:04:40
阅读次数:
297
Under the Hood: Dalvik patch for Facebook for Android
Facebook is one of the most feature-rich apps available for Android. With features likepush notifications, news feed, and an embedded version of...
分类:
移动开发 时间:
2016-07-15 21:07:21
阅读次数:
652