List<T> 底层采用数组存值,按照数据查找的话,最坏情况 O(n),如果按照下标查找的话O(1) 例:T[0]直接可以得到值 数组长度和list数关系 假设数组的长度是32 list是32 这种情况是良好的 数组长度够用 但此时如果add一个list,数组长度就需要扩容,扩容 至少是原来的2倍 ...
分类:
Web程序 时间:
2021-04-14 12:12:25
阅读次数:
0
我们点击项目上方的 Add file,选择 creat new file 名称填写 LICENSE, 右侧便会出现按钮 Choose a license template 选择你要的证书,填写 年份 和 name, 点击 Review and submit 选择master分支,点击 commit ...
分类:
其他好文 时间:
2021-04-14 12:10:36
阅读次数:
0
Docker学习记录 - 构建静态网站 一、目录结构 二、Dockerfile文件 1、nginx 的 docker文件 FROM nginx COPY ./www /usr/share/nginx/html/ WORKDIR /usr/share/nginx/html/ RUN chown -R ...
分类:
Web程序 时间:
2021-04-14 11:59:07
阅读次数:
0
#!/usr/bin/env python3#!-*- coding:UTF-8 -*- import osclass GetPath():# 获取所有目录 @staticmethod def get_dir(path): print("打印所有目录:") for root, dirs, files ...
分类:
编程语言 时间:
2021-04-14 11:51:07
阅读次数:
0
vi file_can_execute_or_not1.sh #!/bin/bash #判断输入的参数个数是否为两个 if [ $# -lt 2 ]then echo "The num of parameter is not right! " exit 0fi #判断用户输入的第一个文件是否可以读i ...
分类:
系统相关 时间:
2021-04-13 12:56:38
阅读次数:
0
IDEA中使用Tomcat解决中文乱码问题 首先在Tomcat的Configurations中配置VM options: -Dfile.encoding=UTF-8 如果操作1不行,就设置IDEA的编码: 在Setting中选择File Encodings: Global Encoding选择UTF ...
分类:
其他好文 时间:
2021-04-13 12:20:15
阅读次数:
0
#coding:utf-8 import xlrd,requests file_name = r"F:\pythonScript\map_dp\data_center\data_config\second_disaster_of_agriculture_and_natural_gas.xls" wo ...
分类:
编程语言 时间:
2021-04-13 11:59:05
阅读次数:
0
"""@File : ${NAME}.py@Author : name@Time : ${DATE} ${HOUR}:${MINUTE}@explain :""" ...
分类:
其他好文 时间:
2021-04-13 11:58:13
阅读次数:
0
前面,我们学习了文件的读(read)和写(write),都是用open()方法打开文件并获取文件流。然后在读或写操作完成后进行流的关闭(close).有时候,最后的流关闭很容易被忽略,从而导致了内存泄漏的问题。 今天要说的就是with,用于自动关闭流。 用法:with open(file, mode ...
分类:
编程语言 时间:
2021-04-13 11:57:38
阅读次数:
0
include "flag.php"; 被包含文件先按参数给出的路径寻找,如果没有给出目录(只有文件名)时则按照 include_path 指定的目录寻找 $a = @$_REQUEST['hello']; 代表 $_REQUEST 将包含 $_GET 和 $_POST 的值,并且当 $_GET 和 ...
分类:
Web程序 时间:
2021-04-13 11:51:24
阅读次数:
0