上一页 1 2 3 4 5 6 7 ··· 12 下一页
摘要: 所有权 所有权是Rust独有的特性,它让Rust无需GC就可以保证内存安全。 所有权解决的问题 Stack-栈 压入(把值压入stack不叫分配) stack存放的是固定大小的数据。 应为指针是已知固定大小的,可以把指针存放到stack上。 把数据压入stack比在heap上分配快的多。 Heap- 阅读全文
posted @ 2024-09-25 09:56 lxd670 阅读(53) 评论(0) 推荐(0)
摘要: 为什么学习迭代器 如何for循环自定义实例对象 class Student: def __init__(self): self.students = [] def add_student(self, name, age): self.students.append({ "name": name, " 阅读全文
posted @ 2024-09-25 09:53 lxd670 阅读(24) 评论(0) 推荐(0)
摘要: 1.node表格 ip | labels + 1.1.1.1 | x_build rv_build 1.1.1.2 | x_build rv_build 1.1.1.3 | x_build rv_build 1.1.1.4 | x_build aa_rv_build 1.1.1.5 | x_buil 阅读全文
posted @ 2024-01-17 09:59 lxd670 阅读(30) 评论(0) 推荐(0)
摘要: <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, 阅读全文
posted @ 2024-01-09 01:05 lxd670 阅读(70) 评论(0) 推荐(0)
摘要: __doc__用法 def fun1(): """This is a fun1""" pass class Debug: """This is a class for debugging""" def __init__(self): """ This funtion only has one pro 阅读全文
posted @ 2024-01-07 22:56 lxd670 阅读(167) 评论(0) 推荐(0)
摘要: 1.__getattr__ 和 __getattribute__区别 1.__getattr__ 在访问对象的属性而属性不存在时触发。它只会在属性不存在时调用,而对已存在的属性访问不会触发。 2.__getattribute__ 在访问对象的任何属性时都会触发。无论属性是否存在,每次属性访问都会经过 阅读全文
posted @ 2024-01-07 02:50 lxd670 阅读(49) 评论(0) 推荐(0)
摘要: docker网络驱动 1.bridge(桥接网络驱动):这是Docker默认使用的网络驱动,它通过docker0网桥连接到宿主机,并为容器分配IP地址,使得容器可以互相通信和与宿主机通信。 2.host(主机网络驱动):使用主机网络驱动时,容器与宿主机共享网络命名空间,容器可以直接使用宿主机的网络接 阅读全文
posted @ 2024-01-07 01:47 lxd670 阅读(210) 评论(0) 推荐(0)
摘要: 1.GO ENV 查看env值 go env GO111MODULE="on" GOARCH="arm64" ... 设置env Go 1.13 及以上(推荐) # 开启GO mod 和设置go模块代码 $ go env -w GO111MODULE=on $ go env -w GOPROXY=h 阅读全文
posted @ 2024-01-07 01:46 lxd670 阅读(35) 评论(0) 推荐(0)
摘要: 1.python类 类本质是一个字典(本质使用空间换时间) class A: def __init__(self, x) -> None: self.x = x a = A(1) print(a.x) # 1 # 添加y属性 a.y = 2 print(a.y) # 2 print(a.__dict 阅读全文
posted @ 2024-01-07 01:34 lxd670 阅读(28) 评论(0) 推荐(0)
摘要: 终端报错输出 def f1(x, y): return f2(x, y) def f2(x, y): return x / y def f3(): res = f1(2, 0) print(res) if __name__ == '__main__': f3() python3 error_test 阅读全文
posted @ 2023-10-15 22:10 lxd670 阅读(166) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 12 下一页