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

@@ -1,61 +1,87 @@
---
id: 587d824a367417b2b2512c45
title: 匿名留言板
challengeType: 4
videoUrl: ''
title: 匿名留言板
---
## Description
<section id="description">构建一个功能类似于此的完整堆栈JavaScript应用程序 <a href='https://spiky-well-vein.glitch.me/' target='_blank'>https://spiky-well-vein.glitch.me/</a> 。在这个项目上工作将涉及您在我们的入门项目上在Glitch上编写代码。完成此项目后您可以将公共故障网址到应用程序的主页复制到此屏幕进行测试您可以选择在另一个平台上编写项目但必须公开显示我们的测试。使用<a href="https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-messageboard/">此链接</a>在Glitch上启动此项目或在GitHub上克隆<a href="https://github.com/freeCodeCamp/boilerplate-project-messageboard/">此存储库</a> 如果您使用Glitch请记住将项目链接保存到安全的地方 </section>
# --description--
## Instructions
<section id="instructions">
</section>
构建一个功能类似于此的完整堆栈JavaScript应用程序 <https://spiky-well-vein.glitch.me/> 。在这个项目上工作将涉及您在我们的入门项目上在Glitch上编写代码。完成此项目后您可以将公共故障网址到应用程序的主页复制到此屏幕进行测试您可以选择在另一个平台上编写项目但必须公开显示我们的测试。使用[此链接](https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-messageboard/)在Glitch上启动此项目或在GitHub上克隆[此存储库](https://github.com/freeCodeCamp/boilerplate-project-messageboard/) 如果您使用Glitch请记住将项目链接保存到安全的地方
## Tests
<section id='tests'>
# --hints--
```yml
tests:
- text: 只允许您的网站加载到您自己网页上的iFrame中。
testString: ''
- text: 不允许DNS预取。
testString: ''
- text: 只允许您的网站为您自己的网页发送引荐来源。
testString: ''
- text: '我可以通过将表单数据文本和deletepassword_传递给/api/threads/ {board}将一个帖子发布到一个特定的留言板。推荐res.redirect到电路板页面/ b / {board}保存的至少是_idtext createdon_日期和时间bumpedon_日期和时间与created_on相同报告布尔值deletepassword_和回复数组。'
testString: ''
- text: '我可以通过将表单数据文本deletepassword_和threadid_传递给/ api / replies / {board}来对特定板上的线程发送回复并且还会将bumped_on日期更新到注释日期。推荐res.redirect到thread page / b / {board} / {thread_id}在线程的回复数组中将保存_idtextcreatedon_deletepassword_并报告。'
testString: ''
- text: '我可以在电路板上获取最近10个凸起线程的数组其中最近只有来自/ api / threads / {board}的3个回复。 report和deletepasswords_字段不会发送到客户端。'
testString: ''
- text: '我可以使用/ api / replies / {board}的所有回复获取整个帖子吗thread_id = {thread_id}。同样隐藏客户端应该看到的相同字段。'
testString: ''
- text: '如果我向/ api / threads / {board}发送DELETE请求并传递threadid_deletepassword_我可以完全删除一个线程。 (文字回复将是“密码不正确”或“成功”)'
testString: ''
- text: '如果我向/ api / replies / {board}发送DELETE请求并传递threadid_replyid_和deletepassword_我可以删除帖子只是将文本更改为“[已删除]”而不是像线程一样完全删除)。 (文字回复将是“密码不正确”或“成功”)'
testString: ''
- text: '我可以通过向/ api / threads / {board}发送PUT请求并传递threadid_来报告一个线程并将其报告值更改为true。 (文字回复将是“成功”)'
testString: ''
- text: '我可以通过向/ api / replies / {board}发送PUT请求并传递threadid_replyid_来报告回复并将其报告值更改为true。 (文字回复将是“成功”)'
testString: ''
- text: 完整的功能测试,完全测试路线和通过。
testString: ''
```
</section>
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
只允许您的网站加载到您自己网页上的iFrame中。
```js
// solution required
```
/section>
不允许DNS预取。
```js
```
只允许您的网站为您自己的网页发送引荐来源。
```js
```
我可以通过将表单数据文本和deletepassword*传递给/api/threads/ {board}将一个帖子发布到一个特定的留言板。推荐res.redirect到电路板页面/ b / {board})保存的至少是\_idtext createdon*日期和时间bumpedon*日期和时间与created_on相同报告布尔值deletepassword*和回复(数组)。
```js
```
我可以通过将表单数据文本deletepassword*和threadid*传递给/ api / replies / {board}来对特定板上的线程发送回复并且还会将bumped*on日期更新到注释日期。推荐res.redirect到thread page / b / {board} / {thread_id})在线程的回复数组中将保存\_idtextcreatedon*deletepassword\_并报告。
```js
```
我可以在电路板上获取最近10个凸起线程的数组其中最近只有来自/ api / threads / {board}的3个回复。 report和deletepasswords\_字段不会发送到客户端。
```js
```
我可以使用/ api / replies / {board}的所有回复获取整个帖子吗thread_id = {thread_id}。同样隐藏客户端应该看到的相同字段。
```js
```
如果我向/ api / threads / {board}发送DELETE请求并传递threadid*deletepassword*,我可以完全删除一个线程。 (文字回复将是“密码不正确”或“成功”)
```js
```
如果我向/ api / replies / {board}发送DELETE请求并传递threadid*replyid*和deletepassword\_我可以删除帖子只是将文本更改为“[已删除]”而不是像线程一样完全删除)。 (文字回复将是“密码不正确”或“成功”)
```js
```
我可以通过向/ api / threads / {board}发送PUT请求并传递threadid\_来报告一个线程并将其报告值更改为true。 (文字回复将是“成功”)
```js
```
我可以通过向/ api / replies / {board}发送PUT请求并传递threadid*replyid*来报告回复并将其报告值更改为true。 (文字回复将是“成功”)
```js
```
完整的功能测试,完全测试路线和通过。
```js
```
# --solutions--

