一、定义xml文件内容,既然是自定义则所有的根节点随便写 使用xml.dom.minidom三方模块对xml文件进行解析 from xml.dom.minidom import parse def getIP(machineNum): #读取xml文件 domTree = parse("./conf ...
分类:
编程语言 时间:
2021-06-07 20:09:27
阅读次数:
0
PyMysql连接数据库 防止sql注入 import pymysql ? ? def insertsql(): # 建立连接 connection_sql = pymysql.connect( host='localhost', port=3306, user='root', password=' ...
分类:
数据库 时间:
2021-06-07 20:05:01
阅读次数:
0
请实现一个函数,用来判断一棵二叉树是不是对称的。如果一棵二叉树和它的镜像一样,那么它是对称的。 具体来讲就是加入以根结点为中心画一条垂线,则从垂线往左右两边移动时,遇到的节点的值一定一样。这里需要借助辅助函数来对比左右节点,所以要构建辅助函数。 /** * Definition for a bina ...
分类:
其他好文 时间:
2021-06-07 19:58:23
阅读次数:
0
set @oldID='1';-- 你要删除的idselect device_type_ids, TRIM(BOTH ',' FROM REPLACE(CONCAT(',',device_type_ids,','),CONCAT(',',@oldID,','),',')) as New_ids fr ...
分类:
数据库 时间:
2021-06-06 19:39:39
阅读次数:
0
1、参考文档:https://nodejs.org/dist/latest-v14.x/docs/api/path.html 2、path.basename:获取一个路径中的文件名(默认包含扩展名) path.basename('/foo/bar/baz/asdf/quux.html'); // R ...
分类:
Web程序 时间:
2021-06-06 19:35:28
阅读次数:
0
####出现错误 提示信息: router.beforeEach((to, from, next) => { if (!storage.getItem('userInfo')) { console.log('error') next({ path: '/login' }) } else { cons ...
分类:
其他好文 时间:
2021-06-06 19:32:40
阅读次数:
0
LRU Least Recently Used 最近最少使用算法 LRU可以算是书本中比较熟悉的算法了,有缓存存在的场景下,基本都会有它的身影。它的作用就是在空间一定的缓存中,淘汰掉最近最少使用的数据,这样就有空间容纳新的数据。 那么假如需要设计一个类似LRU的算法,要支持获取数据get和插入数据p ...
分类:
编程语言 时间:
2021-06-06 19:22:57
阅读次数:
0
模型类 from app.extensions import db??# 商品: 商品属于分类# 分类 分类反向查询商品class Cate(db.Model): __tablename__ = 'tb_cate' id = db.Column(db.Integer, primary_key=Tru ...
分类:
其他好文 时间:
2021-06-06 19:22:13
阅读次数:
0
#vscode插件 #vscode代码片段 { // Place your 全局 snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and // description. ...
分类:
其他好文 时间:
2021-06-06 19:18:17
阅读次数:
0
import requests import re from threading import Thread from bs4 import BeautifulSoup import openpyxl import json class MUSIC(Thread): def run(self): s ...
分类:
编程语言 时间:
2021-06-06 19:17:40
阅读次数:
0