随笔分类 -  algotithmBug

摘要:s = 'abcaabc's = s.rstrip('abc') #!/usr/bin/python# -*- coding: UTF-8 -*- random_string = 'this is good ' # 字符串末尾的空格会被删除print(random_string.rstrip()) 阅读全文
posted @ 2024-08-12 14:22 papering 阅读(116) 评论(0) 推荐(0)
摘要:pd.read_sql(sql, conn) data.to_csv(f'''./exception_csv/{number}.csv''') 翻译 搜索 复制 阅读全文
posted @ 2023-06-09 10:36 papering 阅读(23) 评论(0) 推荐(0)
摘要:chore: avoid deadlock after stopping TimingWheel (#1768) · zeromicro/go-zero@8bc34de https://github.com/zeromicro/go-zero/commit/8bc34defc4240f3d11ca4 阅读全文
posted @ 2023-05-10 22:52 papering 阅读(27) 评论(0) 推荐(0)
摘要:使用Redis实现用户积分及TopN排行榜功能-腾讯云开发者社区-腾讯云 https://cloud.tencent.com/developer/article/1791747 基于Redis实现排行榜周期榜与最近N期榜-腾讯云开发者社区-腾讯云 https://cloud.tencent.com/ 阅读全文
posted @ 2023-01-03 19:11 papering 阅读(54) 评论(0) 推荐(0)
摘要:线程 栈帧链 多处理器编程:从入门到放弃 (线程库;现代处理器和宽松内存模型) [南京大学2022操作系统-P3]_哔哩哔哩_bilibili https://www.bilibili.com/video/BV13u411X72Q/?spm_id_from=333.788 程序=状态机 操作系统上的 阅读全文
posted @ 2022-08-13 23:08 papering 阅读(38) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/er-cha-shu-zhong-he-wei-mou-yi-zhi-de-lu-jing-lcof/ /** * Definition for a binary tree node. * type TreeNode struct { 阅读全文
posted @ 2022-04-25 19:57 papering 阅读(54) 评论(0) 推荐(0)
摘要:动态规划 游标 55. 跳跃游戏 - 力扣(LeetCode) https://leetcode.cn/problems/jump-game/ import "log" func max(a, b int) int { if a > b { return a } return b } // [1] 阅读全文
posted @ 2022-04-24 01:31 papering 阅读(62) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/ju-zhen-zhong-de-lu-jing-lcof/ func exist(board [][]byte, word string) bool { n := len(word) r := len(board) c := len 阅读全文
posted @ 2022-04-22 22:48 papering 阅读(83) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/zui-chang-bu-han-zhong-fu-zi-fu-de-zi-zi-fu-chuan-lcof/ 剑指 Offer 48. 最长不含重复字符的子字符串 请从字符串中找出一个最长的不包含重复字符的子字符串,计算该最长子字符 阅读全文
posted @ 2022-04-19 00:12 papering 阅读(69) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/valid-anagram/ 异或运算找重复值 func f(s string) int { n := len(s) var a int a = 1 for i := 0; i < n; i++ { a ^= int(rune(s[i 阅读全文
posted @ 2022-04-17 15:52 papering 阅读(48) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/ransom-note/ func canConstruct(ransomNote string, magazine string) bool { m := len(ransomNote) n := len(magazine) if 阅读全文
posted @ 2022-04-17 13:47 papering 阅读(61) 评论(0) 推荐(0)
摘要:剑指 Offer 50. 第一个只出现一次的字符 - 力扣(LeetCode) https://leetcode-cn.com/problems/di-yi-ge-zhi-chu-xian-yi-ci-de-zi-fu-lcof/ 剑指 Offer 50. 第一个只出现一次的字符 在字符串 s 中找 阅读全文
posted @ 2022-04-16 18:03 papering 阅读(48) 评论(0) 推荐(0)
摘要:def get_tree_ids(tree: dict, keyword='id', child_name="children") -> list: ''' 求树的全部节点的id 方法:1、递归;2、数据库遍历parent_id查询 ''' ids = [tree[keyword]] childre 阅读全文
posted @ 2022-03-09 23:03 papering 阅读(1144) 评论(0) 推荐(0)