自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

姥姥教我学编程

芝兰生于深谷,不以无人而不芳

  • 博客(229)
  • 资源 (1)
  • 收藏
  • 关注

转载 Android开发中为什么有人坚持不用JavaBean规范的set、get函数

作者:杨博链接:https://www.zhihu.com/question/19773379/answer/31625054来源:知乎著作权归作者所有,转载请联系作者获得授权。Java语言欠缺属性、事件、多重继承功能。所以,如果要在Java程序中实现一些面向对象编程的常见需求,只能手写大量胶水代码。Java Bean正是编写这套胶水代码的惯用模式或约定。这些约定包括getXx

2016-10-18 11:54:30 3048

翻译 Java反射教程-全面分析

Java Reflection makes it possible to inspect classes, interfaces, fields and methods at runtime, without knowing the names of the classes, methods etc. at compile time. It is also possible to instanti

2016-01-28 11:14:23 622

转载 内存分析工具 MAT 的使用

1 内存泄漏的排查方法Dalvik Debug Monitor Server (DDMS) 是 ADT插件的一部分,其中有两项功能可用于内存检查 :·    heap 查看堆的分配情况·    allocation tracker跟踪内存分配情况DDMS 这两项功能有助于找到内存泄漏的操作行为。Eclipse Memory Analysis To

2015-11-18 15:33:18 541

原创 Java 反射实例

