Overview
32 |Week 1 []
37 |Week 2 []
42 |Week 3 []
47 |Week 4 []
52 |Week 5 []
57 |Week 6 []
62 |Week 7 []
67 |Week 8 []
73 |Week 9 []
78 |Week 10 []
83 |Week 11 []
88 |Week 12 []
93 |Week 13 []
98 |Reading Week []
103 |14 |
Some details common to all weeks
3 |About this document
6 |
-
9 |
- This is your main source of information for CS2103/T. You will need to refer it weekly. 10 |
- Recommended usage: At the start of each week, read the section corresponding to that week in the Schedule 11 | page. 12 | That should be good enough in general, unless you are keen to read ahead to find out what's coming up in 13 | future weeks. 14 | 15 |
- Important bits of information are highlighted. 16 | Less important additional information are dimmed out. 17 | 18 |
- We will be adding details of the upcoming weeks as we go. 19 |
- It also contain a lot of links to additional resources. It’s ok if you don’t have time to read them now. 20 | They are for your future reference too (i.e. after the semester is over). 21 | 22 |
- You can access this page after this semester using this link 23 | http://www.comp.nus.edu.sg/~cs2103/AY1617S2 24 |
A typical CS2103/T week
29 |
1. Attend lecture to recap previous week's topics and get an intro to this week's topics.
31 |2. Use the relevant learning resources to learn the topic. Self-test your knowledge using post-lecture quiz 32 | on IVLE.
33 |3a. Do some of the learning activities recommended for the week.
34 |3b. Meet with team members and help each other to complete all basic and intermediate learning 35 | activities collectively as a team.
36 |4. Attend the tutorial and demonstrate to the tutor your completed learning activities.
Tutorial Schedule
40 |Module | 48 |Tutorial ID | 49 |Time | 50 |Venue | 51 |Tutors ( 52 | contact 53 | details 54 | ) 55 | | 56 |
CS2103T (CS) | 60 |W09 | 61 |Wed 0900 | 62 |COM1-B103 | 63 |TBD | 64 |
CS2103T (CS) | 67 |W10 | 68 |Wed 1000 | 69 |COM1-B103 | 70 |TBD | 71 |
CS2103T (CS) | 74 |W11 | 75 |Wed 1100 | 76 |COM1-B103 | 77 |TBD | 78 |
CS2103T (CS) | 81 |W13 | 82 |Wed 1300 | 83 |SR5 (COM1-0201) | 84 |TBD | 85 |
CS2103T (CS) | 88 |W14 | 89 |Wed 1400 | 90 |SR5 (COM1-0201) | 91 |TBD | 92 |
CS2103T (CS) | 95 |W15 | 96 |Wed 1500 | 97 |SR5 (COM1-0201) | 98 |TBD | 99 |
CS2103T (CEG) | 102 |T09 | 103 |Thu 0900 | 104 |COM1-B103 | 105 |TBD | 106 |
CS2103 (CEG) | 109 |T10 | 110 |Thu 1000 | 111 |COM1-B103 | 112 |TBD | 113 |
CS2103 (CEG) | 116 |T11 | 117 |Thu 1100 | 118 |COM1-B103 | 119 |TBD | 120 |
CS2103 | 123 |T13 | 124 |Thu 1300 | 125 |COM1-B103 | 126 |TBD | 127 |
CS2103 | 130 |T14 | 131 |Thu 1400 | 132 |COM1-B103 | 133 |TBD | 134 |
CS2103 | 137 |T15 | 138 |Thu 1500 | 139 |COM1-B103 | 140 |TBD | 141 |
CS2103T (CEG) | 144 |T16 | 145 |Thu 1600 | 146 |SR5 (COM1-0201) | 147 |TBD | 148 |
CS2103 | 151 |T17 | 152 |Thu 1700 | 153 |SR5 (COM1-0201) | 154 |TBD | 155 |
CS2103 | 158 |F09 | 159 |Fri 0900 | 160 |COM1-B103 | 161 |TBD | 162 |
CS2103 | 165 |F10 | 166 |Fri 1000 | 167 |COM1-B103 | 168 |TBD | 169 |
CS2103 | 172 |F11 | 173 |Fri 1100 | 174 |COM1-B103 | 175 |TBD | 176 |
Pre-Tutorial Learning Activities
3 |T10A1. Do a peer code review 
6 | -
8 |
- Refer to the learning outcome 9 | 10 | [LO-CodeReview] 11 |
- For at least one PR created by you, get a team member to do a code review (on GitHub) before merging the PR. 12 | 13 |
- Review at least one PR created by a team member. 14 |
T10A2. Reach V0.4 
19 | -
25 |
- Remember to collate code/tests/docs written by you
26 | (see V0.4 Requirements for more info).
27 | Your tutor will do a brief review of the collated code to give you some feedback about your code quality.
28 | - Note that there are special requirements for the V0.4 demo 29 | which require advance preparations. 30 |
T10A3. Relate Design Patterns to the project 
35 | 40 | Find if those patterns can be applied in other places of your design. 41 |
T10A4. Distinguish between unit, integration, and system testing. 
45 | 47 |
-
48 |
- 49 | Write Integration Tests [LO-IntegrationTests] 51 |
- 52 | Perform System Testing [LO-SystemTesting] 54 |
-
57 |
- Unit tests 58 |
- Integration tests 59 |
- Unit+integration tests 60 |
- System tests 61 |
Tutorial 10: V0.4, Patterns, Testing types
69 |Demo V0.4
72 |74 | Also show evidence of meeting other V0.4 requirements e.g. code has been collated correctly. 75 |
Patterns
79 |Testing types
85 |Lecture 11
95 | 96 |Part 1 - Module Recap [50 minutes]
99 |
103 | ![]() |
105 |
106 | 107 | [No handout] 108 | [Slides] 109 | 110 | 111 |112 | Overview: In this lecture we take a quick pass over various topics 113 | we have covered in the module to see how they fit into a big picture. 114 | 115 | 116 | |
117 |
Resources
121 |-
122 |
- 123 | The Big Picture: how the Module Topics Fit Together 125 | 126 |
- 127 | Summary of UML diagrams 129 | 130 |
-
131 |
Interesting Readings:
132 |-
133 |
- [Web article]
134 | What students really need to hear -
136 | "You see, the main event of school is not academic learning. 137 | It never has been. It never will be. The main event is ..." 138 |
139 | - [Web article] 140 | 142 | 10 Secrets You Should Have Learned with Your Software Engineering Degree – But Probably Didn't 143 | (See how many of those we covered in CS2103). 144 | 145 |
- [Web article] 146 | 148 | Why do professors teach 1 + 1 and then ask you 19.8 * 76 in exams? 149 | 150 | 151 |
- [Web article] 152 | 154 | Elon Musk on Learning New Things: View Knowledge as a Tree 155 | - something related to ‘learn as a cat, not a mouse’ tip mentioned during the lecture 156 | 157 |
159 | - [Web article]
134 | What students really need to hear -
Part 2 - Tips for Killer Product Presentations [30 minutes]
164 |
168 | ![]() |
170 |
171 | 172 | [No handout] 173 | [Slides] 174 | 175 | 176 |177 | Overview: Some tips you can use to improve any product presentation. 178 | Many of these are applicable to the final product demo. 179 | 180 | 181 | |
182 |
Resources
186 |-
187 |
-
188 |
Interesting Readings:
189 |-
190 |
- [Web article] 191 | 192 | How to be a demo God 193 | 194 | 195 |
197 |
Part 3 - PowerPoint Power Tips [20 minutes]
202 |
206 | ![]() |
208 |
209 | 210 | [No handout] 211 | [Slides] 212 | 213 | 214 |215 | Overview: Some advanced PowerPoint tips that can save you time and get more out 216 | of PowerPoint 217 | 218 | 219 | |
220 |
Things to do
3 |Handbook sections to read
6 |-
8 |
- 9 | 10 | 12 | 13 | 11 | 14 |
Pre-Tutorial Learning Activities
22 |T11A1. Reach V0.5rc 
25 | T11A2. Relates XP/Scrum to your project 
34 | 36 | Pick task (a) or (b). Ensure at least one member picks each task 37 | and no more than one member picks the same concept/rule. 38 |
39 |40 | Preferably, try to pick concepts/rules that you think are not applicable to the project. 41 |
42 |-
43 |
- Relate* three
44 |
45 | key concepts of Scrum to your project.
46 | e.g. product backlog, product owner, sprints, sprint backlog, daily scrum, 47 | user stories, scrumboard, story points, burndown charts, team velocity, scrum master, etc. 48 |
49 | - Relate three 50 | XP rules to your project. 51 | 52 |
54 | There is no need to bring any written answers; it is good enough if you can explain your answer verbally. 55 |
56 |57 | *“Relate” here means: Is it applicable in your project? 58 | If not, why not? Are you using something similar or an alternative in your project? etc. 59 | 60 |
61 |T11A3. Relate reuse mechanisms to your project 
65 |
67 | Find platforms, frameworks, and libraries you are using in the project.
68 | What are other alternative/additional platforms/frameworks/libraries you could have used in the project?
69 |
T11A4. Use Activity Diagrams and OO Domain Models 
74 |
76 | Use Activity Diagrams and/or Object Oriented Domain Models to explain the problem domain or the
77 | design of your project.
78 |
T11A5. Relate other UML models to the project 
83 |
85 | Relate other UML models (the non-examinable ones such as State Machine Diagrams) to the project.
86 | e.g. are they applicable to the project?
87 |
96 | Tutorial 11: V0.5rc, OODM, Activity Diagrams, Agile Processes 97 |
98 |Demo V0.5rc
101 |103 |
OODM, Activity Diagrams
107 |Agile processes
113 |Reuse mechanisms
119 |Lecture 12 129 | No webcast due to the sensitive nature of this lecture
130 |Exam preview [25 minutes]
133 |135 | [Slides][No handout] 136 |
137 |Resources
138 |-
139 |
- 140 | Past exam papers and examiner comments 141 | 142 |
Internships Tips Your Boss Wishes You Knew [80 minutes]
147 |149 | [Slides][No handout] 150 |
151 | 152 |Resources
153 |-
154 |
-
155 |
Interesting Readings:
156 |-
157 |
- [Web article] 158 | 159 | 6 Job Interview Questions and Answers to Avoid 160 | 161 | 162 |
- [Web article] 163 | 164 | 15 Words You Should Never Use In A Job Interview 165 | 166 | 167 |
- [Web article] 168 | 169 | How to be a good developer 170 | 171 | 172 |
- [Web article] 173 | 174 | No, you are not 'running late', you are rude and selfish 175 | 176 | 177 |
- [Web article] 178 | 179 | 3 Reasons Millennials Are Getting Fired 180 | 181 | 182 |
- [Blog post] 183 | 184 | Advice to software development interns 185 | 186 | 187 |
- [Web article] 188 | 189 | Why the founder of Rails automatically rejects 80% of Software Engineer applicants 190 | 191 | 192 |
- [Web article] 193 | 194 | Don't Call Yourself A Programmer, And Other Career Advice 195 | 196 | 197 |
- [Web article] 198 | 199 | Advice to a Past Intern: Top 10 Things I Wish I Knew Then 200 | 201 | 202 |
204 |
Week 13: Things to do
4 |Handbook sections to read:
7 |-
9 |
- 10 | Project: 11 | 12 | 14 | | 13 | 15 | 17 | 18 | 16 | 19 |
Deadlines
27 |Deadline [Mon () 23.59]: V0.5 submission
30 |Project presentations/evaluations [Wed () - Sat ()]
36 |Peer evaluation 3 [Wed()-Fri()]
42 |52 | Tutorial 13 : Product Demo 53 |
54 |Demo V0.5
57 |59 |
Deadlines
3 |[Mon () 23:59] Project retrospective
6 |[Wed () 23:59] Individual report
15 |6 | 7 | | 8 |9 | {{ text }} 10 | | 11 |
6 | 7 | | 8 |9 | {{ text }} 10 | | 11 |
6 | 7 | {{ label }} 8 |9 | |
10 |
11 | 12 | {{ text }} 13 |14 | |
15 |
30 | 31 | > To use a custom title (not **Extract from handbook**) for the embedded content, use `pullContent` 32 | (instead of `getContentUsingAjax`) that takes an additional `'param-title'` as its 2nd argument. 33 | 34 | 2. Mark a `div` element with the id for `param-2` where content is loaded into. 35 | In most cases, this can be right after the paragraph with the embedded link. 36 | e.g. `` 37 | 38 | > Embedded links are enabled by including this script tag in a HTML file: 39 | ```html 40 | 41 | ``` 42 | 43 | > **Limitation** 44 | \- HTML syntax for embedded links are overly verbose (PR #174). 45 | 46 | ### Component Panels 47 | Component panels are the lowest-level panels in the Schedule page. 48 | One way to populate panels, other than including content directly, 49 | is by specifying a file to load from when the panel first expands. 50 | The file can be reused with different titles to match the context. 51 | 52 | Inner panels should be `h3` elements nested in the `div`: 53 | ```html 54 |
Title
56 |bg-additional
100 |bg-important
101 |bg-quote
102 | 103 | 104 |bg-warning
105 | ``` 106 |  107 | > Classes may be used with `span`, but preferably blocks (e.g. `p` or `div`). 108 | > However, sidebar elements must be used with blocks and preceded by a block. 109 | 110 | ### Code Tags 111 | Use `` tags to represent fragments of computer code in monospace font.
112 | > font-family: courier
113 | > font-size: small
114 | > background-color: gray
115 |
116 | ### Syntax Highlighting
117 | Language-specific syntax highlighting is achieved by enclosing code samples in:
118 | ```html
119 |
120 | ```
121 | > Other valid code classes: `lang-html`, `shell`
122 |
123 | ### Difficulty Stars
124 | Each tutorial has a list of learning activities. Stars are used for categories.
125 |
126 | * Single star: Basic / Skills to pass the module
127 | `
`
128 |
129 | * 2 stars: Intermediate / Skills for a good grade
130 | `
`
131 |
132 | * 3 stars: Advanced / Beyond the module syllabus
133 | `
`
134 |
135 | ## Best Practices
136 |
137 | ### Coding Standards
138 | * [JavaScript](https://docs.google.com/document/d/1gZ6WG6HBTJYHAtVkz9kzi_SUuzfXqzO-SvFnLuag2xM/pub?embedded=true)
139 | * [CSS](../codingStandards/coding-standards-css.md)
140 | * [HTML](https://oss-generic.github.io/process/codingStandards/CodingStandard-Html.html)
141 |
142 | ### Committing Changes
143 | * Commit each distinct change as a separate commit.
144 | * Write short, descriptive commit messages.
145 | * Use the imperative mood when writing commit messages.
146 | e.g. `Add README.md` rather than `Added README.md` or `Adding README.md`
147 |
148 | ## How to Preview Changes
149 | Refer to: [DeveloperGuide.md#how-to-preview-changes](DeveloperGuide.md#how-to-preview-changes)
150 |
151 | ## Tool Stack
152 | Refer to: [DeveloperGuide.md#tool-stack](DeveloperGuide.md#tool-stack)
153 |
--------------------------------------------------------------------------------
/doc/DeveloperGuide.md:
--------------------------------------------------------------------------------
1 | # Developer Guide
2 | * [Guidelines for New Contributors](#guidelines-for-new-contributors)
3 | * [Contributing to this Repository](#contributing-to-this-repository)
4 | * [Coding Standards](#coding-standards)
5 | * [How to preview changes](#how-to-preview-changes)
6 | * [Preview a week in schedule](#preview-a-week-in-schedule)
7 | * [Preview a handbook section](#preview-a-handbook-section)
8 | * [Preview local files in Google Chrome](#preview-local-files-in-google-chrome)
9 | * [How to stage changes](#how-to-stage-changes)
10 | * [Creating a pull request](#creating-a-pull-request)
11 | * [Tool Stack](#tool-stack)
12 | * [Development environment](#development-environment)
13 | * [Tools used in implementation](#tools-used-in-implementation)
14 |
15 | ## Guidelines for New Contributors
16 | * Asking a Question
17 | * Posting an Issue
18 | * Submitting Your First PR
19 | * Naming Conventions (Branch name and PR title)
20 | * Git Usage Guidelines (Commit messages)
21 |
22 | Refer to: https://github.com/oss-generic/process/#guidelines-for-new-contributors
23 |
24 | ## Contributing to this Repository
25 | 1. Fork this repo.
26 | 2. Make sure what you want to contribute is already listed as an open issue in our issue tracker.
27 | If it is not, post it as an issue first and wait for it to get accepted (an issue is considered
28 | 'accepted' when it is assigned a `priority.*` label).
29 | 3. You may choose an issue labeled `forFirstTimers` as your first issue, if there are any.
30 | But do not do more than one `forFirstTimers` issues.
31 | 4. Clone your fork onto your Computer.
32 | 5. Create a branch. The branch name should be in the format `issue-number-some-key-words`,
33 | i.e. issue number followed by 2-4 key words related to the issue description,
34 | e.g. `112-fix-loading-overlay-handbook`.
35 | 6. Implement your fix in the new branch.
36 | See [coding standards](#coding-standards).
37 | 7. Test the code in your computer.
38 | See [preview local files in Google Chrome](#preview-local-files-in-google-chrome).
39 | 8. When the fix is ready,
40 | 1. Ensure that your fork has the latest code from this repo (the repo you forked from is called
41 | the `upstream` repo). The code in the upstream repo may have been updated while you were fixing the issue.
42 | If that is the case, [sync your fork with upstream repo](https://help.github.com/articles/syncing-a-fork/).
43 | 2. Stage your changes. Your reviewer might want to see how your changes look like to a viewer of the website.
44 | See [how to stage changes](#how-to-stage-changes).
45 | 3. Create a pull request (PR) against the `master` branch of this repo.
46 | See [creating a pull request](#creating-a-pull-request).
47 | 4. Check the diff view of the PR to ensure it contains the intended changes only.
48 | 9. Your code will be reviewed by someone from the dev team. If the reviewer requests changes,
49 | revise the code, push the new commits to your branch, and post a comment to say the pull request
50 | is ready for review again.
51 | 10. When your code is acceptable, it will be merged to this repo. Your fix will be included in the
52 | next release of the website.
53 | 11. After your fix is merged, you may wish to create another PR to add your name to the
54 | [`CONTRIBUTORS.md`](../CONTRIBUTORS.md) file.
55 | There is no need to create a corresponding issue for that PR.
56 |
57 | ## Coding Standards
58 | * [JavaScript](https://docs.google.com/document/d/1gZ6WG6HBTJYHAtVkz9kzi_SUuzfXqzO-SvFnLuag2xM/pub?embedded=true)
59 | * [CSS](../codingStandards/coding-standards-css.md)
60 | * [HTML](https://oss-generic.github.io/process/codingStandards/CodingStandard-Html.html)
61 |
62 | ## How to preview changes
63 |
64 | #### Preview a week in schedule
65 | [`.../contents/schedule/week.html?preview=1`](http://nus-cs2103.github.io/website/contents/schedule/week.html?preview=1)
66 | > `preview` can be any of weeks `0`-`14`.
67 |
68 | #### Preview a handbook section
69 | [`.../contents/handbook/index.html?preview=preliminaries`](http://nus-cs2103.github.io/website/contents/handbook/index.html?preview=preliminaries)
70 | > `preview` can be any section/subsection `id` in handbook/index.html
71 |
72 | #### Preview local files in Google Chrome
73 | You will need to start Chrome with the flag `--allow-file-access-from-files`:
74 | * The path for Chrome can be found at `chrome://version`.
75 | * All windows for Chrome **must** be closed before launching.
76 | * You may create a shortcut to launch Chrome with this flag.
77 |
78 | ## How to stage changes
79 | To create a [*staging site*](https://en.wikipedia.org/wiki/Staging_site) using
80 | [*RawGit*](https://rawgit.com/), commit your changes and push the branch to your fork.
81 | A running version of the website should now be available from the corresponding
82 | `rawgit.com` URL of the form `http://rawgit.com/user/repo/branch/`,
83 | e.g. http://rawgit.com/acjh/website/112-fix-loading-overlay-handbook/.
84 |
85 | ## Creating a pull request
86 | * When naming the PR, copy and paste the name of the issue you are fixing, including the original issue number,
87 | e.g. `Fix size and position of 'Page Loading...' overlay in handbook page #112`.
88 | * In the PR description, mention `Fixes #IssueNumber` (e.g. `Fixes #112`) so that
89 | the corresponding issue is closed automatically when the PR is merged.
90 | Remember to mention the URL of the staging site in your PR description.
91 | [Here](https://github.com/nus-cs2103/website/pull/202) is an example.
92 |
93 | ## Tool Stack
94 |
95 | #### Development environment
96 | * **GitHub**
97 | Used to host the repo and code reviewing.
98 | * **Google Chrome DevTools** (recommended)
99 | Used to iterate, debug and profile the site.
100 | * **Atom** (recommended)
101 | Used as a text editor, automatically removes trailing whitespaces and newlines.
102 | * **SourceTree** (recommended)
103 | Used as a GUI client for Git.
104 |
105 | #### Tools used in implementation
106 | * **HTML** [version 5], **JavaScript**, **CSS**
107 | * **jQuery** [version 1.11.3]
108 | jQuery is a JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
109 | * **jQuery UI** [version 1.11.3]
110 | jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.
111 |
--------------------------------------------------------------------------------
/doc/contextual-backgrounds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/doc/contextual-backgrounds.png
--------------------------------------------------------------------------------
/images/10 observations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/10 observations.png
--------------------------------------------------------------------------------
/images/2stars.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/2stars.png
--------------------------------------------------------------------------------
/images/3stars.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/3stars.png
--------------------------------------------------------------------------------
/images/BigBang.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/BigBang.png
--------------------------------------------------------------------------------
/images/BigPictureSmall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/BigPictureSmall.png
--------------------------------------------------------------------------------
/images/Deliverables.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Deliverables.png
--------------------------------------------------------------------------------
/images/DemoTips.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/DemoTips.png
--------------------------------------------------------------------------------
/images/FilesChangedTab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/FilesChangedTab.png
--------------------------------------------------------------------------------
/images/Forces me to visit a separate website.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Forces me to visit a separate website.png
--------------------------------------------------------------------------------
/images/Greenbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Greenbox.png
--------------------------------------------------------------------------------
/images/I'm not allowed to use my favorite tool.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/I'm not allowed to use my favorite tool.png
--------------------------------------------------------------------------------
/images/IntermediateOop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/IntermediateOop.png
--------------------------------------------------------------------------------
/images/JamesGosling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/JamesGosling.png
--------------------------------------------------------------------------------
/images/Jim at his computer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Jim at his computer.png
--------------------------------------------------------------------------------
/images/KeyboardNotFound.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/KeyboardNotFound.jpg
--------------------------------------------------------------------------------
/images/L10-pre-lecture-exercise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/L10-pre-lecture-exercise.png
--------------------------------------------------------------------------------
/images/Lecture photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Lecture photo.png
--------------------------------------------------------------------------------
/images/Polymorphism.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Polymorphism.png
--------------------------------------------------------------------------------
/images/PowerTips.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/PowerTips.png
--------------------------------------------------------------------------------
/images/PrDetails.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/PrDetails.png
--------------------------------------------------------------------------------
/images/Redbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Redbox.png
--------------------------------------------------------------------------------
/images/Rubber_duck_assisting_with_debugging.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Rubber_duck_assisting_with_debugging.jpg
--------------------------------------------------------------------------------
/images/Submission requirements differ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Submission requirements differ.png
--------------------------------------------------------------------------------
/images/Topics - big picture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Topics - big picture.png
--------------------------------------------------------------------------------
/images/UML reference sheet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/UML reference sheet.png
--------------------------------------------------------------------------------
/images/Violetbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Violetbox.png
--------------------------------------------------------------------------------
/images/Why workload heavy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Why workload heavy.png
--------------------------------------------------------------------------------
/images/Why you....png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/Why you....png
--------------------------------------------------------------------------------
/images/[Handouts] front cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/[Handouts] front cover.png
--------------------------------------------------------------------------------
/images/activitydiagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/activitydiagram.png
--------------------------------------------------------------------------------
/images/ada_lovelace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/ada_lovelace.png
--------------------------------------------------------------------------------
/images/ajax-preload.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/ajax-preload.gif
--------------------------------------------------------------------------------
/images/alternativeDesigns.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/alternativeDesigns.png
--------------------------------------------------------------------------------
/images/archi roadmap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/archi roadmap.png
--------------------------------------------------------------------------------
/images/bad code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/bad code.png
--------------------------------------------------------------------------------
/images/brooks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/brooks.png
--------------------------------------------------------------------------------
/images/chaos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/chaos.png
--------------------------------------------------------------------------------
/images/component designs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/component designs.png
--------------------------------------------------------------------------------
/images/coupling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/coupling.png
--------------------------------------------------------------------------------
/images/defensive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/defensive.png
--------------------------------------------------------------------------------
/images/dennis-ritchie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/dennis-ritchie.png
--------------------------------------------------------------------------------
/images/details.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/details.png
--------------------------------------------------------------------------------
/images/documentation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/documentation.png
--------------------------------------------------------------------------------
/images/eclipse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/eclipse.png
--------------------------------------------------------------------------------
/images/exam connected to project.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/exam connected to project.png
--------------------------------------------------------------------------------
/images/fire.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/fire.png
--------------------------------------------------------------------------------
/images/frameworks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/frameworks.png
--------------------------------------------------------------------------------
/images/frequent submissions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/frequent submissions.png
--------------------------------------------------------------------------------
/images/github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/github.png
--------------------------------------------------------------------------------
/images/good code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/good code.png
--------------------------------------------------------------------------------
/images/grade breakdown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/grade breakdown.png
--------------------------------------------------------------------------------
/images/growingPlant.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/growingPlant.png
--------------------------------------------------------------------------------
/images/how to get help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/how to get help.png
--------------------------------------------------------------------------------
/images/how to google it.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/how to google it.png
--------------------------------------------------------------------------------
/images/hubturboBoardsExample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/hubturboBoardsExample.png
--------------------------------------------------------------------------------
/images/l10-pre.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/l10-pre.png
--------------------------------------------------------------------------------
/images/limited project scope.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/limited project scope.png
--------------------------------------------------------------------------------
/images/moduleTimeline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/moduleTimeline.png
--------------------------------------------------------------------------------
/images/no marks for intermediate submissions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/no marks for intermediate submissions.png
--------------------------------------------------------------------------------
/images/objects.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/objects.png
--------------------------------------------------------------------------------
/images/patterns.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/patterns.png
--------------------------------------------------------------------------------
/images/peer evaluations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/peer evaluations.png
--------------------------------------------------------------------------------
/images/png_peer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/png_peer.png
--------------------------------------------------------------------------------
/images/principles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/principles.png
--------------------------------------------------------------------------------
/images/processes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/processes.png
--------------------------------------------------------------------------------
/images/profilephotos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/profilephotos.png
--------------------------------------------------------------------------------
/images/qa methods.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/qa methods.png
--------------------------------------------------------------------------------
/images/rcs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/rcs.png
--------------------------------------------------------------------------------
/images/roles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/roles.png
--------------------------------------------------------------------------------
/images/slides not detailed enough.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/slides not detailed enough.png
--------------------------------------------------------------------------------
/images/small things matter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/small things matter.png
--------------------------------------------------------------------------------
/images/so much self study.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/so much self study.png
--------------------------------------------------------------------------------
/images/specifying.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/specifying.png
--------------------------------------------------------------------------------
/images/star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/star.png
--------------------------------------------------------------------------------
/images/supplementary books.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/supplementary books.png
--------------------------------------------------------------------------------
/images/t5_architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/t5_architecture.png
--------------------------------------------------------------------------------
/images/t5_discussions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/t5_discussions.png
--------------------------------------------------------------------------------
/images/task listing UI comparison.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/task listing UI comparison.png
--------------------------------------------------------------------------------
/images/team.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/team.png
--------------------------------------------------------------------------------
/images/testcases.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/testcases.png
--------------------------------------------------------------------------------
/images/the good reasons to get home early.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/the good reasons to get home early.png
--------------------------------------------------------------------------------
/images/tools.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/tools.png
--------------------------------------------------------------------------------
/images/typical cs2103 week.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/typical cs2103 week.png
--------------------------------------------------------------------------------
/images/userstories.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/userstories.png
--------------------------------------------------------------------------------
/images/v00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/v00.png
--------------------------------------------------------------------------------
/images/v01demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/v01demo.png
--------------------------------------------------------------------------------
/images/v05demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/v05demo.png
--------------------------------------------------------------------------------
/images/vague requirement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/vague requirement.png
--------------------------------------------------------------------------------
/images/waling skeleton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/waling skeleton.png
--------------------------------------------------------------------------------
/images/week12-12thingsslides.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/week12-12thingsslides.png
--------------------------------------------------------------------------------
/images/weeklyWrapupQuestion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/weeklyWrapupQuestion.png
--------------------------------------------------------------------------------
/images/windowsErrorPrompt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/windowsErrorPrompt.png
--------------------------------------------------------------------------------
/images/yee ha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nus-cs2103/old-website/5fb796942839ce53740319a522abb9130c228d60/images/yee ha.png
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | CS2103/T (Module website)
8 |
9 |
13 |
--------------------------------------------------------------------------------
/publish.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | git pull
3 | git push origin master
4 | git checkout gh-pages
5 | git pull
6 | git merge master
7 | git push origin gh-pages
8 | git checkout master
9 |
--------------------------------------------------------------------------------
/scripts/embedded.js:
--------------------------------------------------------------------------------
1 | function getContentUsingAjax(fileName, elementSelector, sectionName) {
2 | pullContent(fileName, elementSelector, 'Extract from handbook', sectionName);
3 | }
4 |
5 | function pullContent(fileName, elementSelector, title, sectionName) {
6 | var toBeLoaded = fileName + '.html' + (sectionName == undefined ? '' : ' #' + sectionName);
7 | var section = fileName.substring(fileName.lastIndexOf('/') + 1);
8 | var directLink = '../handbook/index.html#' + section;
9 | var linkNotice = '{Some links in this embedded content box might not work. ' +
10 | 'If you need to follow the links, please go to the relevant section ' +
11 | 'of the handbook instead}';
12 | $(elementSelector).html('
');
13 | $(elementSelector).load(toBeLoaded, function(response, status, xhr) {
14 | if (status == 'success') {
15 | $(elementSelector).addClass('embedded');
16 | $(elementSelector).prepend('
'+linkNotice+' ');
19 | $(elementSelector + ' > div > .btn-dismiss').button();
20 |
21 | if ($('.prettyprint:not(.prettyprinted)').length > 0) {
22 | prettyPrintCodeSamples();
23 | }
24 | }
25 | });
26 | }
27 |
--------------------------------------------------------------------------------
/scripts/handbook.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Jumps to a section's heading.
3 | * The header is before the div.
4 | * Account for Safari scrolling.
5 | */
6 | function jumpToSectionHeading(section) {
7 | var isSafariBrowser = !navigator.userAgent.includes('Chrome') && navigator.userAgent.includes('Safari');
8 | var windowToScroll = window;
9 | var headingsFrameOffset = 0;
10 | if(isSafariBrowser && (windowToScroll != window.top)) {
11 | windowToScroll = window.top;
12 | headingsFrameOffset = 60; // From index.html
13 | }
14 | var headerPosition = $('#' + section).prev().offset().top;
15 | $(windowToScroll).scrollTop(headerPosition + headingsFrameOffset);
16 | }
17 |
18 | /**
19 | * Adds jumps-to-section-heading behaviour for anchors.
20 | * Previous behaviour is remove and default is blocked.
21 | */
22 | function addJumpToSectionHeadingBehavior(anchors) {
23 | anchors.off(); // Remove previous behaviour
24 | anchors.click(function(event) {
25 | event.preventDefault(); // Prevent default behaviour
26 | jumpToSectionHeading(this.hash.substring(1));
27 | });
28 | }
29 |
30 | /**
31 | * Adds load-on-demand capability for anchors in table-of-contents.
32 | * This capability is triggered when any of the anchors is clicked.
33 | */
34 | function addLoadOnDemandToAnchors() {
35 | var allAnchors = $('a');
36 | handleClickForAllAnchors(allAnchors);
37 |
38 | // Appendix B
39 | var policySection = 'appendixB-policies';
40 | var policyAnchors = $('a[href^="#policy-"]');
41 | handleClickForAppendixAnchors(policySection, policyAnchors);
42 |
43 | // Appendix C
44 | var faqSection = 'appendixC-faq';
45 | var faqAnchors = $('a[href="#' + faqSection + '"]').next().find('a');
46 | handleClickForAppendixAnchors(faqSection, faqAnchors);
47 | }
48 |
49 | /**
50 | * Handles onclick event for all anchors.
51 | * For first click, load 'section' using ajax then jump to 'section' heading.
52 | * For subsequent clicks, jump to 'section' heading only.
53 | */
54 | function handleClickForAllAnchors(allAnchors) {
55 | allAnchors.click(function() {
56 | var thisAnchor = $(this);
57 | var section = this.hash.substring(1);
58 | var callback = function() {
59 | jumpToSectionHeading(section);
60 | addJumpToSectionHeadingBehavior(thisAnchor);
61 | };
62 | loadSectionUsingAjax(section, callback);
63 | });
64 | }
65 |
66 | /**
67 | * Handles onclick event for Appendix B and C anchors (subsections in common HTML file).
68 | * For first click, load 'containerSection' using ajax then jump to 'subsection' heading.
69 | * For subsequent clicks, jump to 'subsection' heading only.
70 | */
71 | function handleClickForAppendixAnchors(containerSection, subsectionAnchors) {
72 | subsectionAnchors.off(); // Remove previous behaviour
73 | subsectionAnchors.click(function() {
74 | var subsection = this.hash.substring(1);
75 | var callback = function() {
76 | jumpToSectionHeading(subsection);
77 | addJumpToSectionHeadingBehavior(subsectionAnchors);
78 | };
79 | loadSectionUsingAjax(containerSection, callback);
80 | });
81 | }
82 |
83 | /**
84 | * Loads a single section on demand using ajax.
85 | * On success, execute the callback.
86 | */
87 | function loadSectionUsingAjax(section, callback) {
88 | $.ajax({
89 | type: 'GET',
90 | url: section + '.html',
91 | error: function() {
92 | },
93 | success: function(data) {
94 | $('#' + section).html(data);
95 | var images = $('#' + section + ' img');
96 | if (images.length == 0) {
97 | callback();
98 | } else {
99 | var imagesLoaded = 0;
100 | images.on('load', function() {
101 | imagesLoaded++;
102 | if (imagesLoaded == images.length) {
103 | callback();
104 | }
105 | });
106 | }
107 | if ($('.prettyprint:not(.prettyprinted)').length > 0) {
108 | PR.prettyPrint();
109 | }
110 | }
111 | });
112 | }
113 |
114 | /**
115 | * Load all sections asynchronously.
116 | * Increment number of sections loaded in callback.
117 | * If all sections loaded, remove the loading overlay.
118 | */
119 | function loadAllSectionsUsingAjax(callbackOnLoadAll) {
120 | var sectionsLoaded = 0;
121 | for (var i in sections) {
122 | var section = sections[i];
123 | var callback = function() {
124 | sectionsLoaded++;
125 | if (sectionsLoaded == sections.length) {
126 | callbackOnLoadAll();
127 | }
128 | };
129 | loadSectionUsingAjax(section, callback);
130 | }
131 | }
132 |
133 | function isTableOfContentVisible() {
134 | var windowTop = $(window).scrollTop();
135 | var tableTop = $('#table-of-contents').offset().top;
136 | var tableBottom = $('#table-of-contents').height() + tableTop;
137 | return windowTop < tableBottom;
138 | }
139 |
140 | /**
141 | * Loads sections, based on whether a preview was requested.
142 | * If preview, the remaining anchors trigger load-on-demand,
143 | * else, the remaining anchors jump to section heading only.
144 | */
145 | function loadSections() {
146 | var preview = window.location.href.match(/\?preview=([^]*)/);
147 |
148 | if (preview) {
149 | var section = preview[1];
150 | addLoadOnDemandToAnchors();
151 | $('a[href="#' + section + '"]').click();
152 | $('#overlay').remove();
153 | } else {
154 | var callback = function() {
155 | $('#overlay').remove();
156 | // If there is an anchor tag in url, make sure to jump to the specific section.
157 | if (location.hash) {
158 | location.href = location.hash;
159 | }
160 | }
161 | loadAllSectionsUsingAjax(callback);
162 | addJumpToSectionHeadingBehavior($('a'));
163 | }
164 | }
165 |
166 | $(document).ready(function() {
167 | loadSections();
168 |
169 | var buttonAnimationDuration = 200;
170 | var speed = 1;
171 |
172 | function scrollToPosition(scrollTopPosition) {
173 | $('html,body').animate({
174 | scrollTop: scrollTopPosition
175 | }, speed);
176 | }
177 |
178 | $('#back-to-top-button').button();
179 | $('#back-to-top-button').click(function(e) {
180 | scrollToPosition(0);
181 | });
182 |
183 | $(window).scroll(function() {
184 | if (!isTableOfContentVisible()) {
185 | $('#back-to-top-button').fadeIn(buttonAnimationDuration);
186 | } else {
187 | $('#back-to-top-button').fadeOut(buttonAnimationDuration);
188 | }
189 | });
190 | });
191 |
--------------------------------------------------------------------------------
/scripts/markdown.js:
--------------------------------------------------------------------------------
1 | var markdownUrl = $('.markdown-body').attr('data-url');
2 |
3 | $.ajax({
4 | type: 'GET',
5 | url: markdownUrl,
6 | error: function(jqXHR, textStatus, error) {
7 | redirectToGithub();
8 | },
9 | success: function(data) {
10 | $.ajax({
11 | type: "POST",
12 | url: "https://api.github.com/markdown",
13 | data: JSON.stringify({
14 | "text": data,
15 | "mode": "markdown"
16 | }),
17 | error: function(jqXHR, textStatus, error) {
18 | redirectToGithub();
19 | },
20 | success: function(data) {
21 | processAndDisplayResult(data);
22 | }
23 | });
24 | }
25 | });
26 |
27 | function redirectToGithub() {
28 | window.location.href = 'https://github.com/nus-cs2103/website/blob/master/contents/' + markdownUrl;
29 | }
30 |
31 | function displayResult(html) {
32 | $('.markdown-body').html(html);
33 | }
34 |
35 | function processAndDisplayResult(html) {
36 | // Pre-process the result as necessary
37 | html = html.replace(/user-content-/g, '');
38 | html = html.replace(/Good<\/th>/g, ' Good ');
39 | html = html.replace(/Bad<\/th>/g, ' Bad ');
40 | html = html.replace('id="borderless"', 'class="borderless"');
41 |
42 | // Display the result in the page; this is the minimum requirement of the function
43 | displayResult(html);
44 |
45 | // Post-process the result as necessary
46 | }
47 |
--------------------------------------------------------------------------------
/scripts/tooltip.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | // Maps a string to a tooltip (in the form of a HTML string)
3 | var tooltips = {
4 | 'GTD' : 'Getting Things Done',
5 | 'IDE' : 'Integrated Development Environment',
6 | 'Regression' : 'A regression is an unintended side effect of a modification to the code.
'
7 | + 'e.g. when fixing one bug causes another bug'
8 | };
9 |
10 | // Maps a string to a list of aliases
11 | var aliases = {
12 | 'Regression' : ['regression', 'regressions']
13 | }
14 |
15 | for (let term in aliases) {
16 | let tooltip = tooltips[term];
17 | let values = aliases[term];
18 | for (let i in values) {
19 | let alias = values[i];
20 | tooltips[alias] = tooltip;
21 | }
22 | }
23 |
24 | var count = 0;
25 | $('tooltip').each(function() {
26 | var term = $(this).text();
27 | var title = tooltips[term];
28 | var id = String(count++);
29 | $(this).attr('id', id);
30 | $(this).tooltip({
31 | items: '#' + id,
32 | content: title
33 | });
34 | });
35 | })();
36 |
--------------------------------------------------------------------------------
/styles/handbook.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding: 0px 10px;
3 | max-width: 740px;
4 | }
5 |
6 | h1{
7 | color:purple;
8 | }
9 |
10 | h2{
11 | color:purple;
12 | }
13 |
14 | h3{
15 | color:purple;
16 | }
17 |
18 | pre.cliprint{
19 | background-color: #000; /*black*/
20 | -moz-border-radius: 8px;
21 | -webkit-border-radius: 8px;
22 | -o-border-radius: 8px;
23 | -ms-border-radius: 8px;
24 | -khtml-border-radius: 8px;
25 | border-radius: 8px;
26 | padding: 1em;
27 | color:#ffec00;
28 | }
29 |
30 | code.clisystem{
31 | color:#fff; /*white*/
32 | }
33 |
34 | code.cliuser{
35 | color:#b000ff; /*purple*/
36 | }
37 |
38 | img {
39 | max-width: 100%;
40 | height: auto;
41 | }
42 |
43 | #back-to-top-button{
44 | display: none;
45 | position: fixed;
46 | bottom: 0;
47 | right: 0;
48 | padding: 10px;
49 | border: #dff0d8;
50 | color: #fff;
51 | background: #5cb85c;
52 | transition: background 0.2s ease;
53 | }
54 |
55 | #back-to-top-button:hover{
56 | color: #3c763d;
57 | background: #dff0d8;
58 | }
59 |
60 | #overlay {
61 | width: 20%;
62 | background-color: rgba(0,0,0,0.5);
63 | border-radius: 5px;
64 | line-height: 50px;
65 | position: fixed;
66 | top: 50%;
67 | left: 50%;
68 | text-align: center;
69 | font-size: large;
70 | font-family: sans-serif;
71 | color: #ffffff;
72 | transform: translate(-50%, -50%);
73 | }
74 |
75 | /* 740px since max-width of body is set to 740px
76 | Any device whose view is below 740px will use this*/
77 | @media screen and (max-device-width: 740px) {
78 | body{
79 | max-width: 100%;
80 | }
81 |
82 | #overlay {
83 | width: 50%;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/styles/markdown.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding: 30px 50px;
3 | }
4 |
5 | .example-good {
6 | color: green;
7 | }
8 |
9 | .example-bad {
10 | color: red;
11 | }
12 |
13 | .borderless tbody td,
14 | .borderless tbody tr {
15 | border: 0px solid black;
16 | }
17 |
18 | .markdown-body .highlight pre,
19 | .markdown-body pre,
20 | .markdown-body code,
21 | .markdown-body tt {
22 | background-color: inherit;
23 | }
--------------------------------------------------------------------------------