Stay Hungry,Stay Foolish!

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 24 下一页
摘要: sqlachemy https://www.sqlalchemy.org/ 面向数据库的ORM工具,其仅仅做ORM工作,不做校验工作。 SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives appli 阅读全文
posted @ 2022-07-12 23:19 lightsong 阅读(872) 评论(0) 推荐(0) 编辑
摘要: class -- 普通数据聚合 https://python.land/objects-and-classes#What_is_a_Python_object 类可以用来管理聚合数据,但是本身类病是不是为数据管理设计。 class Car: speed = 0 started = False def 阅读全文
posted @ 2022-07-08 23:03 lightsong 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Background 对于一些场景, 我们要求词典对于不存在的key,不报错,返回默认值。 dict有处理方法, get 方法 或者 setdefault方法。 但是过于繁琐。 Handling Missing Keys in Dictionaries https://realpython.com/ 阅读全文
posted @ 2022-07-07 22:34 lightsong 阅读(37) 评论(0) 推荐(0) 编辑
摘要: MST -- Minumum Spinning Tree https://www.geeksforgeeks.org/kruskals-minimum-spanning-tree-algorithm-greedy-algo-2/?ref=leftbar-rightbar 简化一个图, 在保证所有节点 阅读全文
posted @ 2022-06-21 23:45 lightsong 阅读(43) 评论(0) 推荐(0) 编辑
摘要: A Knight’s Tour https://www.tutorialspoint.com/The-Knight-s-tour-problem In chess, we know that the knight can jump in a special manner. It can move e 阅读全文
posted @ 2022-06-20 13:23 lightsong 阅读(37) 评论(0) 推荐(0) 编辑
摘要: B - Unbalanced Squares https://atcoder.jp/contests/arc142/tasks/arc142_b 思路 按照第一行,第二行, ......, 第n行的顺序,将所有元素排成一行 X11, X12, ...., X1N, X21, X22, ...., X 阅读全文
posted @ 2022-06-20 12:00 lightsong 阅读(31) 评论(0) 推荐(0) 编辑
摘要: Best First Search (Informed Search) https://www.geeksforgeeks.org/best-first-search-informed-search/ 最好优先搜索 BFS DFS使用暴力方式盲目搜索。 Best First 方式,使用评价函数来决定 阅读全文
posted @ 2022-06-17 21:24 lightsong 阅读(51) 评论(0) 推荐(0) 编辑
摘要: A* Search Algorithm https://www.geeksforgeeks.org/a-search-algorithm/?ref=lbp 目标: 在存在障碍设置的空间中做路径搜索。 除了这个算法,还有其它搜索算法,见 https://www.cs.cmu.edu/~motionpl 阅读全文
posted @ 2022-06-17 15:37 lightsong 阅读(58) 评论(0) 推荐(0) 编辑
摘要: Search Algorithms in AI https://www.geeksforgeeks.org/search-algorithms-in-ai/?ref=lbp 搜索算法是agent在特定背景下执行目标搜索的方法。 搜索问题包括: 状态空间 启始状态 目标状态 目标检测函数 解决方法,对 阅读全文
posted @ 2022-06-16 11:26 lightsong 阅读(81) 评论(0) 推荐(0) 编辑
摘要: D - ±1 Operation 2 https://atcoder.jp/contests/abc255/tasks/abc255_d 思路 首先将 A 数组进行排序, 然后计算A数组的累加数组, 即每个位置上的左侧累加值, 对于每个查询 x, 使用二分查找, 找到 upper_bound 位置, 阅读全文
posted @ 2022-06-13 14:25 lightsong 阅读(36) 评论(0) 推荐(0) 编辑
摘要: D - Together Square https://atcoder.jp/contests/abc254/tasks/abc254_d 思路 Code #include <bits/stdc++.h> using namespace std; int gcd(int a,int b){ if(b 阅读全文
posted @ 2022-06-08 12:44 lightsong 阅读(47) 评论(0) 推荐(0) 编辑
摘要: K Swap https://atcoder.jp/contests/abc254/tasks/abc254_c 思路 Code #include <bits/stdc++.h> #include <vector> #include <algorithm> #include <deque> #inc 阅读全文
posted @ 2022-06-06 22:35 lightsong 阅读(66) 评论(0) 推荐(0) 编辑
摘要: CPU Scheduling in Operating Systems https://www.geeksforgeeks.org/cpu-scheduling-in-operating-systems/?ref=leftbar-rightbar CPU调度是一个过程,当一个进程被挂起时候,例如等待 阅读全文
posted @ 2022-06-05 23:29 lightsong 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 问题 http://poj.org/problem?id=2386 Description Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by 阅读全文
posted @ 2022-06-05 14:58 lightsong 阅读(15) 评论(0) 推荐(0) 编辑
摘要: Dijstra https://chinese.freecodecamp.org/news/dijkstras-shortest-path-algorithm-visual-introduction/ https://mathweb.ucsd.edu/~fan/teach/202/notes/04g 阅读全文
posted @ 2022-06-03 23:41 lightsong 阅读(42) 评论(0) 推荐(0) 编辑
摘要: E - Road Reduction https://atcoder.jp/contests/abc252/tasks/abc252_e 思路 https://www.cnblogs.com/zengzk/p/16296821.html 一眼最短路树,跑遍dijkstra就行了。 分析: 要求从某个 阅读全文
posted @ 2022-06-01 09:55 lightsong 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 巧抓纪念币 http://go.helloworldroom.com:50080/problem/2723 题目描述 为了让同学们留下美好的回忆,博物院准备了很多纪念币,但需要通过特制的游戏手柄 抓取。纪念币在数轴的任意位置 Y。游戏手柄通过轨道移动,轨道与数轴同长且首尾对齐。 当游戏手柄的坐标与纪 阅读全文
posted @ 2022-05-30 23:36 lightsong 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 编钟演绎 http://go.helloworldroom.com:50080/problem/2719 题目描述 同学们在古典乐器馆见到了编钟,领略了编钟清脆明亮、悠扬动听的音质。谱曲体验更 是让同学们跃跃欲试。游戏开始,屏幕上自动生成若干个音符,每个音符都用一个整数表示 其音调高低,同学们可以选 阅读全文
posted @ 2022-05-27 23:51 lightsong 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Definition https://en.wikipedia.org/wiki/Dynamic_programming 数学和计算机程序上的术语。 如果一个复杂的问题能够分解成更加简单的子问题,并且有最佳子结构, 那么此问题可应用动态规划。 负责问题的最优解,可以从子问题的最优解找到。 类似数学上 阅读全文
posted @ 2022-05-24 22:18 lightsong 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 新“愚公移山” http://go.helloworldroom.com:50080/problem/2721 题目描述 为了吸引中小学生,参观博物院不再停留在看和听,核心理念转变成了互动。新“愚公 移山”项目,屏幕上出现 n 个石块,屏幕下方的底盘是二维方格,每个方格恰好能放置一个 石块。石块放置 阅读全文
posted @ 2022-05-24 13:48 lightsong 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Takahashi and Animals https://atcoder.jp/contests/abc251/tasks/abc251_e Solution 参考 https://blog.csdn.net/qq_52678569/article/details/124790849 https: 阅读全文
posted @ 2022-05-19 10:20 lightsong 阅读(72) 评论(0) 推荐(0) 编辑
摘要: Python Variable Scope https://data-flair.training/blogs/python-variable-scope/ 变量作用域,指代特定的代码区域, 在此与区内变量可以被访问。 变量总是跟作用域绑定, 在其定义时候。 作用域分为四类: L: 局部作用域, 例 阅读全文
posted @ 2022-05-12 11:25 lightsong 阅读(47) 评论(0) 推荐(0) 编辑
摘要: Adjacent Swaps https://atcoder.jp/contests/abc250/tasks/abc250_c Solution 这是一个典型的利用双向链表来提供性能的问题。 利用双向链表,需要注意: (1)添加 表头 和 表尾 节点。 (2)抽象出交换相邻节点,需要用到的 pre 阅读全文
posted @ 2022-05-11 21:43 lightsong 阅读(64) 评论(0) 推荐(0) 编辑
摘要: attribute https://medium.com/swlh/attributes-in-python-6-concepts-to-know-1db6562057b1 OOP中对象带有的参数,叫做 field attribute property python中把这种参数叫做 attribut 阅读全文
posted @ 2022-05-10 00:01 lightsong 阅读(64) 评论(0) 推荐(0) 编辑
摘要: function definition and call https://www.programiz.com/python-programming/function-argument 函数参数定义有三种形式: (1)固定位置参数 (2)可变参数 (3)任意参数 Arguments - 1 - 固定位 阅读全文
posted @ 2022-05-08 20:45 lightsong 阅读(33) 评论(0) 推荐(0) 编辑
摘要: magic methods https://www.educba.com/python-magic-method/?msclkid=8119e878ce8511ec9d52cc88840aaf9b 魔法方法是一组预定义的功能方法,一般不需要程序员关注,所以称为魔法方法, 这里翻译成 神秘方法,更加合 阅读全文
posted @ 2022-05-08 14:30 lightsong 阅读(33) 评论(0) 推荐(0) 编辑
摘要: dominate https://github.com/Knio/dominate domnate是一款强大的python领域的html生成库。 Dominate is a Python library for creating and manipulating HTML documents usi 阅读全文
posted @ 2022-04-29 23:58 lightsong 阅读(281) 评论(0) 推荐(0) 编辑
摘要: type and range 越界问题非常频繁地困扰着开发人员 CPP常用的类型定义不能体现数据的bit位数,让开发人员非常抓狂,相信很多人都遇到过,当判定一个数值是否越界时候,一定是先去网上查表, 但是数据类型对应的范围,依赖具体的compiler的编译器实现的, 嵌入式系统往往范围比较小, 服务 阅读全文
posted @ 2022-04-24 11:00 lightsong 阅读(62) 评论(0) 推荐(0) 编辑
摘要: Environment https://dev.to/flippedcoding/difference-between-development-stage-and-production-d0p 产品研发过程涉及三种环境: 开发环境 -- 研发人员使用 Stage -- 预发布环境,对标真实环境,做A 阅读全文
posted @ 2022-04-23 00:04 lightsong 阅读(95) 评论(0) 推荐(0) 编辑
摘要: https://www.keboola.com/blog/eventual-consistency What is eventual consistency and why should you care about it? The anatomy of distributed storage 分布 阅读全文
posted @ 2022-03-17 20:51 lightsong 阅读(66) 评论(0) 推荐(0) 编辑
摘要: MathJax https://www.mathjax.org/ web页面上的数学公式显示引擎。 使用纯web技术css等 支持多种输入格式: MathML Tex asciimath 可访问性好,可复用。 Beautiful and accessible math in all browsers 阅读全文
posted @ 2022-03-14 14:32 lightsong 阅读(66) 评论(0) 推荐(0) 编辑
摘要: Python Metaclasses https://realpython.com/python-metaclasses/#type-and-class Type and Class type is a metaclass, of which classes are instances. Just 阅读全文
posted @ 2022-03-07 02:14 lightsong 阅读(37) 评论(0) 推荐(0) 编辑
摘要: SSR https://css-tricks.com/server-side-react-rendering/ react代码在客户端渲染,这样导致SEO不友好。 由此引入,SSR 服务器端渲染技术:ReactDomServer库。 The Benefits of Server-Side Rende 阅读全文
posted @ 2022-03-02 13:40 lightsong 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Structured data https://databricks.com/blog/2017/02/23/working-complex-data-formats-structured-streaming-apache-spark-2-1.html 结构化数据 -- 在数据上定义了一层模式, 例 阅读全文
posted @ 2022-03-01 14:55 lightsong 阅读(27) 评论(0) 推荐(0) 编辑
摘要: SOLID https://team-coder.com/solid-principles/ OOP五原则,帮助开发者设计 可维护 和 可扩展的类。 SOLID is an acronym for five principles that help software developers desig 阅读全文
posted @ 2022-02-20 23:58 lightsong 阅读(55) 评论(0) 推荐(0) 编辑
摘要: Separation of Concerns -- Root Principle https://effectivesoftwaredesign.com/2012/02/05/separation-of-concerns/ 道生一,一生二 混沌世界初开时候,为一团气体, 盘古开天辟地之后, 轻气上扬 阅读全文
posted @ 2022-02-20 23:40 lightsong 阅读(42) 评论(0) 推荐(0) 编辑
摘要: Overview https://refactoring.guru/refactoring 把 dirty code 转变成 clean code 过程叫重构。 What is refactoring? Clean code clean code有如下特征: 可读性好 无重复逻辑 低代码 -- 包含 阅读全文
posted @ 2022-02-20 12:26 lightsong 阅读(140) 评论(0) 推荐(0) 编辑
摘要: What's a design pattern? https://refactoring.guru/design-patterns/what-is-pattern 设计模式应对软件设计过程中经常出现的问题。 Design patterns are typical solutions to commo 阅读全文
posted @ 2022-02-20 11:16 lightsong 阅读(116) 评论(0) 推荐(0) 编辑
摘要: absolute import https://realpython.com/absolute-vs-relative-python-imports/#absolute-imports 从项目根目录开始, 使用绝对路径 查找 package 或者 module An absolute import 阅读全文
posted @ 2022-02-17 14:13 lightsong 阅读(60) 评论(0) 推荐(0) 编辑
摘要: LooseCoupling Requirement main文件中,调用底层同功能模块, 一般写法是在 main中,显示引用底层模块。 这构成了 下层对象 直接出现在上层代码中, 上层代码改变,需要考虑是否影响底层代码。 按照依赖倒置原则,需要定义中间抽象层,上层只依赖抽象层, 对底层,上层统一管理 阅读全文
posted @ 2022-02-14 17:03 lightsong 阅读(54) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 24 下一页
Life Is Short, We Need Ship To Travel