当大量数据时,尽量用tuple print 80*'-' print sys.getsizeof(objiect) print dir(sys) print help(sys.getsizeof) tuple 的快速写法: test1 = 1, test2 = 1 test3 = 1,2,3 a = ...
分类:
其他好文 时间:
2020-06-26 22:04:17
阅读次数:
48
id is == #id is(内存地址和判断内存地址是否相同) #id 相同,值不一定相同 #值相同,id不一定相同 # s1 = [1, 2, 3] # s2 = [1, 2, 3] # # print(id(s1)) # # print(id(s2)) # # s1 ='holting' # ...
分类:
其他好文 时间:
2020-06-26 20:29:11
阅读次数:
57
Yes, you can remove the CD-ROM (or or original installation media) from the sources.list Edit the sources.list file with the following command: sudo n ...
分类:
其他好文 时间:
2020-06-26 20:01:57
阅读次数:
58
JPA 第1章1.ORM概述[了解] ORM(Object-Relational Mapping) 表示对象关系映射。在面向对象的软件开发中,通过ORM,就可以把对象映射到关系型数据库中。只要有一套程序能够做到建立对象与数据库的关联,操作对象就可以直接操作数据库数据,就可以说这套程序实现了ORM对象 ...
分类:
其他好文 时间:
2020-06-26 14:35:48
阅读次数:
144
CentOS7 防火墙相关命令 查看防火墙状态 firewall-cmd --state 停止firewall systemctl stop firewalld.service 开启firewall systemctl stop firewalld.service 禁止firewall 开机启动 s ...
分类:
其他好文 时间:
2020-06-26 12:34:39
阅读次数:
43
Sudoku Solver (H) 题目 Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy all of the following rules: E ...
分类:
其他好文 时间:
2020-06-26 11:02:48
阅读次数:
41
给定一个以字符串表示的非负整数 num,移除这个数中的 k 位数字,使得剩下的数字最小。 注意: num 的长度小于 10002 且 ≥ k。num 不会包含任何前导零。示例 1 : 输入: num = "1432219", k = 3输出: "1219"解释: 移除掉三个数字 4, 3, 和 2 ...
分类:
其他好文 时间:
2020-06-25 23:44:08
阅读次数:
51
Docker在Linux上下载与安装配置 官方文档: https://docs.docker.com/install/linux/docker-ce/centos/#set-up-the-repository 1、删除旧版本的docker,防止有残留 sudo yum remove docker \ ...
分类:
系统相关 时间:
2020-06-25 19:27:32
阅读次数:
190
1.删去数据 删去数据是指在C#的泛型列表List中,将指定方位的值删去掉,删去后,列表的索引会发生变化。如将索引值2删去掉,则后面的索引值3就会前移,代替索引值2的方位。 C#中,在泛型列表List中删去数据,能够运用如下3个办法来完成: (1).Remove()办法:依据指定的值来删去。 (2) ...
分类:
其他好文 时间:
2020-06-25 17:36:41
阅读次数:
80
Iterator对象在foreach循环的时候只能使用自己的remove/add方法,如果使用了集合的remove/add方法或者其他线程并发时修改了集合的内容,就属于fail-fast机制,即是一个错误,但是该错误会尽最大可能地抛出ConcurrentModificationException异常 ...
分类:
其他好文 时间:
2020-06-25 15:41:03
阅读次数:
60