Skip to content

Commit

Permalink
chore(i18n,learn): processed translations
Browse files Browse the repository at this point in the history
  • Loading branch information
camperbot committed Nov 5, 2024
1 parent 72c788d commit bb4d1cf
Show file tree
Hide file tree
Showing 3,287 changed files with 349,723 additions and 3,082 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: 64514fda6c245de4d11eb7bb
title: Certified Full Stack Developer
certification: full-stack-developer
challengeType: 7
isPrivate: true
tests:
-
id: 645147516c245de4d11eb7ba
title: Certified Full Stack Developer Exam
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Add a `height` property to the `h4` tag and set it to 25px.
Your code should change the `h4` `height` property to a value of 25 pixels.

```js
const spaceFreeText = document.querySelector("style")?.textContent?.replace(/\s/g, '');
const spaceFreeText = document.querySelector("style:not(.fcc-hide-header)")?.textContent?.replace(/\s/g, '');
const h4Element = document.querySelector('h4');
assert.equal(Math.round(h4Element?.getBoundingClientRect()?.height),25);
assert.match(spaceFreeText,/h4{\S*height:25px(;\S*}|})/);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The `opacity` property in CSS is used to adjust the opacity, or conversely, the

```js
assert.match(
document.querySelector('style')?.textContent,
document.querySelector("style:not(.fcc-hide-header)")?.textContent,
/\.links\s*{([\s\S]*?;)*\s*opacity\s*:\s*0*\.70*\s*(;[\s\S]*?|\s*)}/
);
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Now we've proven that every HTML page has a `body` element, and that its `body`

# --instructions--

首先,創建一個內容文本爲 `Hello World``h1` 元素。
First, create an `h1` element with the text `Hello World`.

接着,在 `body` 的 CSS 規則裏面添加 `color: green;`,這會將頁面內所有字體的顏色都設置爲 `green`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ dashedName: label-bootstrap-wells

For the sake of clarity, let's label both of our wells with their ids.

left-well 的上一層,class 屬性爲 `col-xs-6` `div` 元素裏面,增加一個文本爲 `#left-well` `h4` 元素。
Above your left-well, inside its `col-xs-6` `div` element, add an `h4` element with the text `#left-well`.

right-well 的上一層,class 屬性爲 `col-xs-6` `div` 元素裏面,增加一個文本爲 `#right-well` `h4` 元素。
Above your right-well, inside its `col-xs-6` `div` element, add an `h4` element with the text `#right-well`.

