上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 54 下一页
摘要: 创建一个文件夹 goWeb: [root@VM_0_8_centos goWeb]# ls Dockerfile main 将编译好的go文件main,拖到goWeb内并赋权(chmod 777 main)。 在goWeb内创建文件Dockerfile,内容如下: FROM alpine:lates 阅读全文
posted @ 2020-08-13 10:18 aaronthon 阅读(3080) 评论(0) 推荐(0)
摘要: 根据端口号查看进程PID: netstat -nlp | grep 端口号lsof -i :端口号 根据进程PID查对应的程序路径: ll /proc/进程PID/pwd 结束! 阅读全文
posted @ 2020-08-13 09:23 aaronthon 阅读(1032) 评论(0) 推荐(0)
摘要: 自动安装: sudo apt-get updatesudo apt-get install lrzsz 阅读全文
posted @ 2020-08-11 20:03 aaronthon 阅读(600) 评论(0) 推荐(0)
摘要: windowds下编译go项目,执行如下操作时: SET CGO_ENABLED=0 set GOARCH=amd64 set GOOS=linux go build main.go set GOOS=linux这个操作的linux后面带了空格,编译器不能自动去掉空格,导致编译不过去。结束! 阅读全文
posted @ 2020-08-11 15:36 aaronthon 阅读(3391) 评论(2) 推荐(1)
摘要: 如下定义: mapStr := make(map[string]string) 只能储存string类型的value。 如下定义: mapInt := make(map[string]int) 只能保存int类型的value。 如下定义: mapInterface := make(map[strin 阅读全文
posted @ 2020-08-03 15:09 aaronthon 阅读(945) 评论(0) 推荐(0)
摘要: 一、网络端口映射 (1)使用 -P 参数创建一个python应用容器,容器内部端口随机映射到主机的高端口(flask的默认端口随机映射主机的32772端口): [root@VM_0_8_centos ~]# docker run -d -P training/webapp python app.py 阅读全文
posted @ 2020-07-27 14:23 aaronthon 阅读(1311) 评论(0) 推荐(0)
摘要: 一、查看镜像列表 [root@VM_0_8_centos test]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE test/ubuntu v1 e76cc2165488 22 hours ago 73.9MB ubuntu latest a 阅读全文
posted @ 2020-07-24 16:42 aaronthon 阅读(462) 评论(0) 推荐(0)
摘要: 一、什么是多态 多态是同一个行为具有多个不同表现形式或形态的能力。 多态就是同一个接口,使用不同的实例而执行不同操作。 二、多态的优点 1. 消除类型之间的耦合关系 2. 可替换性 3. 可扩充性 4. 接口性 5. 灵活性 6. 简化性 三、多态存在的三个必要条件 继承 重写 父类引用指向子类对象 阅读全文
posted @ 2020-07-20 15:39 aaronthon 阅读(129) 评论(0) 推荐(0)
摘要: 单词 说明 protected 受保护的 extends 扩充、扩展 super 上一级、超级的 access 访问 inheritance 继承、遗传 base class 基类、父类 derived class 子类、派生类 modifier 修饰符 一、继承 继承就是子类继承父类的特征和行为, 阅读全文
posted @ 2020-07-20 15:16 aaronthon 阅读(1358) 评论(0) 推荐(1)
摘要: 单词 说明 this 这,这个 static 静态的 overloaded 重载,超载 overloaded method 方法重载 public 公共的 private 私有的 一、什么是封装 封装就是隐藏实现细节,将属性私有化,提供共有方法访问私有属性。 封装可以实现: 修改属性的可见性来限制对 阅读全文
posted @ 2020-07-20 14:05 aaronthon 阅读(341) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 54 下一页