1.Looper当中loop()方法的作用2.什么是Message对象的Target3.处理一个Message的方法 1 public static void loop() { //静态方法 2 final Looper me = myLooper(); //myLooper是根据...
分类:
其他好文 时间:
2014-09-10 12:08:10
阅读次数:
202
今天在服务器上部署Python程序,发现服务器上缺Requests库,于是设法装上,CentOS版本怎么安装Python的pip,我之前给出的Ubuntu下apt-get的方法
首先看下服务器系统版本
# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
首先需要先安装下pip
yum install py...
分类:
系统相关 时间:
2014-09-10 10:50:50
阅读次数:
351
环境:操作系统Centos6.5X86_64(final)Nginx-Master:192.168.2.32Nginx-Backup:192.168.3.31VIP:192.168.2.33Web3:192.168.2.29Web4:192.168.2.301、分别在Nginx-Master和Nginx-Backup上安装nginx[root@Nginx-Master~]#rpm-ihttp://nginx.org/packages/centos/6/noarch/RPMS/ng..
分类:
Web程序 时间:
2014-09-09 18:36:30
阅读次数:
387
1、String是最基本的数据类型吗?
基本数据类型包括boolean、byte、char、int、short、long、float、double。
java.lang.String类是final类型的,因此不可以继承这个类、不能修改这个类。为了提高效率节省空间,我们应该用StringBuffer类...
分类:
编程语言 时间:
2014-09-09 18:27:19
阅读次数:
301
所谓的后台线程,是指在程序运行的时候在后台提供一种通用服务的线程,并且这种线程并不属于程序中不可或缺的部分。因此当所有的非后台线程结束时,程序也就终止了,同时会杀死所有后台线程。反过来说,只要有任何非后台线程(用户线程)还在运行,程序就不会终止。后台线程在不执行finally子句的情况下就会终止其r...
分类:
编程语言 时间:
2014-09-09 17:58:39
阅读次数:
197
/**
* 根据手机的分辨率从 dp 的单位 转成为 px(像素)
*/
public static int dip2px(Context context, float dpValue) {
final float scale = context.getResources().getDisplayMetrics().density;
...
分类:
其他好文 时间:
2014-09-09 16:14:19
阅读次数:
175
Tried to install Ubuntu desktop on my Dell Inspiron 1420 but failed, finally work around it and solved the problem. All the problems encountered might be caused by my computer graphical card "NVIDIA GeForece 8400M GS", it has hardware failure before and I ...
分类:
其他好文 时间:
2014-09-09 16:13:09
阅读次数:
266
转自:http://blog.sina.com.cn/s/blog_75247c770100yxpb.html面试的时候,常常会被问到这样一个问题:请您写出一个单例模式(Singleton Pattern)吧。好吧,写就写,这还不容易。顺手写一个: 1 //饥饿模式 2 public final c...
分类:
编程语言 时间:
2014-09-09 15:30:58
阅读次数:
278
public class BaseAction extends ActionSupport implements ModelDriven { private static final long serialVersionUID = 1L; protec...
分类:
其他好文 时间:
2014-09-09 15:20:58
阅读次数:
193
CopyOnWriteArrayList:
public static void main(String[] args) {
final List names = new CopyOnWriteArrayList();
names.add("1");
names.add("2");
names.add("3");
names.add("4");
Itera...
分类:
其他好文 时间:
2014-09-09 12:33:10
阅读次数:
166