Mrwrong1988的博客

Mrwrong1988的博客

    • Home
    • Archives
    • About

Java中的enum类型

枚举类型实际上是一个类,实例只能在其中定义,判断相等时直接使用==,枚举类可以包含构造函数,成员变量,成员函数,典型例子1public enum Size { SMALL, MEDIUM, LARGE, EXTRA_LARGE }; 或1234567publi

2017-04-30

Java-WeakReference的理解与使用

在Java里, 当一个对象o被创建时, 它被放在Heap里. 当GC运行的时候, 如果发现没有任何引用指向o, o就会被回收以腾出内存空间. 或者换句话说, 一个对象被回收, 必须满足两个条件: 1)没有任何引用指向它 2)GC被运行. ##导致内存泄漏例子:A a = ne

2017-04-30

FragmentTabHost使用

布局:需要FragmentTabHost和一个容纳tab实际类容的view 如下123456789101112131415161718192021222324252627282930<?xml version="1.0" encoding="u

2017-04-30

EventBus使用

https://github.com/greenrobot/EventBus/blob/master/HOWTO.md ##1:定义事件事件类就是是简单的java类(POJO (plain old Java object) ),没有任何要求1234567public class

2017-04-30

android项目Gradle设置

1.设置debug不同包名,icon等在build.gradle文件中增加applicationIdSuffix12345buildTypes { debug { applicationIdSuffix ".debug"

2017-04-30

Android-Material-Design相关用法

1.DrawerLayout 侧滑布局 To use a DrawerLayout, position your primary content view as the first child with a width and height of match_parent. Ad

2017-04-30

testa

2017-04-30

Shell笔记

变量使用$variable, ${variable_a} 输出到屏幕echoecho -e 对字符串中转义字符进行替换 -E 选项禁止转义,默认也是不转义的;使用 -n 选项可以禁止插入换行符。 for循环for element in collectiondo echo “

2017-04-30

linux相关

adduser + 用户名 passwd + 密码3.解决is not in the sudoers file切换到root用户 su root运行visudo找到root ALL=(ALL) ALL在下面添加一行xxx ALL=(ALL) ALL 其中xxx是你要加入的用户名称

2017-04-30

G^F^W

#简介防火长城(英语:Great Firewall of China,常用简称:GFW,中文也称中国国家防火墙,中国大陆民众俗称防火墙等),是对中国政府在其互联网边界审查系统(包括相关行政审查系统)的统称。此系统起步于1998年,其英文名称得自于2002年5月17日Charles

2017-04-30
Prev123Next

分类

  • Android10
  • C&C++1
  • react3
  • 其他7
  • 网络1

友情链接

  • InfoQ
RSS 订阅

新浪微博

Hello ,I'm Mrwrong in 1988.
Our lives stretched out ahead of us, like a perpetual sunrise.

Powered by hexo and Theme by Jacman © 2017 Mrwrong1988