二叉排序树定义 一棵空树,或者是具有下列性质的二叉树:(1)若左子树不空,则左子树上所有结点的值均小于它的根结点的值;(2)若右子树不空,则右子树上所有结点的值均大于它的根结点的值;(3)左、右子树也分别为二叉排序树;(4)没有键值相等的结点。 二叉树删除节点 二叉排序树删除节点的时候为其删除后还是 ...
分类:
其他好文 时间:
2019-12-29 18:41:47
阅读次数:
70
用pip安装tornado库: python -m pip install tornado 出现问题一: Could not fetch URL https://pypi.org/simple/twisted/: There was a problem confirming the ssl cert ...
分类:
编程语言 时间:
2019-12-29 18:14:38
阅读次数:
260
一、文件数据操作 (一)向文件中追加数据 1、向a.txt文件末尾写入“what are you doing?” 方法一:sed命令 sed -i '$awhat are you doing?' a.txt 方法二:重定向方法 echo "what are you doing?" >> a.txt ...
分类:
系统相关 时间:
2019-12-29 17:01:42
阅读次数:
88
一、ansible优化 vim /etc/ansible/ansible.cfg host_key_checking = False #不进行验证 log_path = /var/log/ansible.log #打开日志 基于ssh vim /etc/ssh/sshd_config UseDNS ...
分类:
其他好文 时间:
2019-12-29 14:43:46
阅读次数:
79
修改/etc/profile 增加 export HISTTIMEFORMAT="%Y%m%d_%T `whoami` `who am i|awk '{print $1,$5}'|sed 's/ (/@/'|sed 's/)//'` " export PROMPT_COMMAND='history ...
分类:
系统相关 时间:
2019-12-29 00:35:29
阅读次数:
110
背景 收集一些平时可能会用到的Linux脚本。 内容 tcp连接统计 netstat -an | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' 在程序中执行外部脚本 system() popen() ...
分类:
系统相关 时间:
2019-12-28 20:48:38
阅读次数:
75
1.注释 1.1文件头 每个文件的开头是其文件内容的描述。 每个文件必须包含一个顶层注释,对其内容进行简要概述。版权声明和作者信息是可选的。 例如: #!/bin/bash # # Perform hot backups of Oracle databases. 1.2.功能注释 任何不是既明显又短 ...
分类:
系统相关 时间:
2019-12-28 19:28:41
阅读次数:
91
1、grep查询进程关键字 ps -ef|grep redis 2、用awk输出进程ID awk '{print $2}' 3、最后批量kill xargs kill -9 ps -ef | grep redis | awk '{print $2}' |xargs kill -9 ...
分类:
系统相关 时间:
2019-12-28 17:45:23
阅读次数:
83
Using Symbol.iterator, you can create custom iterators that can be used inside of for loops and Array spreads. This lesson walks you through creating ...
分类:
编程语言 时间:
2019-12-28 13:31:41
阅读次数:
85
我的数据库 名字叫dic.db 和程序放在一起CREATE TABLE [dic]( [ID] INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE ON CONFLICT REPLACE, [单词] TEXT UNIQUE ON CONFLICT REPLACE, [英... ...
分类:
数据库 时间:
2019-12-27 23:26:57
阅读次数:
145