散打class PushMainSiteCommand(sublime_plugin.TextCommand): def run(self, edit): self.mySettings = setting.setting() if not self.doReloadHeaderConfig(): ...
分类:
其他好文 时间:
2014-10-09 18:37:57
阅读次数:
222
The number of CPU instruction sets has kept growing, and likewise for the operating systems which are able to run and support on more than one CPU sys...
分类:
系统相关 时间:
2014-10-09 17:02:47
阅读次数:
1016
尽管MessageQueue提供了直接读/写的函数接口,但对于程序员来说,一般不直接读/写消息队列。之前了解到,在Looper.loop()函数中,当取出消息后,会回调msg.target对象的handleMessage()函数,而msg.target的类型正是Handler。
/**
* Run the message queue in this thread. Be sure to call
* {@link #quit()} to end the loop.
...
分类:
其他好文 时间:
2014-10-09 16:59:58
阅读次数:
243
mount/dev/sdx/mnt/gentoo
mount-tprocnone/mnt/gentoo/proc/
或
mount-tprocproc/mnt/gentoo/proc/
mount--rbind/sys/mnt/gentoo/sys/
mount--rbind/dev/mnt/gentoo/dev/
mount--rbind/tmp/mnt/gentoo/tmp(gentoo)
可选:mount--rbind/run/mnt/arch/run(arch)
DNS:cp/etc/reso..
分类:
其他好文 时间:
2014-10-09 16:06:18
阅读次数:
172
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
# Check if user is root
if [ $(id -u) != "0" ]; then
echo "Error: You must be root to run this scr...
分类:
其他好文 时间:
2014-10-09 14:51:44
阅读次数:
267
#! /bin/sh
# chkconfig: 2345 55 25
# Description: Startup script for nginx webserver on Debian. Place in /etc/init.d and
# run 'update-rc.d -f nginx defaults', or use the appropriate command on your
#...
分类:
其他好文 时间:
2014-10-09 14:36:04
阅读次数:
322
看过好多对装饰模式的讲解,他们几乎都有一句相同的话:对现有类功能的扩展。不知道大家怎么理解这句话的,之前我把”对功能的扩展“理解成”加功能=加方法“,比如Person类本来有两个功能:Eat 和 Run ,使用装饰模式后,可以再加一个功能:Sleep,这显然是不能的。增加Sleep意味着修改接...
分类:
其他好文 时间:
2014-10-08 18:25:45
阅读次数:
243
导入一个Maven项目之后发现有一个如下的错误:
Project configuration is not up-to-date with pom.xml. Run project configuration update
其实这个问题解决非常简单:
在项目上右键——【Maven】——【Update Project Configuration……】
这时会打开一...
分类:
其他好文 时间:
2014-10-08 18:05:35
阅读次数:
129
[leetcode]There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n))....
分类:
其他好文 时间:
2014-10-08 14:00:15
阅读次数:
147
转自:http://jinguo.iteye.com/blog/286772Runnable是Thread的接口,在大多数情况下“推荐用接口的方式”生成线程,因为接口可以实现多继承,况且Runnable只有一个run方法,很适合继承。 在使用Thread的时候只需要new一个实例出来,调用sta.....
分类:
编程语言 时间:
2014-10-08 08:59:44
阅读次数:
180