├── EN.html
├── LICENSE
├── README.md
├── TAs.html
├── articles
├── about.html
├── assets
│ └── custom-test.png
├── composition.html
├── debugging.html
├── scheme-builtins.html
├── scheme-spec.html
├── studying.html
├── unix.html
└── using-ok.html
├── assets
├── css
│ ├── calendar.css
│ ├── hw.css
│ ├── mono-blue.css
│ ├── project.css
│ ├── searchbox.css
│ └── style.css
├── images
│ ├── favicon.ico
│ ├── hany-farid.jpg
│ ├── john-denero.jpg
│ └── logo.png
├── js
│ ├── calendar.js
│ ├── config.js
│ ├── dark-mode.js
│ ├── flowchart-data.js
│ ├── flowchart.js
│ ├── hl.js
│ └── sketchy.js
├── pdfs
│ ├── 61a-final-study-guide.pdf
│ ├── 61a-mt1-study-guide.pdf
│ ├── 61a-mt2-study-guide.pdf
│ ├── 61a-sp20-final-solution.pdf
│ └── 61a-sp20-final.pdf
└── slides
│ ├── 01-Computer_Science_1pp.pdf
│ ├── 01-Computer_Science_8pp.pdf
│ ├── 01-Computer_Science_full.pdf
│ ├── 02-Functions_1pp.pdf
│ ├── 02-Functions_8pp.pdf
│ ├── 02-Functions_full.pdf
│ ├── 03-Control_1pp.pdf
│ ├── 03-Control_8pp.pdf
│ ├── 03-Control_full.pdf
│ ├── 04-Higher-Order_Functions_1pp.pdf
│ ├── 04-Higher-Order_Functions_8pp.pdf
│ ├── 04-Higher-Order_Functions_full.pdf
│ ├── 05-Environments_1pp.pdf
│ ├── 05-Environments_8pp.pdf
│ ├── 05-Environments_full.pdf
│ ├── 06-Design_1pp.pdf
│ ├── 06-Design_8pp.pdf
│ ├── 06-Design_full.pdf
│ ├── 07-Function_Examples_1pp.pdf
│ ├── 07-Function_Examples_8pp.pdf
│ ├── 07-Function_Examples_full.pdf
│ ├── 08-Recursion_1pp.pdf
│ ├── 08-Recursion_8pp.pdf
│ ├── 08-Recursion_full.pdf
│ ├── 09-Tree_Recursion_1pp.pdf
│ ├── 09-Tree_Recursion_8pp.pdf
│ ├── 09-Tree_Recursion_full.pdf
│ ├── 10-Containers_1pp.pdf
│ ├── 10-Containers_8pp.pdf
│ ├── 10-Containers_full.pdf
│ ├── 11-Data_Abstraction_1pp.pdf
│ ├── 11-Data_Abstraction_8pp.pdf
│ ├── 11-Data_Abstraction_full.pdf
│ ├── 12-Trees_1pp.pdf
│ ├── 12-Trees_8pp.pdf
│ ├── 12-Trees_full.pdf
│ ├── 13-Binary_Numbers_full.pdf
│ ├── 14-Circuits_full.pdf
│ ├── 15-Mutable_Values_1pp.pdf
│ ├── 15-Mutable_Values_8pp.pdf
│ ├── 15-Mutable_Values_full.pdf
│ ├── 16-Mutable_Functions_1pp.pdf
│ ├── 16-Mutable_Functions_8pp.pdf
│ ├── 16-Mutable_Functions_full.pdf
│ ├── 17-Iterators_1pp.pdf
│ ├── 17-Iterators_8pp.pdf
│ ├── 17-Iterators_full.pdf
│ ├── 18-Objects_1pp.pdf
│ ├── 18-Objects_8pp.pdf
│ ├── 18-Objects_full.pdf
│ ├── 19-Inheritance_1pp.pdf
│ ├── 19-Inheritance_8pp.pdf
│ ├── 19-Inheritance_full.pdf
│ ├── 20-Representation_1pp.pdf
│ ├── 20-Representation_8pp.pdf
│ ├── 20-Representation_full.pdf
│ ├── 21-Composition_1pp.pdf
│ ├── 21-Composition_8pp.pdf
│ ├── 21-Composition_full.pdf
│ ├── 22-Efficiency_1pp.pdf
│ ├── 22-Efficiency_8pp.pdf
│ ├── 22-Efficiency_full.pdf
│ ├── 22.ipynb
│ ├── 23-Decomposition_1pp.pdf
│ ├── 23-Decomposition_8pp.pdf
│ ├── 23-Decomposition_full.pdf
│ ├── 23.zip
│ ├── 24-Data_Examples_1pp.pdf
│ ├── 24-Data_Examples_8pp.pdf
│ ├── 24-Data_Examples_full.pdf
│ ├── 27-Scheme_1pp.pdf
│ ├── 27-Scheme_8pp.pdf
│ ├── 27-Scheme_full.pdf
│ ├── 28-Exceptions_1pp.pdf
│ ├── 28-Exceptions_8pp.pdf
│ ├── 28-Exceptions_full.pdf
│ ├── 29-Calculator_1pp.pdf
│ ├── 29-Calculator_8pp.pdf
│ ├── 29-Calculator_full.pdf
│ ├── 29.zip
│ ├── 30-Interpreters_1pp.pdf
│ ├── 30-Interpreters_8pp.pdf
│ ├── 30-Interpreters_full.pdf
│ ├── 31-Declarative_Programming_1pp.pdf
│ ├── 31-Declarative_Programming_8pp.pdf
│ ├── 31-Declarative_Programming_full.pdf
│ ├── 32-Tables_1pp.pdf
│ ├── 32-Tables_8pp.pdf
│ ├── 32-Tables_full.pdf
│ ├── 33-Aggregation_1pp.pdf
│ ├── 33-Aggregation_8pp.pdf
│ ├── 33-Aggregation_full.pdf
│ ├── 34-Databases_1pp.pdf
│ ├── 34-Databases_8pp.pdf
│ ├── 34-Databases_full.pdf
│ ├── 35-Tail_Calls_1pp.pdf
│ ├── 35-Tail_Calls_8pp.pdf
│ ├── 35-Tail_Calls_full.pdf
│ ├── 36-Macros_1pp.pdf
│ ├── 36-Macros_8pp.pdf
│ ├── 36-Macros_full.pdf
│ ├── 37-Final_Examples_1pp.pdf
│ ├── 37-Final_Examples_8pp.pdf
│ └── 37-Final_Examples_full.pdf
├── disc
├── disc01.pdf
├── disc02.pdf
├── disc03.pdf
├── disc04.pdf
├── disc05.pdf
├── disc06.pdf
├── disc07.pdf
├── disc08.pdf
├── disc10.pdf
├── disc11.pdf
├── disc12.pdf
└── disc14.pdf
├── exam
├── fa16
│ ├── mt1
│ │ ├── 61a-fa16-mt1.pdf
│ │ └── 61a-fa16-mt1_tagged.pdf
│ └── mt2
│ │ ├── 61a-fa16-mt2.pdf
│ │ └── 61a-fa16-mt2_tagged.pdf
├── fa18
│ ├── final
│ │ └── 61a-fa18-final_tagged.pdf
│ ├── mt1
│ │ ├── 61a-fa18-mt1.pdf
│ │ └── 61a-fa18-mt1_tagged.pdf
│ └── mt2
│ │ ├── 61a-fa18-mt2.pdf
│ │ └── 61a-fa18-mt2_tagged.pdf
├── fa19
│ ├── final
│ │ ├── 61a-fa19-final.pdf
│ │ └── 61a-fa19-final_tagged.pdf
│ ├── mt1
│ │ ├── 61a-fa19-mt1.pdf
│ │ └── 61a-fa19-mt1_tagged.pdf
│ └── mt2
│ │ ├── 61a-fa19-mt2.pdf
│ │ └── 61a-fa19-mt2_tagged.pdf
├── fa20
│ ├── final
│ │ └── 61a-fa20-final.pdf
│ ├── mt1
│ │ └── 61a-fa20-mt1.pdf
│ └── mt2
│ │ └── 61a-fa20-mt2.pdf
├── sp18
│ ├── final
│ │ └── 61a-sp18-final_tagged.pdf
│ ├── mt1
│ │ ├── 61a-sp18-mt1.pdf
│ │ └── 61a-sp18-mt1_tagged.pdf
│ └── mt2
│ │ ├── 61a-sp18-mt2.pdf
│ │ └── 61a-sp18-mt2_tagged.pdf
├── sp19
│ └── mt1
│ │ ├── 61a-sp19-mt1.pdf
│ │ └── 61a-sp19-mt1_tagged.pdf
├── sp20
│ └── mt1
│ │ ├── 61a-sp20-mt1.pdf
│ │ └── 61a-sp20-mt1_tagged.pdf
└── su19
│ ├── final
│ └── 61a-su19-final.pdf
│ └── mt
│ └── 61a-su19-mt.pdf
├── hw
├── hw01
│ ├── EN.html
│ ├── hw01.zip
│ └── index.html
├── hw02
│ ├── EN.html
│ ├── hw02.py
│ ├── hw02.zip
│ └── index.html
├── hw03
│ ├── EN.html
│ ├── assets
│ │ ├── mobile-planet-labeled.png
│ │ ├── mobile-planet.png
│ │ └── preorder.png
│ ├── hw03.zip
│ └── index.html
├── hw04
│ ├── EN.html
│ ├── hw04.py
│ ├── hw04.zip
│ └── index.html
├── hw05
│ ├── EN.html
│ ├── assets
│ │ └── preorder.png
│ ├── hw05.py
│ ├── hw05.zip
│ └── index.html
├── hw06
│ ├── EN.html
│ ├── hw06.zip
│ └── index.html
├── hw07
│ ├── EN.html
│ ├── hw07.zip
│ └── index.html
├── hw08
│ ├── EN.html
│ ├── hw08.zip
│ └── index.html
├── hw09
│ ├── EN.html
│ ├── hw09.zip
│ └── index.html
└── hw10
│ ├── EN.html
│ └── index.html
├── index.html
├── instructor.html
├── lab
├── lab00
│ ├── assets
│ │ ├── git-bash-options.png
│ │ ├── python-windows-install-path.png
│ │ ├── terminal.png
│ │ └── terminal_commands.png
│ ├── index.html
│ └── lab00.zip
├── lab01
│ ├── EN.html
│ ├── index.html
│ └── lab01.zip
├── lab02
│ ├── EN.html
│ ├── index.html
│ ├── lab02.zip
│ └── ok
├── lab03
│ ├── EN.html
│ ├── index.html
│ ├── lab03.zip
│ └── ok
├── lab04
│ ├── EN.html
│ ├── assets
│ │ └── grid.jpg
│ ├── index.html
│ └── lab04.zip
├── lab05
│ ├── EN.html
│ ├── assets
│ │ └── cs61a-tree.png
│ ├── index.html
│ ├── lab05.zip
│ └── ok
├── lab06
│ ├── EN.html
│ ├── index.html
│ ├── lab06.zip
│ └── ok
├── lab07
│ ├── EN.html
│ ├── index.html
│ ├── lab07.zip
│ └── ok
├── lab08
│ ├── EN.html
│ ├── assets
│ │ ├── arraylist.png
│ │ ├── arraylist_insert.png
│ │ ├── linkedlist.png
│ │ └── linkedlist_insert.png
│ ├── index.html
│ └── lab08.zip
├── lab09
│ ├── EN.html
│ ├── index.html
│ └── lab09.zip
├── lab10
│ ├── EN.html
│ ├── assets
│ │ ├── list1.png
│ │ └── list2.png
│ ├── index.html
│ └── lab10.zip
├── lab11
│ ├── EN.html
│ ├── index.html
│ └── lab11.zip
├── lab12
│ ├── EN.html
│ ├── assets
│ │ ├── big-game.png
│ │ └── joins.png
│ ├── index.html
│ ├── lab12.zip
│ └── ok
├── lab13
│ ├── EN.html
│ ├── index.html
│ └── lab13.zip
└── lab14
│ ├── EN.html
│ ├── index.html
│ └── lab14.zip
├── office-hours.html
├── proj
├── ants
│ ├── EN.html
│ ├── ants.zip
│ ├── assets
│ │ ├── colony-drawing.png
│ │ ├── insects
│ │ │ ├── ant_bodyguard.gif
│ │ │ ├── ant_fire.gif
│ │ │ ├── ant_harvester.gif
│ │ │ ├── ant_hungry.gif
│ │ │ ├── ant_laser.gif
│ │ │ ├── ant_longthrower.gif
│ │ │ ├── ant_ninja.gif
│ │ │ ├── ant_queen.gif
│ │ │ ├── ant_scary.gif
│ │ │ ├── ant_scuba.gif
│ │ │ ├── ant_shortthrower.gif
│ │ │ ├── ant_slow.gif
│ │ │ ├── ant_tank.gif
│ │ │ ├── ant_thrower.gif
│ │ │ └── ant_wall.gif
│ │ ├── splash.png
│ │ └── submitted.png
│ ├── img
│ │ └── gui_explanation.png
│ └── index.html
├── cats
│ ├── EN.html
│ ├── cats.zip
│ ├── images
│ │ └── cats_typing_still.gif
│ └── index.html
├── hog
│ ├── EN.html
│ ├── assets
│ │ └── icon.gif
│ ├── hog.zip
│ └── index.html
├── hog_contest
│ ├── EN.html
│ ├── hog_contest.zip
│ └── index.html
├── scheme
│ ├── EN.html
│ ├── images
│ │ ├── lambda.png
│ │ ├── let.png
│ │ └── money_tree.png
│ ├── index.html
│ └── scheme.zip
├── scheme_contest
│ ├── EN.html
│ ├── index.html
│ └── scheme_contest.zip
├── scheme_gallery
│ ├── EN.html
│ ├── entries
│ │ ├── 38346344
│ │ │ └── artwork.png
│ │ ├── 05e89b52
│ │ │ └── artwork.png
│ │ ├── 090d45d4
│ │ │ └── artwork.png
│ │ ├── 1158f5f8
│ │ │ └── artwork.png
│ │ ├── 337e6b92
│ │ │ └── artwork.png
│ │ ├── 3949b07b
│ │ │ └── artwork.png
│ │ ├── 3c8b3180
│ │ │ └── artwork.png
│ │ ├── 54196e29
│ │ │ └── artwork.png
│ │ ├── 5f49e954
│ │ │ └── artwork.png
│ │ ├── 66ad6e82
│ │ │ └── artwork.png
│ │ ├── 6864819c
│ │ │ └── artwork.png
│ │ ├── 6a3de5b1
│ │ │ └── artwork.png
│ │ ├── 73595e63
│ │ │ └── artwork.png
│ │ ├── 7b73a72e
│ │ │ └── artwork.png
│ │ ├── 86a8f93b
│ │ │ └── artwork.png
│ │ ├── 8a5fb2c3
│ │ │ └── artwork.png
│ │ ├── 9c458b24
│ │ │ └── artwork.png
│ │ ├── 9de3deb1
│ │ │ └── artwork.png
│ │ ├── a820bac7
│ │ │ └── artwork.png
│ │ ├── aa07ff5a
│ │ │ └── artwork.png
│ │ ├── bda9643a
│ │ │ └── artwork.png
│ │ ├── c29c0819
│ │ │ └── artwork.png
│ │ ├── c6586b2e
│ │ │ └── artwork.png
│ │ ├── c74670f1
│ │ │ └── artwork.png
│ │ ├── c97e4b00
│ │ │ └── artwork.png
│ │ ├── d0e1dc9d
│ │ │ └── artwork.png
│ │ ├── d2969080
│ │ │ └── artwork.png
│ │ ├── d3ed09d6
│ │ │ └── artwork.png
│ │ ├── d6b06054
│ │ │ └── artwork.png
│ │ ├── e2d34b0f
│ │ │ └── artwork.png
│ │ ├── e6a6ce80
│ │ │ └── artwork.png
│ │ ├── f8e6ff3c
│ │ │ └── artwork.png
│ │ ├── late1
│ │ │ └── artwork.jpg
│ │ └── late2
│ │ │ └── artwork.png
│ └── index.html
└── scheme_stubbed
│ ├── EN.html
│ ├── images
│ ├── lambda.png
│ ├── let.png
│ └── money_tree.png
│ ├── index.html
│ └── scheme_stubbed.zip
├── resources.html
├── robots.txt
├── staff.html
├── tutors.html
└── weekly.html
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 ChillyHigh
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CS61A 2020 Fall 中文
2 |
3 | 本项目是对加州大学伯克利分校 [CS 61A 2020 Fall](https://cs61a.org/) 官方网站的镜像。整合了 [CS61A-2020-Fall-Metarials-Mirror](https://github.com/n0rea5on/CS61A-2020-Fall-Metarials-Mirror) 仓库和 [CS_learning
4 | /CS61A/](https://github.com/Stromxun/CS_learning/tree/main/CS61A) 提供的内容。本项目为网站的实验、作业、项目添加了中文翻译;替换了课程视频链接,使其可在 Bilibili 上观看;课本内容也相应的替换为[composing-programs-zh](https://github.com/csfive/composing-programs-zh)项目所提供的中文翻译课本。
5 |
6 | **在线访问:** [https://chillyhigh.github.io/CS61A-CN/](https://chillyhigh.github.io/CS61A-CN/)
7 |
8 | ## 关于 CS 61A
9 |
10 | **CS 61A** 是加州大学伯克利分校(University of California, Berkeley)计算机科学专业的入门课程。该课程旨在教授学生如何使用编程来描述和解决复杂问题,并深入探讨计算机科学的核心概念。
11 |
12 | **课程特点:**
13 |
14 | - 采用 **Python** 作为主要教学语言,强调函数式编程、递归、数据抽象、面向对象编程等编程范式。
15 | - 课程教材为经典教材 *Structure and Interpretation of Computer Programs (SICP)* 。
16 | - 通过实验(Labs)、作业(Homeworks)、项目(Projects)等方式,帮助学生掌握编程技巧并解决实际问题。
17 | - 适合有一定编程基础的学习者,同时也是深入学习计算机科学的良好起点。
18 |
19 | **官网链接:** https://cs61a.org/
20 |
21 | ## 本项目的改动
22 |
23 | ### 1. **内容补全与扩展**
24 |
25 | - 补全了 [CS61A-2020-Fall-Metarials-Mirror](https://github.com/n0rea5on/CS61A-2020-Fall-Metarials-Mirror) 仓库中缺失的内容。
26 | - 添加了 **Spring 2023** 版本的 **Lab 3**,作为期中复习资源。
27 |
28 | ### 2. **中文翻译**
29 |
30 | 对网站的主要内容(课程介绍、指南、部分作业及讲义)进行了中文翻译,帮助学习者更好地理解课程内容。
31 |
32 | > 本人翻译能力有限,如有疏漏,还请见谅。欢迎提交 [Issue](https://github.com/ChillyHigh/CS61A-CN/issues) 和 [Pull Request](https://github.com/ChillyHigh/CS61A-CN/pulls) 来改进翻译。
33 |
34 | ### 3. **视频资源替换**
35 |
36 | 原网站中的课程视频链接指向 **YouTube**,国内用户访问不便。
37 |
38 | - 将课程视频替换为 **Bilibili** 平台上的对应资源。
39 | - 感谢[@小乖乖的喵星球](https://space.bilibili.com/95093036)搬运的[视频](https://www.bilibili.com/video/BV1s3411G7yM)
40 |
41 | ### 4. **课本替换**
42 |
43 | - 课程使用的在线课本已替换为 [composing-programs-zh](https://github.com/csfive/composing-programs-zh) 项目提供的中文翻译版本
44 |
45 | ## 如何使用
46 |
47 | 1. 直接访问 GitHub Pages 在线版本:
48 | **[点击访问](https://chillyhigh.github.io/CS61A-CN/)**
49 |
50 | 2. 如果需要离线访问,可克隆项目到本地:
51 |
52 | ```bash
53 | git clone https://github.com/ChillyHigh/CS61A-CN.git
54 | cd CS61A-CN
55 | python -m http.server 80
56 | ```
57 | 3. 在浏览器中打开 `127.0.0.1` 或`localhost:80`即可使用。
58 |
59 |
60 | ## 免责声明
61 |
62 | - 本项目仅供学习和研究之用,不用于商业目的,所有课程内容版权归 UC Berkeley 所有。
63 | - Bilibili 视频资源由第三方上传,与本项目无直接关联,视频内容仅供参考。
64 | - 如果您认为本项目存在侵权问题,请联系我们,我们将及时处理。
65 |
66 | ## 贡献
67 |
68 | 欢迎对该项目的改进和完善提出建议!
69 | 如果你发现任何问题,欢迎提交 [Issue](https://github.com/ChillyHigh/CS61A-CN/issues) 或 [Pull Request](https://github.com/ChillyHigh/CS61A-CN/pulls) 来贡献你的力量。
70 |
71 | ## 致谢
72 |
73 | 感谢 UC Berkeley 提供 CS 61A 课程的开放资源,
74 |
75 | 感谢 [CS61A-2020-Fall-Metarials-Mirror](https://github.com/n0rea5on/CS61A-2020-Fall-Metarials-Mirror)、 [CS_learning](https://github.com/Stromxun/CS_learning/)仓库提供的网页内容,
76 |
77 | 感谢 [composing-programs-zh](https://github.com/csfive/composing-programs-zh) 项目提供的中文翻译教材,
78 |
79 | 感谢[@小乖乖的喵星球](https://space.bilibili.com/95093036)对视频资源的整理与分享。
80 |
81 | 如果本项目对您有所帮助,请点点 **star** !
--------------------------------------------------------------------------------
/articles/assets/custom-test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/articles/assets/custom-test.png
--------------------------------------------------------------------------------
/assets/css/calendar.css:
--------------------------------------------------------------------------------
1 | .fc {
2 | font-family: "Roboto", sans-serif;
3 | }
4 |
5 | .section-info {
6 | font-size: 14px;
7 | background-color: #fff;
8 | border: 1px solid #000;
9 | border-radius: 20px;
10 | padding: 10px;
11 | margin: auto;
12 | line-height: normal;
13 | }
14 |
15 | .fc-event {
16 | font-size: 0.8em;
17 | padding: 1px;
18 | margin: 2px;
19 | border: none;
20 | }
21 |
22 | .fc-title {
23 | font-weight: bold;
24 | }
25 |
26 | .fc-location {
27 | font-size: 0.85em;
28 | }
29 |
30 | .fc-time-grid .fc-slats .fc-minor td {
31 | border: none;
32 | }
33 |
34 | .fc-time-grid .fc-slats td {
35 | height: 2em;
36 | }
37 |
38 | .fc-ltr .fc-time-grid .fc-event-container {
39 | margin: 0;
40 | }
41 |
--------------------------------------------------------------------------------
/assets/css/hw.css:
--------------------------------------------------------------------------------
1 | .sol-highlight {
2 | color: #CC3232;
3 | }
4 |
--------------------------------------------------------------------------------
/assets/css/mono-blue.css:
--------------------------------------------------------------------------------
1 | /*
2 | Five-color theme from a single blue hue.
3 | */
4 | .hljs {
5 | display: block;
6 | overflow-x: auto;
7 | background: inherit;
8 | -webkit-text-size-adjust: none;
9 | }
10 |
11 | .hljs,
12 | .hljs-list .hljs-built_in {
13 | color: #00193a;
14 | }
15 |
16 | .hljs-keyword,
17 | .hljs-title,
18 | .hljs-important,
19 | .hljs-request,
20 | .hljs-header,
21 | .hljs-javadoctag {
22 | font-weight: bold;
23 | }
24 |
25 | .hljs-comment,
26 | .hljs-chunk {
27 | color: #738191;
28 | }
29 |
30 | .hljs-string,
31 | .hljs-title,
32 | .hljs-parent,
33 | .hljs-built_in,
34 | .hljs-literal,
35 | .hljs-filename,
36 | .hljs-value,
37 | .hljs-addition,
38 | .hljs-tag,
39 | .hljs-argument,
40 | .hljs-link_label,
41 | .hljs-blockquote,
42 | .hljs-header,
43 | .hljs-name {
44 | color: #0048ab;
45 | }
46 |
47 | .hljs-decorator,
48 | .hljs-prompt,
49 | .hljs-yardoctag,
50 | .hljs-subst,
51 | .hljs-symbol,
52 | .hljs-doctype,
53 | .hljs-regexp,
54 | .hljs-preprocessor,
55 | .hljs-pragma,
56 | .hljs-pi,
57 | .hljs-attribute,
58 | .hljs-attr_selector,
59 | .hljs-javadoc,
60 | .hljs-xmlDocTag,
61 | .hljs-deletion,
62 | .hljs-shebang,
63 | .hljs-string .hljs-variable,
64 | .hljs-link_url,
65 | .hljs-bullet,
66 | .hljs-sqbracket,
67 | .hljs-phony {
68 | color: #4c81c9;
69 | }
70 |
71 | /*
72 | FILE ARCHIVED ON 20:55:33 May 17, 2021 AND RETRIEVED FROM THE
73 | INTERNET ARCHIVE ON 11:23:40 Jan 25, 2025.
74 | JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
75 |
76 | ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
77 | SECTION 108(a)(3)).
78 | */
79 | /*
80 | playback timings (ms):
81 | captures_list: 2.435
82 | exclusion.robots: 0.024
83 | exclusion.robots.policy: 0.011
84 | esindex: 0.012
85 | cdx.remote: 21.041
86 | LoadShardBlock: 205.15 (3)
87 | PetaboxLoader3.resolve: 335.858 (3)
88 | PetaboxLoader3.datanode: 121.477 (4)
89 | load_resource: 274.332
90 | */
--------------------------------------------------------------------------------
/assets/css/project.css:
--------------------------------------------------------------------------------
1 | /* Stylesheet for CS 61A projects */
2 | /* IE5 Mac hack \*/
3 | pre {
4 | overflow: auto;
5 | overflow-y: hidden;
6 | margin: 0 0 1.5em;
7 | }
8 |
9 | /* End IE5 Mac hack */
10 | /* Ants */
11 | table.ant {
12 | margin: 10px auto;
13 | border-collapse: collapse;
14 | }
15 |
16 | table.ant td {
17 | margin: 0;
18 | padding: 0.5em;
19 | border: 1px solid #000000;
20 | text-align: center;
21 | }
22 |
23 | table.ant img {
24 | max-width: 80px;
25 | }
26 |
27 | /* Haiku */
28 | .haiku {
29 | text-align: center;
30 | }
31 |
32 | .haiku blockquote {
33 | font-style: italic;
34 | background-color: inherit;
35 | border-color: transparent;
36 | }
37 |
38 | .haiku img {
39 | max-width: 80%;
40 | }
41 |
--------------------------------------------------------------------------------
/assets/css/searchbox.css:
--------------------------------------------------------------------------------
1 | .searchbox {
2 | text-align: center;
3 | }
4 |
--------------------------------------------------------------------------------
/assets/css/style.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | body {
3 | font-family: "Work Sans", sans-serif;
4 | font-size: 1.5em;
5 | }
6 |
7 | code, kbd, pre, samp {
8 | font-family: "Inconsolata", monospace;
9 | font-size: 100%;
10 | }
11 |
12 | h1, h2, h3, h4, .navbar {
13 | font-family: "Roboto", sans-serif;
14 | margin-top: 1em;
15 | font-weight: 500;
16 | }
17 |
18 | /* Necessary to have fixed nav bar and TOC interaction */
19 | h1:before, h2:before, h3:before, h4:before {
20 | content: " ";
21 | display: block;
22 | height: 60px;
23 | margin-top: -60px;
24 | visibility: hidden;
25 | }
26 |
27 | .navbar {
28 | margin-top: 0;
29 | }
30 |
31 | h1 {
32 | font-weight: lighter;
33 | color: #0072c1;
34 | padding-top: 1.2em;
35 | padding-bottom: 0.2em;
36 | border-bottom: 1px solid #eee;
37 | }
38 |
39 | h2, .navbar {
40 | font-weight: 400;
41 | }
42 |
43 | section, footer {
44 | margin: 2em 0;
45 | }
46 |
47 | header {
48 | padding-bottom: 0.5em;
49 | margin: 3.75em 0 1em;
50 | }
51 |
52 | header h1 {
53 | color: #0072c1;
54 | }
55 |
56 | footer {
57 | margin-bottom: 6em;
58 | }
59 |
60 | li p {
61 | margin: 0 0;
62 | }
63 |
64 | a, button, .btn {
65 | outline: 0;
66 | }
67 |
68 | a:hover {
69 | text-decoration: none;
70 | }
71 |
72 | blockquote {
73 | background-color: #e6f3ff;
74 | border-left: solid #0072c1;
75 | font-size: inherit;
76 | }
77 |
78 | abbr {
79 | font-variant: small-caps;
80 | letter-spacing: 0.1em;
81 | text-transform: lowercase;
82 | }
83 |
84 | ::selection {
85 | background: #fff200;
86 | }
87 |
88 | ::-moz-selection {
89 | background: #fff200;
90 | }
91 |
92 | .noselect {
93 | user-select: none;
94 | }
95 |
96 | .disabled {
97 | display: none;
98 | }
99 |
100 | .forecast a {
101 | background-color: rgba(255, 128, 0, 0.25);
102 | }
103 |
104 | .badge {
105 | background-color: #0072c1;
106 | color: #fff;
107 | }
108 |
109 | .inline-block {
110 | display: inline-block;
111 | }
112 |
113 | .list-inline {
114 | display: inline;
115 | margin-bottom: 0px;
116 | }
117 |
118 | .list-inline li {
119 | padding-left: 3px;
120 | padding-right: 0px;
121 | }
122 |
123 | .assignment-text {
124 | padding-right: 5px;
125 | display: inline;
126 | }
127 |
128 | /* Code */
129 | pre code {
130 | word-wrap: normal;
131 | white-space: pre;
132 | }
133 |
134 | code {
135 | color: #0072c1;
136 | }
137 |
138 | /* Current assignments */
139 | .assignments {
140 | text-align: center;
141 | }
142 |
143 | /* Announcements */
144 | #announcements-pager {
145 | min-height: 10em;
146 | }
147 |
148 | .announcement {
149 | display: none;
150 | /* Hide on load */
151 | position: relative;
152 | }
153 |
154 | .announcement .header {
155 | font-family: "Roboto", sans-serif;
156 | margin-top: 20px;
157 | font-weight: 500;
158 | font-size: 24px;
159 | margin-bottom: 10px;
160 | line-height: 1.1;
161 | color: inherit;
162 | }
163 |
164 | .announcement .prev, .announcement .next {
165 | color: #ccc;
166 | cursor: pointer;
167 | font-size: 1.5em;
168 | position: absolute;
169 | top: 2.5em;
170 | }
171 |
172 | .announcement .prev {
173 | left: -2em;
174 | padding: 0.75em 0.75em 0.75em 1em;
175 | }
176 |
177 | .announcement .next {
178 | padding: 0.75em 1em 0.75em 0.75em;
179 | right: -2em;
180 | }
181 |
182 | .announcement .prev:hover, .announcement .next:hover {
183 | color: #555;
184 | }
185 |
186 | @media (max-width: 991px) {
187 | .announcement {
188 | padding: 0 2em;
189 | overflow-x: hidden;
190 | }
191 |
192 | .announcement ul, .announcement ol {
193 | padding-left: 1.5em;
194 | }
195 |
196 | .announcement .prev {
197 | left: -1em;
198 | }
199 |
200 | .announcement .next {
201 | right: -1em;
202 | }
203 | }
204 | .highlight-resources {
205 | display: flex;
206 | }
207 |
208 | .highlight-resource {
209 | flex: 1 0 50%;
210 | }
211 |
212 | /* Calendar */
213 | .topic {
214 | margin: 2em 0;
215 | position: relative;
216 | }
217 |
218 | .resource-topic {
219 | margin: 0;
220 | }
221 |
222 | .topic header, .topic section {
223 | margin: 0;
224 | }
225 |
226 | .topic header .title {
227 | margin-left: 40px;
228 | }
229 |
230 | .topic header .examq-header {
231 | margin-left: 0px;
232 | }
233 |
234 | .topic header .title .header {
235 | margin-left: 0px;
236 | margin-top: 1em;
237 | padding-top: 0;
238 | font-weight: normal;
239 | font-family: "Roboto", sans-serif;
240 | font-size: 30px;
241 | margin-bottom: 10px;
242 | line-height: 1.1;
243 | color: inherit;
244 | }
245 |
246 | .topic header .exam-header {
247 | margin-left: 0px;
248 | margin-top: 1em;
249 | padding-top: 0;
250 | font-weight: normal;
251 | font-family: "Roboto", sans-serif;
252 | font-size: 30px;
253 | margin-bottom: 10px;
254 | line-height: 1.1;
255 | color: inherit;
256 | }
257 |
258 | .topic header .exam-header a {
259 | color: #333;
260 | }
261 |
262 | .topic header a:focus {
263 | text-decoration: none;
264 | }
265 |
266 | .topic header .glyphicon {
267 | transition: transform 0.2s;
268 | font-size: 90%;
269 | font-weight: 400;
270 | line-height: 1;
271 | color: #777;
272 | }
273 |
274 | .topic header .glyphicon.up {
275 | transform: rotate(-180deg);
276 | }
277 |
278 | .topic header .glyphicon.down {
279 | transform: none;
280 | }
281 |
282 | .topic header .list-inline {
283 | margin: 0;
284 | line-height: 1.5;
285 | }
286 |
287 | .topic header .list-inline li {
288 | padding: 0;
289 | }
290 |
291 | .topic header .list-inline li a,
292 | .topic header .list-inline li span {
293 | bottom: 0.15em;
294 | font-weight: normal;
295 | position: relative;
296 | }
297 |
298 | .topic main {
299 | padding: 0 1em;
300 | border: 1px solid #eee;
301 | background-color: #fafafa;
302 | }
303 |
304 | .topic .resource {
305 | padding: 0;
306 | margin-bottom: 0.5em;
307 | border: none;
308 | background-color: inherit;
309 | }
310 |
311 | .topic .timeline {
312 | padding: 1em 0;
313 | }
314 |
315 | .timeline table {
316 | width: 100%;
317 | }
318 |
319 | .timeline .week {
320 | padding: 1em;
321 | width: 100%;
322 | }
323 |
324 | .timeline .week ~ .week {
325 | border-top: 1px solid #ddd;
326 | }
327 |
328 | .timeline .week td {
329 | vertical-align: top;
330 | }
331 |
332 | .topic .list-inline li {
333 | padding-right: 0;
334 | }
335 |
336 | .start-date {
337 | position: absolute;
338 | line-height: 0.5em;
339 | left: 0;
340 | }
341 |
342 | .day {
343 | list-style: none;
344 | padding: 10px;
345 | margin-bottom: 0;
346 | position: relative;
347 | min-height: 32px;
348 | min-width: 290px;
349 | flex: 0 0 33.333%;
350 | }
351 |
352 | .date {
353 | background-color: #ccc;
354 | padding: 0 0.75em;
355 | height: 24px;
356 | line-height: 24px;
357 | border-radius: 12px;
358 | color: white;
359 | display: inline-block;
360 | }
361 |
362 | .date.active {
363 | background-color: #0072c1;
364 | }
365 |
366 | .line {
367 | position: absolute;
368 | border: 5.5px solid #ccc;
369 | border-radius: 5.5px;
370 | left: 21px;
371 | bottom: 20px;
372 | top: 43px;
373 | }
374 |
375 | .event {
376 | color: #aaa;
377 | margin-left: 28px;
378 | padding: 5px 0;
379 | position: relative;
380 | }
381 |
382 | .event::before {
383 | color: #fff;
384 | content: "•";
385 | font-size: 2em;
386 | left: -18px;
387 | line-height: 1em;
388 | position: absolute;
389 | top: 0;
390 | }
391 |
392 | .due {
393 | /* background-color: #ccc; */
394 | background-color: #A4CCEB;
395 | vertical-align: top;
396 | }
397 |
398 | .past .date, .past .due {
399 | background-color: #A4CCEB;
400 | }
401 |
402 | .active .date, .active .due {
403 | background-color: #0072c1;
404 | }
405 |
406 | .past .line {
407 | border-color: #A4CCEB;
408 | }
409 |
410 | .active .line {
411 | border-color: #0072c1;
412 | }
413 |
414 | .past .event,
415 | .active .event {
416 | color: #333;
417 | }
418 |
419 | #flowchart-wrapper {
420 | width: 100%;
421 | height: 250px;
422 | position: relative;
423 | margin-top: 0px;
424 | }
425 |
426 | #flowchart {
427 | width: 100%;
428 | height: 100%;
429 | position: absolute;
430 | left: 0;
431 | top: 0;
432 | z-index: 999;
433 | }
434 |
435 | .resources {
436 | display: flex;
437 | flex-flow: wrap;
438 | }
439 |
440 | .resource {
441 | flex: 1 0 33.333%;
442 | min-width: 290px;
443 | }
444 |
445 | .resource h3, .readings h3 {
446 | text-transform: uppercase;
447 | letter-spacing: 3px;
448 | }
449 |
450 | .readings h3, .readings ul {
451 | display: inline-block;
452 | }
453 |
454 | .resource .list-unstyled {
455 | line-height: 1.8;
456 | }
457 |
458 | .resource .list-inline {
459 | display: inline-block;
460 | margin-left: 0;
461 | }
462 |
463 | .resource .list-inline {
464 | /* Remove extra bottom spacing in "Past Exams" table elements */
465 | margin-bottom: 0;
466 | }
467 |
468 | .resource-start {
469 | height: 16px;
470 | }
471 |
472 | .still-to-come {
473 | margin-left: 10px;
474 | }
475 |
476 | #still-to-come {
477 | padding: 10px 0 0 0;
478 | }
479 |
480 | .exam-question {
481 | padding-left: 5px;
482 | }
483 |
484 | @media (max-width: 991px) {
485 | .topic .day {
486 | min-width: 0;
487 | }
488 | }
489 | @media (max-width: 600px) {
490 | .timeline table,
491 | .timeline table tr.week,
492 | .timeline table td {
493 | display: inline-block;
494 | }
495 | }
496 | @media (max-width: 370px) {
497 | /* Correct display width on very small devices */
498 | .topic main {
499 | padding: 0;
500 | }
501 | }
502 | /* Button-like label style */
503 | .label-outline {
504 | background-color: transparent;
505 | border: 1px solid #ccc;
506 | color: #ccc;
507 | padding: 0.2em 0.4em 0.1em;
508 | }
509 |
510 | a.label-outline:hover, a.label-outline:focus {
511 | background-color: #0072c1;
512 | color: #fff;
513 | }
514 |
515 | a.label-outline {
516 | color: #0072c1;
517 | border: 1px solid #0072c1;
518 | }
519 |
520 | /* Staff page */
521 | .staffer {
522 | margin: 1em 0;
523 | }
524 |
525 | .staffer ul {
526 | color: #555;
527 | list-style: none;
528 | padding-left: 0;
529 | }
530 |
531 | .staffer-img {
532 | padding-top: 24px;
533 | }
534 |
535 | @media (max-width: 767px) {
536 | .staffer .section {
537 | font-size: smaller;
538 | }
539 | }
540 | .bio {
541 | font-size: 13px;
542 | }
543 |
544 | /* Calendar */
545 | .table-responsive {
546 | overflow-x: visible;
547 | margin-top: -5px;
548 | }
549 |
550 | table#calendar {
551 | border-collapse: collapse;
552 | margin-left: auto;
553 | margin-right: auto;
554 | }
555 |
556 | table#calendar th {
557 | color: #0072c1;
558 | text-align: center;
559 | border-top: none;
560 | vertical-align: middle;
561 | }
562 |
563 | table#calendar td {
564 | border: 1px solid #fff;
565 | padding: 6px;
566 | vertical-align: middle;
567 | }
568 |
569 | table#calendar tr:not(:first-child) {
570 | background-color: #c1d6e3;
571 | }
572 |
573 | table#calendar td.weeknum {
574 | text-align: center;
575 | }
576 |
577 | table#calendar td.reading ul {
578 | list-style-type: none;
579 | margin: 0;
580 | padding: 0;
581 | }
582 |
583 | table#calendar td.even {
584 | background-color: #B0C4DE;
585 | }
586 |
587 | table#calendar tr:hover td:not(.weeknum) {
588 | background-color: #B0C4DE;
589 | }
590 |
591 | /* Navbar colors */
592 | .navbar-default {
593 | background-color: #0072c1;
594 | border: none;
595 | top: 0;
596 | position: fixed;
597 | right: 0;
598 | left: 0;
599 | }
600 |
601 | .navbar-default .navbar-brand {
602 | color: #ecf0f1;
603 | font-weight: bold;
604 | }
605 |
606 | .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus {
607 | color: #ffffff;
608 | }
609 |
610 | .navbar-default .navbar-text {
611 | color: #ecf0f1;
612 | }
613 |
614 | .navbar-default .navbar-nav > li > a {
615 | color: #ecf0f1;
616 | }
617 |
618 | .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
619 | color: #ffffff;
620 | }
621 |
622 | .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
623 | color: #ffffff;
624 | background-color: #0085e1;
625 | }
626 |
627 | .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus {
628 | color: #ffffff;
629 | background-color: #0085e1;
630 | }
631 |
632 | .navbar-default .navbar-toggle {
633 | border: none;
634 | }
635 |
636 | .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {
637 | background-color: #0085e1;
638 | }
639 |
640 | .navbar-default .navbar-toggle .icon-bar {
641 | background-color: #ecf0f1;
642 | }
643 |
644 | .navbar-default .navbar-collapse,
645 | .navbar-default .navbar-form {
646 | border: none;
647 | }
648 |
649 | .navbar-default .navbar-link {
650 | color: #ecf0f1;
651 | }
652 |
653 | .navbar-default .navbar-link:hover {
654 | color: #ffffff;
655 | }
656 |
657 | .navbar li {
658 | position: relative;
659 | }
660 |
661 | .navbar .special-box {
662 | margin: 9px;
663 | border-radius: 0.5rem;
664 | padding: 5px;
665 | background: #47505c;
666 | border: 1px white solid;
667 | transition: background-color 0.5s;
668 | }
669 |
670 | .navbar .special-box::after {
671 | content: " ⇗";
672 | }
673 |
674 | .navbar .special-box.special-box:hover {
675 | background-color: #272a34;
676 | }
677 |
678 | @media (max-width: 767px) {
679 | .navbar-default .navbar-nav .open .dropdown-menu > li > a {
680 | color: #ecf0f1;
681 | }
682 |
683 | .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
684 | color: #ffffff;
685 | }
686 |
687 | .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
688 | color: #ffffff;
689 | background-color: #0085e1;
690 | }
691 | }
692 | /* Sidebar */
693 | .sticky {
694 | position: -webkit-sticky;
695 | position: sticky;
696 | top: 5em;
697 | height: 85vh;
698 | overflow-y: auto;
699 | -webkit-overflow-scrolling: touch;
700 | }
701 |
702 | .sidebar {
703 | font-size: 0.9em;
704 | }
705 |
706 | .sidebar > ul > li > a {
707 | padding: 1px 10px;
708 | }
709 |
710 | .sidebar > ul > ul > li > a {
711 | margin-left: 20px;
712 | padding: 1px 10px;
713 | }
714 |
715 | .sidebar > ul > ul > ul > li > a {
716 | margin-left: 40px;
717 | padding: 1px 10px;
718 | }
719 |
720 | .sidebar > ul > ul > ul > ul > li > a {
721 | margin-left: 60px;
722 | padding: 1px 10px;
723 | }
724 |
725 | .sidebar li {
726 | background-color: #fff !important;
727 | }
728 |
729 | .sidebar li > a {
730 | background-color: #fff !important;
731 | }
732 |
733 | .sidebar li > a:hover {
734 | background-color: transparent !important;
735 | }
736 |
737 | .sidebar a:visited {
738 | color: #0072c1 !important;
739 | }
740 |
741 | .sidebar li.active {
742 | background-color: #0072c1 !important;
743 | border-radius: 2px;
744 | }
745 |
746 | .sidebar li.active a {
747 | color: #fff !important;
748 | background-color: #0072c1 !important;
749 | }
750 |
751 | /* Resources */
752 | .btn-outline {
753 | background-color: #fff;
754 | border: 1px solid #0072c1;
755 | color: #0072c1;
756 | cursor: pointer;
757 | margin: 5px;
758 | }
759 |
760 | .btn-outline:focus {
761 | color: #0072c1;
762 | }
763 |
764 | .btn-outline:hover {
765 | background-color: #0072c1;
766 | border: 1px solid #0072c1;
767 | color: #fff;
768 | }
769 |
770 | .btn-outline:active {
771 | -webkit-box-shadow: none;
772 | box-shadow: none;
773 | }
774 |
775 | .toggle {
776 | margin-bottom: 1em;
777 | }
778 |
779 | .solutiontoggle, .solution {
780 | display: none;
781 | }
782 |
783 | .alwaystoggle {
784 | display: none;
785 | }
786 |
787 | #past-exams--content {
788 | overflow-y: scroll;
789 | height: 268px;
790 | }
791 |
792 | #past-exams- {
793 | z-index: 100;
794 | }
795 |
--------------------------------------------------------------------------------
/assets/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/assets/images/favicon.ico
--------------------------------------------------------------------------------
/assets/images/hany-farid.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/assets/images/hany-farid.jpg
--------------------------------------------------------------------------------
/assets/images/john-denero.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/assets/images/john-denero.jpg
--------------------------------------------------------------------------------
/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/assets/images/logo.png
--------------------------------------------------------------------------------
/assets/js/calendar.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Displays the office hours and weekly calendars using
3 | * FullCalendar with Google Calendars integration.
4 | **/
5 |
6 | var apiKey = 'AIzaSyBZKnVt7lMUmk0E2odYaPUHEO7iDTSBWOM';
7 |
8 | // Change event url to null.
9 | var transform = function(event) {
10 | event.url = null;
11 | return event;
12 | }
13 |
14 | // Add location to event display.
15 | var render = function(event, element, view) {
16 | element.append($('
').html(event.location));
17 | return element;
18 | }
19 |
20 | // Show the current week during the semester and the first week of class otherwise.
21 | function calendarStartDate() {
22 | if (moment().isBefore(moment(endDate)) && moment().isAfter(moment(startDate))) {
23 | return moment();
24 | }
25 | return startDate;
26 | }
27 |
28 | $(document).ready(function() {
29 | $('#office-hours').fullCalendar({
30 | eventDataTransform: transform,
31 | eventRender: render,
32 | defaultView: $(window).width() >= 768 ? 'agendaWeek' : 'agendaDay',
33 | allDaySlot: false,
34 | slotEventOverlap: false,
35 | hiddenDays: [],
36 | height: "auto",
37 | minTime: "08:00:00",
38 | maxTime: "24:00:00",
39 | defaultDate: calendarStartDate(),
40 | googleCalendarApiKey: apiKey,
41 | eventSources: [
42 | {
43 | googleCalendarId: officeHoursCalendarId,
44 | cache: true,
45 | color: '#0072c1'
46 | },
47 | {
48 | googleCalendarId: instructorOfficeHoursCalendarId,
49 | cache: true,
50 | color: '#004090'
51 | },
52 | {
53 | googleCalendarId: lecturesCalendarId,
54 | cache: true,
55 | color: '#c1d6e3',
56 | textColor: '#000'
57 | }
58 | ]
59 | });
60 |
61 | $('#weekly').fullCalendar({
62 | eventDataTransform: transform,
63 | eventRender: render,
64 | defaultView: $(window).width() >= 768 ? 'agendaWeek' : 'agendaDay',
65 | allDaySlot: false,
66 | slotEventOverlap: false,
67 | weekends: true,
68 | height: "auto",
69 | minTime: "08:00:00",
70 | maxTime: "24:59:00",
71 | defaultDate: calendarStartDate(),
72 | googleCalendarApiKey: apiKey,
73 | eventSources: [
74 | {
75 | googleCalendarId: sectionsCalendarId,
76 | cache: true,
77 | color: '#0072c1'
78 | },
79 | {
80 | googleCalendarId: lecturesCalendarId,
81 | cache: true,
82 | color: '#c1d6e3',
83 | textColor: '#000'
84 | },
85 | ]
86 | });
87 | });
88 |
--------------------------------------------------------------------------------
/assets/js/config.js:
--------------------------------------------------------------------------------
1 | /* Start/end date of semester. Make sure to change utils.py as well */
2 | var startDate = '2020-08-26', endDate = '2020-12-04';
3 |
4 | /* Calendar Specification */
5 | var officeHoursCalendarId = 'c_qbhh4qrvvd5lhgnrikeh8tqhos@group.calendar.google.com';
6 | var instructorOfficeHoursCalendarId = '';
7 | var lecturesCalendarId = 'c_49p44snsa9d2roc3fv0j0h31no@group.calendar.google.com';
8 | var sectionsCalendarId = 'c_e61er5dri18gquei9i7uq9okbs@group.calendar.google.com';
9 |
--------------------------------------------------------------------------------
/assets/js/dark-mode.js:
--------------------------------------------------------------------------------
1 |
2 | // this is an easter egg so the code is intentionally messy
3 | // it activates CS 61A Dark Mode: https://github.com/PerpetualPanda/lambda-dark
4 |
5 | var a = '';
6 | var b = -770055275;
7 | document.addEventListener('keydown', function (e) {
8 | a += ("" + e.keyCode);
9 | if (a.split('').reduce((a,b)=>{a=((a<<5)-a)+b.charCodeAt(0);return a&a},0) === b) {
10 | var node = document.createElement('style');
11 | node.innerHTML = 'body{background-color:#0c0c0c;color:#ddd}code,kbd,pre,samp{background-color:#222;border:0;color:#ddd !important}p,li,ul,cite{color:#ddd}input,select{color:#ddd !important;background-color:#222 !important;border:1px solid #333 !important}.dropdown-menu{background-color:#222 !important}.dropdown-menu a{color:#ddd !important}.dropdown-menu a:hover{background-color:#444 !important}.fc-today{background:#222 !important}#office-hours td,#weekly td{border:1px solid #333 !important}#office-hours th,#office-hours tr,#weekly th,#weekly tr{border:0}.resource tr,.resource td,.resource th{background-color:#111 !important;border:1px solid #333 !important}.table-bordered{background-color:#111 !important;border:1px solid #333 !important}h1,h2,h3,h4,.navbar{color:#ddd}h1{color:#fff}header h1{color:#fff}blockquote{background-color:rgba(123,241,252,0.15)}::selection{background:#009fc0}::-moz-selection{background:#009fc0}.forecast a{background-color:rgba(255,255,255,0.5)}.announcement .header{color:#ddd}.announcement .prev:hover,.announcement .next:hover{color:#ddd}.topic header .exam-header a{color:#ddd}.topic header .glyphicon{color:#ddd}.line{border:5.5px solid #222}.due{background-color:#333}.past .event,.active .event{color:#ddd}.staffer ul{color:#ddd}table#calendar td{border:1px solid #333}table#calendar tr:not(:first-child){background-color:#111}table#calendar td.even{background-color:#222}table#calendar tr:hover td:not(.weeknum){background-color:#222}.navbar .special-box.special-box:hover{background-color:#ddd}.sidebar li{background-color:transparent !important}.sidebar li>a{background-color:transparent !important}.btn-outline{background-color:transparent}.hljs{display:block;overflow-x:auto;background:inherit;-webkit-text-size-adjust:none}.hljs,.hljs-list .hljs-built_in{color:#0149a8}.hljs-header,.hljs-important,.hljs-javadoctag,.hljs-keyword,.hljs-request,.hljs-title{font-weight:bold}.hljs-chunk,.hljs-comment{color:#738191}.hljs-addition,.hljs-argument,.hljs-blockquote,.hljs-built_in,.hljs-filename,.hljs-header,.hljs-link_label,.hljs-literal,.hljs-name,.hljs-parent,.hljs-string,.hljs-tag,.hljs-title,.hljs-value{color:#4993fc}.hljs-attr_selector,.hljs-attribute,.hljs-bullet,.hljs-decorator,.hljs-deletion,.hljs-doctype,.hljs-javadoc,.hljs-link_url,.hljs-phony,.hljs-pi,.hljs-pragma,.hljs-preprocessor,.hljs-prompt,.hljs-regexp,.hljs-shebang,.hljs-sqbracket,.hljs-string .hljs-variable,.hljs-subst,.hljs-symbol,.hljs-xmlDocTag,.hljs-yardoctag{color:#497fcc}';
12 | document.body.appendChild(node);
13 | }
14 | });
15 |
16 |
17 |
--------------------------------------------------------------------------------
/assets/js/flowchart-data.js:
--------------------------------------------------------------------------------
1 | /*
2 | Each object in the array represents a single high level category for the flowchart.
3 | The "resources" attribute contains the resources that will be displayed when the category is selected.
4 | */
5 | resourceData = [
6 | {
7 | "name": "fundamentals",
8 | "type": "category",
9 | "description": "I feel shaky about a topic and want to brush up on the fundamentals.",
10 | "resources": [
11 | {
12 | "name": "CS61A Textbook",
13 | "type": "resource",
14 | "href": "http://composingprograms.com/"
15 | },
16 | {
17 | "name": "Sequoia's Book",
18 | "type": "resource",
19 | "href": "https://sequoia-tree.github.io/"
20 | },
21 | {
22 | "name": "Guides and Practice Problems by Topic",
23 | "type": "resource",
24 | "href": "/resources.html#resource-start"
25 | }
26 | ]
27 | },
28 | {
29 | "name": "challenge",
30 | "type": "category",
31 | "description": "I feel comfortable with Discussion and Lab questions for a topic, and want more challenging practice.",
32 | "resources": [
33 | {
34 | "name": "Exam Questions on ____ in each Topic section",
35 | "type": "resource",
36 | "href": "/resources.html#resource-start"
37 | }
38 | ]
39 | },
40 | {
41 | "name": "exams",
42 | "type": "category",
43 | "description": "I am interested in studying for exams in general.",
44 | "resources": [
45 | {
46 | "name": "Studying Guide",
47 | "type": "resource",
48 | "href": "/articles/studying.html"
49 | },
50 | {
51 | "name": "Past Exams",
52 | "type": "resource",
53 | "href": "/resources.html#past-exams"
54 | },
55 | {
56 | "name": "Midterm 1 Guides and Practice Problems",
57 | "type": "resource",
58 | "href": "/resources.html#midterm-1"
59 | },
60 | {
61 | "name": "Midterm 2 Guides and Practice Problems",
62 | "type": "resource",
63 | "href": "/resources.html#midterm-2"
64 | },
65 | {
66 | "name": "Final Guides and Practice Problems",
67 | "type": "resource",
68 | "href": "/resources.html#final-exam"
69 | },
70 | {
71 | "name": "Sequoia's Book",
72 | "type": "resource",
73 | "href": "https://sequoia-tree.github.io/"
74 | },
75 | ]
76 | },
77 | {
78 | "name": "stuck",
79 | "type": "category",
80 | "description": "I am studying, but feel like I am not improving.",
81 | "resources": [
82 | {
83 | "name": "See \"Advice\" section",
84 | "type": "resource",
85 | "href": "/resources.html#advice"
86 | }
87 | ]
88 | }
89 | ]
90 |
--------------------------------------------------------------------------------
/assets/js/flowchart.js:
--------------------------------------------------------------------------------
1 | /*
2 | This file creates a flowchart from the data in ./flowchart-data.js imported as resourceData.
3 | Each category in resourceData contains a "description" correlating to a challenge a student may potentially face
4 | and an array of resources that could be helpful
5 | Each resource has a "name" and "href" that links to the location of the resource.
6 |
7 | The flowchart object is the core view that remains on the page at all times
8 | Nodes can be added with flowchart.add(
)
9 | Nodes can be removed with flowchart.remove()
10 | Styling of the flowchart and nodes must be done in this file rather than a .css file
11 | Most styles are added in the flowchart constructor - any valid css can be used
12 | Node dimensions and positions are controlled by the global vars at the top of the file
13 |
14 | cytoscape API documentation: http://js.cytoscape.org/#core
15 | */
16 |
17 | var rows = 2;
18 | var boxWidth = 250;
19 | var boxHeight = 75;
20 | var xOffset = 25;
21 | var yOffset = 50;
22 |
23 | var flowchart = window.flowchart = cytoscape({
24 | container: document.getElementById('flowchart'),
25 |
26 | boxSelectionEnabled: false,
27 | autoungrabify: true,
28 | autounselectify: true,
29 | zoomingEnabled: false,
30 | panningEnabled: true,
31 |
32 | style: [
33 | {
34 | selector: 'node',
35 | style: {
36 | 'shape': 'square',
37 | 'content': 'data(description)',
38 | 'text-valign': 'center',
39 | 'text-halign': 'center',
40 | 'font-size': '15px',
41 | 'font-family': 'Work Sans, sans-serif',
42 | 'color': '#ecf0f1',
43 | 'background-color': '#0072c1',
44 | 'width': 'data(width)',
45 | 'height': 'data(height)',
46 | 'text-wrap': 'wrap',
47 | 'text-max-width': '230px',
48 | 'padding': '0px',
49 | 'overlay-padding': 0,
50 | 'overlay-opacity': 0,
51 | }
52 | },
53 | {
54 | selector: 'core',
55 | style: {
56 | 'active-bg-opacity': 0,
57 | }
58 | }
59 | ]
60 | });
61 |
62 | displayResourceCategories();
63 |
64 | //Create and add nodes for each category in resourceData
65 | function displayResourceCategories() {
66 | flowchart.remove("node[id > '']") //remove all current nodes.
67 | cols = Math.ceil(resourceData.length / rows);
68 | nodes = []
69 | for (var i = 0; i < resourceData.length; i++) {
70 | var category = resourceData[i]
71 | var n = {
72 | group: "nodes",
73 | data: {
74 | id: category.name,
75 | type: category.type,
76 | index: i,
77 | description: category.description,
78 | width: boxWidth,
79 | height: boxHeight
80 | },
81 | position: { x: ((boxWidth/2) + xOffset) + (280*(i % cols)),
82 | y: yOffset + (100* Math.floor(i/cols))
83 | }
84 | }
85 | nodes.push(n)
86 | }
87 | flowchart.add(nodes)
88 | flowchart.reset();
89 | }
90 |
91 | //Create and add nodes for the selected category
92 | function displayResource(category) {
93 | flowchart.remove("node[id > '']") //remove all current nodes.
94 | resources = resourceData[category].resources
95 | cols = Math.ceil(resources.length / rows);
96 | nodes = []
97 | for (var i = 0; i < resources.length; i++) {
98 | var resource = resources[i]
99 | var n = {
100 | group: "nodes",
101 | data: {
102 | description: resource.name,
103 | type: resource.type,
104 | href: resource.href,
105 | width: boxWidth,
106 | height: boxHeight
107 | },
108 | position: { x: ((boxWidth/2) + xOffset) + (280*(i % cols)),
109 | y: yOffset + (100* Math.floor(i/cols))
110 | }
111 | }
112 | nodes.push(n)
113 | }
114 | backNode = {
115 | group: "nodes",
116 | data: {
117 | id: 'back', //make index?
118 | description: '< Back',
119 | type: 'back',
120 | width: '70px',
121 | height: '30px'
122 | },
123 | position: { x: (70/2) + xOffset, // 1/2 of width + offset since boxes position is based on center of rectangle.
124 | y: yOffset + (90 * rows)
125 | }
126 |
127 | }
128 | nodes.push(backNode)
129 | flowchart.add(nodes)
130 | }
131 |
132 | //Event handler for clicking nodes
133 | //Resource: redirect to resource location
134 | //Category: display resources for the category
135 | //Back: return to primary view containing all categories
136 | flowchart.on('tap', 'node', function(){
137 | if (this.data('type') === "resource") {
138 | href = this.data('href')
139 | try { // your browser may block popups
140 | window.open( href, href.charAt(0) === '/' ? '_self' : '');
141 | } catch(e){ // fall back on url change
142 | href.charAt(0) === '/' ? window.location.replace(href) : window.location.href = this.data('href');
143 | }
144 | } else if (this.data('type') === "category"){
145 | displayResource(this.data('index'));
146 | } else if (this.data('type') === 'back') {
147 | displayResourceCategories();
148 | }
149 | });
150 |
151 | flowchart.on('mouseover', 'node', function (evt) {
152 | $('html,body').css('cursor', 'pointer');
153 | evt.target.style('color', '#ffffff');
154 | evt.target.style('background-color', '#B0C4DE');
155 | } );
156 |
157 | flowchart.on('mouseout', 'node', function (evt) {
158 | $('html,body').css('cursor', 'default');
159 | evt.target.style('color', '#ecf0f1');
160 | evt.target.style('background-color', '#0072c1');
161 | });
--------------------------------------------------------------------------------
/assets/js/sketchy.js:
--------------------------------------------------------------------------------
1 | // A little library that adds a sketching button to the nav bar.
2 | // Once clicked, you can draw on a canvas on top of the page,
3 | // and then click again to hide the canvas.
4 |
5 | var makeSketchCanvas = function () {
6 | // Max canvas area (in pixels) before drawing is disabled
7 | // https://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element
8 | const canvasMaxArea = 16e6;
9 |
10 | const activePointers = new Map();
11 |
12 | // Create the canvas and bind events
13 | const $canvas = $("