posted @ 2023-05-27 16:49 huhuuu 阅读(21) 评论(0) 推荐(0)
摘要:
https://www.nowcoder.com/practice/5dfded165916435d9defb053c63f1e84?tpId=295&tqId=2427094&ru=/exam/oj&qru=/ta/format-top101/question-ranking&sourceUrl= 阅读全文
摘要:
借用栈的思想,维护一个单调递减的栈。 阅读全文
posted @ 2023-05-26 16:35 huhuuu 阅读(22) 评论(0) 推荐(0)
摘要:
原因可能是在以前pull下来的代码自动合并失败解决办法:切换到项目文件夹中,使用git命令舍弃本地代码,远端版本覆盖本地版本(慎重)$:git fetch --all$:git reset --hard origin/master$:git fetch保留本地的更改,中止合并->重新合并->重新拉取 阅读全文
posted @ 2022-02-26 15:53 huhuuu 阅读(48) 评论(0) 推荐(0)
摘要:
有个文本文件,需要替换里面的一个词,用python来完成,我是这样写的: 1 2 3 4 5 def modify_text(): with open('test.txt', "r+") as f: read_data = f.read() f.truncate() #清空文件 f.write(re 阅读全文
posted @ 2021-09-08 17:19 huhuuu 阅读(224) 评论(0) 推荐(0)
摘要:
https://www.cnblogs.com/yyds/p/6901864.html 阅读全文
posted @ 2021-04-14 20:27 huhuuu 阅读(36) 评论(0) 推荐(0)
摘要:
kill -9 $(ps -ef|grep 进程名关键字|grep -v grep|awk '{print $2}') https://www.cnblogs.com/chay/p/10473091.html 阅读全文
posted @ 2021-03-15 15:39 huhuuu 阅读(478) 评论(0) 推荐(0)
摘要:
python中有 try——except 的方法捕获异常,可以获取到异常的种类以及自定义异常, 但是有时候对于debug测试来说,信息不全,比如说 触发异常的具体位置在哪: import tracebacktry: num= int('abc')except Exception: traceback 阅读全文
posted @ 2020-02-11 11:39 huhuuu 阅读(1148) 评论(0) 推荐(0)
摘要:
1、 "content":"12321231","1231231" 只匹配前一个 "content":"12321231" "content":".+?" 阅读全文
posted @ 2020-01-22 10:07 huhuuu 阅读(135) 评论(0) 推荐(0)
摘要:
例子: 1 2 3 4 5 6 7 try (FileReader reader = new FileReader("data.txt")) { ... }catch (IOException io) { ... }finally{ .... } 这个括号在JDK1.7之前是没有的,是1.7的新特性 阅读全文
posted @ 2019-11-07 17:16 huhuuu 阅读(772) 评论(0) 推荐(0)
浙公网安备 33010602011771号