Browse Source

Reformat markdown (with prettier)

content-update
xpetit 3 years ago
parent
commit
def316d0f3
No known key found for this signature in database
GPG Key ID: 97C60669182C17A5
  1. 86
      docs/metrics.md
  2. 14
      docs/piscine-rust-curriculum.md
  3. 3
      docs/server-requirements.md
  4. 2
      subjects/abs/README.md
  5. 1
      subjects/action-reaction/README.md
  6. 2
      subjects/all/README.md
  7. 2
      subjects/atm-management-system/README.md
  8. 2
      subjects/biggie-smalls/README.md
  9. 5
      subjects/block-chain/README.md
  10. 2
      subjects/blood_types_s/README.md
  11. 1
      subjects/borrow/README.md
  12. 2
      subjects/borrow_me_the_reference/README.md
  13. 1
      subjects/bring-it-to-life/README.md
  14. 3
      subjects/change/README.md
  15. 1
      subjects/circular/README.md
  16. 1
      subjects/class-that/README.md
  17. 1
      subjects/clonernews/README.md
  18. 2
      subjects/collections/README.md
  19. 1
      subjects/concat-str/README.md
  20. 1
      subjects/currify/README.md
  21. 4
      subjects/cut-corners/README.md
  22. 1
      subjects/dr-strange/README.md
  23. 1
      subjects/elementary/README.md
  24. 28
      subjects/ephemeris/README.md
  25. 2
      subjects/filter/README.md
  26. 2
      subjects/find-expression/README.md
  27. 1
      subjects/first-words/README.md
  28. 2
      subjects/flagger/README.md
  29. 2
      subjects/flat/README.md
  30. 6
      subjects/flow/README.md
  31. 2
      subjects/for-each/README.md
  32. 5
      subjects/get-json/README.md
  33. 3
      subjects/get/README.md
  34. 4
      subjects/good-practices/README.md
  35. 4
      subjects/gougle-search/README.md
  36. 1
      subjects/greedy-url/README.md
  37. 3
      subjects/hello_rust/README.md
  38. 3
      subjects/index-of/README.md
  39. 1
      subjects/ion-out/README.md
  40. 1
      subjects/is-winner/README.md
  41. 3
      subjects/is/README.md
  42. 1
      subjects/its-a-match/README.md
  43. 1
      subjects/keep-cut/README.md
  44. 2
      subjects/keep-trying-or-giveup/README.md
  45. 1
      subjects/last-first-kiss/README.md
  46. 1
      subjects/letter-space-number/README.md
  47. 4
      subjects/make-your-game/different-maps/README.md
  48. 2
      subjects/manipulate-entries/README.md
  49. 3
      subjects/manipulate-keys/README.md
  50. 2
      subjects/manipulate-values/README.md
  51. 1
      subjects/match-cron/README.md
  52. 2
      subjects/min-max/README.md
  53. 2
      subjects/more-or-less/README.md
  54. 1
      subjects/multiplayer_fps/README.md
  55. 2
      subjects/mutability/README.md
  56. 2
      subjects/nasa/README.md
  57. 2
      subjects/primitives/README.md
  58. 1
      subjects/pyramid/README.md
  59. 8
      subjects/quad/README.md
  60. 2
      subjects/quantifiers/README.md
  61. 3
      subjects/race/README.md
  62. 2
      subjects/rebecca-black/README.md
  63. 3
      subjects/reduce/README.md
  64. 2
      subjects/repeat/README.md
  65. 1
      subjects/returns/README.md
  66. 2
      subjects/reverser/README.md
  67. 1
      subjects/road_intersection/README.md
  68. 1
      subjects/same-amount/README.md
  69. 5
      subjects/scalar/README.md
  70. 1
      subjects/select-and-style/README.md
  71. 1
      subjects/series/README.md
  72. 1
      subjects/shop/audit/README.md
  73. 2
      subjects/sign/README.md
  74. 1
      subjects/simple_hash/README.md
  75. 1
      subjects/skeleton/README.md
  76. 2
      subjects/slicer/README.md
  77. 8
      subjects/sortable/README.md
  78. 4
      subjects/system-monitor/README.md
  79. 1
      subjects/tell-it-cypher/README.md
  80. 1
      subjects/temperature_conv/README.md
  81. 1
      subjects/the-pages/README.md
  82. 2
      subjects/throttle/README.md
  83. 1
      subjects/triangle/README.md
  84. 10
      subjects/tron/README.md
  85. 3
      subjects/unbreakable/README.md
  86. 2
      subjects/unicode-technical-report-35/README.md
  87. 2
      subjects/using-filter/README.md
  88. 3
      subjects/using-map/README.md
  89. 3
      subjects/using-reduce/README.md
  90. 1
      subjects/valid-ip/README.md
  91. 1
      subjects/vowel-dots/README.md
  92. 1
      subjects/何/README.md

86
docs/metrics.md

@ -1,63 +1,65 @@
## Metrics card - Export of students' results ## Metrics card - Export of students' results
### Where to find the data ### Where to find the data
Metrics for students from a given campus can be found in the Metrics card in the Admin dashboard. Metrics for students from a given campus can be found in the Metrics card in the Admin dashboard.
### Important information ### Important information
* Data can be exported in csv and json formats
* Data is filtered by campus, exports include all historical data for that campus.
* We will later develop a feature that enables filtering information before downloading it
* Data is updated every hour
* The download link is valid for 24 hours
* We recommend sharing the downloaded document itself instead of the download link as the link contains the admin’s authorisation token
- Data can be exported in csv and json formats
- Data is filtered by campus, exports include all historical data for that campus.
- We will later develop a feature that enables filtering information before downloading it
- Data is updated every hour
- The download link is valid for 24 hours
- We recommend sharing the downloaded document itself instead of the download link as the link contains the admin’s authorisation token
### Description of the data included in the exports ### Description of the data included in the exports
Field | Example | Description | Field | Example | Description |
----- | ----- | ----- | --------------- | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
**user** | MarieMalarme | Student’s github username | **user** | MarieMalarme | Student’s github username |
**first_name** | Marie | Student’s first name | **first_name** | Marie | Student’s first name |
**last_name** | Malarme | Student’s last name | **last_name** | Malarme | Student’s last name |
**object** | who-are-you | Name of the object for which a result is given | **object** | who-are-you | Name of the object for which a result is given |
**type** | exercise | There are 3 object types: <br/> - exercise (for quests and exams) <br/> - raid <br/> - project | **type** | exercise | There are 3 object types: <br/> - exercise (for quests and exams) <br/> - raid <br/> - project |
**parent** | Quest 01 | The object’s hierarchical parent: <br/> - If the object is an exercise, the parent will be either a quest or an exam. <br/> - If the object is a raid or a project, the parent will be the module (piscine or div) | **parent** | Quest 01 | The object’s hierarchical parent: <br/> - If the object is an exercise, the parent will be either a quest or an exam. <br/> - If the object is a raid or a project, the parent will be the module (piscine or div) |
**module** | piscine-go | The part of the curriculum in which the object is included, either a piscine (piscine Go, piscine JS, piscine Rust) or the main curriculum (Div01) | **module** | piscine-go | The part of the curriculum in which the object is included, either a piscine (piscine Go, piscine JS, piscine Rust) or the main curriculum (Div01) |
**path** | /madere/piscine-go/quest-01/who-are-you | The url to that object, which outlines the path and hence the hierarchical structure to that object | **path** | /madere/piscine-go/quest-01/who-are-you | The url to that object, which outlines the path and hence the hierarchical structure to that object |
**attempts** | 2 | Number of submission attempts made by the student | **attempts** | 2 | Number of submission attempts made by the student |
**status** | succeeded | Current status of the student's work on the object: <br/> - "available" indicates that the student has started working on the object but either hasn't submitted it yet to be corrected, or is waiting for the auditing process to be completed <br/> - "succeeded" and "failed" are attributed once the object has been corrected | **status** | succeeded | Current status of the student's work on the object: <br/> - "available" indicates that the student has started working on the object but either hasn't submitted it yet to be corrected, or is waiting for the auditing process to be completed <br/> - "succeeded" and "failed" are attributed once the object has been corrected |
**xp** | 325 | Number of XPs gained by the student for succeeding | **xp** | 325 | Number of XPs gained by the student for succeeding |
**base_xp** | 325 | Maximum number of XPs the student can get for succeeding for that object | **base_xp** | 325 | Maximum number of XPs the student can get for succeeding for that object |
**grade** | 1 | The student’s score for that object is a number between 0 (failed) and 1 (succeeded). If the object is a project, the grade can be superior to 1 when the student successfully passes bonus questions | **grade** | 1 | The student’s score for that object is a number between 0 (failed) and 1 (succeeded). If the object is a project, the grade can be superior to 1 when the student successfully passes bonus questions |
**last_update** | 2020-07-27T15:39:46.368Z | Date and time of the student’s latest activity for that object | **last_update** | 2020-07-27T15:39:46.368Z | Date and time of the student’s latest activity for that object |
### Explanation of the XP and Grade calculation ### Explanation of the XP and Grade calculation
#### Exercises within quests #### Exercises within quests
* _Test mode_: automatic tester
* _XPs_: fixed value. Students get all the points when succeeding at the exercise, no matter how many attempts they made. - _Test mode_: automatic tester
* _Grade_: 0 (failure) or 1 (success) - _XPs_: fixed value. Students get all the points when succeeding at the exercise, no matter how many attempts they made.
- _Grade_: 0 (failure) or 1 (success)
#### Exercises within exams #### Exercises within exams
* _Contextual information_:
* Exams consist of many exercises which are grouped by difficulty levels. The student is randomly assigned an exercise from each level and has to succeed in order to move on to the next exercise level.
* Each exercise level has a maximum amount of XPs which grows according to the level’s difficulty.
* Exams are limited in time so students have to successfully complete as many exams as they can as fast as they can with the least amount of errors.
* _Test mode_: automatic tester
* _XPs_: variable value. Students get the maximum amount of points when they succeed at the first attempt. Each failed submission reduces the amount of XPs the student can get for that level.
* _Grade_: 0 (failure) or 1 (success)
#### Raids - _Contextual information_:
* _Test mode_: projects are evaluated by a jury panel in 2 steps: - Exams consist of many exercises which are grouped by difficulty levels. The student is randomly assigned an exercise from each level and has to succeed in order to move on to the next exercise level.
* First the jury evaluates the code through an audit, a series of pass / fail questions to be answered by the auditor. Succeeding the audit gives students a certain amount of XPs. - Each exercise level has a maximum amount of XPs which grows according to the level’s difficulty.
* The jury then interviews students and can decide to give them bonus / malus XPs based on their evaluation of the code and the students’ answers to their questions. - Exams are limited in time so students have to successfully complete as many exams as they can as fast as they can with the least amount of errors.
* _XPs_: variable value calculated as a fixed value for succeeding the project plus / minus XPs attributed by the jury at their discretion - _Test mode_: automatic tester
* _Grade_: 0 (failure) or 1 (success) - _XPs_: variable value. Students get the maximum amount of points when they succeed at the first attempt. Each failed submission reduces the amount of XPs the student can get for that level.
- _Grade_: 0 (failure) or 1 (success)
#### Projects #### Raids
* _Test mode_: audits, which are peer-to-peer evaluations based on a series of pass/fail questions to be answered by the auditor
* _XPs_: variable value. Students can get more than the maximum value of XPs if they complete bonus exercises. They get no XPs at all if they fail at least one of the questions in the audit
* _Grade_: number between 0 and 1, proportionate to the number of questions successfully passed in the audit. The grade can be higher than 1 if the student completed bonus exercises.
- _Test mode_: projects are evaluated by a jury panel in 2 steps:
- First the jury evaluates the code through an audit, a series of pass / fail questions to be answered by the auditor. Succeeding the audit gives students a certain amount of XPs.
- The jury then interviews students and can decide to give them bonus / malus XPs based on their evaluation of the code and the students’ answers to their questions.
- _XPs_: variable value calculated as a fixed value for succeeding the project plus / minus XPs attributed by the jury at their discretion
- _Grade_: 0 (failure) or 1 (success)
#### Projects
- _Test mode_: audits, which are peer-to-peer evaluations based on a series of pass/fail questions to be answered by the auditor
- _XPs_: variable value. Students can get more than the maximum value of XPs if they complete bonus exercises. They get no XPs at all if they fail at least one of the questions in the audit
- _Grade_: number between 0 and 1, proportionate to the number of questions successfully passed in the audit. The grade can be higher than 1 if the student completed bonus exercises.

