摘要: 连接阿里云服务器上的数据库,速度很慢账户密码正确已关闭防火墙 修改 /etc/my.cnf,在最下侧添加配置skip-name-resolve 在连接远程数据库的时候,直接跳过MySQL的DNS解析重启mysqld服务 service mysqld restart,解决。 阅读全文
posted @ 2021-05-08 12:40 R小哥 阅读(1249) 评论(0) 推荐(0) 编辑
摘要: 数据库表发生变动后,需要同步到models.py中,命令: python manage.py inspectdb >> myapp/models.py 阅读全文
posted @ 2020-07-24 19:28 R小哥 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 在学习Python爬虫的时候,突然报错:urllib.error.HTTPError: HTTP Error 403: Forbidden 问题原因:出现该错误的原因是服务器开启了反爬虫,一般情况下只需要设置header模拟浏览器即可,但是urlretrieve并未提供header参数。 解决方案一 阅读全文
posted @ 2020-06-04 09:38 R小哥 阅读(1351) 评论(0) 推荐(0) 编辑
摘要: 项目启动时,报错:java.sql.SQLException: ORA-00604: 递归 SQL 级别 1 出现错误 ORA-20001: You can not login,Please contact administrator ORA-06512: 在 line 8 at oracle.jd 阅读全文
posted @ 2020-06-03 16:44 R小哥 阅读(997) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # -*- coding:utf-8 -*- #@Time : 2020/4/23 8:57 #@Author: ltl #@File : daxueDownload.py import urllib.request import threading fr 阅读全文
posted @ 2020-04-23 09:43 R小哥 阅读(411) 评论(0) 推荐(0) 编辑
摘要: Python的格式化输出 方法一:传统方法 与C语言类似,可以采用“%”作为格式化输出的标记。如: print("The first number: %5d, the second number: %8.2f" % (123, 456.789)) 输出的结果为: The first number: 阅读全文
posted @ 2020-04-23 09:42 R小哥 阅读(708) 评论(0) 推荐(0) 编辑
摘要: 解决方案:import urllib.requestfrom bs4 import BeautifulSoup site = 'http://www.pm25.com/' html = urllib.request.urlopen(site) soup = BeautifulSoup(html,'h 阅读全文
posted @ 2020-04-22 17:14 R小哥 阅读(918) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # -*- coding:utf-8 -*- #@Time : 2020/4/22 16:14 #@Author: ltl #@File : PM2.5Download.py import urllib.request import threading f 阅读全文
posted @ 2020-04-22 17:09 R小哥 阅读(559) 评论(0) 推荐(0) 编辑
摘要: 查看本机的公网IP:https://ip.cn/ 目前总结了两种获取客户端的公网IP方法。 方法一:通过第三方网站进行获取() public static void main(String[] args){ String ip = ""; String chinaz = "http://ip.chi 阅读全文
posted @ 2020-02-28 22:17 R小哥 阅读(1272) 评论(0) 推荐(1) 编辑
摘要: 1、引入jar包路径不对。 2、引入jar包版本不对。 3、引入非jar包文件 阅读全文
posted @ 2020-01-07 18:13 R小哥 阅读(427) 评论(0) 推荐(0) 编辑