码迷,mamicode.com
首页 >  
搜索关键字:sleep    ( 4174个结果
python 基础11-递归
1、递归特点: 1、递归类似循环 2、递归必须有一个明确的结束条件 3、每次进入更深一层递归时,问题规模相比上次递归都应有所减少 4、递归效率不高,递归层次过多会导致栈溢出 2、递归的函数: # 处于死循环 import time def a(n): print(n) time.sleep(1) a ...
分类:编程语言   时间:2020-03-22 19:50:12    阅读次数:88
事务和锁
数据库事务、事务隔离级别以及锁机制详解 转自 https://www.cnblogs.com/jieerma666/p/10805578.html 以下主要以MySQL(InnoDB引擎)数据库为讨论背景,纯属个人学习总结,不对的地方还请指出! 什么是事务? 事务是作为一个逻辑单元执行的一系列操作, ...
分类:其他好文   时间:2020-03-22 18:07:19    阅读次数:69
Appium_iOS_Safari测试脚本(2)
经过多次调试,在Safari上的测试脚本终于可以运行了,不过部分元素还是无法识别,还需要继续调试; #!/usr/bin/env/python # -*-coding:utf-8-*- import pytest from time import sleep from selenium import ...
分类:移动开发   时间:2020-03-22 13:50:26    阅读次数:82
线程锁-LOCK
from threading import Thread,Lockimport timea=10b=10lock=Lock()def fun(): # lock.acquire() global a global b a+=1 time.sleep(1) b+=1 # lock.release() ...
分类:编程语言   时间:2020-03-22 01:27:05    阅读次数:73
进程间通信-队列
#进程间通信,队列 from multiprocessing import Process,Queue import os,sys import time q=Queue() def get(data): time.sleep(2) print("thread {} get {}".format(o ...
分类:系统相关   时间:2020-03-22 01:23:42    阅读次数:87
Sleeping Schedule CodeForces - 1324E dp
``` #include #include #include #include using namespace std; const int N=2010; int a[N],f[N][N]; int read() { int res=0,ch,flag=0; if((ch=getchar())==... ...
分类:其他好文   时间:2020-03-21 20:51:12    阅读次数:61
第42天IO模块
1.在程序中一般有5中IO model 1.blocking IO 阻塞 IO 2.nonbiocking IO 非阻塞IO 3.IO multiplexing IO多路复用 4.signal driven IO 信号驱动IO(基本上不用) 5.asynchronous 异步IO 2.在进行IO操作 ...
分类:其他好文   时间:2020-03-21 18:24:21    阅读次数:72
[golang]定时器
定时器 go中time包中定时器主要有三种,Sleep、Timer、Ticker。下面逐一来进行说明。 1: Sleep 可以通过Sleep进行指定时间的睡眠。 例如延迟三秒中后输出hello,world。 2:Timer Timer是一个定时器,代表未来的一个单一事件,你可以告诉timer你要等待 ...
分类:其他好文   时间:2020-03-21 12:56:40    阅读次数:59
使用python对文件夹下的照片进行批量修改尺寸
import os import shutil import time from time import sleep from PIL import Image from tqdm import tqdm def makeDirs(path): # 创建新的输出子目录,若存在输出该目录则删除该目录及 ...
分类:编程语言   时间:2020-03-19 15:22:04    阅读次数:92
用JS实现一个sleep函数
1、sleep函数: sleep函数作用是让线程休眠,等到指定时间在重新唤起。 2、ES6实现: <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width ...
分类:Web程序   时间:2020-03-19 15:08:46    阅读次数:81
4174条   上一页 1 ... 39 40 41 42 43 ... 418 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!