import random print(random.random()) # (0,1) 随机小数 0到1 print(random.randint(3,5))# [3,4,5] 取整 print(random.randrange(3,5))# [3,5) 取整 print(random.choic ...
分类:
其他好文 时间:
2021-04-05 12:02:18
阅读次数:
0
1、hive-site.xml解读 hive的远程模式,mysql连接配置。 <property> <name>javax.jdo.option.ConnectionUserName</name> <value>root</value><!--mysql的user--> <description>U ...
分类:
其他好文 时间:
2021-04-05 11:57:53
阅读次数:
0
1、ping命令,如ping www.baidu.com ,用于检测网络是否正常。 2、telnet ip port 用于检测某个指定端口是否开启。 3、curl是常用的命令行工具,用来请求Web服务器。它的名字就是客户端(client)的URL工具的意思。它的功能非常强大,命令行参数多达几十种。如 ...
分类:
其他好文 时间:
2021-04-05 11:43:06
阅读次数:
0
此篇文章介紹 Docker MACVLAN Network 及其運作方式 環境介紹 以下的測試將會在以下環境進行: OS:Ubuntu 18.04 Docker: 18.03.1-ce 網卡配置: eth0:10.103.19.0/24 eth1:trunk port (10.103.[17-18] ...
分类:
Web程序 时间:
2021-04-02 13:35:18
阅读次数:
0
ps 命令的作用是显示进程信息的; | 符号,是个管道符号,表示ps 和 grep 命令同时执行; grep 命令是查找(Global Regular Expression Print),能使用正则表达式搜索文本,然后把匹配的行显示出来; ps命令有一些参数: -e : 显示所有进程 -f : 全格 ...
分类:
其他好文 时间:
2021-04-02 13:33:41
阅读次数:
0
ip route 可以用于查看网络的路由信息,并设置路由表 route n 显示所有路由 [root@ceph-104 ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Ifac ...
分类:
其他好文 时间:
2021-04-02 13:16:37
阅读次数:
0
用python写数据库连接时要用到数据连接池于是就想到了DBUtils ,这个简单pip install DBUtile 安装完后写代码测试一下 from DBUtils.PooledDB import PooledDB Traceback (most recent call last): File ...
分类:
数据库 时间:
2021-04-02 13:02:54
阅读次数:
0
一.二叉树的前序遍历 https://leetcode-cn.com/problems/binary-tree-preorder-traversal/ class Solution { public List<Integer> preorderTraversal(TreeNode root) { L ...
分类:
其他好文 时间:
2021-04-01 13:41:51
阅读次数:
0
递归函数 函数的递归调用: 是函数嵌套调用的一种特殊形式。 具体指的是在调用一个函数的过程中又直接或者间接的调用了自己,称之为函数的递归调用。 函数的递归调用就是一个循环的过程,用函数来实现循环 def f1(): print('from f1') f1() f1() # 函数默认调用1000次 d ...
分类:
其他好文 时间:
2021-04-01 13:41:29
阅读次数:
0
难度 easy 翻转一棵二叉树。 示例: 输入: 4 / 2 7 / \ / 1 3 6 9 输出: 4 / 7 2 / \ / 9 6 3 1 备注: 这个问题是受到 Max Howell 的 原问题 启发的 : 解题思路:这道题比较简单,就是用递归的方式求解的,如果root是空节点或者没有子节点 ...
分类:
其他好文 时间:
2021-04-01 13:37:05
阅读次数:
0