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

8
docs/audits-at-home/README_ru.md

@ -54,11 +54,11 @@
4. Капитан, зайдя на платформу, разрешает аудитору взять под контроль свой компьютер (TeamViewer)
5. Теперь аудитор может запустить проверку на компьютере капитана.
   Организация окон со стороны аудитора может быть сложной частью. Мы предлагаем
   посмотреть видео, и узнать как мы это сделали.
   Организация окон со стороны аудитора может быть сложной частью. Мы предлагаем
   посмотреть видео, и узнать как мы это сделали.
6. Аудитор проводит проверку, если аудитор не может в прямом эфире транслировать свою проверку, он или она
   затем объяснит голосом (или в чате), что он или она делает и как проверяет.
   затем объяснит голосом (или в чате), что он или она делает и как проверяет.
7. Аудит проводится до тех пор, пока все вопросы не верны или пока не будет допущена ошибка.
@ -67,7 +67,7 @@
9. Группа обсуждает потенциальное место ошибки столько, сколько необходимо, до завершения аудита.
10. После завершения аудита все программы могут быть закрыты. Скажите пока и спасибо за ваше время и сделайте
    необходимые выводы среди членов группы.
    необходимые выводы среди членов группы.
### Conclusion

86
docs/metrics.md

@ -1,63 +1,65 @@
## Metrics card - Export of students' results
### Where to find the data
Metrics for students from a given campus can be found in the Metrics card in the Admin dashboard.
### 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
Field | Example | Description
----- | ----- | -----
**user** | MarieMalarme | Student’s github username
**first_name** | Marie | Student’s first name
**last_name** | Malarme | Student’s last name
**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
**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)
**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
**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
**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
**last_update** | 2020-07-27T15:39:46.368Z | Date and time of the student’s latest activity for that object
| Field | Example | Description |
| --------------- | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **user** | MarieMalarme | Student’s github username |
| **first_name** | Marie | Student’s first name |
| **last_name** | Malarme | Student’s last name |
| **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 |
| **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) |
| **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 |
| **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 |
| **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 |
| **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
#### 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.
* _Grade_: 0 (failure) or 1 (success)
- _Test mode_: automatic tester
- _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
* _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
* _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)
- _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)
#### 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.
#### Raids
- _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
- tuples | https://github.com/01-edu/public/tree/master/subjects/tuples
### Quest 02-rust
Exercices:
@ -36,7 +35,6 @@ Exercices:
- 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
### Quest 03-rust
Exercices:
@ -54,13 +52,10 @@ Exercices:
- simple-hash | https://github.com/01-edu/public/tree/master/subjects/simple-hash
- collect | https://github.com/01-edu/public/tree/master/subjects/collect
---
## Week Two
## Quest 04-rust
Exercices:
@ -75,7 +70,6 @@ Exercices:
- 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
## Quest 05-rust
Exercices:
@ -87,7 +81,6 @@ Exercices:
- expected-variable | https://github.com/01-edu/public/tree/master/subjects/expected-variable
- mobs | https://github.com/01-edu/public/tree/master/subjects/mobs
## Quest 06-rust
Exercices:
@ -109,12 +102,10 @@ Exercices:
- 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
---
## Week Three
## Quest 07-rust
Exercices:
@ -126,13 +117,10 @@ Exercices:
- 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
## Quest 08-rust
Exercices:
- closures | https://github.com/01-edu/public/tree/master/subjects/closures
- sales | https://github.com/01-edu/public/tree/master/subjects/sales
- 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
- project-motion | https://github.com/01-edu/public/tree/master/subjects/project-motion
## Quest 09-rust
Exercices:
- stars | https://github.com/01-edu/public/tree/master/subjects/stars
- ordinal | https://github.com/01-edu/public/tree/master/subjects/ordinal
- pangram | https://github.com/01-edu/public/tree/master/subjects/pangram

3
docs/server-requirements.md

