上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: import time #获取本地时间 localtime =time.localtime(time.time()) #返回的是以元组形式的参数:time.struct_time(tm_year=2021, tm_mon=6, tm_mday=3, tm_hour=13, tm_min=34, tm 阅读全文
posted @ 2021-06-03 13:53 神迹丶 阅读(896) 评论(0) 推荐(0) 编辑
摘要: import queue import threading import time exitFlag =0 class myThread(threading.Thread): def __init__(self, threadID, name, m_queue): threading.Thread. 阅读全文
posted @ 2021-06-03 03:14 神迹丶 阅读(717) 评论(0) 推荐(0) 编辑
摘要: import threading import time exitFlag =0 class myThread(threading.Thread): def __init__(self, threadID, name, counter): threading.Thread.__init__(self 阅读全文
posted @ 2021-06-03 01:54 神迹丶 阅读(93) 评论(0) 推荐(0) 编辑
摘要: # coding=utf-8 import smtplib from email.mime.text import MIMEText msg_from = 'abcdefghi@qq.com' # 发送方邮箱 passwd = 'abcdefghijklmn' # 填入发送方邮箱的授权码 msg_t 阅读全文
posted @ 2021-06-02 21:53 神迹丶 阅读(111) 评论(0) 推荐(0) 编辑
摘要: #服务端代码 import sys import socket #创建socket对象 serversocket = socket.socket(socket.AF_INET,socket.SOCK_STREAM) #获取本地主机名 以及设置端口号 host= '127.0.0.1' port= 9 阅读全文
posted @ 2021-06-02 21:32 神迹丶 阅读(393) 评论(0) 推荐(0) 编辑
摘要: import mysql.connector # 数据库链接 mydb = mysql.connector.connect( host="localhost", # 数据库主机地址 user="root", # 数据库用户名 passwd="root", # 数据库密码 database ='hel 阅读全文
posted @ 2021-06-02 20:32 神迹丶 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 解决办法: 第一步:卸载Navicat 第二步:删除Navicat注册表, 下面的操作需要先打开激活工具,在打开Navicat,停留在注册界面, 在进行操作即可 阅读全文
posted @ 2021-06-02 16:49 神迹丶 阅读(8487) 评论(0) 推荐(0) 编辑
摘要: #类的重载 class Test: def __init__(self,n): self.num =n def __add__(self, other): # 加法运算 return Test(self.num+other.num) def __str__(self): #当使用print输出类对象 阅读全文
posted @ 2021-06-02 02:33 神迹丶 阅读(107) 评论(0) 推荐(0) 编辑
摘要: #类的默认构造与结构 class people: __id = 1 #私有成员,无法在类外访问,在变量前面加两个下划线__表示私有变量 在类外访问非法 m_age = 2 #公有成员,可以在类外访问 m_name ='' def __init__(self,id,age,name): #__init 阅读全文
posted @ 2021-06-02 00:35 神迹丶 阅读(212) 评论(0) 推荐(0) 编辑
摘要: #准备工具,http://www.flagyun.com/developer.html#queryaddress 注册并获取接口appkeyimport tkinter as tk import json import requests import urllib import ctypes #隐藏 阅读全文
posted @ 2021-06-01 23:29 神迹丶 阅读(845) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页
网站已运行: