这是下午写的,这次的修改增加了鼠标的事件,需要的是windows的消息机制,WinAPI函数,以下是新添加的定义struct
{ int num;//格子当前状态,1表示有雷,0表示无雷或已经显示数字 int roundnum;//统计格子周围的雷数 int flag;//右键按下显示红旗标志,0表...
分类:
编程语言 时间:
2014-09-14 20:40:37
阅读次数:
298
function quickSort(arr){ if(arr.length <= 1) return arr;//判断是否有效数组 var cut = Math.floor(arr.length/2);//取中间下标 var left = [],right = []; var num = ...
分类:
编程语言 时间:
2014-09-14 16:37:07
阅读次数:
161
public static void main(String[] args) {
final LeftRightDeadLock lock = new LeftRightDeadLock();
new Thread(){
@Override
public void run() {
lock.leftRight();
}
}.start();
new ...
分类:
编程语言 时间:
2014-09-14 15:25:01
阅读次数:
177
获取网页源代码: $line) { echo "Line {$line_num} : " . htmlspecialchars($line) . "/n";}?>获取网页的标题:(.*)", $lines_string, $head);echo $head[0];?>
分类:
Web程序 时间:
2014-09-14 13:58:47
阅读次数:
137
prepare("select id, name, price, num, desn from shops where id>?");$stmt->bind_param("i", $id);$stmt->bind_result($id, $name, $price, $num, $desn);$id...
分类:
数据库 时间:
2014-09-14 12:39:57
阅读次数:
218
/dev/sda1:notfsysdev,dir,orregfile,ignoring引出xfs_fsr的用法场景说明:没有安装xfsdump,然后准备使用命令修复文件系统格式是xfs的文件系统:步骤1:xfs_fsr/dev/sda1但是出现如下的错误:/dev/sda1:notfsysdev,dir,orregfile,ignoring使用parted工具查看到的分区格式:Num..
分类:
其他好文 时间:
2014-09-14 11:26:47
阅读次数:
874
maxheap.h
#include
template
class MaxHeap
{
public:
MaxHeap(int num);
MaxHeap(T Arr[], int arrsize, int totalsize);
bool insert(const T&);
bool del(T&);
void show() const;
void showonlevel()...
分类:
其他好文 时间:
2014-09-13 21:32:55
阅读次数:
300
1 #include 2 #include 3 #include 4 #include 5 #define N 500005 6 using namespace std; 7 typedef long long LL; 8 LL prefix[N], suffix[N], num[N]; 9 LL....
分类:
其他好文 时间:
2014-09-13 17:10:55
阅读次数:
122
来源:http://www.imooc.com/ceping/1596以下关于二维数组的定义和访问正确的是()A int[ ][ ] num = new int[ ][ ];B int[ ][ ] num = new int[ 3 ][ 4 ];C System.out.println( num[ ...
分类:
编程语言 时间:
2014-09-13 14:28:45
阅读次数:
464
题目:一球从100米高度自由落下,每次落地后反跳回原高度的一半;再落下,求它在第10次落地时,共经过多少米?第10次反弹多高?def foo(height,num): sum=height; preh=0; for i in range(0,num): height=...
分类:
编程语言 时间:
2014-09-13 10:29:34
阅读次数:
190