```python # -*- coding:utf8 -*- import os class BatchRename(): """ 批量重命名文件夹中的图片文件 """ def __init__(self): self.path = 'D:\MyData\zhaohz4\Desktop\MIdea... ...
分类:
其他好文 时间:
2020-05-25 09:45:10
阅读次数:
59
## 用于收货接口`server`: **http://127.0.0.1:8000**`url`:**/receivegood** * 请求方法:**POST*** 数据格式:**JSON** * 请求参数| Note | Eg | Type | Is_necessary | Explain || ...
分类:
其他好文 时间:
2020-05-25 09:30:17
阅读次数:
64
问题描述 把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。 输入一个非递减排序的数组的一个旋转,输出旋转数组的最小元素。 例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个旋转,该数组的最小值为1。 NOTE :给出的所有元素都大于0,若数组大小为0,请返回0 分析 思路 ...
分类:
编程语言 时间:
2020-05-25 00:07:09
阅读次数:
57
错误日志 作用 从启动数据库开始,发生过的note、error、warning信息。 定位数据库问题:报错、异常(死锁)。 配置方法 默认配置 修改配置路径 二进制日志(bin_log) 作用 1、数据恢复 2、复制 配置方法 1、server_id = 大于0的值,如果是主从复制,各节点serve ...
分类:
数据库 时间:
2020-05-25 00:05:07
阅读次数:
275
一、unittest属性如下 ['BaseTestSuite', 'FunctionTestCase', 'SkipTest', 'TestCase', 'TestLoader', 'TestProgram', 'TestResult', 'TestSuite', 'TextTestResult', ...
分类:
编程语言 时间:
2020-05-24 16:46:22
阅读次数:
56
暴力法: 思路: 从数组下标1开始遍历到n-1,每当遍历一个元素时,分别寻找到当前元素开始左边和右边的最大值,用最大值中较小值减去当前元素值即为当前位置所能接到的雨水量,加入到结果res中,遍历完成后res即为接到雨水总量。 代码: class Solution: def trap(self, he ...
分类:
其他好文 时间:
2020-05-24 16:43:12
阅读次数:
50
翻转一棵二叉树。 示例: 输入: 4/ \2 7/ \ / \1 3 6 9输出: 4/ \7 2/ \ / \9 6 3 1 python # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): ...
分类:
其他好文 时间:
2020-05-24 13:56:30
阅读次数:
47
# 树的单个结点 class Node: def __init__(self,elem): # 结点数据 self.elem = elem # 左子树和右子树 self.lchild = None self.rchild = None # 二叉树的实现 class my_tree: # 初始化空树 ...
分类:
其他好文 时间:
2020-05-24 13:46:26
阅读次数:
51
TensoeFlow+SSD的环境搭建 1. 先下载TensorFlow的models,然后进入models_master文件夹 https://github.com/tensorflow/models 2. 安装依赖库(见3~) Protobuf 3.0.0 Python tk Pillow 1. ...
分类:
其他好文 时间:
2020-05-24 12:10:44
阅读次数:
113
一、序列化和反序列化 ``` #coding=utf-8from django.http import HttpResponsefrom django.views import Viewimport jsonpickle class User(object): def __init__(self,u ...
分类:
其他好文 时间:
2020-05-24 11:34:28
阅读次数:
96