
杂七杂八小tip
KingsCC
这个作者很懒,什么都没留下…
展开
-
新买笔记本误删office2021解决方法
前情:本来想装下学校免费的visio 卸载完预装office 才发现学校visio要求win专业版 而笔记本默认安装windows11家庭版 不想重装系统 只能把office装回来了解决方法:在网上找了一下一般都是在微软官网订阅里再下回来 然鹅我账号的订阅里除了让我买Microsoft365之外毛都没有以下是可行的解决方法1. 需要知道电脑预装的office版本,然后按照版本下载回来, 例如我电脑预装office 家庭和学生版2021. 安装包比较大,下载时间很长下载链接百度网盘 请输入原创 2022-03-30 15:28:45 · 7113 阅读 · 4 评论 -
记一个golang安装坑
本来想直接homebrew安装一个低版本的1.12,结果出现~ % brew install go@1.12Updating Homebrew...Error: go@1.12 has been disabled because it is not supported upstream!没搜到解决办法原创 2021-08-18 18:34:28 · 4470 阅读 · 0 评论 -
github push本地文件到远程仓库
一、在要push的文件夹下git bash here二、git init三、git add .四、git commit -m “first commit”五、git remote add origin + github地址六、git pull --rebase origin master七、git push origin master八、输入账号密码。...原创 2020-09-14 11:59:57 · 197 阅读 · 0 评论 -
HTTPSConnectionPool(host=‘***‘, port=443): Read timed out.
https://blog.youkuaiyun.com/qq_38251616/article/details/81813793尝试1:仍会发生连接错误try: requests.adapters.DEFAULT_RETRIES = 5 html = requests.post(self.base_url, data=formdata,headers=self.headers,timeout=(3,7)).text parse_html =.原创 2020-09-10 14:22:49 · 1366 阅读 · 0 评论 -
Xpath text()爬取表格 其中一个标签为空导致列表长度不一致
需求:想要获取列表["null","00"],但是使用text()只能得到["00"] 解决 如果是Xpath2.0的话,可以使用 contents4=selector.xpath('//li[@class = "tag_1"]//td/split(.)') 但是相信大多数人使用lxml,貌似仅仅支持Xpath1.0的亚子,因此只能先用//td获取td标签列表,再针对标签列表中每个标签调用.text html = ''' <li class="tag_1">原创 2020-09-03 20:58:51 · 1078 阅读 · 0 评论 -
Springboot2.x 链接mySql 报java.sql.SQLException: The server time zone value的错
在application.properties中在数据库url后添加serverTimezone=Asia/Shanghai因为默认情况下serverTimezone=UTC,比我们北京时间早8小时,写入数据库更新时间和系统时间不一致可能会报错spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=Asia/Shanghai...原创 2020-07-21 15:07:54 · 146 阅读 · 0 评论 -
Mysql忘记密码 解决方法——重置密码(Win10)
参考:https://jingyan.baidu.com/article/ff411625efbd2012e4823730.html 如果不是以管理员身份运行cmd执行命令net stop mysql会报“发生系统错误5 拒绝访问” 重新以管理员身份运行cmd,输入net stop mysql 停止MySQL服务 打开一个cmd窗口输入mysqld --skip-grant-tables,注意这个cmd命令窗口不要关闭 重新打开一个cmd窗口,原创 2020-07-21 13:50:51 · 841 阅读 · 0 评论 -
Springboot helloworld. Failed to execute goal org.springframework.boot:spring-boot-maven-plugin..
问题一: 报错后面出现from/to 阿里云镜像链接,猜测是maven配置出了问题命令行输入mvn help:system果不其然出现错误No goals have been specified for this build. You must specify a valid lifec... build failure排查setting.xml没发现问题最后只好重装大法,删除maven的文件和本地仓库,重新解压配置,具体参考这个老哥的博客:https://www.cnblogs..原创 2020-07-17 13:59:34 · 350 阅读 · 0 评论 -
Python csv文件中文写入乱码
解决乱码问题网上很多博客说encoding=‘utf-8-sig’,亲身尝试并无卵用。目前正解:encoding=‘gb18030’,权限‘wt’#python3with open(r"D:/spyder_py3/test.csv",'wt',encoding='gb18030',newline='') as f: writer=csv.writer(f) header1=['你','是', '个','好', '人'] writer.writerow(header1)发现写入c原创 2020-08-04 13:57:48 · 321 阅读 · 0 评论 -
java 两个字符串日期差多少天|正则匹配日期
//计算两日期相差天数 public static long DayDiff(String date1, String date2,String format) { if (null == date1 || null == date2) { return -1; } SimpleDateFormat formater = new SimpleDateFormat(format); long diff = 0;.原创 2020-06-29 16:23:28 · 259 阅读 · 0 评论