1、sleep()使当前线程(即调用该方法的线程)暂停执行一段时间,让其他线程有机会继续执行,但它并不释放对象锁。也就是说如果有synchronized同步快,其他线程仍然不能访问共享数据。注意该方法要捕捉异常。例如有两个线程同时执行(没有synchronized)一个线程优先级为MAX_PRIOR...
分类:
编程语言 时间:
2014-06-21 08:30:15
阅读次数:
285
经典搜索 1 #include 2 #include 3 using namespace std; 4 5 const int MAX=10; 6 7 int step[MAX][MAX]; 8 char maze[MAX][MAX]; 9 int n,m,t;10 struct {11 ...
分类:
其他好文 时间:
2014-06-21 07:12:00
阅读次数:
218
简单题 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int MAX=205; 7 const int inf=1000000; 8 int tim[MAX][MAX]; 9 char maze[MAX][...
分类:
其他好文 时间:
2014-06-21 00:34:49
阅读次数:
226
基础数据结构: struct A { int a; int b; int c; int d; int e; int f; int g; };初始化次数:const int MAX_L...
分类:
其他好文 时间:
2014-06-21 00:17:14
阅读次数:
166
1 #include 2 #include 3 using namespace std; 4 5 const int MAX=105; 6 7 bool vis[MAX][MAX]; 8 char maze[MAX][MAX]; 9 int n,m;10 int dir[8][2]={0,...
分类:
其他好文 时间:
2014-06-21 00:14:01
阅读次数:
275
>_____<:头文件参见:http://www.cnblogs.com/zjutlitao/p/3733164.html 1 #include "stdafx.h" 2 #include "resourse.h" 3 4 #define MAX_LOADSTRING 100 5 6...
.catelistdlddulliimg{width:expression(this.width>228?'228px':true);max-width:228px;height:expression(this.height>160?'160px':true);max-height:160px;}解...
分类:
其他好文 时间:
2014-06-20 17:50:42
阅读次数:
155
今天使用MongoDB的C++驱动,在编译连接的时候一直出现错误,显示的string_data.h下93行max宏的问题,可视其本身并不是调用max宏,而是调用std::numeric_limits::max这样就是产生错误,通过搜索发现解决方法(参考网址:http://blog.chinaunix...
分类:
数据库 时间:
2014-06-20 17:08:50
阅读次数:
273
母函数简单题 1 #include 2 #include 3 using namespace std; 4 5 const int MAX=130000; 6 int c1[MAX],c2[MAX]; 7 8 struct { 9 int val,num;10 }thing[55];...
分类:
其他好文 时间:
2014-06-20 16:07:13
阅读次数:
164
1 #include 2 #include 3 using namespace std; 4 5 const int MAX=13; 6 7 char maze[MAX][MAX][MAX]; 8 9 struct {10 int i,j,k;11 }beg,des,que[11...
分类:
其他好文 时间:
2014-06-20 14:04:37
阅读次数:
141