1、什么是ANR 如何避免它?
如果耗时操作需要让用户等待,那么可以在界面上显示进度条。
2、View的绘制流程;自定义View如何考虑机型适配;自定义View的事件
3、分发机制;View和ViewGroup分别有哪些事件分发相关的回调方法;自定义View如何提供获取View属性的接口;
4、Art和Dalvik对比;虚拟机原理,如何自己设计一个虚拟机(内存管理,类加载,双亲委派);JVM内存模型及类加载机制;内存对象的循环引用及避免;
4、ddms 和 traceView;
5、内存回收机制与GC算法(各种算法的优缺点以及应用场景);GC原理时机以及GC对象;内存泄露场景及解决方法;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Main { | |
public static void main(String[] args) { | |
Student.main(); | |
} | |
static class Person<T> { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal object MapTest { | |
@JvmStatic | |
fun main(args: Array<String>) { | |
/*1、准备数据**/ | |
val sku1 = Student(1L, "p1", 100L) | |
val sku2 = Student(2L, "p2", 101L) | |
val sku5 = Student(2L, "p5", 100L) | |
val sku3 = Student(3L, "p3", 102L) | |
val sku4 = Student(3L, "p3", 102L) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("content-type:text/resources;charset=utf-8"); | |
define("DB_HOST", '127.0.0.1:3306'); | |
define("DB_USERNAME", 'root');//数据库的用户名 | |
define("DB_PASSWORD", 'root');//数据库的密码 | |
define("DB_NAME", 'hair_db');//数据库的名称 | |
define("DB_CHARSET", 'utf8');//编码方式 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 数据库配置文件 | |
* Created by PhpStorm. | |
* User: edwin | |
* Date: 2017/6/22 | |
* Time: 19:44 | |
*/ | |
require 'db_config.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 处理接口公共业务 | |
* Created by PhpStorm. | |
* User: edwin | |
* Date: 2017/7/2 | |
* Time: 16:50 | |
*/ | |
require_once("./Response.php"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by PhpStorm. | |
* User: edwin | |
* Date: 2017/7/1 | |
* Time: 01:29 | |
*/ | |
class Response | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void algorithm() throws Exception { | |
// input: | |
int n = 3, m = 4; | |
int[] start = new int[]{0, 5, 2}; | |
int[] end = new int[]{4, 7, 8}; | |
int[] query = new int[]{1, 9, 4, 3}; | |
// output: [1,0,1,2] |