import java.security.MessageDigest;import
java.util.*;public class Hello2{ public static void main(String[] args) throws
Exception{ Random r = new Ran...
分类:
其他好文 时间:
2014-07-22 23:13:33
阅读次数:
354
一个同步辅助类,在完成一组正在其他线程中执行的操作之前,它允许一个或多个线程一直等待。类似计数器,当计数器的值为0时,继续往下执行。 1 package
ch03; 2 3 import java.util.Random; 4 import java.util.concurrent.CountDo....
分类:
编程语言 时间:
2014-05-12 17:34:54
阅读次数:
408
Log scale 1 %# some random data 2 x = 2.^(0:10); 3
y = rand(size(x)); 4 5 plot(log2(x), y) %# plot on log2 x-scale 6 se...
分类:
其他好文 时间:
2014-05-12 15:54:18
阅读次数:
377
解决办法是将qmake换成4.8的,qmake5.2的支持opencv支持的不是很好
分类:
其他好文 时间:
2014-05-10 19:48:54
阅读次数:
247
1.first of all,take a lookup on the left side
of keyword const.If there is something(type or pointer),then apply const
featureto it.2.nothing found on...
分类:
编程语言 时间:
2014-05-06 00:38:25
阅读次数:
361
Problem A: Random PermutationsTime Limit: 1
SecMemory Limit: 128 MB Submit: 91Solved: 54Description随机排列生成算法
(运行a.exe输出数字的个数,运行a.exe test时输出为一次随机的排列)In...
分类:
其他好文 时间:
2014-05-05 23:03:04
阅读次数:
341
指针与数组指针与其它数据结构呢?比如说链表?存储空间是非连续的。不能通过对指向这种数据结构的指针做累加来遍历。能不能提供一个行为类似指针的类,来对非数组的数据结构进行遍历呢?这样我们就能够以同样的方式来遍历所有数据结构(容器)。迭代器(Iterator)是指针(pointer)的泛化,它允许程序员以...
分类:
其他好文 时间:
2014-05-05 22:54:24
阅读次数:
596
1. introductionfrom numpy import
*random.rand(4,4)#array to matrixrandMat=mat(randon.rand(4,4))#matrix
inverseIvrandMat=randMat.I#indentity matrixeye(...
分类:
编程语言 时间:
2014-05-05 22:24:10
阅读次数:
336
代码:
if((server_fd = accept(sockfd,(struct sockaddr *)&server_addr, &sin_size)) == -1)
{
fprintf(stderr, "Accept error:%s\n\a", strerror(errno));
exit(1);...
分类:
其他好文 时间:
2014-04-30 22:21:38
阅读次数:
765
最近亲眼看到快播被大批警察包围,感觉到快播注定要关闭很多东西,很多宅男宅女们又要寂寞了,于是乎,疯狂的研究DHT网络技术
看到网上也有开源的代码,这不,我拿来进行了二次重写,呵呵,上代码:
#encoding: utf-8
import socket
from hashlib import sha1
from random import randint
from struct import u...
分类:
其他好文 时间:
2014-04-29 13:13:20
阅读次数:
420