public class AppNameHelper { Constructor mAssetManageCntr = null; Constructor mRourcesCntr = null; Method mMethodAddAssertPath = null; Method mMethodSetConfiguration = null; priv

2015-10-26 21:16:18 636

原创 Android Studio使用Gradle构建错误-Failure initializing default system SSL context

Error:A problem occurred configuring project ':GimeMeFive'.> Could not resolve all dependencies for configuration ':GimeMeFive:_debugCompile'.   > Could not resolve cn.hiroz:uninstallfeedback-lib:

2015-10-22 12:37:30 2060

原创 Android logcat详解

Android日志系统提供了记录和查看系统调试信息的功能。日志都是从各种软件和一些系统的缓冲区中记录下来的,缓冲区可以通过 logcat 命令来查看和使用.      一、使用logcat命令的目的:      1、你可以用 logcat 命令来查看系统日志缓冲区的内容:       [adb] logcat [] ... [] ...       详细内容,请查看Li

2015-10-16 18:02:31 725

原创 Android使用UncaughtExceptionHandler捕获全局异常

Android系统的“程序异常退出”,给应用的用户体验造成不良影响。为了捕获应用运行时异常并给出友好提示,便可继承UncaughtExceptionHandler类来处理。通过Thread.setDefaultUncaughtExceptionHandler()方法将异常处理类设置到线程上即可。    1、异常处理类,代码如下:[java] view plain

2015-09-24 10:24:46 369

原创 UiAutoMator Helper自动运行测试用例

import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io

2015-09-22 18:19:15 1582

原创 Java文件读写文件方式总结

Java文件读写文件方式总结

2015-09-18 14:53:29 374

原创 Java执行命令行问题

String launchTime = ""; try { String logcatCommand = "adb shell logcat -v time -d ActivityManager:I *:S"; Process process = Runtime.getRuntime().exec(logcatCommand); BufferedReader buff

2015-09-17 20:56:10 618

原创 achartengine绘制折线图

参考官网:https://code.google.com/p/achartengine/ public void test() { //准备数据集 XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset(); Random r = new Random(); for

2015-09-17 10:11:58 522

原创 Android报表绘制引擎对比

achartengineandroid-ski-reportichartjscharts4j参考:http://www.doc88.com/p-0807190907598.htmlACharEngine:因为其比较轻便简单,你也可以下载其源码,根据自己的 需要来改其源码从而实现自己所需要的功能.android-ski-report:这个也是免费的,这个没怎么去了解过

2015-09-16 16:46:46 953

原创 Android自动化测试:Robotium在Android Studio中的使用

Android自动化测试:Robotium在Android Studio中的使用

2015-08-04 10:01:52 2860

原创 Java学习线路

入门篇

2015-06-26 17:19:44 435

原创 Android adb授权问题

最近用了两款Android机器,都无法跟电脑进行adb连接,十分郁闷。网上暂时也没有好的解决方案!环境:win8.1系统、大神F1极速版、adb最新版本现象:使用adb命令时,一直出现“error: device unauthorized. Please check the confirmation dialog on your device.”的错误,并且adb设备是离线的。原因:大

2015-05-08 17:34:12 4531

原创 -----------------------要毕业了--------------------------

-------------------------------------------要毕业了----------------------------------------------

2015-04-16 21:03:52 475

原创 Android图像显示系统

1.从Activity说起问题一个Activity界面是如何显示的?2.Surface的分析

2014-12-25 16:45:16 677

原创 Android系统MediaServer分析

1.MediaServer进程/*** Copyright 2008, The Android Open Source Project**** Licensed under the Apache License, Version 2.0 (the "License");** you may not use this file except in compliance with t

2014-12-22 16:58:22 4911

原创 设计模式之代理模式(待续)

设计模式之代理模式的简单

2014-11-17 18:40:11 429

原创 Android之的Looper与Handler分析(待)

Android中的Looper与Handler分析

2014-11-17 17:19:14 651

原创 Android系统之JNI技术(待)

Android系统之JNI技术

2014-11-16 19:54:10 591

原创 读《我的互联网方法论》

最近花了几天时间读完了《我的

2014-11-04 16:52:36 686

原创 LeetCode OJ - Text Justification

Text Justification Total Accepted: 9728 Total Submissions: 69240My SubmissionsGiven an array of words and a length L, format the text such that each line has exactly L characters and is

2014-10-09 14:55:53 555

原创 LeetCode OJ - 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 string by deleting some (can be non

2014-10-09 14:49:33 572

原创 LeetCode OJ - Recover Binary Search Tree

Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is pretty straight forward. Could you devis

2014-09-15 13:13:17 517

原创 LeetCode OJ - Sqrt(x)

Implement int sqrt(int x).Compute and return the square root of x.分析:

2014-09-14 16:55:18 648

原创 LeetCode OJ - Unique Binary Search Trees II

Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example,Given n = 3, your program should return all 5 unique BST's shown below. 1 3

2014-09-14 13:47:17 641

原创 LeetCode OJ - Flatten Binary Tree to Linked List

Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened tree should look like: 1

2014-09-12 23:21:56 556

原创 LeetCode OJ - Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the f

2014-09-11 22:42:19 635

原创 LeetCode OJ - Same Tree

Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.分析:递归

2014-09-11 22:35:27 580

原创 树的遍历转化实现

先序和后序序列构建树:

2014-09-11 22:23:08 566

原创 LeetCode OJ - Word Ladder II

Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can be changed at a timeEach intermediate word must exi

2014-09-11 01:06:32 655

原创 LeetCode OJ - Word Ladder

Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter can be changed at a timeEach intermediate word m

2014-09-09 15:20:19 777

原创 LeetCode OJ - Restore IP Addresses

Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given "25525511135",return ["255.255.11.135", "255.255.111.35"]. (Order

2014-09-08 23:19:19 483

原创 LeetCode OJ - Maximal Rectangle

Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.分析:题目太经典了,

2014-09-08 22:12:38 496

原创 LeetCode OJ - Minimum Window Substring

Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S = "ADOBECODEBANC"T = "ABC"Minimum window is "BAN

2014-09-08 16:59:03 587

原创 LeetCode OJ - Search in Rotated Sorted Array II

Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Write a function to determine if a given target is in the

2014-09-08 16:58:16 461

原创 LeetCode OJ - Sort Colors

Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the integers

2014-09-07 17:20:56 540

原创 LeetCode OJ - Edit Distance

Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted on a word:

2014-09-07 00:23:14 620

原创 《Linux驱动基础篇》- Linux内存管理深入篇

MMU内存管理单元,主要的作用是管理物理内存,当然涉及到虚拟内存和物理内存之间的转化。        内存管理的基本单元是物理页:尽管CPU最小的可寻址单元是字(通常是字节),但是MMU(管理内存并实现虚拟地址到物理地址的转化)通常是以也页单位进行处理的。同时从虚拟内存的角度来看,最小管理单位也是页。不同的体系架构支持的页大小是不一样的。大多数32位的体系架构支持4KB的页,而64位体系结

2014-09-04 00:02:17 536

让Linux驱动不再神秘-新手入门演讲ppt

让Linux驱动不再神秘,新手教学篇,绝对通熟易懂

2014-07-24

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除