07 2018 档案
摘要:/dev/null :代表空设备文件 :代表重定向到哪里,例如:echo "123" /home/123.txt 1 :表示stdout标准输出,系统默认值是1,所以" /dev/null"等同于"1 /dev/null" 2 :表示stderr标准错误 & :表示等同于的意思,2 &1,表示2的输
阅读全文
摘要:注: 下面的方法是在容器内能ping通公网IP的解决方案,如果连公网IP都ping不通,那主机可能也上不了网(尝试ping 8.8.8.8)
阅读全文
摘要:```
########
>>>[3] in [1,2,3,4]
False
>>>3 in [1,2,3,4]
True ########
x = (y = z + 1) 在Python中是非法的。
x = y = z + 1 这种赋值方式可称为 连续赋值、批量赋值、多元赋值、多变量赋值等。 ########
模拟 sorted的函数 def Sorted(v):
t = v[::...
阅读全文
摘要:```
部署流程基本步骤:
- docker search 查询对应版本 - sudo docker search key_words - docker pull 拉取对应镜像 - sudo docker pull images_name
- docker run -it images_name bash 创建container,执行命令 - docker exec -it c...
阅读全文
摘要:参考来源: http://lazybios.com/2015/03/netstat notes/
阅读全文
摘要:经常要使用docker exec it containerID bash 进入docker内部进行一些操作,干脆把它写成shell脚本节省时间。
阅读全文
摘要:来源 https://leetcode cn.com/problems/intersection of two arrays/ 题目描述 给定两个数组,写一个函数来计算它们的交集。 例子: 给定 num1= [1, 2, 2, 1], nums2 = [2, 2], 返回 [2]. 提示: 每个在结
阅读全文