14
docs/piscine-rust-curriculum.md

@ -20,7 +20,6 @@ Exercices:
- division-and-remainder | https://github.com/01-edu/public/tree/master/subjects/division-and-remainder - division-and-remainder | https://github.com/01-edu/public/tree/master/subjects/division-and-remainder
- tuples | https://github.com/01-edu/public/tree/master/subjects/tuples - tuples | https://github.com/01-edu/public/tree/master/subjects/tuples
### Quest 02-rust ### Quest 02-rust
Exercices: Exercices:
@ -36,7 +35,6 @@ Exercices:
- arrange-it | https://github.com/01-edu/public/tree/master/subjects/arrange-it - arrange-it | https://github.com/01-edu/public/tree/master/subjects/arrange-it
- tic-tac-toe | https://github.com/01-edu/public/tree/master/subjects/tic-tac-toe - tic-tac-toe | https://github.com/01-edu/public/tree/master/subjects/tic-tac-toe
### Quest 03-rust ### Quest 03-rust
Exercices: Exercices:
@ -54,13 +52,10 @@ Exercices:
- simple-hash | https://github.com/01-edu/public/tree/master/subjects/simple-hash - simple-hash | https://github.com/01-edu/public/tree/master/subjects/simple-hash
- collect | https://github.com/01-edu/public/tree/master/subjects/collect - collect | https://github.com/01-edu/public/tree/master/subjects/collect
--- ---
## Week Two ## Week Two
## Quest 04-rust ## Quest 04-rust
Exercices: Exercices:
@ -75,7 +70,6 @@ Exercices:
- error-types | https://github.com/01-edu/public/tree/master/subjects/error-types - error-types | https://github.com/01-edu/public/tree/master/subjects/error-types
- boxing-todo | https://github.com/01-edu/public/tree/master/subjects/boxing-todo - boxing-todo | https://github.com/01-edu/public/tree/master/subjects/boxing-todo
## Quest 05-rust ## Quest 05-rust
Exercices: Exercices:
@ -87,7 +81,6 @@ Exercices:
- expected-variable | https://github.com/01-edu/public/tree/master/subjects/expected-variable - expected-variable | https://github.com/01-edu/public/tree/master/subjects/expected-variable
- mobs | https://github.com/01-edu/public/tree/master/subjects/mobs - mobs | https://github.com/01-edu/public/tree/master/subjects/mobs
## Quest 06-rust ## Quest 06-rust
Exercices: Exercices:
@ -109,12 +102,10 @@ Exercices:
- delete-perfix | https://github.com/01-edu/public/tree/master/subjects/mdelete-perfix - delete-perfix | https://github.com/01-edu/public/tree/master/subjects/mdelete-perfix
- commits-stats | https://github.com/01-edu/public/tree/master/subjects/mcommits-stats - commits-stats | https://github.com/01-edu/public/tree/master/subjects/mcommits-stats
--- ---
## Week Three ## Week Three
## Quest 07-rust ## Quest 07-rust
Exercices: Exercices:
@ -126,13 +117,10 @@ Exercices:
- ref-cell | https://github.com/01-edu/public/tree/master/subjects/ref-cell - ref-cell | https://github.com/01-edu/public/tree/master/subjects/ref-cell
- drop-the-thread | https://github.com/01-edu/public/tree/master/subjects/drop-the-thread - drop-the-thread | https://github.com/01-edu/public/tree/master/subjects/drop-the-thread
## Quest 08-rust ## Quest 08-rust
Exercices: Exercices:
- closures | https://github.com/01-edu/public/tree/master/subjects/closures - closures | https://github.com/01-edu/public/tree/master/subjects/closures
- sales | https://github.com/01-edu/public/tree/master/subjects/sales - sales | https://github.com/01-edu/public/tree/master/subjects/sales
- adding | https://github.com/01-edu/public/tree/master/subjects/adding - adding | https://github.com/01-edu/public/tree/master/subjects/adding
@ -144,12 +132,10 @@ Exercices:
- step-iterator | https://github.com/01-edu/public/tree/master/subjects/step-iterator - step-iterator | https://github.com/01-edu/public/tree/master/subjects/step-iterator
- project-motion | https://github.com/01-edu/public/tree/master/subjects/project-motion - project-motion | https://github.com/01-edu/public/tree/master/subjects/project-motion
## Quest 09-rust ## Quest 09-rust
Exercices: Exercices:
- stars | https://github.com/01-edu/public/tree/master/subjects/stars - stars | https://github.com/01-edu/public/tree/master/subjects/stars
- ordinal | https://github.com/01-edu/public/tree/master/subjects/ordinal - ordinal | https://github.com/01-edu/public/tree/master/subjects/ordinal
- pangram | https://github.com/01-edu/public/tree/master/subjects/pangram - pangram | https://github.com/01-edu/public/tree/master/subjects/pangram

3
docs/server-requirements.md

@ -1,6 +1,7 @@
# Server requirements # Server requirements
Features required : Features required :
- Dedicated hardware - Dedicated hardware
- Linux compatibility - Linux compatibility
- UEFI - UEFI
@ -11,4 +12,4 @@ Features required :
| --------- | --------------------------- | | --------- | --------------------------- |
| Processor | 12 threads x86-64 (64 bits) | | Processor | 12 threads x86-64 (64 bits) |
| Memory | 16 GB DDR4 | | Memory | 16 GB DDR4 |
| Disk | 2 * 500 GB SSD | | Disk | 2 \* 500 GB SSD |

2
subjects/abs/README.md

