chore(learn): Applied MDX format to Chinese curriculum files (#40462)

This commit is contained in:
Randell Dawson
2020-12-16 00:37:30 -07:00
committed by GitHub
parent 873fce02a2
commit 9ce4a02a41
1665 changed files with 58741 additions and 88042 deletions

View File

@@ -3,65 +3,75 @@ id: 5e601c0d5ac9d0ecd8b94afe
challengeType: 4
---
## Description
<section id='description'>
Build a full stack JavaScript app that is functionally similar to this: <a href='https://youthful-grave-scabiosa.glitch.me/' target='_blank'>https://youthful-grave-scabiosa.glitch.me/</a>.
# --description--
Build a full stack JavaScript app that is functionally similar to this: <https://youthful-grave-scabiosa.glitch.me/>.
Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.
Start this project on Glitch using <a href='https://glitch.com/edit/#!/remix/clone-from-repo?REPO_URL=https://github.com/freeCodeCamp/boilerplate-project-american-british-english-translator/'>this link</a> or clone <a href='https://github.com/freeCodeCamp/boilerplate-project-american-british-english-translator/'>this repository</a> on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!
</section>
Start this project on Glitch using [this link](https://glitch.com/edit/#!/remix/clone-from-repo?REPO_URL=https://github.com/freeCodeCamp/boilerplate-project-american-british-english-translator/) or clone [this repository](https://github.com/freeCodeCamp/boilerplate-project-american-british-english-translator/) on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!
## Instructions
<section id='instructions'>
# --hints--
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: I can enter a simple sentence into the text area and select whether to translate to British or American English from the dropdown menu.
testString: ''
- text: When the "Translate" button is pressed, append the translated sentence to the <code>translated-sentence</code> <code>div</code>. See the JavaScript files in <code>/public</code> for the different spelling and terms your application should translate.
testString: ''
- text: |
Your application should handle the way time is written in American and British English. For example, ten thirty is written as "10.30" in British English and "10:30" in American English.
testString: ''
- text: Your application should also handle the way titles/honorifics are abbreviated in American and British English. For example, Doctor Wright is abbreviated as "Dr Wright" in British English and "Dr. Wright" in American English. See <code>/public/american-to-british-titles.js</code> for the different titles your application should handle.
testString: ''
- text: Wrap any translated spelling or terms with <code>&lt;span class=&quot;highlight&quot;&gt;...&lt;/span&gt;</code> tags so they appear in green.
testString: ''
- text: If the sentence in the text area has no spelling or terms that should be translated, append the message "Everything looks good to me!" to the <code>translated-sentence</code> <code>div</code>.
testString: ''
- text: |
If there is no text in the text area, append the message "Error: No text to translate." to the <code>error-msg</code> <code>div</code> so the text appears in red.
testString: ''
- text: I can press the "Clear Input" button to remove all text from the text area and the <code>translated-sentence</code> <code>div</code>.
testString: ''
- text: All 20 unit tests are complete and passing. See <code>/tests/1_unit-tests.js</code> for the sentences you should write tests for.
testString: ''
- text: All 4 functional tests are complete and passing. See <code>/tests/2_functional-tests.js</code> for the functionality you should write tests for.
testString: ''
```
</section>
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
I can enter a simple sentence into the text area and select whether to translate to British or American English from the dropdown menu.
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```
</section>
When the "Translate" button is pressed, append the translated sentence to the `translated-sentence` `div`. See the JavaScript files in `/public` for the different spelling and terms your application should translate.
```js
```
Your application should handle the way time is written in American and British English. For example, ten thirty is written as "10.30" in British English and "10:30" in American English.
```js
```
Your application should also handle the way titles/honorifics are abbreviated in American and British English. For example, Doctor Wright is abbreviated as "Dr Wright" in British English and "Dr. Wright" in American English. See `/public/american-to-british-titles.js` for the different titles your application should handle.
```js
```
Wrap any translated spelling or terms with `<span class="highlight">...</span>` tags so they appear in green.
```js
```
If the sentence in the text area has no spelling or terms that should be translated, append the message "Everything looks good to me!" to the `translated-sentence` `div`.
```js
```
If there is no text in the text area, append the message "Error: No text to translate." to the `error-msg` `div` so the text appears in red.
```js
```
I can press the "Clear Input" button to remove all text from the text area and the `translated-sentence` `div`.
```js
```
All 20 unit tests are complete and passing. See `/tests/1_unit-tests.js` for the sentences you should write tests for.
```js
```
All 4 functional tests are complete and passing. See `/tests/2_functional-tests.js` for the functionality you should write tests for.
```js
```
# --solutions--

View File

@@ -1,53 +1,63 @@
---
id: 587d8249367417b2b2512c42
title: 问题跟踪器
challengeType: 4
videoUrl: ''
title: 问题跟踪器
---
## Description
<section id="description">构建一个功能类似于此的完整堆栈JavaScript应用程序 <a href="https://protective-garage.glitch.me/" target="_blank">https</a> <a href="https://protective-garage.glitch.me/" target="_blank">//protective-garage.glitch.me/</a> 。在这个项目上工作将涉及您在我们的入门项目上在Glitch上编写代码。完成此项目后您可以将公共故障网址到应用程序的主页复制到此屏幕进行测试您可以选择在另一个平台上编写项目但必须公开显示我们的测试。使用<a href="https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-issuetracker/">此链接</a>在Glitch上启动此项目或在GitHub上克隆<a href="https://github.com/freeCodeCamp/boilerplate-project-issuetracker/">此存储库</a> 如果您使用Glitch请记住将项目链接保存到安全的地方 </section>
# --description--
## Instructions
<section id="instructions">
</section>
构建一个功能类似于此的完整堆栈JavaScript应用程序 [https](https://protective-garage.glitch.me/) [//protective-garage.glitch.me/](https://protective-garage.glitch.me/) 。在这个项目上工作将涉及您在我们的入门项目上在Glitch上编写代码。完成此项目后您可以将公共故障网址到应用程序的主页复制到此屏幕进行测试您可以选择在另一个平台上编写项目但必须公开显示我们的测试。使用[此链接](https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-issuetracker/)在Glitch上启动此项目或在GitHub上克隆[此存储库](https://github.com/freeCodeCamp/boilerplate-project-issuetracker/) 如果您使用Glitch请记住将项目链接保存到安全的地方
## Tests
<section id='tests'>
# --hints--
```yml
tests:
- text: 防止跨站点脚本XSS攻击。
testString: ''
- text: '我可以使用包含所需issue_titleissue_textcreated_by和可选的assigned_to和status_text的表单数据POST / api / issues / {projectname}。'
testString: ''
- text: 保存和返回的对象将包括所有这些字段空白表示可选无输入还包括created_on日期/时间updated_on日期/时间打开布尔值true表示打开false表示关闭和_id。
testString: ''
- text: '我可以使用id和对象中的任何字段PUT / api / issues / {projectname},并使用值来对象表示对象。返回将“成功更新”或“无法更新”+ id。这应该始终更新updated_on。如果没有发送字段则返回“未发送更新字段”。'
testString: ''
- text: '我可以使用id DELETE / api / issues / {projectname}来完全删除问题。如果没有发送_id则返回“id error”成功“删除”+ id失败“无法删除”+ id。'
testString: ''
- text: '我可以GET / api / issues / {projectname}获取该特定项目中所有问题的数组,其中包含发布时返回的每个问题的所有信息。'
testString: ''
- text: '我可以通过传递查询中的任何字段和值来过滤我的获取请求(即。/ api / issues / {project}open = false。我可以传递尽可能多的字段/值。'
testString: ''
- text: 所有11项功能测试都已完成并通过。
testString: ''
```
</section>
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
防止跨站点脚本XSS攻击。
```js
// solution required
```
/section>
我可以使用包含所需issue_titleissue_textcreated_by和可选的assigned_to和status_text的表单数据POST / api / issues / {projectname}。
```js
```
保存和返回的对象将包括所有这些字段空白表示可选无输入还包括created_on日期/时间updated_on日期/时间打开布尔值true表示打开false表示关闭和\_id。
```js
```
我可以使用id和对象中的任何字段PUT / api / issues / {projectname},并使用值来对象表示对象。返回将“成功更新”或“无法更新”+ id。这应该始终更新updated_on。如果没有发送字段则返回“未发送更新字段”。
```js
```
我可以使用id DELETE / api / issues / {projectname}来完全删除问题。如果没有发送\_id则返回“id error”成功“删除”+ id失败“无法删除”+ id。
```js
```
我可以GET / api / issues / {projectname}获取该特定项目中所有问题的数组,其中包含发布时返回的每个问题的所有信息。
```js
```
我可以通过传递查询中的任何字段和值来过滤我的获取请求(即。/ api / issues / {project}open = false。我可以传递尽可能多的字段/值。
```js
```
所有11项功能测试都已完成并通过。
```js
```
# --solutions--

View File

@@ -1,63 +1,93 @@
---
id: 587d8249367417b2b2512c41
title: 公制 - 英制转换器
challengeType: 4
videoUrl: ''
title: 公制 - 英制转换器
---
## Description
<section id="description">构建一个功能类似于此的完整堆栈JavaScript应用程序 <a href="https://incongruous-beard.glitch.me/" target="_blank">https://incongruous-beard.glitch.me/</a>。在这个项目上工作将涉及您在我们的入门项目上在Glitch上编写代码。完成此项目后您可以将公共故障网址到应用程序的主页复制到此屏幕进行测试您可以选择在另一个平台上编写项目但必须公开显示我们的测试。使用<a href="https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-metricimpconverter/">此链接</a>在Glitch上启动此项目或在GitHub上克隆<a href="https://github.com/freeCodeCamp/boilerplate-project-metricimpconverter/">此存储库</a> 如果您使用Glitch请记住将项目链接保存到安全的地方 </section>
# --description--
## Instructions
<section id="instructions">
</section>
构建一个功能类似于此的完整堆栈JavaScript应用程序 <https://incongruous-beard.glitch.me/>。在这个项目上工作将涉及您在我们的入门项目上在Glitch上编写代码。完成此项目后您可以将公共故障网址到应用程序的主页复制到此屏幕进行测试您可以选择在另一个平台上编写项目但必须公开显示我们的测试。使用[此链接](https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-metricimpconverter/)在Glitch上启动此项目或在GitHub上克隆[此存储库](https://github.com/freeCodeCamp/boilerplate-project-metricimpconverter/) 如果您使用Glitch请记住将项目链接保存到安全的地方
## Tests
<section id='tests'>
# --hints--
```yml
tests:
- text: 我将阻止客户端尝试猜测嗅探MIME类型。
testString: ''
- text: 我会阻止跨站点脚本XSS攻击。
testString: ''
- text: 我可以使用包含可接受的数字和单位的单个参数进行GET / api / convert并将其转换。 (提示:通过查找将标记单元开头的第一个字符的索引来拆分输入)
testString: ''
- text: 我可以将'gal'转换为'L',反之亦然。 1加仑到3.78541升)
testString: ''
- text: 我可以将'lbs'转换为'kg',反之亦然。 1磅至0.453592千克)
testString: ''
- text: 我可以将'mi'转换为'km',反之亦然。 1英里到1.60934公里)
testString: ''
- text: 如果我的计量单位无效,则返回“无效单位”。
testString: ''
- text: 如果我的号码无效,则返回“无效号码”。
testString: ''
- text: 如果两者都无效,则返回“无效数字和单位”。
testString: ''
- text: '我可以在我的参数中使用分数小数或两者即5,1 / 2,2.5 / 6但如果没有提供则默认为1。'
testString: ''
- text: '我的返回将包含initNuminitUnitreturnNumreturnUnit和字符串拼写单元格式为“{initNum} {initial_Units}转换为{returnNum} {return_Units}”结果舍入为字符串中的5位小数。'
testString: ''
- text: 所有16个单元测试都已完成并通过。
testString: ''
- text: 所有5个功能测试都已完成并通过。
testString: ''
```
</section>
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
我将阻止客户端尝试猜测嗅探MIME类型。
```js
// solution required
```
</section>
我会阻止跨站点脚本XSS攻击。
```js
```
我可以使用包含可接受的数字和单位的单个参数进行GET / api / convert并将其转换。 (提示:通过查找将标记单元开头的第一个字符的索引来拆分输入)
```js
```
我可以将'gal'转换为'L',反之亦然。 1加仑到3.78541升)
```js
```
我可以将'lbs'转换为'kg',反之亦然。 1磅至0.453592千克)
```js
```
我可以将'mi'转换为'km',反之亦然。 1英里到1.60934公里)
```js
```
如果我的计量单位无效,则返回“无效单位”。
```js
```
如果我的号码无效,则返回“无效号码”。
```js
```
如果两者都无效,则返回“无效数字和单位”。
```js
```
我可以在我的参数中使用分数小数或两者即5,1 / 2,2.5 / 6但如果没有提供则默认为1。
```js
```
我的返回将包含initNuminitUnitreturnNumreturnUnit和字符串拼写单元格式为“{initNum} {initial_Units}转换为{returnNum} {return_Units}”结果舍入为字符串中的5位小数。
```js
```
所有16个单元测试都已完成并通过。
```js
```
所有5个功能测试都已完成并通过。
```js
```
# --solutions--

View File

@@ -1,57 +1,75 @@
---
id: 587d824a367417b2b2512c43
title: 个人图书馆
challengeType: 4
videoUrl: ''
title: 个人图书馆
---
## Description
<section id="description">构建一个功能类似于此的完整堆栈JavaScript应用程序 <a href="https://fuzzy-mink.glitch.me/" target="_blank">https</a> <a href="https://fuzzy-mink.glitch.me/" target="_blank">//spark-cathedral.glitch.me/</a> 。在这个项目上工作将涉及您在我们的入门项目上在Glitch上编写代码。完成此项目后您可以将公共故障网址到应用程序的主页复制到此屏幕进行测试您可以选择在另一个平台上编写项目但必须公开显示我们的测试。使用<a href="https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-library/">此链接</a>在Glitch上启动此项目或在GitHub上克隆<a href="https://github.com/freeCodeCamp/boilerplate-project-library/">此存储库</a> 如果您使用Glitch请记住将项目链接保存到安全的地方 </section>
# --description--
## Instructions
<section id="instructions">
</section>
构建一个功能类似于此的完整堆栈JavaScript应用程序 [https](https://fuzzy-mink.glitch.me/) [//spark-cathedral.glitch.me/](https://fuzzy-mink.glitch.me/) 。在这个项目上工作将涉及您在我们的入门项目上在Glitch上编写代码。完成此项目后您可以将公共故障网址到应用程序的主页复制到此屏幕进行测试您可以选择在另一个平台上编写项目但必须公开显示我们的测试。使用[此链接](https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-library/)在Glitch上启动此项目或在GitHub上克隆[此存储库](https://github.com/freeCodeCamp/boilerplate-project-library/) 如果您使用Glitch请记住将项目链接保存到安全的地方
## Tests
<section id='tests'>
# --hints--
```yml
tests:
- text: 我的网站上的任何内容都不会缓存在我的客户端中。
testString: ''
- text: 标题会说该网站由'PHP 4.2.0'提供支持,即使它不是(作为安全措施)。
testString: ''
- text: 我可以将标题发布到/ api / books以添加书籍并返回将是具有标题和唯一_id的对象。
testString: ''
- text: 我可以获取/ api / books来检索包含title_id和commentcount的所有书籍的数组。
testString: ''
- text: '我可以使用/ api / books / {id}来检索包含_title_id和注释数组的书的单个对象如果没有注释则为空数组。'
testString: ''
- text: '我可以在/ api / books / {id}上发表评论为书籍添加评论并返回类似于get / api / books / {id}的书籍对象,包括新评论。'
testString: ''
- text: '我可以删除/ api / books / {_ id}从集合中删除一本书。如果成功,返回将“删除成功”。'
testString: ''
- text: 如果我试图要求一本不存在的书,我将被退回'没有书存在'。
testString: ''
- text: 我可以向/ api / books发送删除请求以删除数据库中的所有书籍。如果成功返回将是“完全删除成功”。
testString: ''
- text: 所有6项功能测试都是完整的并且通过。
testString: ''
```
</section>
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
我的网站上的任何内容都不会缓存在我的客户端中。
```js
// solution required
```
/section>
标题会说该网站由'PHP 4.2.0'提供支持,即使它不是(作为安全措施)。
```js
```
我可以将标题发布到/ api / books以添加书籍并返回将是具有标题和唯一\_id的对象。
```js
```
我可以获取/ api / books来检索包含title\_id和commentcount的所有书籍的数组。
```js
```
我可以使用/ api / books / {id}来检索包含\_title\_id和注释数组的书的单个对象如果没有注释则为空数组
```js
```
我可以在/ api / books / {id}上发表评论为书籍添加评论并返回类似于get / api / books / {id}的书籍对象,包括新评论。
```js
```
我可以删除/ api / books / {\_ id}从集合中删除一本书。如果成功,返回将“删除成功”。
```js
```
如果我试图要求一本不存在的书,我将被退回'没有书存在'。
```js
```
我可以向/ api / books发送删除请求以删除数据库中的所有书籍。如果成功返回将是“完全删除成功”。
```js
```
所有6项功能测试都是完整的并且通过。
```js
```
# --solutions--

View File

@@ -3,69 +3,87 @@ id: 5e601bf95ac9d0ecd8b94afd
challengeType: 4
---
## Description
<section id='description'>
Build a full stack JavaScript app that is functionally similar to this: <a href='https://bottlenose-eucalyptus.glitch.me/' target='_blank'>https://bottlenose-eucalyptus.glitch.me/</a>.
# --description--
Build a full stack JavaScript app that is functionally similar to this: <https://bottlenose-eucalyptus.glitch.me/>.
Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.
Start this project on Glitch using <a href='https://glitch.com/edit/#!/remix/clone-from-repo?REPO_URL=https://github.com/freeCodeCamp/boilerplate-project-sudoku-solver/'>this link</a> or clone <a href='https://github.com/freeCodeCamp/boilerplate-project-sudoku-solver/'>this repository</a> on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!
</section>
Start this project on Glitch using [this link](https://glitch.com/edit/#!/remix/clone-from-repo?REPO_URL=https://github.com/freeCodeCamp/boilerplate-project-sudoku-solver/) or clone [this repository](https://github.com/freeCodeCamp/boilerplate-project-sudoku-solver/) on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!
## Instructions
<section id='instructions'>
# --hints--
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: I can enter a sudoku puzzle by filling in the text area with either a number or period (.) to represent an empty cell.
testString: ''
- text: When a valid number is entered in the text area, the same number is applied to the correct cell of the sudoku grid.
testString: ''
- text: I can enter a sudoku puzzle by adding numbers directly to the sudoku grid.
testString: ''
- text: When a valid number is entered in the sudoku grid, the same number appears in the correct position in the text area.
testString: ''
- text: The text area should only update the corresponding sudoku grid cell when a whole number between 1 and 9 is entered.
testString: ''
- text: The sudoku grid should only update the puzzle string in the text area when a whole number between 1 and 9 is entered into a cell.
testString: ''
- text: I can solve an incomplete puzzle by clicking the "Solve" button. When a solution is found, the sudoku grid and text area are automatically populated with the correct numbers for each cell in the grid or position in the text area.
testString: ''
- text: This sudoku solver is not expected to be able to solve every incomplete puzzle. See <code>/public/puzzle-strings.js</code> for a list of puzzle strings it should be able to solve along with their solutions.
testString: ''
- text: |
If the puzzle is not 81 numbers or periods long, append the message "Error: Expected puzzle to be 81 characters long." to the <code>error-msg</code> <code>div</code> so the text appears in red.
testString: ''
- text: I can clear the text area and sudoku grid by clicking the "Clear" button.
testString: ''
- text: All 6 unit tests are complete and passing. See <code>/tests/1_unit-tests.js</code> for the expected behavior you should write tests for.
testString: ''
- text: All 4 functional tests are complete and passing. See <code>/tests/2_functional-tests.js</code> for the functionality you should write tests for.
testString: ''
```
</section>
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
I can enter a sudoku puzzle by filling in the text area with either a number or period (.) to represent an empty cell.
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```
</section>
When a valid number is entered in the text area, the same number is applied to the correct cell of the sudoku grid.
```js
```
I can enter a sudoku puzzle by adding numbers directly to the sudoku grid.
```js
```
When a valid number is entered in the sudoku grid, the same number appears in the correct position in the text area.
```js
```
The text area should only update the corresponding sudoku grid cell when a whole number between 1 and 9 is entered.
```js
```
The sudoku grid should only update the puzzle string in the text area when a whole number between 1 and 9 is entered into a cell.
```js
```
I can solve an incomplete puzzle by clicking the "Solve" button. When a solution is found, the sudoku grid and text area are automatically populated with the correct numbers for each cell in the grid or position in the text area.
```js
```
This sudoku solver is not expected to be able to solve every incomplete puzzle. See `/public/puzzle-strings.js` for a list of puzzle strings it should be able to solve along with their solutions.
```js
```
If the puzzle is not 81 numbers or periods long, append the message "Error: Expected puzzle to be 81 characters long." to the `error-msg` `div` so the text appears in red.
```js
```
I can clear the text area and sudoku grid by clicking the "Clear" button.
```js
```
All 6 unit tests are complete and passing. See `/tests/1_unit-tests.js` for the expected behavior you should write tests for.
```js
```
All 4 functional tests are complete and passing. See `/tests/2_functional-tests.js` for the functionality you should write tests for.
```js
```
# --solutions--