码迷,mamicode.com
首页 >  
搜索关键字:sleep    ( 4174个结果
Webscan360的防御与绕过
这两天给360做了一个webscan360的总结,结果补丁还没有出来,就被人公布到了91org上面,既然公开了,那我就做一个总结首先我们贴上它最新的防御正则\||\b(alert\(|confirm\(|expression\(|prompt\(|benchmark\s*?\(.*\)|sleep\...
分类:Web程序   时间:2014-11-11 16:09:35    阅读次数:336
javascript中sleep等待实现
function sleep(milliSeconds) {var startTime = new Date().getTime();while (new Date().getTime() < startTime + milliSeconds);}sleep(10000);
分类:编程语言   时间:2014-11-10 13:22:56    阅读次数:182
信号处理篇alarm ferror kill mkfifo pause pclose perror pipe popen sigaction sigaddset sigdelset sigemptyset signal sleep strerror
alarm(设置信号传送闹钟)相关函数signal,sleep表头文件#include定义函数unsigned int alarm(unsigned int seconds);函数说明alarm()用来设置信号SIGALRM在经过参数seconds指定的秒数后传送给目前的进程。如果参数second....
分类:其他好文   时间:2014-11-10 06:25:42    阅读次数:291
au3入门学习
如下代码实现了简单的功能:右下角通知,必须要有sleep动作TrayTip( "公告标题-wglm", "紧急通知,村东头教大家学au3,各家男女老少晚饭后请准时集合学习",0) Sleep(1000)显示窗口,必须要有SetState#includeGUICreate("hello 标题",500...
分类:其他好文   时间:2014-11-10 01:04:41    阅读次数:242
sleep()和wait()的区别
sleep(100L)是表示让线程睡眠100毫秒,其他线程不会占用CPU资源,100毫秒之后会立即执行。而wait(100L)是进入线程池中让线程等待100毫秒,交出CPU资源,这100毫秒期间,该线程可以被其他线程notify,100毫秒之后不能保证立即执行,还要等待CPU分配资源,所以wait(100L)的执行..
分类:其他好文   时间:2014-11-09 06:29:15    阅读次数:128
双缓冲技术
#ifndef _DRAW2D_H#define _DRAW2D_H#include #pragma comment(lib, "gdiplus")using namespace Gdiplus;HWND Draw2D_hwnd;void Draw2D(PVOID pvoid){ Sleep(...
分类:其他好文   时间:2014-11-09 06:16:16    阅读次数:180
C# 非独占延时函数 非Sleep
在C#窗口程序中,如果在主线程里调用Sleep,在Sleep完成之前, 界面呈现出假死状态,不能响应任何操作!下边实现的是非独占性延时函数,延时过时中界面仍可响应消息:public static void Delay(int milliSecond){ int start = Environm...
分类:Windows程序   时间:2014-11-06 21:35:22    阅读次数:246
python threading condition
threading time Producer(threading.Thread): run(self): count True: con.acquire(): count>1000: con.wait() : count=count+100 msg=self.name++str(count) msg con.notify() con.release() time.sleep(1) Consumer(threading.Thread): run(self): count True: con.acqu..
分类:编程语言   时间:2014-11-06 17:47:36    阅读次数:239
python 线程学习
线程锁#!/usr/bin/pythonimportthreadingimporttimeclassMyThread(threading.Thread):def__init__(self,threadname):threading.Thread.__init__(self,name=threadname)设定线程名称defrun(self):globalxlock.acquire()加锁foriinrange(3):x=x+1time.sleep(2)printxlock.release..
分类:编程语言   时间:2014-11-06 15:03:13    阅读次数:151
生成者消费者(线程同步,互斥,条件变量)
#include #include "stdio.h"#include #include #define N_CONSUMER 3 //消费者数量#define N_PRODUCER 2 //生产者数量#define C_SLEEP 1 //控制 consumer 消费的节奏#define P_SL...
分类:编程语言   时间:2014-11-05 21:06:30    阅读次数:204
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!