今天要用yum安装软件,于是yum install ***,但是报错,错误如下:There was a problem importing one of the Python modules required to run yum. The error leading to this problem...
分类:
其他好文 时间:
2014-07-07 14:55:42
阅读次数:
350
英文版原文地址这是两篇连载文章的第一篇,讲解了如何使用Docker替代Vagrant开发基于Express框架的NodeJs App的部分细节。不过,这次要增加点难度:我们要使用connect-redis在 Redis 中实现 session 功能。第二篇文章将基于此继续。The Node App这...
分类:
移动开发 时间:
2014-07-01 22:32:50
阅读次数:
414
动态地给一个对象增加一些额外的职责。就增加功能而言,Decorator模式比生成子类更为灵活。public class Tank{public abstract void Shot();public abstract void Run();}public class T50 extends Tank...
分类:
其他好文 时间:
2014-07-01 12:49:58
阅读次数:
209
Live broadcasting with arduinoget a pc , make it run linux. make arduino catch the weather sensor and then transport the information to the PC side. P...
分类:
其他好文 时间:
2014-07-01 12:15:21
阅读次数:
167
public class FillQueueThread extends Thread {
private Queue queue;
public FillQueueThread(Queue queue){
this.queue = queue;
}
@Override
public void run() {
while(true){
try {
boolean a...
分类:
数据库 时间:
2014-07-01 11:20:37
阅读次数:
332
前两篇博客(多线程——继承Thread类,多线程——实现Runnable接口
)介绍了java使用线程的两种方法,这篇博客继续介绍第三种方法——实现Callable接口。
先说一下Runnable和Callable的区别:
1、Callable规定的方法是call(),Runnable规定的方法是run().
2、Callable的任务执行后可返回值,而Runnable的任务是不能...
分类:
编程语言 时间:
2014-07-01 08:25:19
阅读次数:
280
上篇博客(多线程——继承Thread类)介绍了java多线程的第一种实现方法——继承Thread类,这篇博客介绍第二种方法——实现Runnable接口,并实现run方法。
还用上篇博客的例子,现在用第二种方法实现。具体代码如下:
public class Test2 implements Runnable{
private String word;
public Test...
分类:
编程语言 时间:
2014-07-01 06:26:05
阅读次数:
466
SDK和ADT为22.6.2版本
工程为4.4.2
在编译一个Launcher时,报错如下:
sh ndk-build clean
Cannot run program "sh": Launching failed
Error: Program "sh" not found in PATH
PATH=......
在网上看了一下,一直以为是什么GCC的问题,多次...
分类:
系统相关 时间:
2014-06-30 15:45:40
阅读次数:
1319
题目
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)).
方法
转换为寻找第k大的数。
...
分类:
其他好文 时间:
2014-06-30 06:05:58
阅读次数:
261
docker的英文本意是码头工人,也就是搬运工,这种搬运工搬运的是集装箱(Container),集装箱里面装的可不是商品货物,而是任意类型的App,Docker把App(叫Payload)装在Container内,通过LinuxContainer技术的包装将App变成一种标准化的、可移植的、自管理的组件,这种组件可..
分类:
其他好文 时间:
2014-06-29 21:16:16
阅读次数:
454