一、问题的提出以买票系统为例: 1 class Ticket implements Runnable 2 { 3 public int sum=10; 4 public void run() 5 { 6 while(true) 7 { 8 ...
分类:
编程语言 时间:
2014-10-02 01:57:11
阅读次数:
331
Thread类中会影响thread生命周期的方法有: package?java.lang;
public?class?Thread?implements?Runnable?{
????public?void?start();
????public?void?run();
????public?void?stop(...
分类:
其他好文 时间:
2014-10-01 01:06:10
阅读次数:
361
现在Jetty的版本已经到9了,也早已经在Eclipse的门下了。所以有很多groupId,比如:org.eclipse.jetty、org.mortbay.jetty.这些都可以用的哦。我在使用MyEclipse结合maven操作jetty作为开发的服务器,这开开发比较方便。当我运行命令:jetty:run出现:[ERROR]Nopluginfoundforp..
分类:
其他好文 时间:
2014-10-01 00:48:11
阅读次数:
433
今天我需要在同事访问我的PHP页面的时候执行一段python脚本,于是我的代码是这样写的: 1 makeLog('ok run workjob'); 4 if($this->is_internal()){ 5 $cmd = '/usr/bin/python /data/script/abc/run....
分类:
Web程序 时间:
2014-09-30 20:14:50
阅读次数:
229
File file2 = new File(".");String command = file2.getCanonicalPath()+"\\resources\\pages\\testdata\\"+"UploadFile.exe";//exe文件存放的绝对路径Runtime run = Run...
分类:
编程语言 时间:
2014-09-30 18:17:29
阅读次数:
416
// 线程任务基类和线程池基类文件
#ifndef _ITHREADPOOL_H
#define _ITHREADPOOL_H
class IHandle
{
public:
IHandle(){}
virtual ~IHandle(){}
public:
virtual void Run() = 0;
};
class IThreadPool
{
public:
...
分类:
编程语言 时间:
2014-09-30 18:01:19
阅读次数:
299
在java中可有两种方式实现多线程,一种是继承Thread类,一种是实现Runnable接口;Thread类是在java.lang包中定义的。一个类只要继承了Thread类同时覆写了本类中的run()方法就可以实现多线程操作了,但是一个类只能继承一个父类,这是此方法的局限, 下面看例子: pa...
分类:
编程语言 时间:
2014-09-30 15:36:29
阅读次数:
236
第1章Docker基础操作1.1常用的命令0)安装Docker环境yum-yinstalldocker1)指定IP,DNS网络位启动Docker容器a)docker-bip192.168.6.233/28-dns8.8.8.8-g/data/docker/-d2)在线pullp_w_picpath镜像到本地a)Dockerpullcentos3)启动容器a)Dockerrun–i–tcentos/bin/bash4)查看容器..
分类:
其他好文 时间:
2014-09-30 04:23:32
阅读次数:
251
here 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...
分类:
其他好文 时间:
2014-09-30 00:05:21
阅读次数:
274