01 2021 档案
摘要:list1 = [] if list1 == []: print("空列表") # 空列表 if not list1: print("空列表") # 空列表 a = None if a == None: print("a为None") # a为None if not a: print("a为None
阅读全文
摘要:git 回退到某个版本,并推送到远程 git reset --hard xxxx 本地代码回滚了,落后于远程分支,push是推不上去的 git push -f -u origin dev 使用以上命令强制推送 git revert 也可以,详情百度
阅读全文
摘要:import os import sys def get_current(): print(os.getcwd()) print(sys.argv[0]) print(os.path.abspath("../..")) print(os.path.abspath("..")) print(os.pa
阅读全文
摘要:# Python2 import time def get_current_time(): current_time = time.localtime(time.time()) current_time = time.strftime('%Y-%m-%d %H:%M:%S', current_tim
阅读全文
摘要:VUE 1. 第一个VUE程序 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
阅读全文
摘要:windows: pycharm选择Conda executable路径: D:\XXX\Anaconda3\Scripts\conda.exe Conda 环境存放位置: D:\XXX\Anaconda3\envs 清除其他的软件源, 添加清华源 conda config --remove-key
阅读全文
摘要:import time from threading import Thread import inspect import ctypes def _async_raise(tid, exctype): """Raises an exception in the threads with id ti
阅读全文
摘要:import inspect # 定义一个函数 def func(): print("第一行") print("第二行") if __name__ == '__main__': # 使用 inspect.getsourcelines() 函数获取对象源码和开始行数 inspect_res = ins
阅读全文