@ -10,14 +10,12 @@ Create the `abs` function that takes one number argument
and returns its absolute value. and returns its absolute value.
You are not allowed to use `Math.abs`, make your own. You are not allowed to use `Math.abs`, make your own.
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/functions.js](https://nan-academy.github.io/js-training/examples/functions.js) - [nan-academy.github.io/js-training/examples/functions.js](https://nan-academy.github.io/js-training/examples/functions.js)
- [nan-academy.github.io/js-training/examples/ternary.js](https://nan-academy.github.io/js-training/examples/ternary.js) - [nan-academy.github.io/js-training/examples/ternary.js](https://nan-academy.github.io/js-training/examples/ternary.js)
- [devdocs.io/javascript/global_objects/math/abs](https://devdocs.io/javascript/global_objects/math/abs) - [devdocs.io/javascript/global_objects/math/abs](https://devdocs.io/javascript/global_objects/math/abs)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

1
subjects/action-reaction/README.md

@ -3,6 +3,7 @@
### Resources ### Resources
We provide you with some content to get started smoothly, check it out! We provide you with some content to get started smoothly, check it out!
- Video [querySelector](https://www.youtube.com/watch?v=m34qd7aGMBo&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=12) - Video [querySelector](https://www.youtube.com/watch?v=m34qd7aGMBo&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=12)
- Video [DOM JS - Add an event listener to an element](https://www.youtube.com/watch?v=ydRv338Fl8Y) - Video [DOM JS - Add an event listener to an element](https://www.youtube.com/watch?v=ydRv338Fl8Y)
- Video [DOM JS - Set an element's properties](https://www.youtube.com/watch?v=4O6zSVR0ufw&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=14) - Video [DOM JS - Set an element's properties](https://www.youtube.com/watch?v=4O6zSVR0ufw&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=14)

2
subjects/all/README.md

@ -5,13 +5,11 @@
Create a function `all` that works like `Promise.all` but with objects. Create a function `all` that works like `Promise.all` but with objects.
(instead of arrays) (instead of arrays)
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/promise.js](https://nan-academy.github.io/js-training/examples/promise.js) - [nan-academy.github.io/js-training/examples/promise.js](https://nan-academy.github.io/js-training/examples/promise.js)
- [devdocs.io/javascript/global_objects/promise/all](https://devdocs.io/javascript/global_objects/promise/all) - [devdocs.io/javascript/global_objects/promise/all](https://devdocs.io/javascript/global_objects/promise/all)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

2
subjects/atm-management-system/README.md

@ -20,7 +20,7 @@ You will be provided with an ATM management system where users can do the follow
- Make transactions - Make transactions
> The application provided will just handle the **login**, the **creation of new accounts** and **checking the list of owned accounts**. The rest of the features must > The application provided will just handle the **login**, the **creation of new accounts** and **checking the list of owned accounts**. The rest of the features must
be implemented by yourself. > be implemented by yourself.
### File System ### File System

2
subjects/biggie-smalls/README.md

@ -3,10 +3,10 @@
### Instructions ### Instructions
Create 2 variables Create 2 variables
- `smalls` with the smallest possible `number` value - `smalls` with the smallest possible `number` value
- `biggie` with the greatest possible `number` value - `biggie` with the greatest possible `number` value
### Notions ### Notions
- [devdocs.io/javascript-number](https://devdocs.io/javascript-number/) - [devdocs.io/javascript-number](https://devdocs.io/javascript-number/)

5
subjects/block-chain/README.md

@ -5,11 +5,13 @@
Create a `blockChain` that create a block in your very own block chain. Create a `blockChain` that create a block in your very own block chain.
the function takes 2 arguments: the function takes 2 arguments:
- `data` any valid JSON data - `data` any valid JSON data
- `prev` the previous block, if no block are given it should use the - `prev` the previous block, if no block are given it should use the
genesis block: `{ index: 0, hash: '0' }` genesis block: `{ index: 0, hash: '0' }`
A block must have the following properties: A block must have the following properties:
- `index` - `index`
- `hash` a computed hash using the concatenation of the `index`, `hash` - `hash` a computed hash using the concatenation of the `index`, `hash`
and stringified `data` and hashing all of it using the provided `hashCode`. and stringified `data` and hashing all of it using the provided `hashCode`.
@ -17,7 +19,6 @@ A block must have the following properties:
- `prev` the previous block - `prev` the previous block
- `chain` a function that takes a new `data` and create the next block with it. - `chain` a function that takes a new `data` and create the next block with it.
### Examples ### Examples
```js ```js
@ -48,12 +49,10 @@ console.log(chain.index) // -> 5
console.log(fork.index) // -> 5 console.log(fork.index) // -> 5
``` ```
### Notions ### Notions
- [devdocs.io/javascript/global_objects/json/stringify](https://devdocs.io/javascript/global_objects/json/stringify) - [devdocs.io/javascript/global_objects/json/stringify](https://devdocs.io/javascript/global_objects/json/stringify)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

2
subjects/blood_types_s/README.md

@ -5,7 +5,7 @@
Use the following table to define the methods asked: Use the following table to define the methods asked:
| Blood Types | Donate Blood to | Receive Blood From | | Blood Types | Donate Blood to | Receive Blood From |
|-------------|------------------|--------------------| | ----------- | ---------------- | ------------------ |
| A+ | A+, AB+ | A+, A-, O+, O- | | A+ | A+, AB+ | A+, A-, O+, O- |
| O+ | O+, A+, B+, AB+ | O+, O- | | O+ | O+, A+, B+, AB+ | O+, O- |
| B+ | O+, O- | B+, B-, O+, O- | | B+ | O+, O- | B+, B-, O+, O- |

1
subjects/borrow/README.md

@ -10,6 +10,7 @@ Complete the signature and the body of the `str_len` **function** that receives
pub fn str_len(s: ) -> usize { pub fn str_len(s: ) -> usize {
} }
``` ```
### Notions ### Notions
[Primitive Type str](https://doc.rust-lang.org/std/primitive.str.html) [Primitive Type str](https://doc.rust-lang.org/std/primitive.str.html)

2
subjects/borrow_me_the_reference/README.md

@ -9,6 +9,7 @@ Create the following functions :
- `delete_and_backspace`, imagine that the `-` represents the `backspace key` and the `+` represents the `delete key`, this function must receive a borrowed string and turn this string into the string that applies the `backspaces` and the `deletes`. - `delete_and_backspace`, imagine that the `-` represents the `backspace key` and the `+` represents the `delete key`, this function must receive a borrowed string and turn this string into the string that applies the `backspaces` and the `deletes`.
- For example: - For example:
- "helll-o" turns into "hello" - "helll-o" turns into "hello"
- "he+lllo" turns into "hello" - "he+lllo" turns into "hello"
@ -30,7 +31,6 @@ pub fn is_correct(v: &mut Vec<&str>) -> usize {
- https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html - https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html
- https://docs.rs/meval/0.2.0/meval/ - https://docs.rs/meval/0.2.0/meval/
### Usage ### Usage
Here is a program to test your function Here is a program to test your function

1
subjects/bring-it-to-life/README.md

@ -3,6 +3,7 @@
### Resources ### Resources
We provide you with some content to get started smoothly, check it out! We provide you with some content to get started smoothly, check it out!
- Video [Link a JS script to your HTML file](https://www.youtube.com/watch?v=jMvsQm-p1gM&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=7) - Video [Link a JS script to your HTML file](https://www.youtube.com/watch?v=jMvsQm-p1gM&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=7)
- Video [DOM JS - getElementById](https://www.youtube.com/watch?v=34kAR8yBtDM&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=8) - Video [DOM JS - getElementById](https://www.youtube.com/watch?v=34kAR8yBtDM&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=8)
- Video [DOM JS - Set an element's inline style](https://www.youtube.com/watch?v=pxlYKvju1z8&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=15) - Video [DOM JS - Set an element's inline style](https://www.youtube.com/watch?v=pxlYKvju1z8&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=15)

3
subjects/change/README.md

@ -3,6 +3,7 @@
### Instructions ### Instructions
Create 2 functions: Create 2 functions:
- `get`: a function that takes a key and return the corresponding - `get`: a function that takes a key and return the corresponding
value from the sourceObject value from the sourceObject
@ -10,7 +11,6 @@ Create 2 functions:
value for the corresponding property of the sourceObject value for the corresponding property of the sourceObject
and return the set value and return the set value
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/functions.js](https://nan-academy.github.io/js-training/examples/functions.js) - [nan-academy.github.io/js-training/examples/functions.js](https://nan-academy.github.io/js-training/examples/functions.js)
@ -18,7 +18,6 @@ Create 2 functions:
- [nan-academy.github.io/js-training/examples/get.js](https://nan-academy.github.io/js-training/examples/get.js) - [nan-academy.github.io/js-training/examples/get.js](https://nan-academy.github.io/js-training/examples/get.js)
- [nan-academy.github.io/js-training/examples/set.js](https://nan-academy.github.io/js-training/examples/set.js) - [nan-academy.github.io/js-training/examples/set.js](https://nan-academy.github.io/js-training/examples/set.js)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

1
subjects/circular/README.md

@ -5,7 +5,6 @@
Create an object named `circular` that has a property named `circular` with Create an object named `circular` that has a property named `circular` with
itself as the value itself as the value
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/data-structures.js](https://nan-academy.github.io/js-training/examples/data-structures.js) - [nan-academy.github.io/js-training/examples/data-structures.js](https://nan-academy.github.io/js-training/examples/data-structures.js)

1
subjects/class-that/README.md

@ -3,6 +3,7 @@
### Resources ### Resources
We provide you with some content to get started smoothly, check it out! We provide you with some content to get started smoothly, check it out!
- Video [CSS - Set & style with CSS class](https://www.youtube.com/watch?v=-U397k4VloU&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=6) - Video [CSS - Set & style with CSS class](https://www.youtube.com/watch?v=-U397k4VloU&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=6)
### Instructions ### Instructions

1
subjects/clonernews/README.md

@ -19,7 +19,6 @@ You must handle at least:
Post and comments must be ordered by newest post to oldest. Post and comments must be ordered by newest post to oldest.
You must not load all posts at once. You must be able to load posts when ever the users need to see more posts. This can be done with the help of [event](https://developer.mozilla.org/en-US/docs/Web/Events). You must not load all posts at once. You must be able to load posts when ever the users need to see more posts. This can be done with the help of [event](https://developer.mozilla.org/en-US/docs/Web/Events).
[Live Data](https://github.com/HackerNews/API#live-data) : is one of the features from this Hacker News API, you can handle requests so that the news you provide are updated. [Live Data](https://github.com/HackerNews/API#live-data) : is one of the features from this Hacker News API, you can handle requests so that the news you provide are updated.
- You must have a section that present the newest information. You will have to notify the user at least every 5 seconds, whenever the live data is updated. In other words, after every 5 seconds if a change was made in the live data, you have to notify the user. - You must have a section that present the newest information. You will have to notify the user at least every 5 seconds, whenever the live data is updated. In other words, after every 5 seconds if a change was made in the live data, you have to notify the user.

2
subjects/collections/README.md

@ -19,7 +19,6 @@ Write a bunch of function to move from one type to another
and finally write a function `superTypeOf` that unlike `typeof` return and finally write a function `superTypeOf` that unlike `typeof` return
a different value for advanced types like `Map` and `Set` a different value for advanced types like `Map` and `Set`
### Examples ### Examples
```js ```js
@ -61,7 +60,6 @@ superTypeOf(undefined) // -> 'undefined'
superTypeOf(superTypeOf) // -> 'Function' superTypeOf(superTypeOf) // -> 'Function'
``` ```
### Notions ### Notions
- [devdocs.io/javascript/operators/typeof](https://devdocs.io/javascript/operators/typeof) - [devdocs.io/javascript/operators/typeof](https://devdocs.io/javascript/operators/typeof)

1
subjects/concat-str/README.md

@ -4,7 +4,6 @@
Create a `concatStr` function that takes 2 arguments and concatenate them Create a `concatStr` function that takes 2 arguments and concatenate them
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/functions.js](https://nan-academy.github.io/js-training/examples/functions.js) - [nan-academy.github.io/js-training/examples/functions.js](https://nan-academy.github.io/js-training/examples/functions.js)

1
subjects/currify/README.md

@ -10,7 +10,6 @@ example:
const mult2 = (el1, el2) => el1 * el2 const mult2 = (el1, el2) => el1 * el2
console.log(mult2(2, 2)) // result expected 4 console.log(mult2(2, 2)) // result expected 4
const mult2Curried = currify(mult2) const mult2Curried = currify(mult2)
console.log(mult2Curried(2)(2)) // result expected 4 console.log(mult2Curried(2)(2)) // result expected 4

4
subjects/cut-corners/README.md

@ -3,21 +3,21 @@
### Instructions ### Instructions
Create a function for each rounding math functions: Create a function for each rounding math functions:
- round (like `Math.round`) - round (like `Math.round`)
- ceil (like `Math.ceil`) - ceil (like `Math.ceil`)
- floor (like `Math.floor`) - floor (like `Math.floor`)
- trunc (like `Math.trunc`) - trunc (like `Math.trunc`)
Some restrictions apply: Some restrictions apply:
- You may not use strings conversion to do it - You may not use strings conversion to do it
- No bitwise operator - No bitwise operator
### Notions ### Notions
- [devdocs.io/javascript/global_objects/math](https://devdocs.io/javascript/global_objects/math) - [devdocs.io/javascript/global_objects/math](https://devdocs.io/javascript/global_objects/math)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

1
subjects/dr-strange/README.md

@ -15,7 +15,6 @@ it can go backwards or forwards in time.
You will have a function that takes a date and you will pass 3 more parameters to change You will have a function that takes a date and you will pass 3 more parameters to change
the hour, minute and seconds. the hour, minute and seconds.
### Example ### Example
```js ```js

1
subjects/elementary/README.md

@ -3,6 +3,7 @@
### Instructions ### Instructions
Create 3 functions: Create 3 functions:
- `multiply` that act like the `*` operator without using it - `multiply` that act like the `*` operator without using it
- `divide` that do an integer division without using `/` - `divide` that do an integer division without using `/`
- `modulo` that act like the `%` operator without using it - `modulo` that act like the `%` operator without using it

28
subjects/ephemeris/README.md

@ -41,48 +41,48 @@ student@ubuntu:~/ephemeris$ npm install puppeteer
Then, create a new file `ephemeris.mjs` in which you will use the puppeteer module: Then, create a new file `ephemeris.mjs` in which you will use the puppeteer module:
```js ```js
import puppeteer from "puppeteer"; import puppeteer from 'puppeteer'
const browser = await puppeteer.launch({ const browser = await puppeteer.launch({
headless: false, // to be commented or removed when project is submitted headless: false, // to be commented or removed when project is submitted
devtools: true, // to be commented or removed when project is submitted devtools: true, // to be commented or removed when project is submitted
}); })
const [page] = await browser.pages(); const [page] = await browser.pages()
// actions... // actions...
await browser.close(); // you can comment this during you tests await browser.close() // you can comment this during you tests
process.exit(0); // terminate the process as succeeded (you can comment this during you tests) process.exit(0) // terminate the process as succeeded (you can comment this during you tests)
``` ```
**Puppeteer helper - script model** **Puppeteer helper - script model**
```javascript ```javascript
// navigate to a specific url // navigate to a specific url
await page.goto("https://www.google.com/"); await page.goto('https://www.google.com/')
// wait an element in the page // wait an element in the page
await page.waitForSelector("input#myId"); await page.waitForSelector('input#myId')
// find an element in the page: // find an element in the page:
const button = await page.$("button#myId"); const button = await page.$('button#myId')
// check the element was found // check the element was found
if (button) { if (button) {
// use the element // use the element
await button.click(); await button.click()
} else { } else {
// do something else: for example treat the exception as an error // do something else: for example treat the exception as an error
console.error("Button not found !"); console.error('Button not found !')
// and terminate the process as failed (code 1) // and terminate the process as failed (code 1)
process.exit(1); process.exit(1)
} }
// navigate in a website // navigate in a website
await Promise.all([page.waitForNavigation(), page.click("div#myId")]); await Promise.all([page.waitForNavigation(), page.click('div#myId')])
// get the textContent of an element // get the textContent of an element
const myText = await page.$eval("div#myId", (elem) => elem.textContent); const myText = await page.$eval('div#myId', (elem) => elem.textContent)
// type something in an input // type something in an input
await page.type(`input#myId`, "some text"); await page.type(`input#myId`, 'some text')
``` ```
### Optional ### Optional

2
subjects/filter/README.md

@ -11,14 +11,12 @@ and that works like the reject function from lodash.
- Create a `partition` function that takes an array as first argument, a function as second, - Create a `partition` function that takes an array as first argument, a function as second,
and that works like the partition function from lodash. and that works like the partition function from lodash.
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/filter](https://devdocs.io/javascript/global_objects/array/filter) - [devdocs.io/javascript/global_objects/array/filter](https://devdocs.io/javascript/global_objects/array/filter)
- [lodash.com/docs/4.17.15#reject](https://lodash.com/docs/4.17.15#reject) - [lodash.com/docs/4.17.15#reject](https://lodash.com/docs/4.17.15#reject)
- [lodash.com/docs/4.17.15#partition](https://lodash.com/docs/4.17.15#partition) - [lodash.com/docs/4.17.15#partition](https://lodash.com/docs/4.17.15#partition)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

2
subjects/find-expression/README.md

@ -13,13 +13,11 @@ It will look something like this `1 *2 *2 +4`
- If the number can not be reached you should return `undefined` - If the number can not be reached you should return `undefined`
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/loops.js](https://nan-academy.github.io/js-training/examples/loops.js) - [nan-academy.github.io/js-training/examples/loops.js](https://nan-academy.github.io/js-training/examples/loops.js)
- [nan-academy.github.io/js-training/examples/recursion.js](https://nan-academy.github.io/js-training/examples/recursion.js) - [nan-academy.github.io/js-training/examples/recursion.js](https://nan-academy.github.io/js-training/examples/recursion.js)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

1
subjects/first-words/README.md

@ -3,6 +3,7 @@
### Resources ### Resources
We provide you with some content to get started smoothly, check it out! We provide you with some content to get started smoothly, check it out!
- Video [DOM JS - createElement & append](https://www.youtube.com/watch?v=J-A_pqTqGBU&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=13) - Video [DOM JS - createElement & append](https://www.youtube.com/watch?v=J-A_pqTqGBU&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=13)
- Video [Set an element's className](https://www.youtube.com/watch?v=h3b7H1ZKvFE&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=16) - Video [Set an element's className](https://www.youtube.com/watch?v=h3b7H1ZKvFE&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=16)
- Video [DOM JS - Set an element's properties](https://www.youtube.com/watch?v=4O6zSVR0ufw&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=14) - Video [DOM JS - Set an element's properties](https://www.youtube.com/watch?v=4O6zSVR0ufw&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=14)

2
subjects/flagger/README.md

@ -6,6 +6,7 @@ Create a function called `flags` that receives an object and returns
the specific aliases and descriptions from the properties of that object. the specific aliases and descriptions from the properties of that object.
The `help` flag: The `help` flag:
- Should be present in the output by default. - Should be present in the output by default.
- When not present in the input, it should return the description of all flags. - When not present in the input, it should return the description of all flags.
But when present it specifies the descriptions of the flags that are passed to help. (ex: `help: ['divide']`) But when present it specifies the descriptions of the flags that are passed to help. (ex: `help: ['divide']`)
@ -19,6 +20,7 @@ The `help` flag:
help: ['divide'] help: ['divide']
} }
``` ```
and outputs : and outputs :
```js ```js

2
subjects/flat/README.md

@ -4,12 +4,10 @@
Create the `flat` functions that works like the `.flat` array method Create the `flat` functions that works like the `.flat` array method
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/flat](https://devdocs.io/javascript/global_objects/array/flat) - [devdocs.io/javascript/global_objects/array/flat](https://devdocs.io/javascript/global_objects/array/flat)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

6
subjects/flow/README.md

@ -5,20 +5,16 @@
Create the function `flow` that will works as the \_.flow([funcs]) Create the function `flow` that will works as the \_.flow([funcs])
from lodash. from lodash.
### Example ### Example
```js ```js
const square = (nbr) => nbr * nbr
const square = nbr => nbr * nbr
const add2Numbers = (nbr1, nbr2) => nbr1 + nbr2 const add2Numbers = (nbr1, nbr2) => nbr1 + nbr2
const flowedFunctions = flow([add2Numbers, square]) const flowedFunctions = flow([add2Numbers, square])
flowedFunctions(2, 3) // -> 25 flowedFunctions(2, 3) // -> 25
``` ```
### Notions ### Notions
- [lodash.com/docs/4.17.15#flow](https://lodash.com/docs/4.17.15#flow) - [lodash.com/docs/4.17.15#flow](https://lodash.com/docs/4.17.15#flow)

2
subjects/for-each/README.md

@ -5,12 +5,10 @@
Create a `forEach` function that takes an array as first argument, a function as second, Create a `forEach` function that takes an array as first argument, a function as second,
and that works like the method .forEach and that works like the method .forEach
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/foreach](https://devdocs.io/javascript/global_objects/array/foreach) - [devdocs.io/javascript/global_objects/array/foreach](https://devdocs.io/javascript/global_objects/array/foreach)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

5
subjects/get-json/README.md

@ -5,8 +5,9 @@
In this exercise, we will focus on building complex async flows with promises. In this exercise, we will focus on building complex async flows with promises.
Create a `getJSON` function that takes 2 parameters: Create a `getJSON` function that takes 2 parameters:
- `path`, that will be the url called by your function - `path`, that will be the url called by your function
- `params` *optional*, that will be the search parameters appended to your url - `params` _optional_, that will be the search parameters appended to your url
`getJSON` must construct a valid url with the `path` and stringified `params` `getJSON` must construct a valid url with the `path` and stringified `params`
and call `fetch` with it. and call `fetch` with it.
@ -16,10 +17,10 @@ the response status message.
The response body must then be read and parsed from json. The response body must then be read and parsed from json.
The parsed object contains one of those 2 properties: The parsed object contains one of those 2 properties:
- `"data"` the actual data to return - `"data"` the actual data to return
- `"error"` the error message to throw - `"error"` the error message to throw
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/promise.js](https://nan-academy.github.io/js-training/examples/promise.js) - [nan-academy.github.io/js-training/examples/promise.js](https://nan-academy.github.io/js-training/examples/promise.js)

3
subjects/get/README.md

@ -4,13 +4,14 @@
Create the `get` function. Create the `get` function.
It takes 2 arguments: It takes 2 arguments:
- `src` an object - `src` an object
- `path` a string - `path` a string
And returns the value at the given string path. And returns the value at the given string path.
### Example: ### Example:
```js ```js
const src = { nested: { key: 'peekaboo' } } const src = { nested: { key: 'peekaboo' } }
const path = 'nested.key' const path = 'nested.key'

4
subjects/good-practices/README.md

@ -65,11 +65,11 @@ Removing layout can be done using transform:
```js ```js
// bad // bad
// this will trigger the layout to recalculate everything and repaint it again // this will trigger the layout to recalculate everything and repaint it again
box.style.left = `${x * 100}px`; box.style.left = `${x * 100}px`
// good // good
// this way its possible to lose the layout // this way its possible to lose the layout
box.style.transform = `translateX(${x * 100}px)`; box.style.transform = `translateX(${x * 100}px)`
``` ```
It is possible to remove painting by adding a layer: It is possible to remove painting by adding a layer:

4
subjects/gougle-search/README.md

@ -3,6 +3,7 @@
### Instructions ### Instructions
Create the `queryServers` function, that takes 2 arguments: Create the `queryServers` function, that takes 2 arguments:
- `serverName` a string of the name of the server - `serverName` a string of the name of the server
- `q` a string of the query given by the user - `q` a string of the query given by the user
@ -18,7 +19,6 @@ queryServers('pouet', 'hello+world')
// -> getJSON('/pouet_backup?q=hello+world') // -> getJSON('/pouet_backup?q=hello+world')
``` ```
Create a `gougleSearch` function that takes a single query argument. Create a `gougleSearch` function that takes a single query argument.
It must call `queryServers` in concurrently on 3 servers: It must call `queryServers` in concurrently on 3 servers:
`'web'`, `'image'` and `'video'`. `'web'`, `'image'` and `'video'`.
@ -28,13 +28,11 @@ A timeout of 80milliseconds must be set for the whole operation.
You must return the value from each servers in an object You must return the value from each servers in an object
using a the server name as key. using a the server name as key.
### Notions ### Notions
- [devdocs.io/javascript/global_objects/promise/race](https://devdocs.io/javascript/global_objects/promise/race) - [devdocs.io/javascript/global_objects/promise/race](https://devdocs.io/javascript/global_objects/promise/race)
- [devdocs.io/javascript/global_objects/promise/all](https://devdocs.io/javascript/global_objects/promise/all) - [devdocs.io/javascript/global_objects/promise/all](https://devdocs.io/javascript/global_objects/promise/all)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

1
subjects/greedy-url/README.md

@ -10,7 +10,6 @@ Write 3 functions :
You can search for greedy quantifiers for help You can search for greedy quantifiers for help
### Notions ### Notions
- [github.com/ziishaned/learn-regex](https://github.com/ziishaned/learn-regex) - [github.com/ziishaned/learn-regex](https://github.com/ziishaned/learn-regex)

3
subjects/hello_rust/README.md

@ -47,9 +47,11 @@ Once this is done the git clone command should work now.
Once you repository is cloned, Once you repository is cloned,
create and edit the .gitignore file in your repository and add this line: create and edit the .gitignore file in your repository and add this line:
```console ```console
**/target/* **/target/*
``` ```
The goal of this setup is to avoid any binary files to be pushed in your gitea accidentaly. The goal of this setup is to avoid any binary files to be pushed in your gitea accidentaly.
Do not forget to push it to your repository. Do not forget to push it to your repository.
@ -89,6 +91,7 @@ You can test it with the below command inside the folder of your exercise.
```console ```console
cargo run cargo run
``` ```
This command will compile, and run the binary. This command will compile, and run the binary.
#### 4- return your solution #### 4- return your solution

3
subjects/index-of/README.md

@ -3,6 +3,7 @@
### Instructions ### Instructions
Create 3 functions: Create 3 functions:
- `indexOf` that returns the index of the first occurence of a value - `indexOf` that returns the index of the first occurence of a value
- `lastIndexOf` that returns the index of the last occurence of a value - `lastIndexOf` that returns the index of the last occurence of a value
- `includes` that returns true if the value was found in the array - `includes` that returns true if the value was found in the array
@ -13,14 +14,12 @@ Create 3 functions:
> both `indexOf` and `lastIndexOf` take an additional `fromIndex` argument > both `indexOf` and `lastIndexOf` take an additional `fromIndex` argument
> that allows you to begin searching from a specific index. > that allows you to begin searching from a specific index.
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/indexof](https://devdocs.io/javascript/global_objects/array/indexof) - [devdocs.io/javascript/global_objects/array/indexof](https://devdocs.io/javascript/global_objects/array/indexof)
- [devdocs.io/javascript/global_objects/array/lastindexof](https://devdocs.io/javascript/global_objects/array/lastindexof) - [devdocs.io/javascript/global_objects/array/lastindexof](https://devdocs.io/javascript/global_objects/array/lastindexof)
- [devdocs.io/javascript/global_objects/array/includes](https://devdocs.io/javascript/global_objects/array/includes) - [devdocs.io/javascript/global_objects/array/includes](https://devdocs.io/javascript/global_objects/array/includes)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

1
subjects/ion-out/README.md

@ -5,7 +5,6 @@
Make a function `ionOut` that receives a string and returns an array with every Make a function `ionOut` that receives a string and returns an array with every
word containing 'ion' following a t, without the 'ion'. word containing 'ion' following a t, without the 'ion'.
### Notions ### Notions
- [github.com/ziishaned/learn-regex#4-lookarounds](https://github.com/ziishaned/learn-regex#4-lookarounds) - [github.com/ziishaned/learn-regex#4-lookarounds](https://github.com/ziishaned/learn-regex#4-lookarounds)

1
subjects/is-winner/README.md

@ -19,7 +19,6 @@ less than 3 times
If the country was champion in more than one year, the years should be If the country was champion in more than one year, the years should be
displayed like : '1000, 1004, 1008'. The same goes for the results displayed like : '1000, 1004, 1008'. The same goes for the results
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

3
subjects/is/README.md

@ -3,6 +3,7 @@
### Instructions ### Instructions
Add new function properties to the object `is` to check a value type Add new function properties to the object `is` to check a value type
- `is.num` value is a number - `is.num` value is a number
- `is.nan` value is NaN - `is.nan` value is NaN
- `is.str` value is a string - `is.str` value is a string
@ -15,7 +16,6 @@ Add new function properties to the object `is` to check a value type
- `is.truthy` value is truthy - `is.truthy` value is truthy
- `is.falsy` value is falsy - `is.falsy` value is falsy
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/primitive-and-operators](https://nan-academy.github.io/js-training/examples/primitive-and-operators.js) - [nan-academy.github.io/js-training/examples/primitive-and-operators](https://nan-academy.github.io/js-training/examples/primitive-and-operators.js)
@ -23,7 +23,6 @@ Add new function properties to the object `is` to check a value type
- [developer.mozilla.org/en-US/docs/Glossary/Truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy) - [developer.mozilla.org/en-US/docs/Glossary/Truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy)
- [developer.mozilla.org/en-US/docs/Glossary/Falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) - [developer.mozilla.org/en-US/docs/Glossary/Falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

1
subjects/its-a-match/README.md

@ -15,7 +15,6 @@ Create 4 regular expression in variables:
- `beginEnd` matches with the expression 'hi', - `beginEnd` matches with the expression 'hi',
only when it is in the beginning and the end. only when it is in the beginning and the end.
### Notions ### Notions
- [github.com/ziishaned/learn-regex#28-anchors](https://github.com/ziishaned/learn-regex#28-anchors) - [github.com/ziishaned/learn-regex#28-anchors](https://github.com/ziishaned/learn-regex#28-anchors)

1
subjects/keep-cut/README.md

@ -20,7 +20,6 @@ and return the string only keeping the 2 last characters.
Create a `keepFirstLast` function that takes a string as parameter Create a `keepFirstLast` function that takes a string as parameter
and only keep 2 first characters and 2 last characters. and only keep 2 first characters and 2 last characters.
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/slice](https://devdocs.io/javascript/global_objects/array/slice) - [devdocs.io/javascript/global_objects/array/slice](https://devdocs.io/javascript/global_objects/array/slice)

2
subjects/keep-trying-or-giveup/README.md

@ -3,6 +3,7 @@
### Instructions ### Instructions
Create a `retry` function, that takes 2 arguments Create a `retry` function, that takes 2 arguments
- a `count` indicates maximum amount of retries - a `count` indicates maximum amount of retries
- an async `callback`, that will be called on every try - an async `callback`, that will be called on every try
@ -15,6 +16,7 @@ exceeds `count` then throw an `Error`.
> the initial call + 3 retries. > the initial call + 3 retries.
Create a `timeout` function, that takes 2 arguments Create a `timeout` function, that takes 2 arguments
- a `delay` indicates maximum wait time - a `delay` indicates maximum wait time
- an async `callback`, that will be called - an async `callback`, that will be called

1
subjects/last-first-kiss/README.md

@ -13,7 +13,6 @@ Create 3 functions:
- a `kiss` function that returns an array of 2 elements - a `kiss` function that returns an array of 2 elements
the last and the first element, in that order the last and the first element, in that order
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/data-structures.js](https://nan-academy.github.io/js-training/examples/data-structures.js) - [nan-academy.github.io/js-training/examples/data-structures.js](https://nan-academy.github.io/js-training/examples/data-structures.js)

1
subjects/letter-space-number/README.md

@ -6,7 +6,6 @@ Make a function called `letterSpaceNumber` that receives a string and returns an
array with every instance of a letter, followed by a space, followed by a number array with every instance of a letter, followed by a space, followed by a number
only if that number has only one digit and is not followed by any letter. only if that number has only one digit and is not followed by any letter.
### Notions ### Notions
- [github.com/ziishaned/learn-regex#3-shorthand-character-sets](https://github.com/ziishaned/learn-regex#3-shorthand-character-sets) - [github.com/ziishaned/learn-regex#3-shorthand-character-sets](https://github.com/ziishaned/learn-regex#3-shorthand-character-sets)

4
subjects/make-your-game/different-maps/README.md

@ -16,11 +16,11 @@ To store efficiently the **tile images**, you should group them all in a single
To generate a specific tile image, you must select a section of this big image and render it into the game. To generate a specific tile image, you must select a section of this big image and render it into the game.
This will help with performance and memory usage. This will help with performance and memory usage.
---- ---
If you plan to use scrolling tile maps it can be pretty costly on [rendering performance](https://developer.mozilla.org/en-US/docs/Games/Techniques/Tilemaps#Performance). So you must take special caution if you do so. One of the best ways is to render only the tiles that will be visible to the player using opacity or other methods. Sometime this is not enough. If you plan to use scrolling tile maps it can be pretty costly on [rendering performance](https://developer.mozilla.org/en-US/docs/Games/Techniques/Tilemaps#Performance). So you must take special caution if you do so. One of the best ways is to render only the tiles that will be visible to the player using opacity or other methods. Sometime this is not enough.
---- ---
A tile map can be mapped to a logical grid, helping with the map display and the game logic. Here is an example of a tile map data structure: A tile map can be mapped to a logical grid, helping with the map display and the game logic. Here is an example of a tile map data structure:

2
subjects/manipulate-entries/README.md

@ -20,7 +20,6 @@ Create 3 other functions that use your previously create functions:
What the functions will take as argument is an object cart which contains the food rations. All the nutrition in the nutritionDB object are measured per 100 grams. What the functions will take as argument is an object cart which contains the food rations. All the nutrition in the nutritionDB object are measured per 100 grams.
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/filter](https://devdocs.io/javascript/global_objects/array/filter) - [devdocs.io/javascript/global_objects/array/filter](https://devdocs.io/javascript/global_objects/array/filter)
@ -29,7 +28,6 @@ What the functions will take as argument is an object cart which contains the fo
- [devdocs.io/javascript/global_objects/object/entries](https://devdocs.io/javascript/global_objects/object/entries) - [devdocs.io/javascript/global_objects/object/entries](https://devdocs.io/javascript/global_objects/object/entries)
- [devdocs.io/javascript/global_objects/object/fromentries](https://devdocs.io/javascript/global_objects/object/fromentries) - [devdocs.io/javascript/global_objects/object/fromentries](https://devdocs.io/javascript/global_objects/object/fromentries)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

3
subjects/manipulate-keys/README.md

@ -5,11 +5,11 @@
I do not want onions. I want oranges!!! I do not want onions. I want oranges!!!
Create 3 functions that works like the `.filter`, `.map` and `.reduce` array method but for the keys of your grocery cart. Create 3 functions that works like the `.filter`, `.map` and `.reduce` array method but for the keys of your grocery cart.
- `filterKeys` filters the name of the items you have. - `filterKeys` filters the name of the items you have.
- `mapKeys` changes the name of the items you have. - `mapKeys` changes the name of the items you have.
- `reduceKeys` reducing you grocery cart. - `reduceKeys` reducing you grocery cart.
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/filter](https://devdocs.io/javascript/global_objects/array/filter) - [devdocs.io/javascript/global_objects/array/filter](https://devdocs.io/javascript/global_objects/array/filter)
@ -18,7 +18,6 @@ Create 3 functions that works like the `.filter`, `.map` and `.reduce` array met
- [devdocs.io/javascript/global_objects/object/entries](https://devdocs.io/javascript/global_objects/object/entries) - [devdocs.io/javascript/global_objects/object/entries](https://devdocs.io/javascript/global_objects/object/entries)
- [devdocs.io/javascript/global_objects/object/fromentries](https://devdocs.io/javascript/global_objects/object/fromentries) - [devdocs.io/javascript/global_objects/object/fromentries](https://devdocs.io/javascript/global_objects/object/fromentries)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

2
subjects/manipulate-values/README.md

@ -8,6 +8,7 @@ You have a grocery cart with some items you need.
The items will have a `key` being the name and a `value` that is the amount in grams. The items will have a `key` being the name and a `value` that is the amount in grams.
Create 3 functions that works like the `.filter`, `.map` and `.reduce` array method but for the values of your grocery cart. Create 3 functions that works like the `.filter`, `.map` and `.reduce` array method but for the values of your grocery cart.
- `filterValues` filters the values of your grocery cart. - `filterValues` filters the values of your grocery cart.
- `mapValues` changes the values of your grocery cart. - `mapValues` changes the values of your grocery cart.
- `reduceValues` that will reduce your grocery cart. - `reduceValues` that will reduce your grocery cart.
@ -22,7 +23,6 @@ You will have a small database to help you with the groceries.
- [devdocs.io/javascript/global_objects/object/entries](https://devdocs.io/javascript/global_objects/object/entries) - [devdocs.io/javascript/global_objects/object/entries](https://devdocs.io/javascript/global_objects/object/entries)
- [devdocs.io/javascript/global_objects/object/fromentries](https://devdocs.io/javascript/global_objects/object/fromentries) - [devdocs.io/javascript/global_objects/object/fromentries](https://devdocs.io/javascript/global_objects/object/fromentries)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

1
subjects/match-cron/README.md

@ -25,7 +25,6 @@ matchCron('9 * * * *', new Date('2020-05-30 19:21:00')) // -> false
// +--------- Minute (range: 0-59) // +--------- Minute (range: 0-59)
``` ```
### Notions ### Notions
- [crontab.guru](https://crontab.guru/) - [crontab.guru](https://crontab.guru/)

2
subjects/min-max/README.md

@ -12,7 +12,6 @@ and returns the lowest
> You must not just use `Math.min`, make your own. > You must not just use `Math.min`, make your own.
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/functions](https://nan-academy.github.io/js-training/examples/functions.js) - [nan-academy.github.io/js-training/examples/functions](https://nan-academy.github.io/js-training/examples/functions.js)
@ -20,7 +19,6 @@ and returns the lowest
- [devdocs.io/javascript/global_objects/math/min](https://devdocs.io/javascript/global_objects/math/min) - [devdocs.io/javascript/global_objects/math/min](https://devdocs.io/javascript/global_objects/math/min)
- [devdocs.io/javascript/global_objects/math/max](https://devdocs.io/javascript/global_objects/math/max) - [devdocs.io/javascript/global_objects/math/max](https://devdocs.io/javascript/global_objects/math/max)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

2
subjects/more-or-less/README.md

@ -3,12 +3,12 @@
### Instructions ### Instructions
Create 4 functions Create 4 functions
- `more` that takes 1 argument and add 1 to it - `more` that takes 1 argument and add 1 to it
- `less` that takes 1 argument and substract 1 to it - `less` that takes 1 argument and substract 1 to it
- `add` that takes 2 arguments and add them - `add` that takes 2 arguments and add them
- `sub` that takes 2 arguments and substract them - `sub` that takes 2 arguments and substract them
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/functions](https://nan-academy.github.io/js-training/examples/functions.js) - [nan-academy.github.io/js-training/examples/functions](https://nan-academy.github.io/js-training/examples/functions.js)

1
subjects/multiplayer_fps/README.md

@ -22,7 +22,6 @@ Write your own version of the game [maze wars](https://www.youtube.com/watch?v=5
- Use the UDP protocol to enable the communication between the clients and the server. - Use the UDP protocol to enable the communication between the clients and the server.
#### You have to develop the game server and also a client application: #### You have to develop the game server and also a client application:
- The server must accept as much connections as possible (the minimum should be 10). - The server must accept as much connections as possible (the minimum should be 10).

2
subjects/mutability/README.md

@ -10,14 +10,12 @@ Create a new variable `samePerson` with the same value as `person`.
Increase by one the property age of `person` Increase by one the property age of `person`
and set his country to `'FR'`. and set his country to `'FR'`.
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/set](https://nan-academy.github.io/js-training/examples/set.js) - [nan-academy.github.io/js-training/examples/set](https://nan-academy.github.io/js-training/examples/set.js)
- [nan-academy.github.io/js-training/examples/get](https://nan-academy.github.io/js-training/examples/get.js) - [nan-academy.github.io/js-training/examples/get](https://nan-academy.github.io/js-training/examples/get.js)
- [nan-academy.github.io/js-training/examples/data-structures](https://nan-academy.github.io/js-training/examples/data-structures.js) - [nan-academy.github.io/js-training/examples/data-structures](https://nan-academy.github.io/js-training/examples/data-structures.js)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

2
subjects/nasa/README.md

@ -4,11 +4,11 @@
Create a `nasa` function that takes a number `N` as a parameter and returns Create a `nasa` function that takes a number `N` as a parameter and returns
a string with all numbers from 1 to the `N` separated by whitespace, with three exceptions: a string with all numbers from 1 to the `N` separated by whitespace, with three exceptions:
- For numbers divisible by 3, add 'NA'. - For numbers divisible by 3, add 'NA'.
- For numbers divisible by 5, add 'SA'. - For numbers divisible by 5, add 'SA'.
- For the number that are divisible by 3 and 5 add 'NASA'. - For the number that are divisible by 3 and 5 add 'NASA'.
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/loops](https://nan-academy.github.io/js-training/examples/loops.js) - [nan-academy.github.io/js-training/examples/loops](https://nan-academy.github.io/js-training/examples/loops.js)

2
subjects/primitives/README.md

@ -3,12 +3,12 @@
### Instructions ### Instructions
Create a constant variable for each primitives: Create a constant variable for each primitives:
- `str` for `String` - `str` for `String`
- `num` for `Number` - `num` for `Number`
- `bool` for `Boolean` - `bool` for `Boolean`
- `undef` for `undefined` - `undef` for `undefined`
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/primitive-and-operators](https://nan-academy.github.io/js-training/examples/primitive-and-operators.js) - [nan-academy.github.io/js-training/examples/primitive-and-operators](https://nan-academy.github.io/js-training/examples/primitive-and-operators.js)

1
subjects/pyramid/README.md

@ -19,6 +19,7 @@ Just like triangle
******* *******
********* *********
``` ```
> No new line in last line > No new line in last line
### Notions ### Notions

8
subjects/quad/README.md

@ -112,7 +112,7 @@ o
student@ubuntu:~/quad/test$ student@ubuntu:~/quad/test$
``` ```
---- ---
## quadB ## quadB
@ -226,7 +226,7 @@ student@ubuntu:~/quad/test$ ./test
student@ubuntu:~/quad/test$ student@ubuntu:~/quad/test$
``` ```
---- ---
## quadC ## quadC
@ -340,7 +340,7 @@ C
student@ubuntu:~/quad/test$ student@ubuntu:~/quad/test$
``` ```
---- ---
## quadD ## quadD
@ -454,7 +454,7 @@ A
student@ubuntu:~/quad/test$ student@ubuntu:~/quad/test$
``` ```
---- ---
## quadE ## quadE

2
subjects/quantifiers/README.md

@ -13,13 +13,11 @@ condition of the received function and false otherwise.
The use of `[].every` and `[].some` is forbidden for this exercise. The use of `[].every` and `[].some` is forbidden for this exercise.
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/some](https://devdocs.io/javascript/global_objects/array/some) - [devdocs.io/javascript/global_objects/array/some](https://devdocs.io/javascript/global_objects/array/some)
- [devdocs.io/javascript/global_objects/array/every](https://devdocs.io/javascript/global_objects/array/every) - [devdocs.io/javascript/global_objects/array/every](https://devdocs.io/javascript/global_objects/array/every)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

3
subjects/race/README.md

@ -6,15 +6,14 @@ Create a function `race` that works like `Promise.race`
Create a function `some` that takes an `array` of promises or values Create a function `some` that takes an `array` of promises or values
and `N` number. It should return the first `N` resolved values. and `N` number. It should return the first `N` resolved values.
> Empty array or a count of 0 return a promise resolving to `undefined`
> Empty array or a count of 0 return a promise resolving to `undefined`
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/promise](https://nan-academy.github.io/js-training/examples/promise.js) - [nan-academy.github.io/js-training/examples/promise](https://nan-academy.github.io/js-training/examples/promise.js)
- [devdocs.io/javascript/global_objects/promise/race](https://devdocs.io/javascript/global_objects/promise/race) - [devdocs.io/javascript/global_objects/promise/race](https://devdocs.io/javascript/global_objects/promise/race)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

2
subjects/rebecca-black/README.md

@ -3,12 +3,12 @@
### Instructions ### Instructions
Create the following functions: Create the following functions:
- `isFriday` returns true if the date is a friday - `isFriday` returns true if the date is a friday
- `isWeekend` returns true if the date is a day of the weekend - `isWeekend` returns true if the date is a day of the weekend
- `isLeapYear` returns true if the year is a leap year - `isLeapYear` returns true if the year is a leap year
- `isLastDayOfMonth` returns true if the date is the last day of the month - `isLastDayOfMonth` returns true if the date is the last day of the month
### Notions ### Notions
- [date-fns.org/v2.14.0/docs/isWeekend](https://date-fns.org/v2.14.0/docs/isWeekend) - [date-fns.org/v2.14.0/docs/isWeekend](https://date-fns.org/v2.14.0/docs/isWeekend)

3
subjects/reduce/README.md

@ -19,6 +19,7 @@ If your array is less than 1 argument you should throw an error.
- `reduceRight` like reduce, from the last value to the first - `reduceRight` like reduce, from the last value to the first
Example: Example:
```js ```js
const adder = (a, b) => a + b const adder = (a, b) => a + b
fold([1, 2, 3], adder, 2) // returns 8 (2 + 1 + 2 + 3) fold([1, 2, 3], adder, 2) // returns 8 (2 + 1 + 2 + 3)
@ -28,12 +29,10 @@ reduce([1,2,3], adder) // returns 6 (1 + 2 + 3)
The use of `[].reduce` and `[].reduceRight` is forbidden for this exercise. The use of `[].reduce` and `[].reduceRight` is forbidden for this exercise.
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/reduce](https://devdocs.io/javascript/global_objects/array/reduce) - [devdocs.io/javascript/global_objects/array/reduce](https://devdocs.io/javascript/global_objects/array/reduce)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

2
subjects/repeat/README.md

@ -7,14 +7,12 @@ and return the repeated string by the given number
Like the method [developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat) Like the method [developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat)
Of course you may not use the method directly Of course you may not use the method directly
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/loops](https://nan-academy.github.io/js-training/examples/loops.js) - [nan-academy.github.io/js-training/examples/loops](https://nan-academy.github.io/js-training/examples/loops.js)
- [nan-academy.github.io/js-training/examples/recursion](https://nan-academy.github.io/js-training/examples/recursion.js) - [nan-academy.github.io/js-training/examples/recursion](https://nan-academy.github.io/js-training/examples/recursion.js)
- [devdocs.io/javascript/global_objects/string/repeat](https://devdocs.io/javascript/global_objects/string/repeat) - [devdocs.io/javascript/global_objects/string/repeat](https://devdocs.io/javascript/global_objects/string/repeat)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

1
subjects/returns/README.md

@ -7,7 +7,6 @@ Create the following functions:
- `id` that takes one argument and return it - `id` that takes one argument and return it
- `getLength` that takes an array or a string and return its length - `getLength` that takes an array or a string and return its length
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/functions](https://nan-academy.github.io/js-training/examples/functions.js) - [nan-academy.github.io/js-training/examples/functions](https://nan-academy.github.io/js-training/examples/functions.js)

2
subjects/reverser/README.md

@ -6,12 +6,10 @@ Create a `reverse` function that works on both arrays and strings.
Like `[].reverse()` but working also for strings (without using the actual method) Like `[].reverse()` but working also for strings (without using the actual method)
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/reverse](https://devdocs.io/javascript/global_objects/array/reverse) - [devdocs.io/javascript/global_objects/array/reverse](https://devdocs.io/javascript/global_objects/array/reverse)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

1
subjects/road_intersection/README.md

@ -91,6 +91,7 @@ vehicles in different lanes and with different routes.
For this it must be possible to do the following: For this it must be possible to do the following:
- The `Arrow` keys must generate one vehicle in a specific direction and with a random route ( `r`, `s` and `l`): - The `Arrow` keys must generate one vehicle in a specific direction and with a random route ( `r`, `s` and `l`):
- `Up` south to north. - `Up` south to north.
- `Down` north to south. - `Down` north to south.
- `Right` west to east. - `Right` west to east.

1
subjects/same-amount/README.md

@ -8,7 +8,6 @@ a data string and 2 regexes.
The objective is to confirm that the second and the third parameter matched The objective is to confirm that the second and the third parameter matched
the same amount of times in the first parameter. the same amount of times in the first parameter.
### Notions ### Notions
- [developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Using_regular_expressions_in_JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Using_regular_expressions_in_JavaScript) - [developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Using_regular_expressions_in_JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Using_regular_expressions_in_JavaScript)

5
subjects/scalar/README.md

@ -1,7 +1,9 @@
## Scalar ## Scalar
### Instructions ### Instructions
Create the following **functions**, which each receives two parameters: Create the following **functions**, which each receives two parameters:
- `sum`, which returns the sum between two values from 0 to 255 - `sum`, which returns the sum between two values from 0 to 255
- `diff`, which returns the difference between two values from -32768 to 32767 - `diff`, which returns the difference between two values from -32768 to 32767
- `pro`, which returns the product of the multiplication between two values from -128 to 127 - `pro`, which returns the product of the multiplication between two values from -128 to 127
@ -11,8 +13,8 @@ Create the following **functions**, which each receives two parameters:
You **must** complete the Expected functions parameters data type accordingly (Replace the Xs)! You **must** complete the Expected functions parameters data type accordingly (Replace the Xs)!
### Notions ### Notions
- [Data Types](https://doc.rust-lang.org/book/ch03-02-data-types.html)
- [Data Types](https://doc.rust-lang.org/book/ch03-02-data-types.html)
### Expected functions (Incomplete, you must precise the Data Types) ### Expected functions (Incomplete, you must precise the Data Types)
@ -39,6 +41,7 @@ pub fn rem(a: X, b: X) -> X {
``` ```
### Usage : ### Usage :
#### Note that There is no output for this test for you to train to comment accordingly. #### Note that There is no output for this test for you to train to comment accordingly.
```rust ```rust

1
subjects/select-and-style/README.md

@ -3,6 +3,7 @@
### Resources ### Resources
We provide you with some content to get started smoothly, check it out! We provide you with some content to get started smoothly, check it out!
- Video [Link a CSS stylesheet to your HTML file](https://www.youtube.com/watch?v=e7G-KhaqTjs&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=3) - Video [Link a CSS stylesheet to your HTML file](https://www.youtube.com/watch?v=e7G-KhaqTjs&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=3)
- Video [CSS - Style with type selectors](https://www.youtube.com/watch?v=q0ur7YWBzhs&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=4) - Video [CSS - Style with type selectors](https://www.youtube.com/watch?v=q0ur7YWBzhs&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=4)
- Video [HTML/CSS - Set & style with ID selector](https://www.youtube.com/watch?v=3b3MiY-MR-Y&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=5) - Video [HTML/CSS - Set & style with ID selector](https://www.youtube.com/watch?v=3b3MiY-MR-Y&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=5)

1
subjects/series/README.md

@ -5,7 +5,6 @@
Create a function `series` that takes an array of async functions. Create a function `series` that takes an array of async functions.
It must execute them in series and return the results in order. It must execute them in series and return the results in order.
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/promise](https://nan-academy.github.io/js-training/examples/promise.js) - [nan-academy.github.io/js-training/examples/promise](https://nan-academy.github.io/js-training/examples/promise.js)

1
subjects/shop/audit/README.md

@ -5,6 +5,7 @@
###### Can you confirm that the user was created? ###### Can you confirm that the user was created?
##### Navigate to the homepage using the user you created. Try to erase products that were ##### Navigate to the homepage using the user you created. Try to erase products that were
##### not created by the user. ##### not created by the user.
###### Is it impossible to edit and delete products that were not created by your user? ###### Is it impossible to edit and delete products that were not created by your user?

2
subjects/sign/README.md

@ -10,14 +10,12 @@ You must not just use `Math.sign`, make your own.
Create the `sameSign` function that takes 2 numbers as arguments and return true Create the `sameSign` function that takes 2 numbers as arguments and return true
if they both have the same sign, or false otherwise. if they both have the same sign, or false otherwise.
### Notions ### Notions
- [nan-academy.github.io/js-training/examples/functions](https://nan-academy.github.io/js-training/examples/functions.js) - [nan-academy.github.io/js-training/examples/functions](https://nan-academy.github.io/js-training/examples/functions.js)
- [nan-academy.github.io/js-training/examples/if-else](https://nan-academy.github.io/js-training/examples/if-else.js) - [nan-academy.github.io/js-training/examples/if-else](https://nan-academy.github.io/js-training/examples/if-else.js)
- [devdocs.io/javascript/global_objects/math/sign](https://devdocs.io/javascript/global_objects/math/sign) - [devdocs.io/javascript/global_objects/math/sign](https://devdocs.io/javascript/global_objects/math/sign)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

1
subjects/simple_hash/README.md

@ -7,6 +7,7 @@ Create a **function** `contain` that checks a `HashMap` to see if it contains a
Create a **function** `remove` that removes a given key from the `HashMap`. Create a **function** `remove` that removes a given key from the `HashMap`.
- Note: pay attention to the comment in the [usage](#usage) - Note: pay attention to the comment in the [usage](#usage)
### Notions ### Notions
- https://doc.rust-lang.org/rust-by-example/std/hash.html - https://doc.rust-lang.org/rust-by-example/std/hash.html

1
subjects/skeleton/README.md

@ -19,6 +19,7 @@ For the whole quest, the principle is to iterate over your code: when you finish
### Resources ### Resources
We provide you with some content to get started smoothly, check it out! We provide you with some content to get started smoothly, check it out!
- Video [Basic set up of an HTML page](https://www.youtube.com/watch?v=QtKoO7tT-Gg&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=1) - Video [Basic set up of an HTML page](https://www.youtube.com/watch?v=QtKoO7tT-Gg&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=1)
- Video [Different HTML tags overview](https://www.youtube.com/watch?v=Al-Jzpib8VY&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=2) - Video [Different HTML tags overview](https://www.youtube.com/watch?v=Al-Jzpib8VY&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=2)

2
subjects/slicer/README.md

@ -6,12 +6,10 @@ Create the `slice` function that works like `Array.slice` and `String.slice`
It takes an additional first argument which is the string or the array It takes an additional first argument which is the string or the array
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/slice](https://devdocs.io/javascript/global_objects/array/slice) - [devdocs.io/javascript/global_objects/array/slice](https://devdocs.io/javascript/global_objects/array/slice)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

8
subjects/sortable/README.md

@ -7,13 +7,12 @@ weird masks wearing **superheroes**. You never understood why are some of them
considered superheroes just because they are rich. Others annoy you with their considered superheroes just because they are rich. Others annoy you with their
philosophical speeches. And of course that something tragic has had to happen philosophical speeches. And of course that something tragic has had to happen
to them for the people to feel sorry for them. \ to them for the people to feel sorry for them. \
Anyway, we've found *confidential* information about those superheroes. Anyway, we've found _confidential_ information about those superheroes.
> Your task for the moment is to build a web page in order to organize all the > Your task for the moment is to build a web page in order to organize all the
> data from those smartypants. > data from those smartypants.
> This information can be found here: [all.json](https://rawcdn.githack.com/akabab/superhero-api/0.2.0/api/all.json). > This information can be found here: [all.json](https://rawcdn.githack.com/akabab/superhero-api/0.2.0/api/all.json).
#### Fetching the data #### Fetching the data
In order to get the information out of the API you should use `fetch`. In order to get the information out of the API you should use `fetch`.
@ -56,14 +55,15 @@ A `<select>` input is used to chose from `10`, `20`,`50`, `100` or `all results`
#### Search #### Search
It must be possible to filter information by searching the name as a string It must be possible to filter information by searching the name as a string
*(ex: superheroes that contain **man** in their name).* _(ex: superheroes that contain **man** in their name)._
- The search should be interactive, in other words, the results should be - The search should be interactive, in other words, the results should be
displaying as you write, not needing a button for you to click. displaying as you write, not needing a button for you to click.
#### Sort #### Sort
It must be possible to sort by any columns of the table It must be possible to sort by any columns of the table
*(either alphabetically or numerically).* _(either alphabetically or numerically)._
- Initially all rows should be sorted by the column `name` by `ascending` order - Initially all rows should be sorted by the column `name` by `ascending` order
- First click will order the column by `ascending` value - First click will order the column by `ascending` value

4
subjects/system-monitor/README.md

@ -91,6 +91,7 @@ You can acquire more knowledge about this filesystem by taking a look to the `pr
For this project you must present the following monitorization: For this project you must present the following monitorization:
- **System monitor**, that will contain : - **System monitor**, that will contain :
- The type of OS (Operating System). - The type of OS (Operating System).
- The user logged into the computer. - The user logged into the computer.
- The computer name, this being the **hostname**. - The computer name, this being the **hostname**.
@ -112,6 +113,7 @@ For this project you must present the following monitorization:
![image](system.gif) ![image](system.gif)
- **Memory and process monitor**, that will contain : - **Memory and process monitor**, that will contain :
- The Physic Memory (RAM) being used, it must have some kind of visual display of this usage. - The Physic Memory (RAM) being used, it must have some kind of visual display of this usage.
- The Virtual Memory (SWAP) being used, it should also include a visual display. - The Virtual Memory (SWAP) being used, it should also include a visual display.
- The Disk usage, same here. - The Disk usage, same here.
@ -128,11 +130,13 @@ For this project you must present the following monitorization:
![image](mem.gif) ![image](mem.gif)
- **Network**, that will contain : - **Network**, that will contain :
- The network ipv4, (`lo`, `wlp5s0` and other networks that the computer may have). - The network ipv4, (`lo`, `wlp5s0` and other networks that the computer may have).
- A tab bar that should contain two tables : - A tab bar that should contain two tables :
- `RX` (network receiver) containing the following data : bytes, packets, errs, drop, fifo, frame, compressed and multicast. - `RX` (network receiver) containing the following data : bytes, packets, errs, drop, fifo, frame, compressed and multicast.
- `TX` (network transmitter) containing the following data : bytes, packets, errs, drop, fifo, colls, carrier and compressed. - `TX` (network transmitter) containing the following data : bytes, packets, errs, drop, fifo, colls, carrier and compressed.
- It should also contain a tabbed section for both `RX` and `TX`, those sections should display a visual usage (ex: a progress bar), of all network present on the computer. This visual display should obey the following rules: - It should also contain a tabbed section for both `RX` and `TX`, those sections should display a visual usage (ex: a progress bar), of all network present on the computer. This visual display should obey the following rules:
- Each network should be converted from **bytes** to **GB**, **KB** or **MB** depending on the value. It should not display values that - Each network should be converted from **bytes** to **GB**, **KB** or **MB** depending on the value. It should not display values that
are too big or too small. In other words it should be adjustable. are too big or too small. In other words it should be adjustable.

1
subjects/tell-it-cypher/README.md

@ -6,6 +6,7 @@ FINALLY, you got the names.
But you could forget it... loose it... How could you write it without puting the surprise in danger?! But you could forget it... loose it... How could you write it without puting the surprise in danger?!
Create a `tell-it-cypher.mjs` script that: Create a `tell-it-cypher.mjs` script that:
- Takes a file as first argument - Takes a file as first argument
- Takes one of these keywords as second argument: - Takes one of these keywords as second argument:
- `encode`: convert your file to `base64`, then save the result in a `cypher.txt` file. - `encode`: convert your file to `base64`, then save the result in a `cypher.txt` file.

1
subjects/temperature_conv/README.md

@ -35,4 +35,3 @@ student@ubuntu:~/temperature_conv/test$ cargo run
0 C = 32 F 0 C = 32 F
student@ubuntu:~/temperature_conv/test$ student@ubuntu:~/temperature_conv/test$
``` ```

1
subjects/the-pages/README.md

@ -7,6 +7,7 @@ In this exercise, one will create a mini-horror game inspired on ["Slender: The
Just like in the Slender game, the goal of your game should be, while being chased by a monster/creature (a "Creep"), to get all the 8 pages spread around the map in different locations. Just like in the Slender game, the goal of your game should be, while being chased by a monster/creature (a "Creep"), to get all the 8 pages spread around the map in different locations.
To find models of scary monsters/creatures: To find models of scary monsters/creatures:
- you can easily choose checking the [Mixamo website](https://www.mixamo.com/#/). - you can easily choose checking the [Mixamo website](https://www.mixamo.com/#/).
- alternatively, you can use the models on the ["Creeps.zip"](https://assets.01-edu.org/Unreal-Engine-Projects/ThePages/Creeps.zip) file. - alternatively, you can use the models on the ["Creeps.zip"](https://assets.01-edu.org/Unreal-Engine-Projects/ThePages/Creeps.zip) file.

2
subjects/throttle/README.md

@ -3,11 +3,11 @@
### Instructions ### Instructions
Create two functions that will work like `_.throttle` from lodash Create two functions that will work like `_.throttle` from lodash
- `throttle`, this function doesn't need to take care of the options - `throttle`, this function doesn't need to take care of the options
- `opThrottle`, this function will take care of - `opThrottle`, this function will take care of
the `trailing` and `leading` options the `trailing` and `leading` options
### Notions ### Notions
- [lodash.com/docs/4.17.15#throttle](https://lodash.com/docs/4.17.15#throttle) - [lodash.com/docs/4.17.15#throttle](https://lodash.com/docs/4.17.15#throttle)

1
subjects/triangle/README.md

@ -17,6 +17,7 @@ of the number passed as argument.
**** ****
***** *****
``` ```
> No new line in last line > No new line in last line
### Notions ### Notions

10
subjects/tron/README.md

@ -16,12 +16,12 @@ You will need to create a public repository with the name `tron`. Next you need
### Rules ### Rules
- Your AI has to move every turn *(it can not stay still)* - Your AI has to move every turn _(it can not stay still)_
- Every time the AI moves somewhere the AI leaves a color trail. - Every time the AI moves somewhere the AI leaves a color trail.
- the AI can only move to a blank tile. - the AI can only move to a blank tile.
- the AI can not move out of the map *(100 x 100)* - the AI can not move out of the map _(100 x 100)_
- the AI can only move to its `left`, `forward` or its `right`. - the AI can only move to its `left`, `forward` or its `right`.
*(Moving `backward` is suicide as it would hit its own trail !)* _(Moving `backward` is suicide as it would hit its own trail !)_
- If too much CPU power is required to decide where to go, the AI dies. - If too much CPU power is required to decide where to go, the AI dies.
- If two AIs moved to the same spot, both of them die. - If two AIs moved to the same spot, both of them die.
- **The AI has to survive as long as it can.** - **The AI has to survive as long as it can.**
@ -49,6 +49,7 @@ You will need to create a public repository with the name `tron`. Next you need
- let's change the update function so that your AI only goes forward. - let's change the update function so that your AI only goes forward.
Replace this line just before the `return` of the update function: Replace this line just before the `return` of the update function:
```js ```js
const available = coordsInBound.filter(isFree) const available = coordsInBound.filter(isFree)
@ -57,6 +58,7 @@ Replace this line just before the `return` of the update function:
``` ```
...with this line: ...with this line:
```js ```js
// always return the first free coordinates // always return the first free coordinates
return coordsInBound.filter(isFree)[0] return coordsInBound.filter(isFree)[0]
@ -74,6 +76,6 @@ Replace this line just before the `return` of the update function:
Be aware that there will be the possibility for the peer-correcter Be aware that there will be the possibility for the peer-correcter
to use his or her own AI. to use his or her own AI.
*May the best tron win :)* _May the best tron win :)_
Have fun and good luck. Have fun and good luck.

3
subjects/unbreakable/README.md

@ -3,19 +3,18 @@
### Instructions ### Instructions
Implement 2 functions: Implement 2 functions:
- `split` that works like the string method `.split` but take the string as - `split` that works like the string method `.split` but take the string as
it's first argument. it's first argument.
- `join` that works like the string method `.join` but take the array as - `join` that works like the string method `.join` but take the array as
it's first argument. it's first argument.
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/join](https://devdocs.io/javascript/global_objects/array/join) - [devdocs.io/javascript/global_objects/array/join](https://devdocs.io/javascript/global_objects/array/join)
- [devdocs.io/javascript/global_objects/string/split](https://devdocs.io/javascript/global_objects/string/split) - [devdocs.io/javascript/global_objects/string/split](https://devdocs.io/javascript/global_objects/string/split)
### Code provided ### Code provided
> all code provided will be added to your solution and doesn't need to be submited. > all code provided will be added to your solution and doesn't need to be submited.

2
subjects/unicode-technical-report-35/README.md

@ -3,6 +3,7 @@
### Subject ### Subject
Implement a `format` function that takes 2 arguments: Implement a `format` function that takes 2 arguments:
- a valid javascript Date object - a valid javascript Date object
- a format string that handle all of the following fields: - a format string that handle all of the following fields:
- y - y
@ -27,7 +28,6 @@ Implement a `format` function that takes 2 arguments:
- HH - HH
- a - a
### Notions ### Notions
- [www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table) - [www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table)

2
subjects/using-filter/README.md

@ -33,6 +33,7 @@ objects and that returns only the ones which:
- the key `region` is not `'South'` - the key `region` is not `'South'`
> Example of an array of objects matching the criterias: > Example of an array of objects matching the criterias:
```js ```js
[ [
{ tag: 'CA', name: 'California', capital: 'Sacramento', region: 'West' }, { tag: 'CA', name: 'California', capital: 'Sacramento', region: 'West' },
@ -45,7 +46,6 @@ objects and that returns only the ones which:
The goal of this exercise is to learn to use `filter`, as such all your The goal of this exercise is to learn to use `filter`, as such all your
solution **MUST** use `filter` solution **MUST** use `filter`
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/filter](https://devdocs.io/javascript/global_objects/array/filter) - [devdocs.io/javascript/global_objects/array/filter](https://devdocs.io/javascript/global_objects/array/filter)

3
subjects/using-map/README.md

@ -68,7 +68,7 @@ tempForecasts([
temperature: ' 101 °F', temperature: ' 101 °F',
state: 'california', state: 'california',
region: 'West', region: 'West',
} },
]) // -> ['38°Celsius in Pasadena, California'] ]) // -> ['38°Celsius in Pasadena, California']
``` ```
@ -77,7 +77,6 @@ tempForecasts([
The goal of this exercise is to learn to use `map`, as such all your The goal of this exercise is to learn to use `map`, as such all your
solution **MUST** use `map` solution **MUST** use `map`
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/map](https://devdocs.io/javascript/global_objects/array/map) - [devdocs.io/javascript/global_objects/array/map](https://devdocs.io/javascript/global_objects/array/map)

3
subjects/using-reduce/README.md

@ -3,6 +3,7 @@
### Instructions ### Instructions
Create three functions : Create three functions :
- `adder` that receives an array and adds its elements. - `adder` that receives an array and adds its elements.
- `sumOrMul` that receives an array and adds or multiplies its elements - `sumOrMul` that receives an array and adds or multiplies its elements
@ -14,6 +15,7 @@ All functions may or may not receive an extra argument that should be the
initial value for the functions execution. initial value for the functions execution.
Example: Example:
```js ```js
sumOrMul([1, 2, 3, 4], 5) sumOrMul([1, 2, 3, 4], 5)
// -> (((5 + 1) * 2) + 3) * 4 // -> (((5 + 1) * 2) + 3) * 4
@ -25,7 +27,6 @@ sumOrMul([1, 2, 3, 4], 5)
The goal of this exercise is to learn to use `reduce`, as such all your The goal of this exercise is to learn to use `reduce`, as such all your
solution **MUST** use `reduce` solution **MUST** use `reduce`
### Notions ### Notions
- [devdocs.io/javascript/global_objects/array/reduce](https://devdocs.io/javascript/global_objects/array/reduce) - [devdocs.io/javascript/global_objects/array/reduce](https://devdocs.io/javascript/global_objects/array/reduce)

1
subjects/valid-ip/README.md

@ -10,7 +10,6 @@ A valid IP has the following format :
- xxx is a number from 0-255 - xxx is a number from 0-255
- You cannot have a 0 before a number, example 0xx - You cannot have a 0 before a number, example 0xx
### Notions ### Notions
- [github.com/ziishaned/learn-regex](https://github.com/ziishaned/learn-regex) - [github.com/ziishaned/learn-regex](https://github.com/ziishaned/learn-regex)

1
subjects/vowel-dots/README.md

@ -5,7 +5,6 @@
Create a function called vowelDots that receives a string and adds a `.` after Create a function called vowelDots that receives a string and adds a `.` after
every vowel ('y' is not considered a vowel here) using a regex called `vowels`. every vowel ('y' is not considered a vowel here) using a regex called `vowels`.
### Notions ### Notions
- [github.com/ziishaned/learn-regex#22-character-sets](https://github.com/ziishaned/learn-regex#22-character-sets) - [github.com/ziishaned/learn-regex#22-character-sets](https://github.com/ziishaned/learn-regex#22-character-sets)

1
subjects/何/README.md

@ -4,7 +4,6 @@
Create a `inequality` value that is not equal to itself Create a `inequality` value that is not equal to itself
### Notions ### Notions
- [devdocs.io/javascript/global_objects/number](https://devdocs.io/javascript/global_objects/number) - [devdocs.io/javascript/global_objects/number](https://devdocs.io/javascript/global_objects/number)

Loading…
Cancel
Save