文章目录 7.1 `List`容量初始化7.2 元素个数确定时推荐使用Tuple7.3 推荐使用局部变量引用频繁使用的外界对象7.4 尽量使用`generator comprehension`代替`listcomprehension`7.5 使用字符串格式化方式代替"+"和"+="操作符7.1 Li ...
分类:
编程语言 时间:
2021-07-12 17:58:09
阅读次数:
0
@echo off set "PATH=%~dp0bin;%path%" echo. echo 当前配置 echo. bash --login -c "echo mirror=`apt-cyg mirror`;echo cache=`apt-cyg cache`;echo;apt-cyg proxy ...
上一篇升级版,转换文件内容。 #!/user/bin env python # author:Simple-Sir # time:2021/7/9 23:32 def txt_2_list(filename): dic = {} dic_k = [] dic_v = [] with open(fil ...
分类:
编程语言 时间:
2021-07-09 17:54:52
阅读次数:
0
private string HttpRequest(Dictionary<string, object> dic, string url) { string json = JSONhelper.ObjToJson(dic); WebRequest request = WebRequest.Crea ...
分类:
Web程序 时间:
2021-07-07 17:56:22
阅读次数:
0
二维数组的遍历使用foreach public int numWays(int n, int[][] relation, int k) { ways = 0; this.n = n; this.k = k; edges = new ArrayList<>(); //把关系处理成list,类似于图的每 ...
分类:
编程语言 时间:
2021-07-07 17:49:25
阅读次数:
0
@PostMapping("uploads") public String posts(@RequestParam("file") List<MultipartFile> files){//参数file以list数组接收 if (files.isEmpty()) { return "上传失败,请选择 ...
分类:
Web程序 时间:
2021-07-06 16:22:43
阅读次数:
0
普通属性直接赋值,高级属性可以根据你的业务需要进行赋值, /* 定义高级属性 */ const user = { _age: 0 } //这种方式定义的age无法存储数,只是对某个变量成员的代理,加入get和set的目是让你的属性具有 //了行为,也就是我们可以再访问或者是设置属性的时候,添加更多的 ...
分类:
其他好文 时间:
2021-07-05 19:07:14
阅读次数:
0
const list = [ { type: 'shop', momey: 223 }, { type: 'study', momey: 341 }, { type: 'shop', momey: 821 }, { type: 'transfer', momey: 821 }, { type: 's ...
分类:
编程语言 时间:
2021-07-05 19:06:57
阅读次数:
0
<?php $info = ""; $req = []; $flag="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; ini_set("display_error", false); //为一个配置选项设置值 error_reporting(0); //关闭所有PHP错 ...
分类:
Web程序 时间:
2021-07-05 19:06:03
阅读次数:
0
<?php error_reporting (E_ERROR); ignore_user_abort(true); ini_set('max_execution_time',0); $ipaddr = 'xxx.xxx.xxx.xxx'; $port = '443'; $msg = php_unam ...