Skip to content

Commit

Permalink
优化首页,优化程设辅学页面,建立各精品课程页面
Browse files Browse the repository at this point in the history
  • Loading branch information
bowling233 committed Sep 26, 2023
1 parent b4177b1 commit 03d35bc
Show file tree
Hide file tree
Showing 18 changed files with 134 additions and 22 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

## 构建

该仓库已经设置了 GitHub Action,您的每次推送都会自动触发构建与部署,无需在本地执行 `mkdocs gh-deploy` 等操作。

本网站基于 MkDocs Material 构建,额外使用的插件有:

- [neoteroi.cards](https://www.neoteroi.dev/mkdocs-plugins/cards/)
Expand All @@ -26,7 +28,7 @@ pip install mkdocs mkdocs-material neoteroi-mkdocs mkdocs-glightbox mkdocs-heti-
mkdocs serve
```

部署到 GitHub Pages:
手动部署到 GitHub Pages:

```bash
mkdocs gh-deploy
Expand Down
3 changes: 3 additions & 0 deletions docs/PracticalSkillsTutorial/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 程设辅学课程 实用技能拾遗

欢迎来到竺院程设辅学实用技能拾遗版块🤗。你可以在左侧导航栏中详细浏览本模块的内容。
Binary file added docs/graph/algebra.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/graph/analysis.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/graph/calculus.webp
Binary file not shown.
Binary file added docs/graph/chem.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/graph/physics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/graph/programming.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 42 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,48 @@

这里是竺可桢学院学业指导中心辅学计划的站点。辅学计划为竺院大一新生提供数学分析(H)、线性代数(H)、微积分(H)、普通物理学(H)、普通化学(H)、程序设计基础等**荣誉课程**的学习指导与帮助。

你可以通过网站上方或左侧的导航栏浏览我们的网站。除五大课程版块外,一些线下辅学课程也单列有自己的版块。
你可以通过网站上方或左侧的导航栏浏览我们的网站。普通辅学版块使用📚标注,精品课程版块使用🏫标注。

<!-- prettier-ignore-start -->
::cards:: cols=3

[
{
"title": "[微积分](calculus/index.md)",
"content": "",
"image": "graph/calculus.webp"
},
{
"title": "[数学分析](analysis/index.md)",
"content": "",
"image": "graph/analysis.jpg"
},
{
"title": "[线性代数](algebra/index.md)",
"content": "[【线下课程】线性代数:未尽之美](lalu/index.md)",
"image": "graph/algebra.jpg"
},
{
"title": "[程序设计](programming/index.md)",
"content": "[【线下课程】系统知识拾遗](programming_lecture/index.md)<br>
[【线下课程】实用技能拾遗](PracticalSkillsTutorial/index.md)",
"image": "graph/programming.jpg"
},
{
"title": "[普通化学](chemistry/index.md)",
"content": "",
"image": "graph/chem.jpg"
},
{
"title": "[普通物理学](physics/index.md)",
"content": "",
"image": "graph/physics.png"
},

]

::/cards::
<!-- prettier-ignore-end -->

如果您愿意参与该网站的建设,请到 GitHub 中本项目的[仓库](https://github.com/ckc-agc/study-assist)进行贡献。

Expand Down
3 changes: 3 additions & 0 deletions docs/lalu/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 线代辅学课程 线性代数:未竟之美

欢迎来到竺院线性代数辅学课程版块🤗。你可以在左侧导航栏中详细浏览本模块的内容。
3 changes: 3 additions & 0 deletions docs/physics/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 普物辅学

欢迎来到竺院普物辅学版块🤗。你可以在左侧导航栏中详细浏览本模块的内容。
6 changes: 3 additions & 3 deletions docs/programming_lecture/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# 程序设计辅学 线下授课
# 程设辅学课程 系统知识拾遗

欢迎来到竺院辅学程设线下授课版块🤗。你可以在左侧导航栏中详细浏览本模块的内容。
欢迎来到竺院程设辅学系统知识拾遗版块🤗。你可以在左侧导航栏中详细浏览本模块的内容。

## 课程简介

程序设计课程讲述的内容较为表象。实质上,C 语言是一门很难的编程语言,不懂编译原理、操作系统和计算机体系结构无法获得深入的理解。我们希望通过线下辅学授课,为具有 C 语言基础或愿意深入学习这门语言的同学提供更深入、更底层方面的知识扩展,让同学们在计算机而非算法题的语境下理解 C 语言。
程序设计与算法基础课程讲述的内容局限于语言本身,较为表象。实质上,C 语言是一门很难的编程语言,不懂编译原理、操作系统和计算机体系结构无法获得深入的理解,而这些也是学习计算机专业的同学应当尽早了解的知识。我们希望通过线下辅学授课,为具有 C 语言基础或愿意深入学习计算机基础知识的同学提供更深入、更底层方面的知识扩展,让同学们在计算机系统而非算法题的语境下理解 C 语言。

## 课程安排

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 54 additions & 4 deletions docs/programming_lecture/lecture1/lecture1.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,30 +75,80 @@ CPU 还有自己的小工作区——由若干寄存器(Register)组成的
{
"title": "机器语言 <br> Machine Code",
"content": "这是第一代编程语言,也是计算机唯一能识别的语言。上图展示了世界上第一个计算机程序,它用来找出一个数最大的因数。",
"image": "https://cdn.bowling233.top/images/2023/07/202307142052574.png"
"image": "graph/machine_code.png"
},
{
"title": "汇编语言 <br> Assembly Language",
"content": "这是第二代编程语言,其实就是机器语言的助记符。它使得程序员不用再直接与 0 和 1 打交道,程序的可读性也更强了。上图显示了将两个整数相加的汇编代码。",
"image": "https://cdn.bowling233.top/images/2023/07/202307142105177.png"
"image": "graph/assembly.png"
},
{
"title": "高级语言 <br> High-level Language",
"content": "这是第三代编程语言,它让程序员们不用再关注计算机结构上的细节,而是将注意力转移到要解决的问题上来。",
"image": "graph/high_level_language.png"
},

]

::/cards::
<!-- prettier-ignore-end -->

下面三行代码分别是用 C 语言、汇编语言和机器语言(十六进制)描述的同一件事:

<!-- prettier-ignore-start -->
=== "简单的例子"

```c
c = a + b;
```

```asm
add $t0, $t1, $t2
```

```
01 2a 40 20
```
=== "复杂的例子"

```c
void multstore(long x, long y, long *dest) {
long t = mult2(x, y);
*dest = t;
}
```

```asm
multstore:
pushq %rbx
movq %rdx, %rbx
call mult2
movq %rax, (%rbx)
popq %rbx
ret
```

```
53 48 89 d3 48 83 ec 08 e8 00 00 00 00 48 89 03 5b c3
```
<!-- prettier-ignore-end -->

<!-- prettier-ignore-start -->
!!! question "为什么需要高级语言?"

1. 机器语言和汇编语言都是非常底层的语言,程序员需要关注计算机的细节,这使得程序的**可读性很差**。使用高级语言,程序员能**将注意力转移到要解决的问题上来**。
2. 机器语言和汇编语言都是与具体 CPU 相关的,程序员需要为不同的 CPU 编写不同的程序,**可移植性差**。使用高级语言,程序员只需要写一次程序,再使用编译器就能将其翻译成能在特定 CPU 的机器语言。
<!-- prettier-ignore-end -->

## 程序的编译过程
<!-- prettier-ignore-start -->
??? info "对机器语言有兴趣?"

[这里](https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Introduction_To_MIPS_Assembly_Language_Programming_(Kann)/04%3A_Translating_Assembly_Language_into_Machine_Code)提供了一些将汇编语言转换为 MIPS 指令集机器语言的基础例子,有兴趣可以了解一下。
<!-- prettier-ignore-end -->

## 程序的编译过程

接下来,我们将了解编译器和汇编器是如何一步步把你的程序编译成机器码的。

GCC 是最经典的 C 语言编译器。当我们使用命令 `gcc -o test test.c` 编译一个 C 语言程序时,GCC 会调用一系列的程序将源代码翻译成汇编语言、再翻译成机器语言,最后经过链接产生可执行文件。下图展示了这个过程。

Expand All @@ -109,7 +159,7 @@ GCC 是最经典的 C 语言编译器。当我们使用命令 `gcc -o test test.
3. 汇编:由汇编器(Assembler)完成,它将汇编代码翻译成机器语言。汇编后得到的机器代码文件以 `.o` 为后缀。
4. 链接:由链接器(Linker)完成,它将多个目标文件链接成一个可执行文件。链接后得到的可执行文件以 `.exe` 为后缀。

这里解释一下链接步骤。为什么要链接?模块化思想在程序设计中很重要。比如我写了一个在屏幕上显示图像的函数,把它编译成了机器码。你的程序需要使用这个图形库,你不用把我的源代码搬过去,或者我不想让你知道我的源代码。你只需要使用链接器把我的机器码和你的机器码链接起来就能生成一个功能完整的源程序了。


## 参考资料

Expand Down
4 changes: 3 additions & 1 deletion docs/test.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# latex 数学公式测试
# LaTeX 数学公式测试

本页面用于测试各类 LaTeX 公式是否能正常显示。

simple

Expand Down
32 changes: 20 additions & 12 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,27 +115,35 @@ plugins:


nav:
- 首页: index.md
- 程设线下辅学:
- programming_lecture/index.md
- 1. 程序编译过程与调试技术:
- 准备开发与调试环境: programming_lecture/lecture1/pre_class.md
- 课程讲义: programming_lecture/lecture1/lecture1.md
- 微积分:
- 首页:
- index.md
- 测试: test.md
- 📚微积分:
- calculus/index.md
- 数学分析:
- 📚数学分析:
- analysis/index.md
- 历年卷整理: analysis/exam.md
- 2023 年辅学资料: analysis/2023/index.md
- 线性代数:
- 📚线性代数:
- algebra/index.md
- 程设:
- 🏫线性代数:未竟之美:
- lalu/index.md
- 📚程设:
- programming/index.md
- FAQ: programming/faq.md
- 历年卷:
- programming/exam/index.md
# - C 小历年卷常见问题总结: programming/exam/fp.md
# - C 大历年卷常见问题总结: programming/exam/lcp.md
# - 2023 年辅学资料: programming/2023/index.md
- 普通化学:
- chemistry/index.md
- 🏫实用技能拾遗:
- PracticalSkillsTutorial/index.md
- 🏫系统知识拾遗:
- programming_lecture/index.md
- 1. 程序编译过程与调试技术:
- 准备开发与调试环境: programming_lecture/lecture1/pre_class.md
- 课程讲义: programming_lecture/lecture1/lecture1.md
- 📚普通化学:
- chemistry/index.md
- 📚普通物理学:
- physics/index.md

0 comments on commit 03d35bc

Please sign in to comment.