03 2018 档案
摘要:原文:https://blog.csdn.net/u011822862/article/details/52166940 Qt 官方开发环境使用的动态链接库方式,在发布生成的可执行程序时,需要复制可执行程序的依赖库,如果自己去复制依赖库,可能会遗漏,导致可执行程序在别的电脑里无法正常运行,因此 Qt
阅读全文
摘要:python.txt是百度百科上的一段: 生成的图片如下:
阅读全文
摘要:对所使用的字符串类型调用encode()方法进行转换即可
阅读全文
摘要:import zlib import os ss = 's' * 1024 * 1024 #写入原始文件 file = open("src.dat", "wb") file.write(ss.encode()) file.close() #读取上一步原始的文件 file = open("src.dat", "rb") sss = file.read(os.path.getsize("...
阅读全文
摘要:import cv2 img = cv2.imread("lena.jpg") cv2.namedWindow("Image") cv2.imshow("Image", img) cv2.waitKey(0) cv2.destroyAllWindows()
阅读全文
摘要:import sqlite3 from datetime import datetime conn = sqlite3.connect('data.db') print("Opened database successfully") for i in range(100): time = datetime.now() conn.execute("INSERT INTO t...
阅读全文
摘要:from datetime import datetime from apscheduler.schedulers.blocking import BlockingScheduler def tick(): print(datetime.now()) if __name__ == '__main__': scheduler = BlockingScheduler(...
阅读全文
摘要:import threading import time class myThread (threading.Thread): #继承父类threading.Thread def __init__(self, threadID, name): threading.Thread.__init__(self) self.name = name ...
阅读全文
摘要:import requests import bs4 import urllib.request import urllib import os hdr = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHT
阅读全文
摘要:源地址:http://www.cnblogs.com/thinksasa/archive/2013/08/26/3283695.html 方法:新建一个register.py 文件,把一下代码贴进去,保存 (代码来自:http://effbot.org/zone/python-register.ht
阅读全文
摘要:# -*- coding: cp936 -*- import sys,os,string d=0; path="F://test" srcfile=os.listdir(path) for i in srcfile: src=path+"//"+i dst=path+"//"+str(d)+".txt" os.rename(src,dst) d=d+1; ...
阅读全文
摘要:分布式程序通常需要运行在一个统一的时间环境里。 转自:http://blog.csdn.net/mengfanzhundsc/article/details/62046562 安装NTP:yum install ntp 配置时间源vi /etc/ntp.confserver 210.72.145.4
阅读全文
摘要:转自:http://blog.csdn.net/loyachen/article/details/51010688 [系统环境] CentOS release 6.7 (Final) 服务端配置 1. 安装nfs-utils和rpcbind 2.设置开机启动服务 3.启动相关服务 4.创建共享目录
阅读全文