chore(i18n,learn): processed translations (#45493)

pull/45493/merge
camperbot 2022-03-21 22:25:58 +05:30 committed by GitHub
parent c56b47edbc
commit 1036cde22e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 382 additions and 184 deletions

View File

@ -13,7 +13,7 @@ tests:
title: 世界盃數據庫
-
id: 5f87ac112ae598023a42df1a
title: 沙龍預約計劃
title: 沙龍預約安排程序
-
id: 602d9ff222201c65d2a019f2
title: 元素週期表數據庫

View File

@ -25,14 +25,12 @@ function equalityTest(myVal) {
如果 `myVal` 等於 `10`,相等運算符會返回 `true`,因此大括號裏面的代碼會被執行,函數將返回 `Equal`。 否則,函數返回 `Not Equal`。 在 JavaScript 中,爲了讓兩個不同的<dfn>數據類型</dfn>(例如 `numbers``strings`)的值可以作比較,它必須把一種類型轉換爲另一種類型。 這叫作 “類型強制轉換”。 轉換之後,可以像下面這樣來比較:
```js
1 == 1
1 == 2
1 == '1'
"3" == 3
1 == 1 // true
1 == 2 // false
1 == '1' // true
"3" == 3 // true
```
按順序,這些表達式會返回 `true`、`false`、`true`、`true`。
# --instructions--
把相等運算符添加到指定的行,這樣當 `val` 的值爲 `12` 的時候,函數會返回 `Equal`
@ -57,7 +55,7 @@ assert(testEqual(12) === 'Equal');
assert(testEqual('12') === 'Equal');
```
應該使用 `==` 運算符
應該使用 `==` 運算符
```js
assert(code.match(/==/g) && !code.match(/===/g));

View File

@ -16,63 +16,61 @@ dashedName: comparison-with-the-greater-than-operator
**例如:**
```js
5 > 3
7 > '3'
2 > 3
'1' > 9
5 > 3 // true
7 > '3' // true
2 > 3 // false
'1' > 9 // false
```
按順序,這些表達式會返回 `true`、`true`、`false` 和 `false`
# --instructions--
添加大於運算符到指定的行,使得返回的語句是有意義的
將大於運算符添加到指示的行,以便返回語句有意義
# --hints--
`testGreaterThan(0)` 應該返回字符串 `10 or Under`
`testGreaterThan(0)` 應該返回字符串 `10 or Under`
```js
assert(testGreaterThan(0) === '10 or Under');
```
`testGreaterThan(10)` 應該返回字符串 `10 or Under`
`testGreaterThan(10)` 應該返回字符串`10 or Under`
```js
assert(testGreaterThan(10) === '10 or Under');
```
`testGreaterThan(11)` 應該返回字符串 `Over 10`
`testGreaterThan(11)` 應該返回字符串 `Over 10`
```js
assert(testGreaterThan(11) === 'Over 10');
```
`testGreaterThan(99)` 應該返回字符串 `Over 10`
`testGreaterThan(99)` 應該返回字符串 `Over 10`
```js
assert(testGreaterThan(99) === 'Over 10');
```
`testGreaterThan(100)` 應該返回字符串 `Over 10`
`testGreaterThan(100)` 應該返回字符串 `Over 10`
```js
assert(testGreaterThan(100) === 'Over 10');
```
`testGreaterThan(101)` 應該返回字符串 `Over 100`
`testGreaterThan(101)` 應該返回字符串 `Over 100`
```js
assert(testGreaterThan(101) === 'Over 100');
```
`testGreaterThan(150)` 應該返回字符串 `Over 100`
`testGreaterThan(150)` 應該返回字符串 `Over 100`
```js
assert(testGreaterThan(150) === 'Over 100');
```
應該使用 `>` 運算符至少兩次
應該使用 `>` 至少兩次
```js
assert(code.match(/val\s*>\s*('|")*\d+('|")*/g).length > 1);

View File

@ -16,63 +16,61 @@ dashedName: comparison-with-the-greater-than-or-equal-to-operator
**例如:**
```js
6 >= 6
7 >= '3'
2 >= 3
'7' >= 9
6 >= 6 // true
7 >= '3' // true
2 >= 3 // false
'7' >= 9 // false
```
按順序,這些表達式會返回 `true`、`true`、`false` 和 `false`
# --instructions--
添加大於等於運算符到指定行,使得函數的返回語句有意義。
# --hints--
`testGreaterOrEqual(0)` 應該返回字符串 `Less than 10`
`testGreaterOrEqual(0)` 應該返回字符串 `Less than 10`
```js
assert(testGreaterOrEqual(0) === 'Less than 10');
```
`testGreaterOrEqual(9)` 應該返回字符串 `Less than 10`
`testGreaterOrEqual(9)` 應該返回字符串 `Less than 10`
```js
assert(testGreaterOrEqual(9) === 'Less than 10');
```
`testGreaterOrEqual(10)` 應該返回字符串 `10 or Over`
`testGreaterOrEqual(10)` 應該返回字符串 `10 or Over`
```js
assert(testGreaterOrEqual(10) === '10 or Over');
```
`testGreaterOrEqual(11)` 應該返回字符串 `10 or Over`
`testGreaterOrEqual(11)` 應該返回字符串 `10 or Over`
```js
assert(testGreaterOrEqual(11) === '10 or Over');
```
`testGreaterOrEqual(19)` 應該返回字符串 `10 or Over`
`testGreaterOrEqual(19)` 應該返回字符串 `10 or Over`
```js
assert(testGreaterOrEqual(19) === '10 or Over');
```
`testGreaterOrEqual(100)` 應該返回字符串 `20 or Over`
`testGreaterOrEqual(100)` 應該返回字符串 `20 or Over`
```js
assert(testGreaterOrEqual(100) === '20 or Over');
```
`testGreaterOrEqual(21)` 應該返回字符串 `20 or Over`
`testGreaterOrEqual(21)` 應該返回字符串 `20 or Over`
```js
assert(testGreaterOrEqual(21) === '20 or Over');
```
應該使用 `>=` 運算符至少兩次。
應該使用 `>=` 運算符至少兩次。
```js
assert(code.match(/val\s*>=\s*('|")*\d+('|")*/g).length > 1);

View File

@ -8,7 +8,7 @@ dashedName: smallest-common-multiple
# --description--
找到給定參數的最小公倍數,可以被這兩個參數整除,也可以被指定範圍內的所整數整除。
找到給定參數的最小公倍數,可以被這兩個參數整除,也可以被指定範圍內的所整數整除。
注意,較小數不一定總是出現在數組的第一個元素。

View File

@ -186,6 +186,12 @@ assert(telephoneCheck('(555)5(55?)-5555') === false);
assert(telephoneCheck('55 55-55-555-5') === false);
```
`telephoneCheck("11 555-555-5555")` 應該返回 `false`
```js
assert(telephoneCheck('11 555-555-5555') === false);
```
# --seed--
## --seed-contents--

View File

@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT);
Redux store 應該將 `state` 初始化爲 0。
```js
assert(store.getState() === 0);
assert(_store.getState() === 0);
```
在 Redux store 上 dispatch `incAction` 應該將 `state` 增加 1。
@ -39,9 +39,9 @@ assert(store.getState() === 0);
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(incAction());
const incState = store.getState();
const initialState = _store.getState();
_store.dispatch(incAction());
const incState = _store.getState();
return initialState + 1 === incState;
})()
);
@ -52,9 +52,9 @@ assert(
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(decAction());
const decState = store.getState();
const initialState = _store.getState();
_store.dispatch(decAction());
const decState = _store.getState();
return initialState - 1 === decState;
})()
);
@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing
const store = null; // Define the Redux store here, passing in your reducers
```
## --after-user-code--
```js
const _store = Redux.createStore(counterReducer)
```
# --solutions--
```js

View File

@ -30,7 +30,7 @@ dashedName: timestamp-microservice
};
```
對具有有效日期的 `/api/:date?` 的請求應返回一個帶有 `unix` 鍵的 JSON 對象,該鍵是輸入日期的 Unix 時間戳(以毫秒爲單位)
一個對 `/api/:date?` 的有效日期的請求應該返回一個 JSON 對象,該對象的 `unix` 鍵是輸入日期的 Unix 時間戳,單位是毫秒(數字類型)。
```js
(getUserInput) =>

View File

@ -20,7 +20,7 @@ bcrypt.hash(myPlaintextPassword, saltRounds, (err, hash) => {
# --instructions--
把這段哈希方法添加到你的服務器(我們已經定義好這個方法的變量給你直接使用了),然後你可以嘗試在控制檯輸出。 之後,我們通常需要把哈希的結果保存到數據庫。
將該哈希函數添加到你的服務器上(我們已經定義了函數中使用的變量),並將其記錄到控制檯以便你查看! 之後,我們通常需要把哈希的結果保存到數據庫。
當你需要對比用戶輸入的值是否和之前哈希過的值一樣的時候,只需要調用對比函數:
@ -30,7 +30,7 @@ bcrypt.compare(myPlaintextPassword, hash, (err, res) => {
});
```
當控制檯輸出生成的哈希並在對比的回調中輸出結果後,我們就可以將其添加到現有的哈希函數中。 控制檯中會首先輸出一個哈希結果,然後輸出 true。 如果將比較函數中的 “myPlaintextPassword” 更改爲 “someOtherPlaintextPassword”則比較的結果應顯示 false。
在你記錄完成的哈希,並在比較中把 'res' 記錄到控制檯後,將此添加到你現有的哈希函數中(因爲你需要等待哈希完成後再調用比較函數)。 控制檯中會首先輸出一個哈希結果,然後輸出 true。 如果將比較函數中的 “myPlaintextPassword” 更改爲 “someOtherPlaintextPassword”則比較的結果應顯示 false。
```js
bcrypt.hash('passw0rd!', 13, (err, hash) => {

View File

@ -13,7 +13,7 @@ tests:
title: 世界杯数据库
-
id: 5f87ac112ae598023a42df1a
title: 沙龙预约计划
title: 沙龙预约安排程序
-
id: 602d9ff222201c65d2a019f2
title: 元素周期表数据库

View File

@ -25,14 +25,12 @@ function equalityTest(myVal) {
如果 `myVal` 等于 `10`,相等运算符会返回 `true`,因此大括号里面的代码会被执行,函数将返回 `Equal`。 否则,函数返回 `Not Equal`。 在 JavaScript 中,为了让两个不同的<dfn>数据类型</dfn>(例如 `numbers``strings`)的值可以作比较,它必须把一种类型转换为另一种类型。 这叫作 “类型强制转换”。 转换之后,可以像下面这样来比较:
```js
1 == 1
1 == 2
1 == '1'
"3" == 3
1 == 1 // true
1 == 2 // false
1 == '1' // true
"3" == 3 // true
```
按顺序,这些表达式会返回 `true`、`false`、`true`、`true`。
# --instructions--
把相等运算符添加到指定的行,这样当 `val` 的值为 `12` 的时候,函数会返回 `Equal`
@ -57,7 +55,7 @@ assert(testEqual(12) === 'Equal');
assert(testEqual('12') === 'Equal');
```
应该使用 `==` 运算符
应该使用 `==` 运算符
```js
assert(code.match(/==/g) && !code.match(/===/g));

View File

@ -16,63 +16,61 @@ dashedName: comparison-with-the-greater-than-operator
**例如:**
```js
5 > 3
7 > '3'
2 > 3
'1' > 9
5 > 3 // true
7 > '3' // true
2 > 3 // false
'1' > 9 // false
```
按顺序,这些表达式会返回 `true`、`true`、`false` 和 `false`
# --instructions--
添加大于运算符到指定的行,使得返回的语句是有意义的
将大于运算符添加到指示的行,以便返回语句有意义
# --hints--
`testGreaterThan(0)` 应该返回字符串 `10 or Under`
`testGreaterThan(0)` 应该返回字符串 `10 or Under`
```js
assert(testGreaterThan(0) === '10 or Under');
```
`testGreaterThan(10)` 应该返回字符串 `10 or Under`
`testGreaterThan(10)` 应该返回字符串`10 or Under`
```js
assert(testGreaterThan(10) === '10 or Under');
```
`testGreaterThan(11)` 应该返回字符串 `Over 10`
`testGreaterThan(11)` 应该返回字符串 `Over 10`
```js
assert(testGreaterThan(11) === 'Over 10');
```
`testGreaterThan(99)` 应该返回字符串 `Over 10`
`testGreaterThan(99)` 应该返回字符串 `Over 10`
```js
assert(testGreaterThan(99) === 'Over 10');
```
`testGreaterThan(100)` 应该返回字符串 `Over 10`
`testGreaterThan(100)` 应该返回字符串 `Over 10`
```js
assert(testGreaterThan(100) === 'Over 10');
```
`testGreaterThan(101)` 应该返回字符串 `Over 100`
`testGreaterThan(101)` 应该返回字符串 `Over 100`
```js
assert(testGreaterThan(101) === 'Over 100');
```
`testGreaterThan(150)` 应该返回字符串 `Over 100`
`testGreaterThan(150)` 应该返回字符串 `Over 100`
```js
assert(testGreaterThan(150) === 'Over 100');
```
应该使用 `>` 运算符至少两次
应该使用 `>` 至少两次
```js
assert(code.match(/val\s*>\s*('|")*\d+('|")*/g).length > 1);

View File

@ -16,63 +16,61 @@ dashedName: comparison-with-the-greater-than-or-equal-to-operator
**例如:**
```js
6 >= 6
7 >= '3'
2 >= 3
'7' >= 9
6 >= 6 // true
7 >= '3' // true
2 >= 3 // false
'7' >= 9 // false
```
按顺序,这些表达式会返回 `true`、`true`、`false` 和 `false`
# --instructions--
添加大于等于运算符到指定行,使得函数的返回语句有意义。
# --hints--
`testGreaterOrEqual(0)` 应该返回字符串 `Less than 10`
`testGreaterOrEqual(0)` 应该返回字符串 `Less than 10`
```js
assert(testGreaterOrEqual(0) === 'Less than 10');
```
`testGreaterOrEqual(9)` 应该返回字符串 `Less than 10`
`testGreaterOrEqual(9)` 应该返回字符串 `Less than 10`
```js
assert(testGreaterOrEqual(9) === 'Less than 10');
```
`testGreaterOrEqual(10)` 应该返回字符串 `10 or Over`
`testGreaterOrEqual(10)` 应该返回字符串 `10 or Over`
```js
assert(testGreaterOrEqual(10) === '10 or Over');
```
`testGreaterOrEqual(11)` 应该返回字符串 `10 or Over`
`testGreaterOrEqual(11)` 应该返回字符串 `10 or Over`
```js
assert(testGreaterOrEqual(11) === '10 or Over');
```
`testGreaterOrEqual(19)` 应该返回字符串 `10 or Over`
`testGreaterOrEqual(19)` 应该返回字符串 `10 or Over`
```js
assert(testGreaterOrEqual(19) === '10 or Over');
```
`testGreaterOrEqual(100)` 应该返回字符串 `20 or Over`
`testGreaterOrEqual(100)` 应该返回字符串 `20 or Over`
```js
assert(testGreaterOrEqual(100) === '20 or Over');
```
`testGreaterOrEqual(21)` 应该返回字符串 `20 or Over`
`testGreaterOrEqual(21)` 应该返回字符串 `20 or Over`
```js
assert(testGreaterOrEqual(21) === '20 or Over');
```
应该使用 `>=` 运算符至少两次。
应该使用 `>=` 运算符至少两次。
```js
assert(code.match(/val\s*>=\s*('|")*\d+('|")*/g).length > 1);

View File

@ -8,7 +8,7 @@ dashedName: smallest-common-multiple
# --description--
找到给定参数的最小公倍数,可以被这两个参数整除,也可以被指定范围内的所整数整除。
找到给定参数的最小公倍数,可以被这两个参数整除,也可以被指定范围内的所整数整除。
注意,较小数不一定总是出现在数组的第一个元素。

View File

@ -186,6 +186,12 @@ assert(telephoneCheck('(555)5(55?)-5555') === false);
assert(telephoneCheck('55 55-55-555-5') === false);
```
`telephoneCheck("11 555-555-5555")` 应该返回 `false`
```js
assert(telephoneCheck('11 555-555-5555') === false);
```
# --seed--
## --seed-contents--

View File

@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT);
Redux store 应该将 `state` 初始化为 0。
```js
assert(store.getState() === 0);
assert(_store.getState() === 0);
```
在 Redux store 上 dispatch `incAction` 应该将 `state` 增加 1。
@ -39,9 +39,9 @@ assert(store.getState() === 0);
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(incAction());
const incState = store.getState();
const initialState = _store.getState();
_store.dispatch(incAction());
const incState = _store.getState();
return initialState + 1 === incState;
})()
);
@ -52,9 +52,9 @@ assert(
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(decAction());
const decState = store.getState();
const initialState = _store.getState();
_store.dispatch(decAction());
const decState = _store.getState();
return initialState - 1 === decState;
})()
);
@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing
const store = null; // Define the Redux store here, passing in your reducers
```
## --after-user-code--
```js
const _store = Redux.createStore(counterReducer)
```
# --solutions--
```js

View File

@ -30,7 +30,7 @@ dashedName: timestamp-microservice
};
```
对具有有效日期的 `/api/:date?` 的请求应返回一个带有 `unix` 键的 JSON 对象,该键是输入日期的 Unix 时间戳(以毫秒为单位)
一个对 `/api/:date?` 的有效日期的请求应该返回一个 JSON 对象,该对象的 `unix` 键是输入日期的 Unix 时间戳,单位是毫秒(数字类型)。
```js
(getUserInput) =>

View File

@ -20,7 +20,7 @@ bcrypt.hash(myPlaintextPassword, saltRounds, (err, hash) => {
# --instructions--
把这段哈希方法添加到你的服务器(我们已经定义好这个方法的变量给你直接使用了),然后你可以尝试在控制台输出。 之后,我们通常需要把哈希的结果保存到数据库。
将该哈希函数添加到你的服务器上(我们已经定义了函数中使用的变量),并将其记录到控制台以便你查看! 之后,我们通常需要把哈希的结果保存到数据库。
当你需要对比用户输入的值是否和之前哈希过的值一样的时候,只需要调用对比函数:
@ -30,7 +30,7 @@ bcrypt.compare(myPlaintextPassword, hash, (err, res) => {
});
```
当控制台输出生成的哈希并在对比的回调中输出结果后,我们就可以将其添加到现有的哈希函数中。 控制台中会首先输出一个哈希结果,然后输出 true。 如果将比较函数中的 “myPlaintextPassword” 更改为 “someOtherPlaintextPassword”则比较的结果应显示 false。
在你记录完成的哈希,并在比较中把 'res' 记录到控制台后,将此添加到你现有的哈希函数中(因为你需要等待哈希完成后再调用比较函数)。 控制台中会首先输出一个哈希结果,然后输出 true。 如果将比较函数中的 “myPlaintextPassword” 更改为 “someOtherPlaintextPassword”则比较的结果应显示 false。
```js
bcrypt.hash('passw0rd!', 13, (err, hash) => {

View File

@ -9,7 +9,7 @@ dashedName: use-the-css-transform-scale-property-to-scale-an-element-on-hover
# --description--
La propiedad `transform` tiene una variedad de funciones que el permiten escalar, mover, rotar, sesgar, etc., sus elementos. Cuando se usa con pseudo-classes como `:hover` que especifican un cierto estado de un elemento, la propiedad `transform` puede agregar fácilmente interactividad a sus elementos.
La propiedad `transform` tiene una variedad de funciones que te permiten escalar, mover, rotar, sesgar, etc., sus elementos. Cuando se usa con pseudo-classes como `:hover` que especifican un cierto estado de un elemento, la propiedad `transform` puede agregar fácilmente interactividad a sus elementos.
Aquí hay un ejemplo para escalar los elementos de párrafo a 2.1 veces su tamaño original:

View File

@ -1,6 +1,6 @@
---
id: ae9defd7acaf69703ab432ea
title: Múltiplo común más pequeño
title: Mínimo común múltiplo
challengeType: 5
forumTopicId: 16075
dashedName: smallest-common-multiple

View File

@ -22,7 +22,7 @@ function Bird() {
Este constructor define un objeto `Bird` con las propiedades `name`, `color` y `numLegs` establecidas a Albert, blue y 2 respectivamente. Los constructores tienen las siguientes convenciones:
<ul><li>Están definidos con un nombre en mayúscula para distinguirlos de otras funciones que no son <code>constructors</code>.</li><li>Utilizan la palabra clave <code>this</code> para establecer propiedades del objeto que crearán. Dentro del constructor, <code>this</code> se refiere al nuevo objeto que creará.</li><li>Los Constructors definen propiedades y comportamientos en ves de devolverlos como un valor como lo harían otras funciones.</li></ul>
<ul><li>Están definidos con un nombre en mayúscula para distinguirlos de otras funciones que no son <code>constructors</code>.</li><li>Utilizan la palabra clave <code>this</code> para establecer propiedades del objeto que crearán. Dentro del constructor, <code>this</code> se refiere al nuevo objeto que creará.</li><li>Los Constructors definen propiedades y comportamientos en vez de devolverlos como un valor como lo harían otras funciones.</li></ul>
# --instructions--

View File

@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT);
El almacén Redux debe inicializarse con un `state` de 0.
```js
assert(store.getState() === 0);
assert(_store.getState() === 0);
```
El envío de `incAction` en el almacén Redux debe incrementar el `state` en 1.
@ -39,9 +39,9 @@ El envío de `incAction` en el almacén Redux debe incrementar el `state` en 1.
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(incAction());
const incState = store.getState();
const initialState = _store.getState();
_store.dispatch(incAction());
const incState = _store.getState();
return initialState + 1 === incState;
})()
);
@ -52,9 +52,9 @@ El envío de `decAction` en el almacén Redux debe disminuir el `state` en 1.
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(decAction());
const decState = store.getState();
const initialState = _store.getState();
_store.dispatch(decAction());
const decState = _store.getState();
return initialState - 1 === decState;
})()
);
@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing
const store = null; // Define the Redux store here, passing in your reducers
```
## --after-user-code--
```js
const _store = Redux.createStore(counterReducer)
```
# --solutions--
```js

