摘要:
使用内置库 atexit 注册程序退出前要执行的函数. 程序崩溃和外部中断都会执行。 import atexit import time def f(): print('结束') atexit.register(f) if __name__ == '__main__': for i in range 阅读全文
摘要:
背景 最近尝试编译C++项目,编译的时候遇到如下报错: .obj/Inotify.o:(.bss+0x0): multiple definition of `EVENT_NAME' .obj/FileServer.o:(.bss+0x0): first defined here .obj/serve 阅读全文
摘要:
Dependence Inversion Principle:依赖倒置原则 Single Responsibility Principle:单一职责原则 Open Closed Principle:开闭原则 Liskov Substitution Principle:里氏替换原则 Law of De 阅读全文