View File

@@ -3,15 +3,16 @@ id: 5e46f979ac417301a38fb932
challengeType: 10
---
## Description
<section id='description'>
# --description--
Create a port scanner using Python.
You can access <a href='https://repl.it/@freeCodeCamp/fcc-port-scanner' target='_blank'>the full project description and starter code on repl.it</a>.
You can access [the full project description and starter code on repl.it](https://repl.it/@freeCodeCamp/fcc-port-scanner).
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
We are still developing the interactive instructional part of the Python curriculum. For now, here are some videos on the freeCodeCamp.org YouTube channel that will teach you some of the Python skills required for this project:
<ul>
<li>
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody Video Course</a> (14 hours)
@@ -21,37 +22,13 @@ We are still developing the interactive instructional part of the Python curricu
</li>
<ul>
</section>
# --hints--
## Instructions
<section id='instructions'>
It should pass all Python tests.
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: 'It should pass all Python tests.'
testString: ''
```js
```
</section>
# --solutions--
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
```py
# Python 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>

View File

@@ -3,82 +3,123 @@ id: 5e601c775ac9d0ecd8b94aff
challengeType: 4
---
## Description
<section id='description'>
Develop a 2D real time multiplayer game using the HTML Canvas API and <a href='https://socket.io/' target='_blank'>Socket.io</a> that is functionally similar to this: <a href='https://thread-valley-lipstick.glitch.me/' target='_blank'>https://thread-valley-lipstick.glitch.me/</a>.
# --description--
Develop a 2D real time multiplayer game using the HTML Canvas API and [Socket.io](https://socket.io/) that is functionally similar to this: <https://thread-valley-lipstick.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-secure-real-time-multiplayer-game/'>this link</a> or clone <a href='https://github.com/freeCodeCamp/boilerplate-project-secure-real-time-multiplayer-game'>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-secure-real-time-multiplayer-game/) or clone [this repository](https://github.com/freeCodeCamp/boilerplate-project-secure-real-time-multiplayer-game) 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: Multiple players can connect to a server and play.
testString: ''
- text: Each player has an avatar.
testString: ''
- text: Each player is represented by an object created by the <code>Player</code> class in <code>Player.mjs</code>.
testString: ''
- text: At a minimum, each player object should contain a unique <code>id</code>, a <code>score</code>, and <code>x</code> and <code>y</code> coordinates representing the player's current position.
testString: ''
- text: The game has at least one type of collectible item. Complete the <code>Collectible</code> class in <code>Collectible.mjs</code> to implement this.
testString: ''
- text: At a minimum, each collectible item object created by the <code>Collectible</code> class should contain a unique <code>id</code>, a <code>value</code>, and <code>x</code> and <code>y</code> coordinates representing the item's current position.
testString: ''
- text: Players can use the WASD and/or arrow keys to move their avatar. Complete the <code>movePlayer</code> method in <code>Player.mjs</code> to implement this.
testString: ''
- text: |
The <code>movePlayer</code> method should accept two arguments: a string of "up", "down", "left", or "right", and a number for the amount of pixels the player's position should change. <code>movePlayer</code> should adjust the <code>x</code> and <code>y</code> coordinates of the player object it's called from.
testString: ''
- text: The player's score should be used to calculate their rank among the other players. Complete the <code>calculateRank</code> method in the <code>Player</code> class to implement this.
testString: ''
- text: |
The <code>calculateRank</code> method should accept an array of objects representing all connected players and return the string <code>Rank: currentRanking/totalPlayers</code>. For example, in a game with two players, if Player A has a score of 3 and Player B has a score of 5, <code>calculateRank</code> for Player A should return <code>Rank: 2/2</code>.
testString: ''
- text: Players can collide with a collectible item. Complete the <code>collision</code> method in <code>Player.mjs</code> to implement this.
testString: ''
- text: The <code>collision</code> method should accept a collectible item's object as an argument. If the player's avatar intersects with the item, the <code>collision</code> method should return <code>true</code>.
testString: ''
- text: All players are kept in sync.
testString: ''
- text: Players can disconnect from the game at any time.
testString: ''
- text: Prevent the client from trying to guess / sniff the MIME type.
testString: ''
- text: Prevent cross-site scripting (XSS) attacks.
testString: ''
- text: Nothing from the website is cached in the client.
testString: ''
- text: The headers say that the site is powered by "PHP 7.4.3" even though it isn't (as a security measure).
testString: ''
```
</section>
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
Multiple players can connect to a server and play.
```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>
Each player has an avatar.
```js
```
Each player is represented by an object created by the `Player` class in `Player.mjs`.
```js
```
At a minimum, each player object should contain a unique `id`, a `score`, and `x` and `y` coordinates representing the player's current position.
```js
```
The game has at least one type of collectible item. Complete the `Collectible` class in `Collectible.mjs` to implement this.
```js
```
At a minimum, each collectible item object created by the `Collectible` class should contain a unique `id`, a `value`, and `x` and `y` coordinates representing the item's current position.
```js
```
Players can use the WASD and/or arrow keys to move their avatar. Complete the `movePlayer` method in `Player.mjs` to implement this.
```js
```
The `movePlayer` method should accept two arguments: a string of "up", "down", "left", or "right", and a number for the amount of pixels the player's position should change. `movePlayer` should adjust the `x` and `y` coordinates of the player object it's called from.
```js
```
The player's score should be used to calculate their rank among the other players. Complete the `calculateRank` method in the `Player` class to implement this.
```js
```
The `calculateRank` method should accept an array of objects representing all connected players and return the string `Rank: currentRanking/totalPlayers`. For example, in a game with two players, if Player A has a score of 3 and Player B has a score of 5, `calculateRank` for Player A should return `Rank: 2/2`.
```js
```
Players can collide with a collectible item. Complete the `collision` method in `Player.mjs` to implement this.
```js
```
The `collision` method should accept a collectible item's object as an argument. If the player's avatar intersects with the item, the `collision` method should return `true`.
```js
```
All players are kept in sync.
```js
```
Players can disconnect from the game at any time.
```js
```
Prevent the client from trying to guess / sniff the MIME type.
```js
```
Prevent cross-site scripting (XSS) attacks.
```js
```
Nothing from the website is cached in the client.
```js
```
The headers say that the site is powered by "PHP 7.4.3" even though it isn't (as a security measure).
```js
```
# --solutions--

View File

@@ -3,15 +3,16 @@ id: 5e46f983ac417301a38fb933
challengeType: 10
---
## Description
<section id='description'>
# --description--
For this project you will learn about the importance of good security by creating a password cracker to figure out passwords that were hashed using SHA-1.
You can access <a href='https://repl.it/@freeCodeCamp/fcc-brute-force-password-cracker' target='_blank'>the full project description and starter code on repl.it</a>.
You can access [the full project description and starter code on repl.it](https://repl.it/@freeCodeCamp/fcc-brute-force-password-cracker).
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
We are still developing the interactive instructional part of the Python curriculum. For now, here are some videos on the freeCodeCamp.org YouTube channel that will teach you some of the Python skills required for this project:
<ul>
<li>
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody Video Course</a> (14 hours)
@@ -20,37 +21,14 @@ We are still developing the interactive instructional part of the Python curricu
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python Video Course</a> (2 hours)
</li>
<ul>
</section>
## Instructions
<section id='instructions'>
# --hints--
</section>
It should pass all Python tests.
## Tests
<section id='tests'>
```yml
tests:
- text: 'It should pass all Python tests.'
testString: ''
```js
```
</section>
# --solutions--
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
```py
# Python 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>

View File

@@ -1,51 +1,57 @@
---
id: 587d824a367417b2b2512c44
title: 股票价格检查
challengeType: 4
videoUrl: ''
title: 股票价格检查
---
## Description
<section id="description">构建一个功能类似于此的完整堆栈JavaScript应用程序 <a href="https://sphenoid-crater.glitch.me/" target="_blank">https</a> <a href="https://sphenoid-crater.glitch.me/" target="_blank">//giant-chronometer.glitch.me/</a> 。在这个项目上工作将涉及您在我们的入门项目上在Glitch上编写代码。完成此项目后您可以将公共故障网址到应用程序的主页复制到此屏幕进行测试您可以选择在另一个平台上编写项目但必须公开显示我们的测试。使用<a href="https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-stockchecker/">此链接</a>在Glitch上启动此项目或在GitHub上克隆<a href="https://github.com/freeCodeCamp/boilerplate-project-stockchecker/">此存储库</a> 如果您使用Glitch请记住将项目链接保存到安全的地方 </section>
# --description--
## Instructions
<section id="instructions">
</section>
构建一个功能类似于此的完整堆栈JavaScript应用程序 [https](https://sphenoid-crater.glitch.me/) [//giant-chronometer.glitch.me/](https://sphenoid-crater.glitch.me/) 。在这个项目上工作将涉及您在我们的入门项目上在Glitch上编写代码。完成此项目后您可以将公共故障网址到应用程序的主页复制到此屏幕进行测试您可以选择在另一个平台上编写项目但必须公开显示我们的测试。使用[此链接](https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-project-stockchecker/)在Glitch上启动此项目或在GitHub上克隆[此存储库](https://github.com/freeCodeCamp/boilerplate-project-stockchecker/) 如果您使用Glitch请记住将项目链接保存到安全的地方
## Tests
<section id='tests'>
# --hints--
```yml
tests:
- text: 将内容安全策略设置为仅允许从服务器加载脚本和css。
testString: ''
- text: 我可以使用包含纳斯达克股票代码的表格数据获得/ api /股票价格并收回一个对象stockData。
testString: ''
- text: 在stockData中我可以看到股票字符串股票代码价格字符串格式的小数和喜欢int
testString: ''
- text: 我也可以传递像trueboolean这样的字段来将我的喜欢添加到股票中。每个IP应该只接受1个。
testString: ''
- text: 如果我传递2只股票则返回对象将是一个包含股票信息的数组。而不是喜欢它将显示两者上的rel_likes两只股票之间的差异
testString: ''
- text: 获得当前价格的一个好方法是使用以下外部API用您的股票替换“GOOG”https//finance.google.com/finance/infoq = NASDAQ3AOGOOG
testString: ''
- text: 所有5个功能测试都已完成并通过。
testString: ''
```
</section>
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
将内容安全策略设置为仅允许从服务器加载脚本和css。
```js
// solution required
```
/section>
我可以使用包含纳斯达克股票代码的表格数据获得/ api /股票价格并收回一个对象stockData。
```js
```
在stockData中我可以看到股票字符串股票代码价格字符串格式的小数和喜欢int
```js
```
我也可以传递像trueboolean这样的字段来将我的喜欢添加到股票中。每个IP应该只接受1个。
```js
```
如果我传递2只股票则返回对象将是一个包含股票信息的数组。而不是喜欢它将显示两者上的rel_likes两只股票之间的差异
```js
```
获得当前价格的一个好方法是使用以下外部API用您的股票替换“GOOG”https//finance.google.com/finance/infoq = NASDAQ3AOGOOG
```js
```
所有5个功能测试都已完成并通过。
```js
```
# --solutions--