#-*-coding:utf-8-*-'''compile 函数根据一个模式字符串和可选的标志参数生成一个正则表达式对象。re.match 尝试从字符串的起始位置匹配一个模式group(num) 或 groups() 匹配对象函数来获取匹配表达式。import reprint(re.match('w ...
分类:
编程语言 时间:
2019-07-14 14:58:42
阅读次数:
116
# THREAD 线程 t = threading.Thread(target=test,args=('test',)) t.setDaemon(True)#t设为守护线程,在主线程生命周期结束时结束,主线程会在其他非守护线程结束后结束,并且需要在启动前设置 t.start()#启动线程 t.joi... ...
分类:
编程语言 时间:
2019-07-14 12:52:01
阅读次数:
104
import zipfilefrom threading import Thread #多线程库import optparse #选定字典或者文件def extractFile(zfile,password): try: zfile.extractall(pwd=password) print('[... ...
分类:
编程语言 时间:
2019-07-11 09:29:00
阅读次数:
185
System.Windows.Forms.Timer, System.Threading.Timer, System.Timer,三种Timer使用如下 第一种:System.Windows.Forms.Timer使用 [DllImport("User32.dll", CharSet = CharS ...
分类:
其他好文 时间:
2019-07-10 18:45:37
阅读次数:
108
首先,我觉得三种计时器最大的区别是:DispatcherTimer触发的内容会直接转到主线程去执行(耗时操作会卡住主线程),另外两个则是在副线程执行,如果需要修改界面,则需要手动转到主线程。 DispatcherTimer: System.Timers.Timer: System.Threading ...
using System;using System.Collections.Generic;using System.Data;using System.Data.SqlClient;using System.Linq;using System.Text;using System.Threading ...
分类:
数据库 时间:
2019-07-09 19:21:37
阅读次数:
139
今天要复习一下C#基础中的变量和常量,所谓变量,就是用来存储特定类型的数据,分为值类型和引类型,可以根据需要随时改变变量中所村存储的数据值,变量必须先声明,然后才能赋值;常量就是固定不变的值,常量的变量值是唯一的,标志const。 1、变量类型有两种,分别是值类型和引类型 值类型,主要包含整数类型( ...
```python
import queue
import threading
import time def produce(q: queue.Queue): thread_name = threading.current_thread().getName() for i in range(10)... ...
分类:
编程语言 时间:
2019-07-08 15:25:08
阅读次数:
106
#Semaphore 是用于控制进入数量的锁,控制同时进行的线程,内部是基于Condition来进行实现的 #文件, 读、写, 写一般只是用于一个线程写,读可以允许有多个 #做爬虫 import threading import time class HtmlSpider(threading.Thr... ...
分类:
编程语言 时间:
2019-07-07 20:24:58
阅读次数:
134
Docker制作dotnet core控制台程序镜像 基于dotnet SDK 构建镜像 基于dotnet Runtime using System; using System.Threading; namespace console { class Program { static void Ma ...
分类:
Web程序 时间:
2019-07-07 13:00:19
阅读次数:
339