共有 30 篇文章
2024-12-09
2024-12-09 ~ 2024-12-16
Chapter 02 Drill After each step of this drill, run your program to make sure it is really doing what you expect it to. Keep a list of what mistakes you make so that you can try to avoid those in the future.
Write a program that produces a simple form letter based on user input. Begin by typing the code from §2.1 prompting a user to enter his or her first name and writing “Hello, first_name” where first_name is the name entered by the user.
2024-11-21
2024-11-21 ~ 2024-11-21
一个广度优先遍历算法实现过程示例 You can download this picture from this link.
2024-11-15
2024-11-15 ~ 2024-11-15
一个深度优先遍历算法实现过程示例 You can download this picture from this link.
2024-11-01
2024-11-01 ~ 2024-11-01
Box Trace (基于递归插入) 插入 Jan 当前树为空,创建 Jan 作为根节点。 插入 Feb Feb < Jan,递归到 Jan 的左子树。 Jan 的左子树为空,将 Feb 作为 Jan 的左子节点。 插入 Mar Mar > Jan,递归到 Jan 的右
2024-08-28
2024-08-28 ~ 2024-08-28
我定义了多个 Shortcode, 为了在 VS Code 中编辑文档时方便使用,定义了如下的 snippets: 这些 snippets 主要用于该静态网站,因此,我将其放在了 .vscode/ 下,名为:snipp
2024-08-26
2024-08-26 ~ 2024-08-26
列表生成式(List Comprehension)是 Python 中一种生成列表的方式。它允许你使用单行语法,基于已有的序列(如列表、元组、字符串等)来生成一个新的列表,且通
2024-08-15
2024-08-15 ~ 2024-08-16
同“在 Hugo 博客中实现多语言代码片段的选项卡切换”一致,该功能实现主要基于 Shortcode。以下是名为 two-columns.html 的 Shortcode: <div class="two-columns-container"> <div class="column column-left"> {{ with .Inner }} {{ $parts := split . "###" }} {{ if ge (len $parts) 1 }} {{ $left := index
2024-08-15
2024-08-15 ~ 2024-08-16
Functions In C++ and most modern programming languages, we may put statements into functions to be invoked in the future. Also known as procedures in some languages. Why functions We need modules instead of a huge main function. Easier to divide the works: modularization. Easier to debug: mantenance. Easier to maintain consistency. We need something that can be used repeatedly. Enhance resuability Structure of functions In C++, a function is composed of a header and body. A header for declaration:
2024-08-14
2024-08-14 ~ 2024-08-28
同“在 Hugo 博客中实现多语言代码片段的选项卡切换”一致,该功能实现主要基于 Shortcode。以下是名为 protected.html 的 Shortcode: <div id="protected-content-{{ .Get "id" }}" style="display: none"> {{ if eq (.Get "isTabs") "true" }} {{ .Inner | safeHTML }} {{ else }} {{ .Inner | markdownify }}