condition 类:
作为一个示例,假定有一个绑定的缓冲区,它支持 put 和 take 方法。如果试图在空的缓冲区上执行 take 操作,则在某一个项变得可用之前,线程将一直阻塞;如果试图在满的缓冲区上执行 put 操作,则在有空间变得可用之前,线程将一直阻塞。我们喜欢在单独的等待
set 中保存 put 线程和 take 线程,这样就可以在缓冲区中的项或空间变得可用时利用最佳规划...
分类:
编程语言 时间:
2015-01-27 09:25:18
阅读次数:
149
#define QUOTA (5*1024*1024*1024)
uint64_t ui64 = QUOTA;
gcc编译器会报出:warning: integer overflow in expression,你发现哪里出问题了?以此为戒!...
分类:
其他好文 时间:
2015-01-26 11:58:28
阅读次数:
309
题意:FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as la...
分类:
其他好文 时间:
2015-01-25 11:01:17
阅读次数:
157
方法一:在my.ini的[mysqld]字段加入:skip-grant-tables重启mysql服务,这时的mysql不需要密码即可登录数据库然后进入mysqlmysql>usemysql;mysql>更新usersetpassword=password(‘新密码‘)WHEREUser=‘root‘;mysql>flushprivileges;运行之后最后去掉my.ini中的skip-gran..
分类:
数据库 时间:
2015-01-25 06:36:14
阅读次数:
267
VacationTime Limit: 3000MSMemory Limit: Unknown64bit IO Format: %lld & %lluDescriptionThe ProblemYou are planning to take some rest and to go out on v...
分类:
其他好文 时间:
2015-01-24 10:03:11
阅读次数:
235
These examples illustrate the applications ofcp.xMD code in the Quantum ESPRESSO distribution. Since MD simulations usually take very long, we will lo...
分类:
其他好文 时间:
2015-01-23 21:24:40
阅读次数:
357
#include
#include
#include
#include
#include
using namespace std ;
#define MAXN 100
int map[MAXN][MAXN] ;
int in_cout[MAXN] ;
int e_time[MAXN] ;
int arry[MAXN] ;
int n , e , n_s = 1 ,sum ;
int max(...
分类:
编程语言 时间:
2015-01-22 18:12:04
阅读次数:
295
Best Cow Line
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 11230
Accepted: 3329
Description
FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the an...
分类:
其他好文 时间:
2015-01-22 13:24:57
阅读次数:
157
package com.latrobe.spark
import org.apache.spark.{SparkContext, SparkConf}
/**
* Created by spark on 15-1-19.
* 根据key对K-V类型的RDD进行排序获得新的RDD
*/
object SortByKey {
def main(args: Array[String]) {...
分类:
其他好文 时间:
2015-01-20 23:59:25
阅读次数:
500
一、登陆mysql以后执行以下命令: GRANT ALL ON *.* TO username@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; FLUSH PRIVILEGES; 二、修改/etc/mysql/my.cnf,注释以下行: skip-ne...
分类:
数据库 时间:
2015-01-20 15:19:57
阅读次数:
154