代码片段fromurllib.requestimporturlretrieveimportsocketimportosimportsysdefreporthook(blocknum,bs,size):#blocknum:已经下载的数据块bs:数据块的大小size:远程文件的大小per=100.0*blocknum*bs/sizeifper>100:per=100sys.stdout.writ
分类:
编程语言 时间:
2020-03-31 14:22:47
阅读次数:
99
当一个视图有list、create、retrieve、update、destroy所有的功能,路由组件可以用DRF自带的routers简写 项目总路由:pro/urls.py from django.contrib import admin from django.urls import path, ...
分类:
其他好文 时间:
2020-03-31 00:57:04
阅读次数:
73
修改 我们打开一个页面,随便修改一下,保存,结果会出现错误:Unable to write file (NoPermissions (FileSystemError): Error: EACCES: permission denied, 我们在这里找到答案:https://github.com/mi ...
分类:
Web程序 时间:
2020-03-26 21:29:23
阅读次数:
157
数据测试的时候出现: 网上查资料说的是mysql5.x 版本和 8.x版本的区别; 5.7版本是:default_authentication_plugin=mysql_native_password 8.x版本就是:default_authentication_plugin=caching_sha ...
分类:
数据库 时间:
2020-03-26 19:08:23
阅读次数:
88
如下图所示,当我Git克隆别人的repo时,会发生这样的错误.发现它尝试用http和https代理,后来仔细回想了下,原来是自己用了代理,忘记取消 # 查看当前git 的设置 git config --global -l # 设置代理 git config --global http.proxy h ...
分类:
数据库 时间:
2020-03-24 12:56:02
阅读次数:
1310
用eclipse配置好了struts2,一运行tomcat就报错,我这里原因是我吧struts2的jar包都放进去了,太多了所以报错,然后我去掉了大部分留下几个核心jar包,还是报错, java.lang.NoClassDefFoundError: com/opensymphony/xwork2/A ...
分类:
编程语言 时间:
2020-03-23 22:24:43
阅读次数:
1897
在Spring Boot项目中,出现这个错误有两种情况: 一,在main方法所在的类忘记添加@SpringBootApplication 二,缺少依赖,添加即可 <dependency> <groupId>org.springframework.boot</groupId> <artifactId> ...
分类:
移动开发 时间:
2020-03-23 20:33:18
阅读次数:
82
命令行:sudo apt install squid 提示错误:package 'squid' has no installation candidate 尝试命令:sudo apt-get install squid 出现错误提示:Unable to locate pakage squid 输入: ...
分类:
系统相关 时间:
2020-03-22 19:31:50
阅读次数:
99
由于浏览器必须要在执行事件处理函数之后,才能知道有没有掉用过 preventDefault() ,这就导致了浏览器不能及时响应滚动,略有延迟。 所以为了让页面滚动的效果如丝般顺滑,从 chrome56 开始,在 window、document 和 body 上注册的 touchstart 和 tou ...
分类:
其他好文 时间:
2020-03-21 14:49:59
阅读次数:
48
安装插件时,弹出提示框: Package Control Unable to download XXX. Please view the console for more details. 一番搜索后在github上找到答案: 解决方法:在这里插入图片描述1.打开Sublime Text,Prefe ...
分类:
其他好文 时间:
2020-03-20 14:30:25
阅读次数:
627