二叉树的遍历和添加结点 class Node(): def __init__(self, item): self.elem = item self.l_child = None self.r_child = None class Tree(): def __init__(self): self.ro ...
分类:
编程语言 时间:
2019-11-30 11:29:58
阅读次数:
76
使用 python 和 pillow 批量给图片添加自定义水印 ...
分类:
编程语言 时间:
2019-11-29 15:55:32
阅读次数:
123
栈 lass Stack(object): """栈""" def __init__(self): self.items = [] def is_empty(self): """判断是否为空""" return self.items == [] def push(self, item): """加入 ...
分类:
编程语言 时间:
2019-11-29 11:07:10
阅读次数:
81
python 中的顺序表 在python中的顺序表其实就是list。是动态数组(Cpython)。 从细节上看,Python中的列表是由对其它对象的引用组成的连续数组。指向这个数组的指针及其长度被保存在一个列表头结构中。这意味着,每次添加或删除一个元素时,由引用组成的数组需要该标大小(重新分配)。幸 ...
分类:
编程语言 时间:
2019-11-29 10:54:25
阅读次数:
77
实现代码如下: #mysql数据库的查询等 import pymysql from xctest_tools.xc_ReadFile.get_ReadTxt import * class mysql: def get_mysql(self,s): # 读取配置文件 db=ReadTxt().read ...
分类:
数据库 时间:
2019-11-28 21:09:20
阅读次数:
95
leetcode 1 3题题解,用C++和python实现 第一题 解题思路 暴力解法 嵌入两层循环:第一层:i 从 0 到 n 2 ; 第二层: j 从 i+1 到 n 1;判断nums[i] +nums[j] == target, 如果成立则是正确答案。时间复杂度O(n^2) map解法 O(n ...
分类:
其他好文 时间:
2019-11-28 13:07:55
阅读次数:
66
一、如何使用Python实现一个返回固定页面的Web Server 1.使用socket创建一个TCP Server 2.接受来自浏览器的TCP链接,并接收HTTP请求 3.返回固定响应数据给浏览器 代码如下: import socket def handle_request(new_socket) ...
分类:
编程语言 时间:
2019-11-28 13:07:37
阅读次数:
90
https://blog.csdn.net/weixin_42336574/article/details/95485622 https://dingtalk-sdk.readthedocs.io/zh_CN/latest/client/api/calendar.html https://blog. ...
分类:
编程语言 时间:
2019-11-27 00:43:15
阅读次数:
192
Python之23种设计模式 Python七大原则,24种设计模式 二十三种设计模式及其python实现 常用设计模式Python实现及其python实现 ...
分类:
编程语言 时间:
2019-11-26 22:59:43
阅读次数:
66
class SingletonType(type): def __init__(self, args, kwargs): super(SingletonType,self).__init__( args, kwargs) def __call__(cls, args, kwargs): 这里的cls ...
分类:
编程语言 时间:
2019-11-26 22:56:19
阅读次数:
67