# --hints--

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,25 @@ assert(
應該有一個監聽函數 `store.subscribe` 訂閱 store。

```js
(getUserInput) => assert(getUserInput('index').match(/store\s*\.\s*subscribe\(/gm));
assert.match(code, /store\s*\.\s*subscribe\(/gm);
```

`store.subscribe` 應該收到一個函數。

```js
(getUserInput) => assert(getUserInput('index').match(/(\s*function\s*)|(\s*\(\s*\)\s*=>)/gm))
assert.match(code, /(\s*function\s*)|(\s*\(\s*\)\s*=>)/gm);
```

The function passed to `store.subscribe` should not be called.

```js
assert.notMatch(code, /store\.subscribe\(.+\(\)\)/);
```

在更新 store 時,`store.subscribe` 應該在回調中使全局變量 `count` 的值增加。

```js
assert(store.getState() === count);
assert.strictEqual(store.getState(), count);
```

# --seed--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@ You should assign the modified character to a variable named `converted_characte
```js
({
test: () => {
const transformedCode = code.replace(/\r/g, "");
const convert_to_snake_case = __helpers.python.getDef("\n" + transformedCode, "convert_to_snake_case");
const { function_body } = convert_to_snake_case;

assert.match(function_body, / +converted_character\s*=\s*("|')_\1\s*\+\s*char\.lower\s*\(\s*\)/);
assert(runPython(`
converted_character_variable = (
_Node(_code)
.find_function("convert_to_snake_case")
.find_for_loops()[0]
.find_ifs()[0]
.find_variable("converted_character")
)
converted_character_variable.is_equivalent(
"converted_character = '_' + char.lower()"
) or converted_character_variable.is_equivalent(
"converted_character = f'_{char.lower()}'"
)
`));
}
})
```
Expand All @@ -32,9 +42,7 @@ You should not have `pass` in your `if` statement.
```js
({
test: () => {
const commentless_code = __helpers.python.removeComments(code);
const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+char\.isupper\s*\(\s*\)\s*/);
assert.notMatch(block_body, /pass/);
assert(runPython(`not _Node(_code).find_function("convert_to_snake_case").find_for_loops()[0].find_ifs()[0].has_stmt("pass")`));
}
})
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,32 @@ In this project, you will visualize and make calculations from medical examinati


## Instructions

Create a chart similar to `examples/Figure_1.png`, where we show the counts of good and bad outcomes for the `cholesterol`, `gluc`, `alco`, `active`, and `smoke` variables for patients with `cardio=1` and `cardio=0` in different panels.

By each number in the `medical_data_visualizer.py` file, add the code from the associated instruction number below.

1. Import the data from `medical_examination.csv` and assign it to the `df` variable
2. Create the `overweight` column in the `df` variable
1. Import the data from `medical_examination.csv` and assign it to the `df` variable.
2. Add an `overweight` column to the data. To determine if a person is overweight, first calculate their BMI by dividing their weight in kilograms by the square of their height in meters. If that value is > 25 then the person is overweight. Use the value `0` for NOT overweight and the value `1` for overweight.
3. Normalize data by making `0` always good and `1` always bad. If the value of `cholesterol` or `gluc` is 1, set the value to `0`. If the value is more than `1`, set the value to `1`.
4. Draw the Categorical Plot in the `draw_cat_plot` function
4. Draw the Categorical Plot in the `draw_cat_plot` function.
5. Create a DataFrame for the cat plot using `pd.melt` with values from `cholesterol`, `gluc`, `smoke`, `alco`, `active`, and `overweight` in the `df_cat` variable.
6. Group and reformat the data in `df_cat` to split it by `cardio`. Show the counts of each feature. You will have to rename one of the columns for the `catplot` to work correctly.
7. Convert the data into `long` format and create a chart that shows the value counts of the categorical features using the following method provided by the seaborn library import : `sns.catplot()`
8. Get the figure for the output and store it in the `fig` variable
9. Do not modify the next two lines
10. Draw the Heat Map in the `draw_heat_map` function
7. Convert the data into `long` format and create a chart that shows the value counts of the categorical features using the following method provided by the seaborn library import: `sns.catplot()`.
8. Get the figure for the output and store it in the `fig` variable.
9. Do not modify the next two lines.
10. Draw the Heat Map in the `draw_heat_map` function.
11. Clean the data in the `df_heat` variable by filtering out the following patient segments that represent incorrect data:
- diastolic pressure is higher than systolic (Keep the correct data with `(df['ap_lo'] <= df['ap_hi'])`)
- height is less than the 2.5th percentile (Keep the correct data with `(df['height'] >= df['height'].quantile(0.025))`)
- height is more than the 97.5th percentile
- weight is less than the 2.5th percentile
- weight is more than the 97.5th percentile
12. Calculate the correlation matrix and store it in the `corr` variable
13. Generate a mask for the upper triangle and store it in the `mask` variable
14. Set up the `matplotlib` figure
15. Plot the correlation matrix using the method provided by the `seaborn` library import: `sns.heatmap()`
16. Do not modify the next two lines
12. Calculate the correlation matrix and store it in the `corr` variable.
13. Generate a mask for the upper triangle and store it in the `mask` variable.
14. Set up the `matplotlib` figure.
15. Plot the correlation matrix using the method provided by the `seaborn` library import: `sns.heatmap()`.
16. Do not modify the next two lines.

## 開發

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ The new version of JavaScript provides us with a built-in Map object which provi
- `.set(key, value)` 設置一個新的鍵值對
- `.delete(key)` 移除一個鍵值對
- `.clear()` 移除所有鍵值對
- `.entries()` 返回一個所有按鍵插入順序排列的鍵的數組
- `.entries()` 返回一個所有按值的插入順序排列的值的數組
- `.keys()` returns a new map iterator object that contains all the keys in insertion order
- `.values()` returns a new map iterator object that contains all the values in insertion order
- `.entries()` returns a new map iterator object that contains all the key, value pairs in insertion order

# --instructions--

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ assert(hasH1);
你不應該添加一個新的 `style` 標籤。 將新的 CSS 規則添加到現有的 `style` 標籤中。

```js
const hasManyStyleTags = document.querySelectorAll('style').length > 1;
assert(!hasManyStyleTags);
assert.isAtMost(document.querySelectorAll('style').length, 2);
```

你應該添加一個新的 `h2` 選擇器。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You appear to be using a browser extension that is modifying the page. Be sure t

```js
assert.isAtMost(document.querySelectorAll('script').length, 2);
assert.equal(document.querySelectorAll('style').length, 0);
assert.equal(document.querySelectorAll('style').length, 1);
assert.equal(document.querySelectorAll('link').length, 0);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The anchor text should be `cute cats`.
assert.strictEqual(document.querySelector('a')?.innerText, "cute cats");
```
The `href` attrivute of the new anchor element should be `https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg`.
The `href` attribute of the new anchor element should be `https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg`.

```js
assert.strictEqual(document.querySelector('a')?.href, "https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dashedName: step-30

# --description--

Within your `.calories-info` element, create a `div` element. Give that `div` element a `class` attribute set to `left-container`. Within the newly created `div` element, create a `h2` element with the text `Amount per serving`. Give the `h2` element a `class` attribute set to `bold small-text`.
Within your `.calories-info` element, create a `div` element. Give that `div` element a `class` attribute set to `left-container`. Within the newly created `div` element, create an `h2` element with the text `Amount per serving`. Give the `h2` element a `class` attribute set to `bold small-text`.

# --hints--

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dashedName: step-45

# --description--

你的下一個計算是<dfn>範圍</dfn>,它是列表中最大和最小數字之間的差異。
你的下一個計算是<dfn>極差</dfn>,它是列表中最大和最小數字之間的差異。

你之前學習了全局 `Math` 對象。 `Math``.min()` 方法從一系列數字中獲得最小數字,而 `.max()` 方法獲得最大數字。 下面是一個從數組中獲得最小數字的示例:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dashedName: step-16

我們遇到了一點小問題。 你正在嘗試在頁面上查詢按鈕元素,但 `script` 標籤位於 HTML 的 `head` 中。 這意味着你的代碼在瀏覽器讀取 HTML 之前運行,並且你的 `document.querySelector()` 將看不到該按鈕 - 因爲瀏覽器尚未處理它。

要解決此問題,請將 `script` 元素移出 `head` 元素,並將其放置在 `body` 元素的末尾(就在結束 `</body>` 標籤之前)。
To fix this, move your `script` element out of the `head` element, and place it at the end of your `body` element (just before the closing `</body>` tag).

# --hints--

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ dashedName: step-35
你應該使用箭頭語法向採用 `btn` 參數的 `forEach` 方法添加回調函數。

```js
assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(\s*(\(\s*btn\s*\)|btn)\s*=>\s*\{/);
assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(\s*(\(\s*btn\s*\)|btn)\s*=>\s*(?:\{|\s*)/);
```

你應該向 `btn` 變量添加一個事件監聽器。

```js
assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(\s*(\(\s*btn\s*\)|btn)\s*=>\s*\{\s*btn\s*\.\s*addEventListener\s*\(/);
assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(\s*(\(\s*btn\s*\)|btn)\s*=>\s*(?:\{\s*btn\s*\.\s*addEventListener\s*\(|\s*btn\s*\.\s*addEventListener\s*\()/);
```

你應該監聽 `btn` 變量上的 `click` 事件。

```js
assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(\s*(?:\(\s*btn\s*\)|btn)\s*=>\s*\{\s*btn\s*\.\s*addEventListener\s*\(\s*('|"|`)click\1\s*,\s*/);
assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(\s*(?:\(\s*btn\s*\)|btn)\s*=>\s*(?:\{\s*btn\s*\.\s*addEventListener\s*\(\s*('|"|`)click\1\s*,\s*|\s*btn\s*\.\s*addEventListener\s*\(\s*('|"|`)click\2\s*,\s*)/);
```

你應該向事件監聽器添加一個空的回調函數。 記得給它一個 `event` 參數。

```js
assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(\s*(?:\(\s*btn\s*\)|btn)\s*=>\s*\{\s*btn\s*\.\s*addEventListener\s*\(\s*('|"|`)click\1\s*,\s*(\(\s*event\s*\)|event)\s*=>\s*\{\s*\}\s*\)\s*;?\s*\}\s*\)/);
assert.match(code, /\[\s*\.\.\.addToCartBtns\s*\]\s*\.\s*forEach\s*\(\s*(?:\(\s*btn\s*\)|btn)\s*=>\s*(?:\{\s*btn\s*\.\s*addEventListener\s*\(\s*('|"|`)click\1\s*,\s*(\(\s*event\s*\)|event)\s*=>\s*\{\s*\}\s*\)\s*;?\s*\}\s*\)|\s*btn\s*\.\s*addEventListener\s*\(\s*('|"|`)click\3\s*,\s*(\(\s*event\s*\)|event)\s*=>\s*\{\s*\}\s*\)\s*;?\s*\))/);
```

# --seed--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dashedName: step-43
lineOne = lineOne + "\n" + lineTwo;
```

使用第二個加法運算符在現有的 `result` 值和添加的 `row` 值之間連接一個新行。
Use a second addition operator to append a new line after the existing `result` value and the added `row` value.

# --hints--

Expand All @@ -25,22 +25,22 @@ lineOne = lineOne + "\n" + lineTwo;
assert.match(__helpers.removeJSComments(code), /('|")\\n\1/);
```

你應該將 `\n` 轉義序列連接到 `result` 變量。
You should concatenate your `row` variable to your `result` variable.

```js
assert.match(__helpers.removeJSComments(code), /result\s*\+\s*('|")\\n\1/);
assert.match(__helpers.removeJSComments(code), /result\s*\+\s*row\s*\+\s*('|")\\n\1/);
```

你應該將 `row` 變量連接到 `\n` 轉義序列。
You should concatenate the `\n` escape sequence to your `row` variable.

```js
assert.match(__helpers.removeJSComments(code), /result\s*\+\s*('|")\\n\1\s*\+\s*row/);
assert.match(__helpers.removeJSComments(code), /row\s*\+\s*('|")\\n\1/);
```

你應該將整個連接分配回你的 `result` 變量。 不要忘記分號。

```js
assert.match(__helpers.removeJSComments(code), /result\s*=\s*result\s*\+\s*('|")\\n\1\s*\+\s*row;/);
assert.match(__helpers.removeJSComments(code), /result\s*=\s*result\s*\+\s*row\s*\+\s*('|")\\n\1;/);
```

# --seed--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ for (let i = 0; i < count; i = i + 1) {
let result = ""

for (const row of rows) {
result = result + "\n" + row;
result = result + row + "\n";
}

console.log(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ for (let i = 0; i < count; i = i + 1) {
let result = ""

for (const row of rows) {
result = result + "\n" + row;
result = result + row + "\n";
}

console.log(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ for (let i = 0; i < count; i = i + 1) {
let result = ""

for (const row of rows) {
result = result + "\n" + row;
result = result + row + "\n";
}

console.log(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ for (let i = 0; i < count; i = i + 1) {
let result = ""

for (const row of rows) {
result = result + "\n" + row;
result = result + row + "\n";
}

console.log(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ for (let i = 0; i < count; i = i + 1) {
let result = ""

for (const row of rows) {
result = result + "\n" + row;
result = result + row + "\n";
}

console.log(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ for (let i = 0; i < count; i = i + 1) {
let result = ""

for (const row of rows) {
result = result + "\n" + row;
result = result + row + "\n";
}

console.log(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ for (let i = 0; i < count; i = i + 1) {
let result = ""

for (const row of rows) {
result = result + "\n" + row;
result = result + row + "\n";
}

console.log(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ for (let i = 0; i < count; i = i + 1) {
let result = ""

for (const row of rows) {
result = result + "\n" + row;
result = result + row + "\n";
}

console.log(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ for (let i = 0; i < count; i = i + 1) {
let result = ""

for (const row of rows) {
result = result + "\n" + row;
result = result + row + "\n";
}

console.log(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ for (let i = 0; i < count; i = i + 1) {
let result = ""

for (const row of rows) {
result = result + "\n" + row;
result = result + row + "\n";
}

console.log(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ for (let i = 0; i < count; i = i + 1) {
let result = ""

for (const row of rows) {
result = result + "\n" + row;
result = result + row + "\n";
}

console.log(result);
Expand Down
Loading

0 comments on commit bb4d1cf

Please sign in to comment.