View File

@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT);
Lo store Redux dovrebbe essere inizializzato con uno `state` di 0.
```js
assert(store.getState() === 0);
assert(_store.getState() === 0);
```
Effettuare il dispatch di `incAction` nello store Redux dovrebbe aumentare lo `state` di 1.
@ -39,9 +39,9 @@ Effettuare il dispatch di `incAction` nello store Redux dovrebbe aumentare lo `s
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(incAction());
const incState = store.getState();
const initialState = _store.getState();
_store.dispatch(incAction());
const incState = _store.getState();
return initialState + 1 === incState;
})()
);
@ -52,9 +52,9 @@ Effettuare il dispatch di `decAction` nello store Redux dovrebbe decrementare lo
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(decAction());
const decState = store.getState();
const initialState = _store.getState();
_store.dispatch(decAction());
const decState = _store.getState();
return initialState - 1 === decState;
})()
);
@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing
const store = null; // Define the Redux store here, passing in your reducers
```
## --after-user-code--
```js
const _store = Redux.createStore(counterReducer)
```
# --solutions--
```js

View File

@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT);
Redux ストアを、`state` を 0 として初期化します。
```js
assert(store.getState() === 0);
assert(_store.getState() === 0);
```
Redux ストアでの `incAction` のディスパッチで、`state` を 1 だけ増やします。
@ -39,9 +39,9 @@ Redux ストアでの `incAction` のディスパッチで、`state` を 1 だ
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(incAction());
const incState = store.getState();
const initialState = _store.getState();
_store.dispatch(incAction());
const incState = _store.getState();
return initialState + 1 === incState;
})()
);
@ -52,9 +52,9 @@ Redux ストアでの `decAction` のディスパッチで、`state` を 1 だ
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(decAction());
const decState = store.getState();
const initialState = _store.getState();
_store.dispatch(decAction());
const decState = _store.getState();
return initialState - 1 === decState;
})()
);
@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing
const store = null; // Define the Redux store here, passing in your reducers
```
## --after-user-code--
```js
const _store = Redux.createStore(counterReducer)
```
# --solutions--
```js

View File

@ -38,9 +38,13 @@ assert(myVar === 10);
`myVar = myVar - 1;` deve ser alterado.
```js
assert(
/let\s*myVar\s*=\s*11;\s*\/*.*\s*([-]{2}\s*myVar|myVar\s*[-]{2});/.test(code)
);
assert(!code.match(/myVar\s*=\s*myVar\s*[-]\s*1.*?;?/));
```
Você não deve atribuir a `myVar` o valor `10`.
```js
assert(!code.match(/myVar\s*=\s*10.*?;?/));
```
Você deve usar o operador `--` na variável `myVar`.

View File

@ -31,13 +31,13 @@ assert(
);
```
Após `updateRecords(recordCollection, 5439, "tracks", "Take a Chance on Me")`, `tracks` deve ter a string `Take a Chance on Me` como último elemento.
Após `updateRecords(recordCollection, 5439, "tracks", "Take a Chance on Me")`, `tracks` deve ter a string `Take a Chance on Me` como o último e único elemento.
```js
assert(
updateRecords(_recordCollection, 5439, 'tracks', 'Take a Chance on Me')[5439][
'tracks'
].pop() === 'Take a Chance on Me'
updateRecords(_recordCollection, 5439, 'tracks', 'Take a Chance on Me') &&
_recordCollection[5439]['tracks'].length === 1 &&
_recordCollection[5439]['tracks'].pop() === 'Take a Chance on Me'
);
```

View File

@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT);
A store do Redux deve inicializar com o `state` igual a 0.
```js
assert(store.getState() === 0);
assert(_store.getState() === 0);
```
Despachar `incAction` na store do Redux deve incrementar o `state` por 1.
@ -39,9 +39,9 @@ Despachar `incAction` na store do Redux deve incrementar o `state` por 1.
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(incAction());
const incState = store.getState();
const initialState = _store.getState();
_store.dispatch(incAction());
const incState = _store.getState();
return initialState + 1 === incState;
})()
);
@ -52,9 +52,9 @@ Despachar `decAction` na store do Redux deve decrementar o `state` por 1.
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(decAction());
const decState = store.getState();
const initialState = _store.getState();
_store.dispatch(decAction());
const decState = _store.getState();
return initialState - 1 === decState;
})()
);
@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing
const store = null; // Define the Redux store here, passing in your reducers
```
## --after-user-code--
```js
const _store = Redux.createStore(counterReducer)
```
# --solutions--
```js

View File

@ -30,7 +30,7 @@ Você deve fornecer seu próprio projeto, não o exemplo de URL.
};
```
Uma solicitação a `/api/:date?` com uma data válida deve retornar um objeto JSON com uma chave `unix`, que é um timestamp do Unix da data de entrada em milissegundos
Uma solicitação a `/api/:date?` com uma data válida deve retornar um objeto JSON com uma chave `unix`, que é um timestamp do Unix da data de entrada em milissegundos (com o tipo Number)
```js
(getUserInput) =>

View File

@ -10,11 +10,6 @@ dashedName: arithmetic-formatter
Você [trabalhará neste projeto com nosso código inicial do Replit](https://replit.com/github/freeCodeCamp/boilerplate-arithmetic-formatter).
Ainda estamos desenvolvendo a parte instrucional interativa do currículo Python. Por enquanto, aqui estão alguns vídeos no canal do freeCodeCamp.org do YouTube que ensinarão tudo o que você precisa saber para completar este projeto:
- [Curso de Python em vídeo para todos](https://www.freecodecamp.org/news/python-for-everybody/) (14 horas)
- [Curso Aprenda Python em vídeo](https://www.freecodecamp.org/news/learn-python-video-course/) (10 horas)
# --instructions--
Os alunos da escola primária geralmente organizam problemas aritméticos de modo vertical para facilitar a sua resolução. Por exemplo, "235 + 52" se torna:
@ -88,7 +83,7 @@ Copie o URL do seu projeto e envie-o abaixo.
# --hints--
O projeto deve formatar corretamente um problema aritmético e passar em todos os testes.
O programa deve formatar corretamente um problema aritmético e passar em todos os testes.
```js

View File

@ -10,12 +10,6 @@ dashedName: budget-app
Você [trabalhará neste projeto com nosso código inicial do Replit](https://replit.com/github/freeCodeCamp/boilerplate-budget-app).
Ainda estamos desenvolvendo a parte instrucional interativa do currículo Python. Por enquanto, aqui estão alguns vídeos no canal do freeCodeCamp.org do YouTube que ensinarão tudo o que você precisa saber para completar este projeto:
- [Curso de Python em vídeo para todos](https://www.freecodecamp.org/news/python-for-everybody/) (14 horas)
- [Curso Aprenda Python em vídeo](https://www.freecodecamp.org/news/learn-python-video-course/) (10 horas)
# --instructions--
Complete a classe `Category` no `budget.py`. Ela deve ser capaz de instanciar objetos com base em diferentes categorias de orçamento, como *alimentos* (food), *vestuário* (clothing) e *entretenimento* (entertainment). Quando os objetos são criados, eles são passados com o nome da categoria. A classe deve ter uma variável de instância chamada `ledger` que seja uma lista. A classe também deve conter os seguintes métodos:

View File

@ -10,12 +10,6 @@ dashedName: polygon-area-calculator
Você [trabalhará neste projeto com nosso código inicial do Replit](https://replit.com/github/freeCodeCamp/boilerplate-polygon-area-calculator).
Ainda estamos desenvolvendo a parte instrucional interativa do currículo Python. Por enquanto, aqui estão alguns vídeos no canal do freeCodeCamp.org do YouTube que ensinarão tudo o que você precisa saber para completar este projeto:
- [Curso de Python em vídeo para todos](https://www.freecodecamp.org/news/python-for-everybody/) (14 horas)
- [Curso Aprenda Python em vídeo](https://www.freecodecamp.org/news/learn-python-video-course/) (10 horas)
# --instructions--
Neste projeto, você usará programação orientada a objetos para criar a classe Rectangle, para um retângulo, e a classe Square, para um quadrado. A classe Square deve ser uma subclasse da classe Rectangle e herdar métodos e atributos.

View File

@ -10,19 +10,13 @@ dashedName: probability-calculator
Você [trabalhará neste projeto com nosso código inicial do Replit](https://replit.com/github/freeCodeCamp/boilerplate-probability-calculator).
Ainda estamos desenvolvendo a parte instrucional interativa do currículo Python. Por enquanto, aqui estão alguns vídeos no canal do freeCodeCamp.org do YouTube que ensinarão tudo o que você precisa saber para completar este projeto:
- [Curso de Python em vídeo para todos](https://www.freecodecamp.org/news/python-for-everybody/) (14 horas)
- [Curso Aprenda Python em vídeo](https://www.freecodecamp.org/news/learn-python-video-course/) (10 horas)
# --instructions--
Suponha que haja um chapéu contendo 5 bolas azuis, 4 bolas vermelhas e 2 bolas verdes. Qual é a probabilidade de um sorteio aleatório de 4 bolas conter pelo menos 1 bola vermelha e 2 bolas verdes? Embora seja possível calcular a probabilidade usando matemática avançada, uma maneira mais fácil é escrever um programa para realizar um grande número de experimentos para estimar uma probabilidade aproximada.
Para este projeto, escreva um programa para determinar a probabilidade aproximada de retirar certas bolas aleatoriamente de um chapéu.
Primeiro, crie uma classe `Hat` (Chapéu) em `prob_calculator.py`. A classe deve ter um número variável de argumentos que especificam o número de bolas de cada cor que estão no chapéu. Por exemplo, um objeto da classe poderia ser criado de qualquer uma dessas maneiras:
Primeiro, crie uma classe `Hat` em `prob_calculator.py`. A classe deve ter um número variável de argumentos que especificam o número de bolas de cada cor que estão no chapéu. Por exemplo, um objeto da classe poderia ser criado de qualquer uma dessas maneiras:
```py
hat1 = Hat(yellow=3, blue=2, green=6)

View File

@ -10,12 +10,6 @@ dashedName: time-calculator
Você [trabalhará neste projeto com nosso código inicial do Replit](https://replit.com/github/freeCodeCamp/boilerplate-time-calculator).
Ainda estamos desenvolvendo a parte instrucional interativa do currículo Python. Por enquanto, aqui estão alguns vídeos no canal do freeCodeCamp.org do YouTube que ensinarão tudo o que você precisa saber para completar este projeto:
- [Curso de Python em vídeo para todos](https://www.freecodecamp.org/news/python-for-everybody/) (14 horas)
- [Curso Aprenda Python em vídeo](https://www.freecodecamp.org/news/learn-python-video-course/) (10 horas)
# --instructions--
Escreva uma função chamada `add_time`, que recebe dois parâmetros necessários e um parâmetro opcional:

View File

@ -8,7 +8,7 @@ dashedName: problem-344-silver-dollar-game
# --description--
O jogo de N.G. de Bruijn, conhecido como o jogo do dólar de prata, tem uma variante que pode ser descrita da seguinte forma:
Uma variante de N.G. de Bruijn, conhecida como o jogo do dólar de prata, pode ser descrita da seguinte forma:
Em uma faixa de quadrados, várias moedas são colocadas, estando, no máximo, uma moeda por quadrado. Apenas uma moeda, chamada de dólar de prata, tem qualquer valor. Dois jogadores se revezam fazendo movimentos. Em cada turno, um jogador deve fazer um movimento regular ou especial.

View File

@ -8,7 +8,7 @@ dashedName: problem-356-largest-roots-of-cubic-polynomials
# --description--
Considere an como a maior raiz real de um polinômio $g(x) = x^3 - 2^n \times x^2 + n$.
Considere $a_n$ como sendo a maior raiz real de um polinômio $g(x) = x^3 - 2^n \times x^2 + n$.
Por exemplo, $a_2 = 3.86619826\ldots$

View File

@ -13,11 +13,11 @@ Este é um dos projetos necessários para obter sua certificação. Para este pr
# --instructions--
**Importante:** depois de passar em todos os testes do projeto, salve um dump (cópia) do seu banco de dados em um arquivo `number_guessers.sql`, bem como toda a sua pasta `number_guessing_game` para poder concluir a etapa 2. Haverá instruções sobre como fazer isso dentro da máquina virtual.
**Importante:** depois de passar em todos os testes do projeto, salve um dump (cópia) do seu banco de dados em um arquivo `number_guess.sql`, bem como seu arquivo `number_guess.sh` para poder concluir a etapa 2. Haverá instruções sobre como fazer isso dentro da máquina virtual.
# --notes--
Arquivos necessários: `number_guessers.sql` e toda a pasta `number_guessing_game`
Arquivos necessários: `number_guess.sql`, `number_guess.sh`
# --hints--

View File

@ -13,11 +13,11 @@ Este é um dos projetos necessários para obter sua certificação. Para este pr
# --instructions--
**Importante:** depois de passar em todos os testes do projeto, salve um dump (cópia) do seu banco de dados em um arquivo `elements.sql`, bem como toda a sua pasta `periodic_table` para poder concluir a etapa 2. Haverá instruções sobre como fazer isso dentro da máquina virtual.
**Importante:** depois de passar em todos os testes do projeto, salve um dump (cópia) do seu banco de dados no arquivo `periodic_table.sql` bem como seu arquivo `element.sh` para poder completar a etapa 2. Haverá instruções sobre como fazer isso dentro da máquina virtual.
# --notes--
Arquivos necessários: `elements.sql` e toda a pasta `periodic_table`
Arquivos necessários: `periodic_table.sql`, `element.sh`
# --hints--

View File

@ -9,7 +9,7 @@ dashedName: build-a-bike-rental-shop
# --description--
Neste curso intermediário, você vai construir um programa de Bash interativo que armazena informações de aluguel para sua loja de aluguel de bicicletas utilizando PostgreSQL.
Neste curso de 210 aulas, você vai construir um programa de Bash interativo que armazena informações de aluguel para sua loja de aluguel de bicicletas utilizando PostgreSQL.
# --instructions--

View File

@ -9,7 +9,7 @@ dashedName: build-a-boilerplate
# --description--
Neste curso de 170 aulas, você aprenderá comandos básicos criando o boilerplate de um site usando apenas a linha de comando.
Neste curso de 170 aulas, você aprenderá comandos do terminal criando o boilerplate de um site usando apenas a linha de comando.
# --instructions--

View File

@ -7,9 +7,9 @@ dashedName: step-2
# --description--
Você já deve estar familiarizado com a tag `meta`. Ela é usada para especificar informações sobre a página como título, descrição, palavras-chave e autor.
Você já deve estar familiarizado com o elemento `meta`. Ele é usado para especificar informações sobre a página como título, descrição, palavras-chave e autor.
Dê à página uma tag `meta` com um valor apropriado para `charset`.
Dê à página um elemento `meta` com um valor apropriado para `charset`.
O atributo `charset` especifica a codificação de caracteres da página e, hoje em dia, `UTF-8` é a única codificação suportada pela maioria dos navegadores.

View File

@ -7,7 +7,7 @@ dashedName: step-3
# --description--
Continuando com as tags `meta`, uma definição de `viewport` informa ao navegador como renderizar a página. Sua inclusão melhora a acessibilidade visual no celular e a _SEO_ (otimização de mecanismos de busca).
Continuando com os elementos `meta`, uma definição de `viewport` informa ao navegador como renderizar a página. Sua inclusão melhora a acessibilidade visual no celular e a _SEO_ (otimização de mecanismos de busca).
Adicione uma definição de `viewport` com um atributo `content` detalhando a `width` (largura) e a `initial-scale` (escala inicial) da página.

View File

@ -0,0 +1,68 @@
---
id: 61329d52e5010e08d9b9d66b
title: Etapa 4
challengeType: 0
dashedName: step-4
---
# --description--
Outro elemento `meta` importante para a acessibilidade e para a SEO é a `description`. O valor do atributo `content` é usado pelos mecanismos de busca para fornecer uma descrição de sua página.
Adicione um elemento `meta` com o atributo `name` definido como `description`, e dê a ele um atributo `content`.
# --hints--
Você deve adicionar um novo elemento `meta` à `head`.
```js
assert.equal(document.querySelectorAll('meta').length, 3);
```
Você deve dar ao elemento `meta` um atributo `name` de `description`.
```js
assert.exists(document.querySelector('meta[name="description"]'));
```
Você deve dar ao elemento `meta` um atributo `content`.
```js
assert.notEmpty(document.querySelector('meta[name="description"]')?.content);
```
O valor do atributo `content` não deve ter mais de 165 caracteres. _Esse é o tamanho máximo da descrição para o Google._
```js
assert.isAtMost(document.querySelector('meta[name="description"]')?.content?.length, 165);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
--fcc-editable-region--
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="styles.css" />
</head>
--fcc-editable-region--
<body>
</body>
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
```

View File

@ -0,0 +1,63 @@
---
id: 6133acc353338c0bba9cb553
title: Etapa 5
challengeType: 0
dashedName: step-5
---
# --description--
Por fim, em `head`, o elemento `title` é útil para que os leitores de tela entendam o conteúdo de uma página. Além disso, ele é uma parte importante para a _SEO_.
Dê à sua página um `title` que seja descritivo e conciso.
# --hints--
Você deve adicionar um elemento `title` à `head`.
```js
assert.exists(document.querySelector('head > title'));
```
Você não deve permitir que o `title` seja maior do que 60 caracteres.
```js
assert.isAtMost(document.querySelector('head > title')?.textContent?.length, 60);
```
Tente ser mais descritivo com o elemento `title`. _Dica: use ao menos 15 caracteres_
```js
assert.isAtLeast(document.querySelector('head > title')?.textContent?.length, 15);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
--fcc-editable-region--
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
<link rel="stylesheet" href="styles.css" />
</head>
--fcc-editable-region--
<body>
</body>
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
```

View File

@ -0,0 +1,50 @@
---
id: 614ccc21ea91ef1736b9b578
title: Etapa 1
challengeType: 0
dashedName: step-1
---
# --description--
Boas-vindas à primeira parte do questionário com acessibilidade. Como você está se tornando um desenvolvedor HTML e CSS experiente, já iniciaremos com o boilerplate básico.
Inicie esta jornada de acessibilidade, fornecendo um atributo `lang` ao seu elemento `html`. Isto ajudará os leitores de tela a identificar o idioma da página.
# --hints--
Você deve dar ao elemento `html` um atributo `lang`. _Dica: você pode usar o valor `en` para o inglês._
```js
assert.match(code, /<html\s+lang=('|")[\w\-]+?\1\s*>/i);
// TODO: This should/could be fixed in the builder.js
// assert.notThrow(Intl.getCanonicalLocales(document.querySelector('html').lang));
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
--fcc-editable-region--
<html>
<head>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
</body>
</html>
--fcc-editable-region--
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
```

View File

@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT);
Сховище Redux повинне ініціалізуватися із `state`, що дорівнює 0.
```js
assert(store.getState() === 0);
assert(_store.getState() === 0);
```
Відправлення `incAction` у сховище Redux має збільшити `state` на 1.
@ -39,9 +39,9 @@ assert(store.getState() === 0);
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(incAction());
const incState = store.getState();
const initialState = _store.getState();
_store.dispatch(incAction());
const incState = _store.getState();
return initialState + 1 === incState;
})()
);
@ -52,9 +52,9 @@ assert(
```js
assert(
(function () {
const initialState = store.getState();
store.dispatch(decAction());
const decState = store.getState();
const initialState = _store.getState();
_store.dispatch(decAction());
const decState = _store.getState();
return initialState - 1 === decState;
})()
);
@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing
const store = null; // Define the Redux store here, passing in your reducers
```
## --after-user-code--
```js
const _store = Redux.createStore(counterReducer)
```
# --solutions--
```js