线程
通过调用Thread类的 start()方法来启动一个线程,这时此线程处于就绪(可运行)状态,但此时并没有运行,它需要CPU时间片。一旦得到CPU时间片,就会执行run()方法。run()的方法体称为线程体,它包含了要执行的这个线程的内容,run()方法运行结束,此线程也随即终止。
线程状态转换
一、新建(new):新创建了一个线程对象。
二、可运行(runnable):线程...
分类:
其他好文 时间:
2014-07-18 18:03:26
阅读次数:
180
class Solution {public: void sortColors(int A[], int n) { int cnt[3] = {0}; for (int i = 0; i 0) start += cnt[i-1]; for (...
分类:
其他好文 时间:
2014-07-18 16:15:56
阅读次数:
166
在HTML5中的OL被改良了,为它增加了两个新属性。start属性:start属性用来定义列表编号的起始位置,比如下面的代码,列表将从50开始51...55以此类推 首页 阅览室 我的 简历 社区 教程 HTML5 专题 酷站 TShirt 作品 学院复制代码reversed...
分类:
Web程序 时间:
2014-07-18 14:18:21
阅读次数:
327
Const TR_LEVEL_MARK = "+"Const TR_COL_INDEX = "A"Const TR_COL_LEVEL = "E"Const TR_COL_NAME = "C"Const TR_COL_COUNT = "D"Const TR_COL_TREE_START = "F"C...
分类:
其他好文 时间:
2014-07-18 14:16:07
阅读次数:
414
#!/bin/sh
#
# iptables Start iptables firewall
#
# chkconfig: 2345 08 92
# description: Starts, stops and saves iptables firewall
#
# config: /etc/sysconfig/iptables
# co...
分类:
其他好文 时间:
2014-07-18 12:23:55
阅读次数:
354
http://tomcat.apache.org/download-70.cgi这里下载
放到Linux文件夹下,解压开,
默认端口:8080可以直接使用
常用启动命令catalina.sh start
关闭命令 kill -9 pid
通常使用ps aux|grep tomcat 来查看运行状态以及pid...
分类:
系统相关 时间:
2014-07-18 11:29:00
阅读次数:
234
使用最简单的排序方法; 1 /** 2 * Definition for an interval. 3 * public class Interval { 4 * int start; 5 * int end; 6 * Interval() { start = 0;...
分类:
其他好文 时间:
2014-07-18 10:26:09
阅读次数:
188
//到页面底部下载源,配合效果跟好。 public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { ...
分类:
Web程序 时间:
2014-07-18 10:11:46
阅读次数:
281
虚拟机无法联网,service network start 启动eth0报错:
Error: Connection activation failed: Device not managed by NetworkMan
错误的原因是:网络管理装置不被允许。
解决方法:
运行下列命令
chkconfig network off
chkconfig ...
分类:
其他好文 时间:
2014-07-17 19:17:29
阅读次数:
212