@ -1,6 +1,7 @@
# Server requirements
Features required :
- Dedicated hardware
- Linux compatibility
- UEFI
@ -11,4 +12,4 @@ Features required :
| --------- | --------------------------- |
| Processor | 12 threads x86-64 (64 bits) |
| 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.
You are not allowed to use `Math.abs`, make your own.
### 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/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)
### Code provided
> 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
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 [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)

2
subjects/all/README.md

@ -5,13 +5,11 @@
Create a function `all` that works like `Promise.all` but with objects.
(instead of arrays)
### Notions
- [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)
### Code provided
> 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
> 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

2
subjects/biggie-smalls/README.md

@ -3,10 +3,10 @@
### Instructions
Create 2 variables
- `smalls` with the smallest possible `number` value
- `biggie` with the greatest possible `number` value
### Notions
- [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.
the function takes 2 arguments:
- `data` any valid JSON data
- `prev` the previous block, if no block are given it should use the
genesis block: `{ index: 0, hash: '0' }`
A block must have the following properties:
- `index`
- `hash` a computed hash using the concatenation of the `index`, `hash`
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
- `chain` a function that takes a new `data` and create the next block with it.
### Examples
```js
@ -48,12 +49,10 @@ console.log(chain.index) // -> 5
console.log(fork.index) // -> 5
```
### Notions
- [devdocs.io/javascript/global_objects/json/stringify](https://devdocs.io/javascript/global_objects/json/stringify)
### Code provided
> 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:
| Blood Types | Donate Blood to | Receive Blood From |
|-------------|------------------|--------------------|
| ----------- | ---------------- | ------------------ |
| A+ | A+, AB+ | A+, A-, O+, O- |
| O+ | O+, A+, B+, AB+ | 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 {
}
```
### Notions
[Primitive Type str](https://doc.rust-lang.org/std/primitive.str.html)

8
subjects/borrow_me_the_reference/README.md

@ -7,13 +7,14 @@ needing garbage collector. Therefore you must understand ownership in rust.
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`.
- For example:
- `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:
- "helll-o" turns into "hello"
- "he+lllo" turns into "hello"
- `is_correct` that borrows a Vector of string literals with some correct and incorrect math equations and replaces the correct equations with `✔` and the wrong with `✘` and returns a `usize` with the percentage of correct equations.
- `is_correct` that borrows a Vector of string literals with some correct and incorrect math equations and replaces the correct equations with `✔` and the wrong with `✘` and returns a `usize` with the percentage of correct equations.
### Expected Functions
@ -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://docs.rs/meval/0.2.0/meval/
### Usage
Here is a program to test your function

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

@ -3,6 +3,7 @@
### Resources
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 [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)

3
subjects/change/README.md

@ -3,6 +3,7 @@
### Instructions
Create 2 functions:
- `get`: a function that takes a key and return the corresponding
value from the sourceObject
@ -10,7 +11,6 @@ Create 2 functions:
value for the corresponding property of the sourceObject
and return the set value
### Notions
- [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/set.js](https://nan-academy.github.io/js-training/examples/set.js)
### Code provided
> 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
itself as the value
### Notions
- [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
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)
### 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.
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.
- 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.

4
subjects/collections/README.md

@ -19,12 +19,11 @@ Write a bunch of function to move from one type to another
and finally write a function `superTypeOf` that unlike `typeof` return
a different value for advanced types like `Map` and `Set`
### Examples
```js
const str = 'hello'
const arr = [ 1, 2, 1, 3 ]
const arr = [1, 2, 1, 3]
const obj = { x: 45, y: 75, radius: 24 }
const set = new Set()
const map = new Map()
@ -61,7 +60,6 @@ superTypeOf(undefined) // -> 'undefined'
superTypeOf(superTypeOf) // -> 'Function'
```
### Notions
- [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
### Notions
- [nan-academy.github.io/js-training/examples/functions.js](https://nan-academy.github.io/js-training/examples/functions.js)

5
subjects/currify/README.md

@ -7,9 +7,8 @@ Create the function `currify` that will curry any functions put as argument.
example:
```js
const mult2 = (el1,el2) => el1 * el2
console.log(mult2(2,2)) // result expected 4
const mult2 = (el1, el2) => el1 * el2
console.log(mult2(2, 2)) // result expected 4
const mult2Curried = currify(mult2)

4
subjects/cut-corners/README.md

@ -3,21 +3,21 @@
### Instructions
Create a function for each rounding math functions:
- round (like `Math.round`)
- ceil (like `Math.ceil`)
- floor (like `Math.floor`)
- trunc (like `Math.trunc`)
Some restrictions apply:
- You may not use strings conversion to do it
- No bitwise operator
### Notions
- [devdocs.io/javascript/global_objects/math](https://devdocs.io/javascript/global_objects/math)
### Code provided
> 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
the hour, minute and seconds.
### Example
```js

1
subjects/elementary/README.md

@ -3,6 +3,7 @@
### Instructions
Create 3 functions:
- `multiply` that act like the `*` operator without using it
- `divide` that do an integer division without using `/`
- `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:
```js
import puppeteer from "puppeteer";
import puppeteer from 'puppeteer'
const browser = await puppeteer.launch({
headless: false, // 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...
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)
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)
```
**Puppeteer helper - script model**
```javascript
// 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
await page.waitForSelector("input#myId");
await page.waitForSelector('input#myId')
// find an element in the page:
const button = await page.$("button#myId");
const button = await page.$('button#myId')
// check the element was found
if (button) {
// use the element
await button.click();
await button.click()
} else {
// 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)
process.exit(1);
process.exit(1)
}
// 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
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
await page.type(`input#myId`, "some text");
await page.type(`input#myId`, 'some text')
```
### Optional

8
subjects/filter/README.md

@ -3,14 +3,13 @@
### Instructions
- Create a `filter` function that takes an array as first argument, a function as second,
and that works like the method [].filter
and that works like the method [].filter
- Create a `reject` function that takes an array as first argument, a function as second,
and that works like the reject function from lodash.
and that works like the reject function from lodash.
- 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
@ -18,7 +17,6 @@ and that works like the partition function from lodash.
- [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)
### Code provided
> all code provided will be added to your solution and doesn't need to be submited.

6
subjects/find-expression/README.md

@ -8,18 +8,16 @@ Create a function called `findExpression` that takes a number as parameter and r
- Your goal is to try to find a sequence, starting from the number 1, and repeatedly either adding 4 or multiplying 2
that produces the number given has parameter.
For example, the number 8 you must first multiplying by 2 twice and then add 4.
It will look something like this `1 *2 *2 +4`
For example, the number 8 you must first multiplying by 2 twice and then add 4.
It will look something like this `1 *2 *2 +4`
- If the number can not be reached you should return `undefined`
### 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/recursion.js](https://nan-academy.github.io/js-training/examples/recursion.js)
### Code provided
> 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
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 [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)

6
subjects/flagger/README.md

@ -6,8 +6,9 @@ Create a function called `flags` that receives an object and returns
the specific aliases and descriptions from the properties of that object.
The `help` flag:
- Should be present in the output by default.
- When not present in the input, it should return the description of all flags.
- Should be present in the output by default.
- 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']`)
#### Example:
@ -19,6 +20,7 @@ The `help` flag:
help: ['divide']
}
```
and outputs :
```js

2
subjects/flat/README.md

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

8
subjects/flow/README.md

@ -5,20 +5,16 @@
Create the function `flow` that will works as the \_.flow([funcs])
from lodash.
### Example
``` js
const square = nbr => nbr * nbr
```js
const square = (nbr) => nbr * nbr
const add2Numbers = (nbr1, nbr2) => nbr1 + nbr2
const flowedFunctions = flow([add2Numbers, square])
flowedFunctions(2, 3) // -> 25
```
### Notions
- [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,
and that works like the method .forEach
### Notions
- [devdocs.io/javascript/global_objects/array/foreach](https://devdocs.io/javascript/global_objects/array/foreach)
### Code provided
> all code provided will be added to your solution and doesn't need to be submited.

2
subjects/fusion/README.md

@ -9,7 +9,7 @@ With this create a function called `fusion` that:
- If the type is an array you must concat it
```js
fusion([1,2], [3,4]) // -> [1,2,3,4]
fusion([1, 2], [3, 4]) // -> [1,2,3,4]
```
- If it is a string you must concatenate with a space

5
subjects/get-json/README.md

@ -5,8 +5,9 @@
In this exercise, we will focus on building complex async flows with promises.
Create a `getJSON` function that takes 2 parameters:
- `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`
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 parsed object contains one of those 2 properties:
- `"data"` the actual data to return
- `"error"` the error message to throw
### Notions
- [nan-academy.github.io/js-training/examples/promise.js](https://nan-academy.github.io/js-training/examples/promise.js)

7
subjects/get/README.md

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

4
subjects/good-practices/README.md

@ -65,11 +65,11 @@ Removing layout can be done using transform:
```js
// bad
// 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
// 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:

10
subjects/gougle-search/README.md

@ -3,6 +3,7 @@
### Instructions
Create the `queryServers` function, that takes 2 arguments:
- `serverName` a string of the name of the server
- `q` a string of the query given by the user
@ -13,12 +14,11 @@ Then return the first value of those 2 calls
```js
queryServers('pouet', 'hello+world')
// return the fastest of those 2 calls:
// -> getJSON('/pouet?q=hello+world')
// -> getJSON('/pouet_backup?q=hello+world')
// return the fastest of those 2 calls:
// -> getJSON('/pouet?q=hello+world')
// -> getJSON('/pouet_backup?q=hello+world')
```
Create a `gougleSearch` function that takes a single query argument.
It must call `queryServers` in concurrently on 3 servers:
`'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
using a the server name as key.
### Notions
- [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)
### Code provided
> 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
### Notions
- [github.com/ziishaned/learn-regex](https://github.com/ziishaned/learn-regex)

4
subjects/group-price/README.md

@ -7,6 +7,6 @@ The function has to return an array of arrays with the full match of the price (
and the groups of that price, the first group(43) and the second group (99).
If there is no match the function returns an empty array.
Example:
"The price is USD12.31"
"The price is USD12.31"
Expected output:
[["USD12.31","12","31"]]
[["USD12.31","12","31"]]

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,
create and edit the .gitignore file in your repository and add this line:
```console
**/target/*
```
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.
@ -89,6 +91,7 @@ You can test it with the below command inside the folder of your exercise.
```console
cargo run
```
This command will compile, and run the binary.
#### 4- return your solution

3
subjects/index-of/README.md

@ -3,6 +3,7 @@
### Instructions
Create 3 functions:
- `indexOf` that returns the index of the first 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
@ -13,14 +14,12 @@ Create 3 functions:
> both `indexOf` and `lastIndexOf` take an additional `fromIndex` argument
> that allows you to begin searching from a specific index.
### Notions
- [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/includes](https://devdocs.io/javascript/global_objects/array/includes)
### Code provided
> 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
word containing 'ion' following a t, without the 'ion'.
### Notions
- [github.com/ziishaned/learn-regex#4-lookarounds](https://github.com/ziishaned/learn-regex#4-lookarounds)

5
subjects/is-winner/README.md

@ -9,17 +9,16 @@ return a resolved Promise with the string:
- `<country> + ' is not what we are looking for because of the continent'`,
if the country passed in `isWinner` is not from the european
continent
continent
- `<country> + ' is not what we are looking for because of the number of times it was champion'`, if the country passed in `isWinner` was champion
less than 3 times
less than 3 times
- `<country> + ' won the FIFA World Cup in ' + <year(s)> + 'winning by ' + <results>`, otherwise.
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
### Code provided
> 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
Add new function properties to the object `is` to check a value type
- `is.num` value is a number
- `is.nan` value is NaN
- `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.falsy` value is falsy
### Notions
- [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/Falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy)
### Code provided
> 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',
only when it is in the beginning and the end.
### Notions
- [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
and only keep 2 first characters and 2 last characters.
### Notions
- [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
Create a `retry` function, that takes 2 arguments
- a `count` indicates maximum amount of retries
- 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.
Create a `timeout` function, that takes 2 arguments
- a `delay` indicates maximum wait time
- 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
the last and the first element, in that order
### Notions
- [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
only if that number has only one digit and is not followed by any letter.
### Notions
- [github.com/ziishaned/learn-regex#3-shorthand-character-sets](https://github.com/ziishaned/learn-regex#3-shorthand-character-sets)

6
subjects/long-words/README.md

@ -5,13 +5,13 @@
Create three functions that take as argument an array each:
- `longWords` that returns true if every element of the array is a string of at
least 5 characters.
least 5 characters.
- `oneLongWord` that returns true if at least one element of the array is a
string of at least 10 characters.
string of at least 10 characters.
- `noLongWords` that returns true if there are no elements in the array that are
a string with at least 7 characters.
a string with at least 7 characters.
### Notions

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.
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.
----
---
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.
### Notions
- [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/fromentries](https://devdocs.io/javascript/global_objects/object/fromentries)
### Code provided
> 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!!!
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.
- `mapKeys` changes the name of the items you have.
- `reduceKeys` reducing you grocery cart.
### Notions
- [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/fromentries](https://devdocs.io/javascript/global_objects/object/fromentries)
### Code provided
> 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.
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.
- `mapValues` changes the values of 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/fromentries](https://devdocs.io/javascript/global_objects/object/fromentries)
### Code provided
> all code provided will be added to your solution and doesn't need to be submited.

4
subjects/mapper/README.md

@ -3,10 +3,10 @@
### Instructions
- Create a `map` function that takes an array as first argument, a function as second,
and that works like the method .map
and that works like the method .map
- Create a `flatMap` function that takes an array as first argument, a function as second,
and that works like the method .flatMap
and that works like the method .flatMap
### Notions

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)
```
### Notions
- [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.
### Notions
- [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/max](https://devdocs.io/javascript/global_objects/math/max)
### Code provided
> 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
Create 4 functions
- `more` that takes 1 argument and add 1 to it
- `less` that takes 1 argument and substract 1 to it
- `add` that takes 2 arguments and add them
- `sub` that takes 2 arguments and substract them
### Notions
- [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.
#### 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).

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`
and set his country to `'FR'`.
### 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/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)
### Code provided
> 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
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 5, add 'SA'.
- For the number that are divisible by 3 and 5 add 'NASA'.
### Notions
- [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
Create a constant variable for each primitives:
- `str` for `String`
- `num` for `Number`
- `bool` for `Boolean`
- `undef` for `undefined`
### Notions
- [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
### Notions

8
subjects/quad/README.md

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

8
subjects/quantifiers/README.md

@ -5,21 +5,19 @@
Create three functions that receive an array and a function each:
- `every` that returns true if every element of the array respects the
condition of the received function and false otherwise.
condition of the received function and false otherwise.
- `some` that returns true if at least one element of the array respects the
condition of the received function and false otherwise.
condition of the received function and false otherwise.
- `none` that returns true if none of the elements of the array respects the
condition of the received function and false otherwise.
condition of the received function and false otherwise.
The use of `[].every` and `[].some` is forbidden for this exercise.
### Notions
- [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)
### Code provided
> 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
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
- [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)
### Code provided
> 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
Create the following functions:
- `isFriday` returns true if the date is a friday
- `isWeekend` returns true if the date is a day of the weekend
- `isLeapYear` returns true if the year is a leap year
- `isLastDayOfMonth` returns true if the date is the last day of the month
### Notions
- [date-fns.org/v2.14.0/docs/isWeekend](https://date-fns.org/v2.14.0/docs/isWeekend)

23
subjects/reduce/README.md

@ -5,35 +5,34 @@
Create three functions:
- `fold` that receives an array, a function and an accumulator, in this order,
and applies the function in the elements of the array starting on the left.
and applies the function in the elements of the array starting on the left.
- `foldRight` that receives an array, a function and an accumulator, in this order,
and applies the function in the elements of the array starting on the right.
and applies the function in the elements of the array starting on the right.
- `reduce` that works just like the method `[].reduce` when you don't
specify an accumulator.
The arguments should be an array and a function.
The starting value of your accumulator must be the first value of the array.
If your array is less than 1 argument you should throw an error.
specify an accumulator.
The arguments should be an array and a function.
The starting value of your accumulator must be the first value of the array.
If your array is less than 1 argument you should throw an error.
- `reduceRight` like reduce, from the last value to the first
Example:
```js
const adder = (a,b) => a + b
fold([1,2,3], adder, 2) // returns 8 (2 + 1 + 2 + 3)
foldRight([1,2,3], adder, 2) // returns 8 (2 + 3 + 2 + 1)
reduce([1,2,3], adder) // returns 6 (1 + 2 + 3)
const adder = (a, b) => a + b
fold([1, 2, 3], adder, 2) // returns 8 (2 + 1 + 2 + 3)
foldRight([1, 2, 3], adder, 2) // returns 8 (2 + 3 + 2 + 1)
reduce([1, 2, 3], adder) // returns 6 (1 + 2 + 3)
```
The use of `[].reduce` and `[].reduceRight` is forbidden for this exercise.
### Notions
- [devdocs.io/javascript/global_objects/array/reduce](https://devdocs.io/javascript/global_objects/array/reduce)
### Code provided
> 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)
Of course you may not use the method directly
### 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/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)
### Code provided
> 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
- `getLength` that takes an array or a string and return its length
### Notions
- [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)
### Notions
- [devdocs.io/javascript/global_objects/array/reverse](https://devdocs.io/javascript/global_objects/array/reverse)
### Code provided
> all code provided will be added to your solution and doesn't need to be submited.

5
subjects/road_intersection/README.md

@ -68,12 +68,12 @@ Vehicles must obey this rules:
- Vehicles must have a color depending on their route the colors are up to you to decide(ex:`r`- purple, `s`- Blue and `l`- Yellow). This must then be given during the audit
- Autonomous, vehicles driving on a lane with a **given route** must follow the direction of
that route, its not possible for the driver to change lanes or route.
that route, its not possible for the driver to change lanes or route.
- Each vehicle must have a fixed velocity.
- It must be kept a safety distance from other vehicles, if one vehicle stops the other vehicle thats
behind him must stop and keep its distance.
behind him must stop and keep its distance.
- Vehicles must stop if the traffic light is red and proceed otherwise.
@ -91,6 +91,7 @@ vehicles in different lanes and with different routes.
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`):
- `Up` south to north.
- `Down` north to south.
- `Right` west to east.

3
subjects/same-amount/README.md

@ -6,8 +6,7 @@ Create a `sameAmount` function that takes three parameter,
a data string and 2 regexes.
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

5
subjects/scalar/README.md

@ -1,7 +1,9 @@
## Scalar
### Instructions
Create the following **functions**, which each receives two parameters:
- `sum`, which returns the sum between two values from 0 to 255
- `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
@ -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)!
### 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)
@ -39,6 +41,7 @@ pub fn rem(a: X, b: X) -> X {
```
### Usage :
#### Note that There is no output for this test for you to train to comment accordingly.
```rust

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

@ -3,6 +3,7 @@
### Resources
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 [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)

1
subjects/series/README.md

@ -5,7 +5,6 @@
Create a function `series` that takes an array of async functions.
It must execute them in series and return the results in order.
### Notions
- [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?
##### Navigate to the homepage using the user you created. Try to erase products that were
##### not created by the 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
if they both have the same sign, or false otherwise.
### 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/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)
### Code provided
> 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`.
- Note: pay attention to the comment in the [usage](#usage)
### Notions
- 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
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 [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
### Notions
- [devdocs.io/javascript/global_objects/array/slice](https://devdocs.io/javascript/global_objects/array/slice)
### Code provided
> 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
philosophical speeches. And of course that something tragic has had to happen
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
> 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).
#### Fetching the data
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
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
displaying as you write, not needing a button for you to click.
#### Sort
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
- 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:
- **System monitor**, that will contain :
- The type of OS (Operating System).
- The user logged into the computer.
- The computer name, this being the **hostname**.
@ -112,6 +113,7 @@ For this project you must present the following monitorization:
![image](system.gif)
- **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 Virtual Memory (SWAP) being used, it should also include a visual display.
- The Disk usage, same here.
@ -128,11 +130,13 @@ For this project you must present the following monitorization:
![image](mem.gif)
- **Network**, that will contain :
- The network ipv4, (`lo`, `wlp5s0` and other networks that the computer may have).
- A tab bar that should contain two tables :
- `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.
- 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
are too big or too small. In other words it should be adjustable.

2
subjects/talking/README.md

@ -7,7 +7,7 @@ Build the function `talking` which will allow you to talk with your computer.
His answers will be created by you following the rules below.
- He answers "There is no need to yell, calm down!" if you yell at him, for example "LEAVE ME ALONE!"
(it is considered yelling when the sentence is all written in capital letters).
(it is considered yelling when the sentence is all written in capital letters).
- He answers "Sure" if you ask him something without yelling, for example "Is everything ok with you?"
- He answers "Quiet, I am thinking!" if you yell a question at him. "HOW ARE YOU?"
- He says "Just say something!" if you address him without actually saying anything.

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?!
Create a `tell-it-cypher.mjs` script that:
- Takes a file as first argument
- Takes one of these keywords as second argument:
- `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
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.
To find models of scary monsters/creatures:
- 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.

2
subjects/throttle/README.md

@ -3,11 +3,11 @@
### Instructions
Create two functions that will work like `_.throttle` from lodash
- `throttle`, this function doesn't need to take care of the options
- `opThrottle`, this function will take care of
the `trailing` and `leading` options
### Notions
- [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
### Notions

20
subjects/tron/README.md

@ -16,12 +16,12 @@ You will need to create a public repository with the name `tron`. Next you need
### 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.
- 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`.
*(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 two AIs moved to the same spot, both of them die.
- **The AI has to survive as long as it can.**
@ -49,17 +49,19 @@ 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.
Replace this line just before the `return` of the update function:
```js
const available = coordsInBound.filter(isFree)
const available = coordsInBound.filter(isFree)
// And I return a random available coord
return pickRandom(available)
// And I return a random available coord
return pickRandom(available)
```
...with this line:
```js
// always return the first free coordinates
return coordsInBound.filter(isFree)[0]
// always return the first free coordinates
return coordsInBound.filter(isFree)[0]
```
- save the file, push the changes and re-run the game in the browser.
@ -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
to use his or her own AI.
*May the best tron win :)*
_May the best tron win :)_
Have fun and good luck.

3
subjects/unbreakable/README.md

@ -3,19 +3,18 @@
### Instructions
Implement 2 functions:
- `split` that works like the string method `.split` but take the string as
it's first argument.
- `join` that works like the string method `.join` but take the array as
it's first argument.
### Notions
- [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)
### Code provided
> 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
Implement a `format` function that takes 2 arguments:
- a valid javascript Date object
- a format string that handle all of the following fields:
- y
@ -27,7 +28,6 @@ Implement a `format` function that takes 2 arguments:
- HH
- a
### 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)

16
subjects/using-filter/README.md

@ -3,29 +3,29 @@
### Instructions
- Create a function `filterShortStateName` that takes an array of
strings and that returns the ones with less than 7 characters.
strings and that returns the ones with less than 7 characters.
> Example: `'Iowa'` only contains 4 characters
- Create a function `filterStartVowel` that takes an array of strings
and that returns only the ones that start with a vowel (a,e,i,o,u).
and that returns only the ones that start with a vowel (a,e,i,o,u).
> Example: `'Alabama'` starts with a vowel
- Create a function `filter5Vowels` that takes an array of strings
and that returns only the ones which contain at least 5
vowels (a,e,i,o,u).
and that returns only the ones which contain at least 5
vowels (a,e,i,o,u).
> Example: `'California'` contains at least 5 vowels
- Create a function `filter1DistinctVowel` that takes an array of
strings and that returns only the ones which vowels are of only
one distinct one (a,e,i,o,u).
strings and that returns only the ones which vowels are of only
one distinct one (a,e,i,o,u).
> Example: `'Alabama'` only contains 1 distinct vowels `'a'`.
- Create a function `multiFilter` that takes an array of
objects and that returns only the ones which:
objects and that returns only the ones which:
- the key `capital` contains at least 8 characters.
- the key `name` does not start with a vowel
@ -33,6 +33,7 @@ objects and that returns only the ones which:
- the key `region` is not `'South'`
> Example of an array of objects matching the criterias:
```js
[
{ 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
solution **MUST** use `filter`
### Notions
- [devdocs.io/javascript/global_objects/array/filter](https://devdocs.io/javascript/global_objects/array/filter)

23
subjects/using-map/README.md

@ -3,7 +3,7 @@
### Instructions
- Create a function named `citiesOnly` which takes an array of objects
and which return an array of strings from the key `city`.
and which return an array of strings from the key `city`.
#### Example:
@ -21,8 +21,8 @@ citiesOnly([
```
- Create a function named `upperCasingStates` which takes an array of strings
and which Upper Case each words of a string. \
The function returns then an array of strings.
and which Upper Case each words of a string. \
The function returns then an array of strings.
#### Example:
@ -31,8 +31,8 @@ upperCasingStates(['alabama', 'new jersey']) // -> ['Alabama', 'New Jersey']
```
- Create a function named `fahrenheitToCelsius` which takes an array
of fahrenheit temperatures which converts them to Celsius.
Round down the result.
of fahrenheit temperatures which converts them to Celsius.
Round down the result.
The function then returns the result as an array of strings like below:
@ -43,15 +43,15 @@ fahrenheitToCelsius(['68°F', '59°F', '25°F']) // -> ['20°C', '15°C', '-4°C
```
- Create a function named `trimTemp` which takes an array of objects
and which removes the spaces from the string in the key `temperature`. \
The function then returns an array of objects with the modification.
and which removes the spaces from the string in the key `temperature`. \
The function then returns an array of objects with the modification.
#### Example:
```js
trimTemp([
{ city: 'Los Angeles', temperature: ' 101 °F '},
{ city: 'San Francisco', temperature: ' 84 ° F '},
{ city: 'Los Angeles', temperature: ' 101 °F ' },
{ city: 'San Francisco', temperature: ' 84 ° F ' },
]) /* -> [
{ city: 'Los Angeles', temperature: '101°F' },
{ city: 'San Francisco', temperature: '84°F' },
@ -59,7 +59,7 @@ trimTemp([
```
- Create a `tempForecasts` function which will take an array of objects, and which will
return an array of strings formatted as below:
return an array of strings formatted as below:
```js
tempForecasts([
@ -68,7 +68,7 @@ tempForecasts([
temperature: ' 101 °F',
state: 'california',
region: 'West',
}
},
]) // -> ['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
solution **MUST** use `map`
### Notions
- [devdocs.io/javascript/global_objects/array/map](https://devdocs.io/javascript/global_objects/array/map)

5
subjects/using-reduce/README.md

@ -3,10 +3,11 @@
### Instructions
Create three functions :
- `adder` that receives an array and adds its elements.
- `sumOrMul` that receives an array and adds or multiplies its elements
depending on whether the element is an odd or an even number.
depending on whether the element is an odd or an even number.
- `funcExec` that receives an array of functions and executes them.
@ -14,6 +15,7 @@ All functions may or may not receive an extra argument that should be the
initial value for the functions execution.
Example:
```js
sumOrMul([1, 2, 3, 4], 5)
// -> (((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
solution **MUST** use `reduce`
### Notions
- [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
- You cannot have a 0 before a number, example 0xx
### Notions
- [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
every vowel ('y' is not considered a vowel here) using a regex called `vowels`.
### Notions
- [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
### Notions
- [devdocs.io/javascript/global_objects/number](https://devdocs.io/javascript/global_objects/number)

Loading…
Cancel
Save