实现星空流动效果
代码如下
#include
#include
const int StarNum = 300;
void DrawStar (HWND hwnd);
int cxClient, cyClient;
short arr[StarNum][3];
HDC hdc;
static int num= 0;
LRESULT CALLBACK WndProc(HWND hwnd, UI...
一、什么是锁在Java的util.concurrent.locks包下有关于锁的接口和类如下:先看一段代码:package com.codeing.snail.test;
public class ReadWriteLockTest {
public static void main(String[] args) {
final Output output = new Output();...
分类:
移动开发 时间:
2014-09-16 00:20:29
阅读次数:
338
防止产生重复的排列字串,即在排列时不会重复的交换
第一种思路是在递归函数中用set检查当前交换的数字是否已经换过,
如{0,1,0,2}中start=0时:
交换num[0]和num[0],并产生start=1的子排列
交换num[0]和num[1],并产生start=1的子排列
交换num[0]和num[2],并产生start=1的子排列(产生重复)
交换num[0]和n...
分类:
其他好文 时间:
2014-09-16 00:20:19
阅读次数:
228
A computer-implemented system and method for a lock-less, zero data copy messaging mechanism in a multi-core processor for use on a modem in a telecom...
分类:
移动开发 时间:
2014-09-16 00:19:19
阅读次数:
395
A buffer management mechanism in a multi-core processor for use on a modem in a telecommunications network is described herein. The buffer management ...
分类:
移动开发 时间:
2014-09-15 22:46:49
阅读次数:
415
由于Python的线程有些限制,例如多线程不能充分利用多核CPU等问题,因此在Python中我们更倾向使用多进程。但在做不阻塞的异步UI等场景,我们也会使用多线程。本篇文章主要探讨Python多进程的问题。
Python在2.6引入了多进程的机制,并提供了丰富的组件及api以方便编写并发应用。multiprocessing包的组件Process, Queue, Pipe, Lock等组件提供了与多线程类似的功能。使用这些组件,可以方便地编写多进程并发程序。...
分类:
编程语言 时间:
2014-09-15 14:22:09
阅读次数:
256
/****** Object: StoredProcedure [dbo].[sp_who_lock] Script Date: 09/15/2014 11:55:46 ******/ SET ANSI_NULLS ON GOSET QUOTED_IDENTIFIER ON GOCREATE pro...
分类:
其他好文 时间:
2014-09-15 12:51:38
阅读次数:
165
一、判断AdminServer.lok被其进程锁死 >weblogic.management.ManagementException: Unable to obtain lock on *******/AdminServer.lok. Server may...
分类:
Web程序 时间:
2014-09-15 10:03:18
阅读次数:
272
import java.util.*;public class GuessNumber { public static void main(String[] args) { int num = new Random().nextInt(100), temp; Sca...
分类:
其他好文 时间:
2014-09-14 23:35:07
阅读次数:
323
很经常我们会遇到这样一种情况:例如,你需要和其他人合作,别人提供数据,而你不需要关注别人获取或者构建数据的方式方法。你只要对这个拿到的数据进行操作。这样,就相当于我们提供一个外在的函数,别人调用这个函数,返回相应的数据。例如:?12345678function (num , numFun) {if(...
分类:
Web程序 时间:
2014-09-14 23:30:27
阅读次数:
378