From e73220e4d60e7b33ec2572ebc90a5f101a735796 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment?=
Date: Mon, 22 Apr 2019 11:45:15 +0100
Subject: [PATCH 001/104] Create call-graphql.go
---
examples/call-graphql.go | 93 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 93 insertions(+)
create mode 100644 examples/call-graphql.go
diff --git a/examples/call-graphql.go b/examples/call-graphql.go
new file mode 100644
index 00000000..ab72c141
--- /dev/null
+++ b/examples/call-graphql.go
@@ -0,0 +1,93 @@
+package main
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io/ioutil"
+ "net/http"
+ "os"
+)
+
+func jsonPrettyPrint(in []byte) string {
+ var out bytes.Buffer
+ err := json.Indent(&out, in, "", " ")
+ if err != nil {
+ return string(in)
+ }
+ return out.String()
+}
+
+var HASURA_GRAPHQL_ADDRESS = os.Getenv("HASURA_GRAPHQL_ADDRESS")
+var HASURA_GRAPHQL_ADMIN_SECRET = os.Getenv("HASURA_GRAPHQL_ADMIN_SECRET")
+
+type GraphqlQuery struct {
+ Data interface{}
+}
+
+var client = &http.Client{Transport: http.DefaultTransport}
+
+func hasura(query string, variables interface{}, data interface{}) (err error) {
+ variablesBytes, err := json.Marshal(variables)
+ if err != nil {
+ return
+ }
+
+ v := string(variablesBytes)
+ requestBody := []byte(`{"query":"` + query + `","variables":` + v + `}`)
+ requestBytes := bytes.NewBuffer(requestBody)
+ req, err := http.NewRequest("POST", HASURA_GRAPHQL_ADDRESS, requestBytes)
+ if err != nil {
+ return
+ }
+
+ req.Header.Add("X-Hasura-Admin-Secret", HASURA_GRAPHQL_ADMIN_SECRET)
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return
+ }
+
+ b, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return
+ }
+
+ // loggin the answer for debugging purposes
+ fmt.Println(jsonPrettyPrint(b))
+
+ if resp.StatusCode < 200 || resp.StatusCode > 299 {
+ return errors.New(http.StatusText(resp.StatusCode))
+ }
+
+ gqlQuery := GraphqlQuery{Data: data}
+ err = json.Unmarshal(b, &gqlQuery)
+ if err != nil {
+ return
+ }
+ return
+}
+
+type User struct {
+ GithubLogin string
+}
+
+const userQuery = `
+query {
+ user {
+ githubLogin
+ }
+}`
+
+func getUsers() (users []User, err error) {
+ var data map[string][]User
+ err = hasura(userQuery, nil, &data)
+ return data["user"], err
+}
+
+func main() {
+ fmt.Println(getUsers())
+}
+
+// HASURA_GRAPHQL_ADMIN_SECRET=VERYVERYSECRET HASURA_GRAPHQL_ADDRESS=http://localhost/graphql-engine/v1alpha1/graphql go run call-graphql.go
From 1142d3429126759a8eacd4e7489b6374344784bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment?=
Date: Mon, 22 Apr 2019 11:54:54 +0100
Subject: [PATCH 002/104] Remove supefluous check
---
examples/call-graphql.go | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/examples/call-graphql.go b/examples/call-graphql.go
index ab72c141..9ef6af54 100644
--- a/examples/call-graphql.go
+++ b/examples/call-graphql.go
@@ -61,12 +61,7 @@ func hasura(query string, variables interface{}, data interface{}) (err error) {
return errors.New(http.StatusText(resp.StatusCode))
}
- gqlQuery := GraphqlQuery{Data: data}
- err = json.Unmarshal(b, &gqlQuery)
- if err != nil {
- return
- }
- return
+ return json.Unmarshal(b, &GraphqlQuery{Data: data})
}
type User struct {
From fdba51f5ebcd025a04bebde77c1ef0f47603f8e2 Mon Sep 17 00:00:00 2001
From: Louise Foussat
Date: Mon, 22 Apr 2019 14:51:05 +0100
Subject: [PATCH 003/104] create first doc for step creation in
signup/administrative part
---
doc/create-steps.md | 152 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 152 insertions(+)
create mode 100644 doc/create-steps.md
diff --git a/doc/create-steps.md b/doc/create-steps.md
new file mode 100644
index 00000000..0f583973
--- /dev/null
+++ b/doc/create-steps.md
@@ -0,0 +1,152 @@
+# How to create onboarding steps
+
+## Usage
+This documentation explains how to create steps in your onboarding. 2 kind of steps can be generated in a modular way :
+* forms
+* documents to sign
+
+These steps are used for the "sign up" phase, and for the administrative part of the onboarding.
+
+## Description & examples
+The sign up phase and the administration part of the onboarding are related to major objects in the admin. all the steps for each of these two sections are children of these two big objects, that you can create, update, or delete, and order as you wish.
+The objects contained in the sign up phase are object of type "sign up".
+The objects contained in the administration part of the onboarding phase are object of type "onboarding".
+
+### Relate a step to a major object
+Every step is related to the major object you want to costum as a child. To create a child, you must :
+1. Create a new object for your step in the admin (in Admin > "Add new object")
+ * The title of your object will be the title displayed for the step you're creating. Use a intellegible title for your user.
+ * This object must have the same type as your major object ("signup" for the sign up phase, "onboarding" for the administration part of the onboarding)
+2. Add this new object as a child of your major object
+ 1. Edit the major object
+ 2. Go to "Children" > "Add a child"
+ 3. Set up the new child:
+ * Enter its name in the input "Add a child name"
+ * Select you child in the select input
+ * Click on "ADD"
+
+### Settings for a form step
+In the child object you've created, 2 attributes must be filled:
+1. subtype
+2. form
+
+To set up the child object you've created with these elements :
+1. Edit you child object
+2. Go to "Object attributes"
+3. Add the attributes :
+ 1. Add a new key "subtype" of type `` with the value 'onb-adm-form'
+ 2. Add a new key "form" of type `
-## The Commandements _(read them)_
+### The Commandements _(read them)_
- Le numérique est ta passion.
@@ -100,7 +100,7 @@ A few basic principles to follow
- Si tu t’interroges ou ne comprends pas nos choix pédagogiques, demande nous. On ne fait généralement rien au hasard.
-## Required
+### Required
You [clone](http://lmgtfy.com/?q=git+clone) your [fork](http://lmgtfy.com/?q=github+fork) of this [repository](http://lmgtfy.com/?q=git+repository)
and in it, you must create a file named `turn_in` () in which you write EXACTLY the following sentence ending by a line break.
@@ -109,6 +109,6 @@ and in it, you must create a file named `turn_in` () in which you write EXACTLY
-## Submiting your solution
+### Submiting your solution
Your work should be commited and pushed in the master branch of your own fork of this repository.
diff --git a/subjects/compare.en.md b/subjects/compare.en.md
index e40ff803..9133ea0c 100644
--- a/subjects/compare.en.md
+++ b/subjects/compare.en.md
@@ -1,10 +1,10 @@
-# compare
+## compare
-## Instructions
+### Instructions
Write a function that behaves like the [`Compare`](https://golang.org/pkg/strings/#Compare) function.
-## Expected function
+### Expected function
```go
func Compare(a, b string) int {
@@ -12,7 +12,7 @@ func Compare(a, b string) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/compare.fr.md b/subjects/compare.fr.md
index a5fe8d4f..9f27f0c0 100644
--- a/subjects/compare.fr.md
+++ b/subjects/compare.fr.md
@@ -1,10 +1,10 @@
-# compare
+## compare
-## Instructions
+### Instructions
Écrire une fonction qui se comporte comme la fonction [`Compare`](https://golang.org/pkg/strings/#Compare).
-## Fonction attendue
+### Fonction attendue
```go
func Compare(a, b string) int {
@@ -12,7 +12,7 @@ func Compare(a, b string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/concat.en.md b/subjects/concat.en.md
index 31e99ceb..c5b4644c 100644
--- a/subjects/concat.en.md
+++ b/subjects/concat.en.md
@@ -1,10 +1,10 @@
-# concat
+## concat
-## Instructions
+### Instructions
Write a function that returns the concatenation of two `string` passed in arguments.
-## Expected function
+### Expected function
```go
func Concat(str1 string, str2 string) string {
@@ -12,7 +12,7 @@ func Concat(str1 string, str2 string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/concat.fr.md b/subjects/concat.fr.md
index fcacfdfa..20f7feeb 100644
--- a/subjects/concat.fr.md
+++ b/subjects/concat.fr.md
@@ -1,10 +1,10 @@
-# concat
+## concat
-## Instructions
+### Instructions
Écrire une fonction qui retourne la concaténation de deux `string` passées en paramètres.
-## Fonction attendue
+### Fonction attendue
```go
func Concat(str1 string, str2 string) string {
@@ -12,7 +12,7 @@ func Concat(str1 string, str2 string) string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/concatparams.en.md b/subjects/concatparams.en.md
index cc996d63..b9425ecd 100644
--- a/subjects/concatparams.en.md
+++ b/subjects/concatparams.en.md
@@ -1,19 +1,19 @@
-# concatparams
+## concatparams
-## Instructions
+### Instructions
Write a function that takes the arguments reveived in parameters and returns them as a `string`.
The arguments must be **separated** by a `\n`.
-## Expected function
+### Expected function
```go
func ConcatParams(args []string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/concatparams.fr.md b/subjects/concatparams.fr.md
index a9584ede..b5e5084c 100644
--- a/subjects/concatparams.fr.md
+++ b/subjects/concatparams.fr.md
@@ -1,19 +1,19 @@
-# concatparams
+## concatparams
-## Instructions
+### Instructions
Écrire une fonction qui prend les arguments en paramètres et les retournes dans une `string`.
Les arguments doivent être **séparés** par un `\n`.
-## Fonction attendue
+### Fonction attendue
```go
func ConcatParams(args []string) string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/convertbase.en.md b/subjects/convertbase.en.md
index f82550b3..760e3453 100644
--- a/subjects/convertbase.en.md
+++ b/subjects/convertbase.en.md
@@ -1,6 +1,6 @@
-# convertbase
+## convertbase
-## Instructions
+### Instructions
Write a function that returns the convertion of a `string` number from one `string` baseFrom to one `string` baseTo.
@@ -8,14 +8,14 @@ Only valid bases will be tested.
Negative numbers will not be tested.
-## Expected function
+### Expected function
```go
func ConvertBase(nbr, baseFrom, baseTo string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/convertbase.fr.md b/subjects/convertbase.fr.md
index 45da7f30..76899372 100644
--- a/subjects/convertbase.fr.md
+++ b/subjects/convertbase.fr.md
@@ -1,6 +1,6 @@
-# convertbase
+## convertbase
-## Instructions
+### Instructions
Écrire une fonction qui retourne la convertion d'un nombre `string` d'une baseFrom `string` à une baseTo `string`.
@@ -8,14 +8,14 @@ Seules des bases valides seront testées.
Les nombres négatifs ne seront pas testés.
-## Fonction attendue
+### Fonction attendue
```go
func ConvertBase(nbr, baseFrom, baseTo string) string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/countif.en.md b/subjects/countif.en.md
index 87105d0b..234987de 100644
--- a/subjects/countif.en.md
+++ b/subjects/countif.en.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Write a function `CountIf` that returns the number of elements of a `string` array for which the `f` function returns `true`.
-## Expected function
+### Expected function
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/countif.fr.md b/subjects/countif.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/countif.fr.md
+++ b/subjects/countif.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/divmod.en.md b/subjects/divmod.en.md
index 535108f8..1deb4ce1 100755
--- a/subjects/divmod.en.md
+++ b/subjects/divmod.en.md
@@ -1,10 +1,10 @@
-# divmod
+## divmod
-## Instructions
+### Instructions
- Write a function that will be formatted as below.
-## Expected function
+### Expected function
```go
func DivMod(a int, b int, div *int, mod *int) {
@@ -16,7 +16,7 @@ func DivMod(a int, b int, div *int, mod *int) {
- The result of this division will be stored in the int pointed by **div**.
- The remainder of this division will be stored in the int pointed by **mod**.
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/divmod.fr.md b/subjects/divmod.fr.md
index 90b9c353..5af68c2f 100755
--- a/subjects/divmod.fr.md
+++ b/subjects/divmod.fr.md
@@ -1,10 +1,10 @@
-# divmod
+## divmod
-## Instructions
+### Instructions
- Écrire une fonction qui aura le format ci-dessous.
-## Fonction attendue
+### Fonction attendue
```go
func DivMod(a int, b int, div *int, mod *int) {
@@ -16,7 +16,7 @@ func DivMod(a int, b int, div *int, mod *int) {
- Le résultat de la division sera stocké dans l'int pointé par **div**.
- Le reste de cette division sera stocké dans l'int pointé par **mod**.
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/doop.en.md b/subjects/doop.en.md
index f870fced..21c48d3d 100644
--- a/subjects/doop.en.md
+++ b/subjects/doop.en.md
@@ -1,6 +1,6 @@
-# doop
+## doop
-## Instructions
+### Instructions
Write a [program](TODO-LINK) that is called `doop`.
@@ -16,7 +16,7 @@ In case of an invalid number of arguments the program prints nothing.
`fmt.Print` is authorized.
-## Usage
+### Usage
```console
student@ubuntu:~/piscine/test$ go build doop.go
diff --git a/subjects/doop.fr.md b/subjects/doop.fr.md
index 0d11ae53..8acbf79e 100644
--- a/subjects/doop.fr.md
+++ b/subjects/doop.fr.md
@@ -1,6 +1,6 @@
-# doop
+## doop
-## Instructions
+### Instructions
Écrire un [programme](TODO-LINK) qui s'apelle `doop`.
@@ -16,7 +16,7 @@ En cas de nombre invalide d'arguments le programme affiche rien.
`fmt.Print` est autorisé.
-## Utilisation
+### Utilisation
```console
student@ubuntu:~/piscine/test$ go build doop.go
diff --git a/subjects/eightqueens.en.md b/subjects/eightqueens.en.md
index b90d7946..9964bfdd 100644
--- a/subjects/eightqueens.en.md
+++ b/subjects/eightqueens.en.md
@@ -1,6 +1,6 @@
-# eightqueens
+## eightqueens
-## Intructions
+### Intructions
Write a function that prints the solutions to the [eight queens puzzle](https://en.wikipedia.org/wiki/Eight_queens_puzzle).
@@ -22,7 +22,7 @@ The index of the placement of a queen starts at 1.
It reads from left to right and each digit is the position for each column.
The solutions will be printed in ascending order.
-## Expected function
+### Expected function
```go
package main
diff --git a/subjects/eightqueens.fr.md b/subjects/eightqueens.fr.md
index bd418b21..927baa65 100644
--- a/subjects/eightqueens.fr.md
+++ b/subjects/eightqueens.fr.md
@@ -1,6 +1,6 @@
-# eightqueens
+## eightqueens
-## Intructions
+### Intructions
Écrire une [fonction](TODO-LINK) qui affiche toutes les solutions du [problème des huit dames](https://en.wikipedia.org/wiki/Eight_queens_puzzle).
@@ -22,7 +22,7 @@ L'index du placement d'une reine commence à 1.
Elle se lit de gauche à droite et chaque chiffre est la position pour chacune des colonnes.
Les solutions seront affichées dans l'ordre croissant.
-## Fonction attendue
+### Fonction attendue
```go
package main
diff --git a/subjects/fibonacci.en.md b/subjects/fibonacci.en.md
index abc673da..47ad3862 100644
--- a/subjects/fibonacci.en.md
+++ b/subjects/fibonacci.en.md
@@ -1,6 +1,6 @@
-# fibonacci
+## fibonacci
-## Intructions
+### Intructions
Write an **recursive** function that returns the value of fibonacci sequence matching the index passed as parameter.
@@ -12,7 +12,7 @@ A negative index will return `-1`.
`for` is **forbidden** for this exercise.
-## Expected function
+### Expected function
```go
package main
@@ -22,7 +22,7 @@ func Fibonacci(int index) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/fibonacci.fr.md b/subjects/fibonacci.fr.md
index d0b949f9..c6b5b0a2 100644
--- a/subjects/fibonacci.fr.md
+++ b/subjects/fibonacci.fr.md
@@ -1,6 +1,6 @@
-# fibonacci
+## fibonacci
-## Intructions
+### Intructions
Écrire une fonction **récursive** qui renvoie la valeur de la suite de fibonacci correspondant à l'index passé en paramètre.
@@ -12,7 +12,7 @@ Un index négatif renvoie `-1`.
`for` est **interdit** pour cet exercice.
-## Fonction attendue
+### Fonction attendue
```go
package main
@@ -22,7 +22,7 @@ func Fibonacci(int index) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel `main.go` :
diff --git a/subjects/findnextprime.en.md b/subjects/findnextprime.en.md
index a612340c..5743622f 100644
--- a/subjects/findnextprime.en.md
+++ b/subjects/findnextprime.en.md
@@ -1,10 +1,10 @@
-# findnextprime
+## findnextprime
-## Intructions
+### Intructions
Write a function that returns the first prime number that is equal or superior to the `int` passed as parameter.
-## Expected function
+### Expected function
```go
func FindNextPrime(int nb) int {
@@ -12,7 +12,7 @@ func FindNextPrime(int nb) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/findnextprime.fr.md b/subjects/findnextprime.fr.md
index 073307bd..c1761842 100644
--- a/subjects/findnextprime.fr.md
+++ b/subjects/findnextprime.fr.md
@@ -1,10 +1,10 @@
-# findnextprime
+## findnextprime
-## Intructions
+### Intructions
Écrire une fonction qui renvoie le premier nombre premier qui est égal ou supérieur à l'`int` passé en paramètre.
-## Fonction attendue
+### Fonction attendue
```go
func FindNextPrime(int nb) int {
@@ -12,7 +12,7 @@ func FindNextPrime(int nb) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/firebase-demo.en.md b/subjects/firebase-demo.en.md
index 9d1765ed..e68fc092 100644
--- a/subjects/firebase-demo.en.md
+++ b/subjects/firebase-demo.en.md
@@ -1 +1 @@
-# firebase-demo
+## firebase-demo
diff --git a/subjects/firstrune.en.md b/subjects/firstrune.en.md
index be9c9a7c..f257da3d 100644
--- a/subjects/firstrune.en.md
+++ b/subjects/firstrune.en.md
@@ -1,10 +1,10 @@
-# firstrune
+## firstrune
-## Instructions
+### Instructions
Write a function that returns the first `rune` of a `string`.
-## Expected function
+### Expected function
```go
func FirstRune(s string) rune {
@@ -12,7 +12,7 @@ func FirstRune(s string) rune {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/firstrune.fr.md b/subjects/firstrune.fr.md
index 1ed1a722..932cbe45 100644
--- a/subjects/firstrune.fr.md
+++ b/subjects/firstrune.fr.md
@@ -1,10 +1,10 @@
-# firstrune
+## firstrune
-## Instructions
+### Instructions
Écrire une fonction qui retourne la première `rune` d'une `string`.
-## Fonction attendue
+### Fonction attendue
```go
func FirstRune(s string) rune {
@@ -12,7 +12,7 @@ func FirstRune(s string) rune {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/foreach.en.md b/subjects/foreach.en.md
index b88c4b5f..d21c6ca0 100644
--- a/subjects/foreach.en.md
+++ b/subjects/foreach.en.md
@@ -1,17 +1,17 @@
-# foreach
+## foreach
-## Instructions
+### Instructions
Write a function `ForEach` that, for an `int` array, applies a function on each elements of that array.
-## Expected function
+### Expected function
```go
func ForEach(f func(int), arr []int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/foreach.fr.md b/subjects/foreach.fr.md
index e143d7cf..18ac85ac 100644
--- a/subjects/foreach.fr.md
+++ b/subjects/foreach.fr.md
@@ -1,17 +1,17 @@
-# foreach
+## foreach
-## Instructions
+### Instructions
Écrire une fonction `ForEach` qui, pour un tableau d'`int`, applique une fonction sur chaque éléments de ce tableau.
-## Fonction attendue
+### Fonction attendue
```go
func ForEach(f func(int), arr []int) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/functions.en.md b/subjects/functions.en.md
index 4675bc02..c5ba5ff2 100644
--- a/subjects/functions.en.md
+++ b/subjects/functions.en.md
@@ -1,3 +1,3 @@
-# functions
+## functions
This repository aggregate every functions of the Zone 01 organization
diff --git a/subjects/get-ready.en.md b/subjects/get-ready.en.md
index df26156b..8086b1ce 100644
--- a/subjects/get-ready.en.md
+++ b/subjects/get-ready.en.md
@@ -1,6 +1,6 @@
-# get-ready
+## get-ready
-## Instructions
+### Instructions
Subscribe to [Discord](Discord-invite-link) and send a private message to the bot (TODO: find a name for the bot).
diff --git a/subjects/go-say-hello.en.md b/subjects/go-say-hello.en.md
index 2fba5366..d9242b47 100644
--- a/subjects/go-say-hello.en.md
+++ b/subjects/go-say-hello.en.md
@@ -1,10 +1,10 @@
-# go-say-hello
+## go-say-hello
-## Instructions
+### Instructions
Write a [program](TODO-LINK) that says `hello` to your GitHub username.
-## Usage
+### Usage
Where `{username}` is your GitHub username:
diff --git a/subjects/go-say-hello.fr.md b/subjects/go-say-hello.fr.md
index 01a9cc9c..5aab8f02 100644
--- a/subjects/go-say-hello.fr.md
+++ b/subjects/go-say-hello.fr.md
@@ -1,10 +1,10 @@
-# gosayhello
+## gosayhello
-## Instructions
+### Instructions
Écrire un [programme](TODO-LINK) qui vous dis `hello` à votre GitHub username.
-## Utilisation
+### Utilisation
Ici `{username}` est votre GitHub username:
diff --git a/subjects/index.en.md b/subjects/index.en.md
index 5c7c46c6..4210f76d 100644
--- a/subjects/index.en.md
+++ b/subjects/index.en.md
@@ -1,10 +1,10 @@
-# index
+## index
-## Instructions
+### Instructions
Write a function that behaves like the [`Index`](https://golang.org/pkg/strings/#Index) function.
-## Expected function
+### Expected function
```go
func Index(s string, toFind string) int {
@@ -12,7 +12,7 @@ func Index(s string, toFind string) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/index.fr.md b/subjects/index.fr.md
index d8770b3d..fa256638 100644
--- a/subjects/index.fr.md
+++ b/subjects/index.fr.md
@@ -1,10 +1,10 @@
-# index
+## index
-## Instructions
+### Instructions
Écrire une fonction qui se comporte comme la fonction [`Index`](https://golang.org/pkg/strings/#Index).
-## Fonction attendue
+### Fonction attendue
```go
func Index(s string, toFind string) int {
@@ -12,7 +12,7 @@ func Index(s string, toFind string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/isalpha.en.md b/subjects/isalpha.en.md
index 89be87ff..92cc667f 100644
--- a/subjects/isalpha.en.md
+++ b/subjects/isalpha.en.md
@@ -1,10 +1,10 @@
-# isalpha
+## isalpha
-## Instructions
+### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains alphanumerical characters, and that returns `false` otherwise.
-## Expected function
+### Expected function
```go
func IsAlpha(str string) bool {
@@ -12,7 +12,7 @@ func IsAlpha(str string) bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/isalpha.fr.md b/subjects/isalpha.fr.md
index 7a55229b..0bd3b2ce 100644
--- a/subjects/isalpha.fr.md
+++ b/subjects/isalpha.fr.md
@@ -1,10 +1,10 @@
-# isalpha
+## isalpha
-## Instructions
+### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères alphanumériques, et qui retourne `false` autrement.
-## Fonction attendue
+### Fonction attendue
```go
func IsAlpha(str string) bool {
@@ -12,7 +12,7 @@ func IsAlpha(str string) bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/islower.en.md b/subjects/islower.en.md
index 6cb7b82d..71d43576 100644
--- a/subjects/islower.en.md
+++ b/subjects/islower.en.md
@@ -1,10 +1,10 @@
-# islower
+## islower
-## Instructions
+### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains lowercase characters, and that returns `false` otherwise.
-## Expected function
+### Expected function
```go
func IsLower(str string) bool {
@@ -12,7 +12,7 @@ func IsLower(str string) bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/islower.fr.md b/subjects/islower.fr.md
index c1987fb1..47b13436 100644
--- a/subjects/islower.fr.md
+++ b/subjects/islower.fr.md
@@ -1,10 +1,10 @@
-# islower
+## islower
-## Instructions
+### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères minuscules, et qui retourne `false` autrement.
-## Fonction attendue
+### Fonction attendue
```go
func IsLower(str string) bool {
@@ -12,7 +12,7 @@ func IsLower(str string) bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/isnegative.en.md b/subjects/isnegative.en.md
index bf0f34bf..faa8b57c 100644
--- a/subjects/isnegative.en.md
+++ b/subjects/isnegative.en.md
@@ -1,10 +1,10 @@
-# isnegative
+## isnegative
-## Instructions
+### Instructions
Write a [function](TODO-LINK) that prints `'T'` (true) on a single line if the `int` passed as parameter is negative, otherwise it prints `'F'` (false).
-## Expected function
+### Expected function
```go
func IsNegative(nb int) {
@@ -12,7 +12,7 @@ func IsNegative(nb int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/isnegative.fr.md b/subjects/isnegative.fr.md
index fa2f3739..9804e33b 100644
--- a/subjects/isnegative.fr.md
+++ b/subjects/isnegative.fr.md
@@ -1,10 +1,10 @@
-# isnegative
+## isnegative
-## Instructions
+### Instructions
Écrire une [fonction](TODO-LINK) qui affiche `'T'` (true) sur une seule ligne si l'`int` passé en paramètre est négatif, sinon elle affiche `'F'` (false).
-## Fonction attendue
+### Fonction attendue
```go
func IsNegative(nb int) {
@@ -12,7 +12,7 @@ func IsNegative(nb int) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/isnumeric.en.md b/subjects/isnumeric.en.md
index 0d877d6d..550dced3 100644
--- a/subjects/isnumeric.en.md
+++ b/subjects/isnumeric.en.md
@@ -1,10 +1,10 @@
-# isnumeric
+## isnumeric
-## Instructions
+### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains numerical characters, and that returns `false` otherwise.
-## Expected function
+### Expected function
```go
func IsNumeric(str string) bool {
@@ -12,7 +12,7 @@ func IsNumeric(str string) bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/isnumeric.fr.md b/subjects/isnumeric.fr.md
index 624f58e0..adaec9ba 100644
--- a/subjects/isnumeric.fr.md
+++ b/subjects/isnumeric.fr.md
@@ -1,10 +1,10 @@
-# isnumeric
+## isnumeric
-## Instructions
+### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères numériques, et qui retourne `false` autrement.
-## Fonction attendue
+### Fonction attendue
```go
func IsNumeric(str string) bool {
@@ -12,7 +12,7 @@ func IsNumeric(str string) bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/isprime.en.md b/subjects/isprime.en.md
index 371eca69..b5a2f91f 100644
--- a/subjects/isprime.en.md
+++ b/subjects/isprime.en.md
@@ -1,10 +1,10 @@
-# isprime
+## isprime
-## Intructions
+### Intructions
Write a function that returns `true` if the `int` passed as parameter is a prime number. Otherwise it returns `false`.
-## Expected function
+### Expected function
```go
func IsPrime(int nb) bool {
@@ -12,7 +12,7 @@ func IsPrime(int nb) bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/isprime.fr.md b/subjects/isprime.fr.md
index 55b63472..be345292 100644
--- a/subjects/isprime.fr.md
+++ b/subjects/isprime.fr.md
@@ -1,10 +1,10 @@
-# isprime
+## isprime
-## Intructions
+### Intructions
Écrire une fonction qui renvoie `true` si l'`int` passé en paramètre est un nombre premier. Autrement elle renvoie `false`.
-## Fonction attendue
+### Fonction attendue
```go
func IsPrime(int nb) bool {
@@ -12,7 +12,7 @@ func IsPrime(int nb) bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/isprintable.en.md b/subjects/isprintable.en.md
index 55e7ab19..04c131f8 100644
--- a/subjects/isprintable.en.md
+++ b/subjects/isprintable.en.md
@@ -1,10 +1,10 @@
-# isprintable
+## isprintable
-## Instructions
+### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains printable characters, and that returns `false` otherwise.
-## Expected function
+### Expected function
```go
package main
@@ -13,7 +13,7 @@ func IsPrintable(str string) bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/isprintable.fr.md b/subjects/isprintable.fr.md
index 3822a20b..9927cbee 100644
--- a/subjects/isprintable.fr.md
+++ b/subjects/isprintable.fr.md
@@ -1,10 +1,10 @@
-# isprintable
+## isprintable
-## Instructions
+### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères majuscules, et qui retourne `false` autrement.
-## Fonction attendue
+### Fonction attendue
```go
package main
@@ -13,7 +13,7 @@ func IsPrintable(str string) bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/issorted.en.md b/subjects/issorted.en.md
index 89683314..5970788a 100644
--- a/subjects/issorted.en.md
+++ b/subjects/issorted.en.md
@@ -1,6 +1,6 @@
-# issorted
+## issorted
-## Instructions
+### Instructions
Write a function `IsSorted` that returns `true` if the slice of `int` is sorted, and that returns `false` otherwise.
@@ -9,14 +9,14 @@ it returns `0` if they are equal and it returns a negative `int` otherwise.
To do your testing you have to write your own `f` function.
-## Expected function
+### Expected function
```go
func IsSorted(f func(a, b int) int, tab []int) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function (without `f`):
diff --git a/subjects/issorted.fr.md b/subjects/issorted.fr.md
index 28241082..6c6471c2 100644
--- a/subjects/issorted.fr.md
+++ b/subjects/issorted.fr.md
@@ -1,6 +1,6 @@
-# issorted
+## issorted
-## Instructions
+### Instructions
Écrire une fonction `IsSorted` qui retourne `true` si la slice d'`int` est triée, et qui retourne `false` autrement.
@@ -8,14 +8,14 @@ La fonction passée en paramètre retourne un `int` positive si `a` (le premier
Pour faire vos tests, vous devez coder votre propre fonction `f`.
-## Fonction attendue
+### Fonction attendue
```go
func IsSorted(f func(a, b int) int, tab []int) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction (sans `f`) :
diff --git a/subjects/isupper.en.md b/subjects/isupper.en.md
index 20afc831..66980bec 100644
--- a/subjects/isupper.en.md
+++ b/subjects/isupper.en.md
@@ -1,10 +1,10 @@
-# isupper
+## isupper
-## Instructions
+### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains uppercase characters, and that returns `false` otherwise.
-## Expected function
+### Expected function
```go
func IsUpper(str string) bool {
@@ -12,7 +12,7 @@ func IsUpper(str string) bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/isupper.fr.md b/subjects/isupper.fr.md
index c10d8129..9b991785 100644
--- a/subjects/isupper.fr.md
+++ b/subjects/isupper.fr.md
@@ -1,10 +1,10 @@
-# isupper
+## isupper
-## Instructions
+### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères majuscules, et qui retourne `false` autrement.
-## Fonction attendue
+### Fonction attendue
```go
func IsUpper(str string) bool {
@@ -12,7 +12,7 @@ func IsUpper(str string) bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/iterativefactorial.en.md b/subjects/iterativefactorial.en.md
index 45a5cf5a..2e882e55 100644
--- a/subjects/iterativefactorial.en.md
+++ b/subjects/iterativefactorial.en.md
@@ -1,12 +1,12 @@
-# iterativefactorial
+## iterativefactorial
-## Intructions
+### Intructions
Write an **iterative** function that returns the factorial of the `int` passed as parameter.
Errors (non possible values or overflows) will return `0`.
-## Expected function
+### Expected function
```go
func IterativeFactorial(int nb) int {
@@ -14,7 +14,7 @@ func IterativeFactorial(int nb) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/iterativefactorial.fr.md b/subjects/iterativefactorial.fr.md
index 9f7f91ae..79f2a2f2 100644
--- a/subjects/iterativefactorial.fr.md
+++ b/subjects/iterativefactorial.fr.md
@@ -1,12 +1,12 @@
-# iterativefactorial
+## iterativefactorial
-## Intructions
+### Intructions
Écrire une fonction **itérative** qui renvoie la factorielle d'un `int` passé en paramètre.
Les erreurs (valeurs non possibles ou overflows) renverront `0`.
-## Fonction attendue
+### Fonction attendue
```go
func IterativeFactorial(int nb) int {
@@ -14,7 +14,7 @@ func IterativeFactorial(int nb) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/iterativepower.en.md b/subjects/iterativepower.en.md
index 26586a26..a7d30fea 100644
--- a/subjects/iterativepower.en.md
+++ b/subjects/iterativepower.en.md
@@ -1,12 +1,12 @@
-# iterativepower
+## iterativepower
-## Intructions
+### Intructions
Write an **iterative** function that returns the power of the `int` passed as parameter.
Negative powers will return `0`. Overflows do **not** have to be dealt with.
-## Expected function
+### Expected function
```go
func IterativePower(int nb, int power) int {
@@ -14,7 +14,7 @@ func IterativePower(int nb, int power) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/iterativepower.fr.md b/subjects/iterativepower.fr.md
index 6088ab9b..c4fac89d 100644
--- a/subjects/iterativepower.fr.md
+++ b/subjects/iterativepower.fr.md
@@ -1,12 +1,12 @@
-# iterativepower
+## iterativepower
-## Intructions
+### Intructions
Écrire une fonction **itérative** qui renvoie la puissance de deux `int` passés en paramètre.
Les puissances négatives renverront `0`. Les overflows **ne doivent pas** être gérés.
-## Fonction attendue
+### Fonction attendue
```go
func IterativePower(int nb, int power) int {
@@ -14,7 +14,7 @@ func IterativePower(int nb, int power) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/join.en.md b/subjects/join.en.md
index 80bb2904..cf5800d3 100644
--- a/subjects/join.en.md
+++ b/subjects/join.en.md
@@ -1,10 +1,10 @@
-# join
+## join
-## Instructions
+### Instructions
Write a function that returns the concatenation of all the `string` of a table of `string` **separated** by the separator passed in argument.
-## Expected function
+### Expected function
```go
func Join(strs []string, sep string) string {
@@ -12,7 +12,7 @@ func Join(strs []string, sep string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/join.fr.md b/subjects/join.fr.md
index 57beea67..03317193 100644
--- a/subjects/join.fr.md
+++ b/subjects/join.fr.md
@@ -1,10 +1,10 @@
-# join
+## join
-## Instructions
+### Instructions
Écrire une fonction qui retourne la concaténation de deux `string` **séparées** par le séparateur passées en paramètres.
-## Fonction attendue
+### Fonction attendue
```go
func Join(strs []string, sep string) string{
@@ -12,7 +12,7 @@ func Join(strs []string, sep string) string{
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/lastrune.en.md b/subjects/lastrune.en.md
index 495ed812..03a11067 100644
--- a/subjects/lastrune.en.md
+++ b/subjects/lastrune.en.md
@@ -1,10 +1,10 @@
-# lastrune
+## lastrune
-## Instructions
+### Instructions
Write a function that returns the last `rune` of a `string`.
-## Expected function
+### Expected function
```go
func LastRune(s string) rune {
@@ -12,7 +12,7 @@ func LastRune(s string) rune {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/lastrune.fr.md b/subjects/lastrune.fr.md
index d439daba..da208207 100644
--- a/subjects/lastrune.fr.md
+++ b/subjects/lastrune.fr.md
@@ -1,10 +1,10 @@
-# lastrune
+## lastrune
-## Instructions
+### Instructions
Écrire une fonction qui retourne la dernière `rune` d'une `string`.
-## Fonction attendue
+### Fonction attendue
```go
func LastRune(s string) rune {
@@ -12,7 +12,7 @@ func LastRune(s string) rune {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listat.en.md b/subjects/listat.en.md
index 4298d54e..4518a82d 100644
--- a/subjects/listat.en.md
+++ b/subjects/listat.en.md
@@ -1,12 +1,12 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListAt` that haves one pointer to the list, `l`, and an `int` as parameters. This function should print a `Node` of the linked list, depending on the number, `nbr`.
- In case of error it should print `nil`
-## Expected function and structure
+### Expected function and structure
```go
type Node struct {
@@ -20,7 +20,7 @@ func ListAt(l *Node, nbr int) *Node{
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listat.fr.md b/subjects/listat.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listat.fr.md
+++ b/subjects/listat.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listclear.en.md b/subjects/listclear.en.md
index 9830399e..0da3b3c9 100644
--- a/subjects/listclear.en.md
+++ b/subjects/listclear.en.md
@@ -1,12 +1,12 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListClear` that delets all `nodes` from a linked list, deleting the link between the list.
- Tip: assign the list's pointer to nil
-## Expected function and structure
+### Expected function and structure
```go
type Node struct {
@@ -24,7 +24,7 @@ func ListClear(l *List) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listclear.fr.md b/subjects/listclear.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listclear.fr.md
+++ b/subjects/listclear.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listfind.en.md b/subjects/listfind.en.md
index aec36d3e..4979b846 100644
--- a/subjects/listfind.en.md
+++ b/subjects/listfind.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListFind` that returns the address of the first link that the function in the arguments its equal.
@@ -8,7 +8,7 @@ Write a function `ListFind` that returns the address of the first link that the
- Use pointers wen ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -30,7 +30,7 @@ func ListFind(l *list, comp func(l *list) bool) *interface{} {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listfind.fr.md b/subjects/listfind.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listfind.fr.md
+++ b/subjects/listfind.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listforeach.en.md b/subjects/listforeach.en.md
index 5b34cf45..025c0e52 100644
--- a/subjects/listforeach.en.md
+++ b/subjects/listforeach.en.md
@@ -1,12 +1,12 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListForEach` that applies a function given as argument to the information within each of the list's links.
- The function given as argument must have a pointer as argument: `l *list`
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -23,7 +23,7 @@ func ListForEach(l *list, f func(l *list)) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listforeach.fr.md b/subjects/listforeach.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listforeach.fr.md
+++ b/subjects/listforeach.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listforeachif.en.md b/subjects/listforeachif.en.md
index 3b97056d..501d047f 100644
--- a/subjects/listforeachif.en.md
+++ b/subjects/listforeachif.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListForEachIf` that applies a function given as argument to the information within some links of the list.
@@ -10,7 +10,7 @@ Write a function `ListForEachIf` that applies a function given as argument to th
- Use pointers wen ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -32,7 +32,7 @@ func ListForEachIf(l *list, f func(l *list), comp func(l *list) bool) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listforeachif.fr.md b/subjects/listforeachif.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listforeachif.fr.md
+++ b/subjects/listforeachif.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listlast.en.md b/subjects/listlast.en.md
index 329123bc..24503898 100644
--- a/subjects/listlast.en.md
+++ b/subjects/listlast.en.md
@@ -1,10 +1,10 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListLast` that returns the last element of the linked list.
-## Expected function and structure
+### Expected function and structure
```go
type Node struct {
@@ -21,7 +21,7 @@ func ListLast(l *list) *list {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listlast.fr.md b/subjects/listlast.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listlast.fr.md
+++ b/subjects/listlast.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listmerge.en.md b/subjects/listmerge.en.md
index ce2ec03d..e29427f5 100644
--- a/subjects/listmerge.en.md
+++ b/subjects/listmerge.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListMerge` that places elements of a list `l2` at the end of an other list `l1`.
@@ -8,7 +8,7 @@ Write a function `ListMerge` that places elements of a list `l2` at the end of a
- Use pointers when ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -26,7 +26,7 @@ func ListMerge(l1 *list, l2 *list) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listmerge.fr.md b/subjects/listmerge.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listmerge.fr.md
+++ b/subjects/listmerge.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listpushback.en.md b/subjects/listpushback.en.md
index 8ede0b59..eada7bf9 100644
--- a/subjects/listpushback.en.md
+++ b/subjects/listpushback.en.md
@@ -1,10 +1,10 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListPushBack` that inserts a new element `Node` at the end of the list, using the structure `List`
-## Expected function and structure
+### Expected function and structure
```go
type Node struct {
@@ -21,7 +21,7 @@ func ListPushBack(l *List, data interface{}) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listpushback.fr.md b/subjects/listpushback.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listpushback.fr.md
+++ b/subjects/listpushback.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listpushfront.en.md b/subjects/listpushfront.en.md
index f7014021..0e1e511b 100644
--- a/subjects/listpushfront.en.md
+++ b/subjects/listpushfront.en.md
@@ -1,10 +1,10 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListPushBack` that inserts a new element `node` at the beginning of the list using `list`
-## Expected function and structure
+### Expected function and structure
```go
type Node struct {
@@ -21,7 +21,7 @@ func ListPushFront(l *list, data interface{}) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listpushfront.fr.md b/subjects/listpushfront.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listpushfront.fr.md
+++ b/subjects/listpushfront.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listpushparams.en.md b/subjects/listpushparams.en.md
index d4868fe1..c799dce2 100644
--- a/subjects/listpushparams.en.md
+++ b/subjects/listpushparams.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a program that creates a new linked list and includes each command-line argument in to the list.
diff --git a/subjects/listpushparams.fr.md b/subjects/listpushparams.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listpushparams.fr.md
+++ b/subjects/listpushparams.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listremoveif.en.md b/subjects/listremoveif.en.md
index 5fd911d9..b27311ed 100644
--- a/subjects/listremoveif.en.md
+++ b/subjects/listremoveif.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListRemoveIf` that removes all elements that are equal to the `data_ref` introduced in the argument of the function.
@@ -8,7 +8,7 @@ Write a function `ListRemoveIf` that removes all elements that are equal to the
- Use pointers wen ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -26,7 +26,7 @@ func ListRemoveIf(l *list, data_ref interface{}) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listremoveif.fr.md b/subjects/listremoveif.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listremoveif.fr.md
+++ b/subjects/listremoveif.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listreverse.en.md b/subjects/listreverse.en.md
index 2f9d80fe..a602a052 100644
--- a/subjects/listreverse.en.md
+++ b/subjects/listreverse.en.md
@@ -1,12 +1,12 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListReverse` that reverses the elements order of a given linked list.
- Use pointers when ever you can
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -23,7 +23,7 @@ func ListReverse(l *list) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listreverse.fr.md b/subjects/listreverse.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listreverse.fr.md
+++ b/subjects/listreverse.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listsize.en.md b/subjects/listsize.en.md
index b520b872..c69f59f8 100644
--- a/subjects/listsize.en.md
+++ b/subjects/listsize.en.md
@@ -1,10 +1,10 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListSize` that returns the number of elements in the list.
-## Expected function and structure
+### Expected function and structure
```go
type Node struct {
@@ -22,7 +22,7 @@ func ListSize(l *List) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listsize.fr.md b/subjects/listsize.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listsize.fr.md
+++ b/subjects/listsize.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listsort.en.md b/subjects/listsort.en.md
index 14f29496..b690cb98 100644
--- a/subjects/listsort.en.md
+++ b/subjects/listsort.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListSort` that sorts the linked list by ascending order.
@@ -10,7 +10,7 @@ Write a function `ListSort` that sorts the linked list by ascending order.
- Use pointers when ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -23,7 +23,7 @@ func ListSort(l *node) *node {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listsort.fr.md b/subjects/listsort.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listsort.fr.md
+++ b/subjects/listsort.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/make-it-better.en.md b/subjects/make-it-better.en.md
index 016dd955..936388b5 100644
--- a/subjects/make-it-better.en.md
+++ b/subjects/make-it-better.en.md
@@ -1,6 +1,6 @@
-# make-it-better
+## make-it-better
-## Instructions
+### Instructions
Create the files and directories so that when you use the command `ls` below the output will looks like this :
diff --git a/subjects/make-it-better.fr.md b/subjects/make-it-better.fr.md
index eb9a0303..a0c3885b 100644
--- a/subjects/make-it-better.fr.md
+++ b/subjects/make-it-better.fr.md
@@ -1,6 +1,6 @@
-# make-it-better
+## make-it-better
-## Instructions
+### Instructions
Créer les fichiers et dossiers de tel sorte que lorsque cette commande `ls` ci-dessous est utilisée, l'`output` ressemble à cela :
diff --git a/subjects/makerange.en.md b/subjects/makerange.en.md
index e6516af6..0c96b368 100644
--- a/subjects/makerange.en.md
+++ b/subjects/makerange.en.md
@@ -1,6 +1,6 @@
-# makerange
+## makerange
-## Instructions
+### Instructions
Write a function that takes an `int` min and an `int` max as parameters.
That function returns a slice of `int` with all the values between min and max.
@@ -11,14 +11,14 @@ If min is superior or equal to max, a `nil` slice is returned.
`append` is not allowed for this exercise.
-## Expected function
+### Expected function
```go
func MakeRange(min, max int) []int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/makerange.fr.md b/subjects/makerange.fr.md
index 9edf6692..3e12b377 100644
--- a/subjects/makerange.fr.md
+++ b/subjects/makerange.fr.md
@@ -1,6 +1,6 @@
-# makerange
+## makerange
-## Instructions
+### Instructions
Écrire une fonction qui prend un `int` minimum et un `int` maximum comme paramètres. Cette fonction retournes une slice d'`int` avec toutes les valeurs comprises entre le minimum et le maximum.
@@ -10,14 +10,14 @@ Si le minimum est supérieur ou égal au maximum, une slice `nil` est retournée
`append` n'est pas autorisé pour cet exercice.
-## Fonction attendue
+### Fonction attendue
```go
func MakeRange(min, max int) []int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/map.en.md b/subjects/map.en.md
index caa35d78..c1112463 100644
--- a/subjects/map.en.md
+++ b/subjects/map.en.md
@@ -1,17 +1,17 @@
-# map
+## map
-## Instructions
+### Instructions
Write a function `Map` that, for an `int` array, applies a function of this type `func(int) bool` on each elements of that array and returns an array of all the return values.
-## Expected function
+### Expected function
```go
func Map(f func(int) bool, arr []int) []bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/map.fr.md b/subjects/map.fr.md
index 478219a5..6b518816 100644
--- a/subjects/map.fr.md
+++ b/subjects/map.fr.md
@@ -1,17 +1,17 @@
-# map
+## map
-## Instructions
+### Instructions
Écrire une fonction `Map` qui, pour un tableau d'`int`, applique une fonction de type `func(int) bool` sur chaque éléments de ce tableau et retournes un tableau de toutes les valeurs de retour.
-## Fonction attendue
+### Fonction attendue
```go
func Map(f func(int) bool, arr []int) []bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/now-get-to-work.en.md b/subjects/now-get-to-work.en.md
index bf2fc418..6ac5d5be 100644
--- a/subjects/now-get-to-work.en.md
+++ b/subjects/now-get-to-work.en.md
@@ -1,6 +1,6 @@
-# now-get-to-work
+## now-get-to-work
-## Instructions
+### Instructions
"Something terrible happened"
@@ -8,7 +8,7 @@ clone this repo : https://github.com/01-edu/the-final-cl-test
Submit your solution in the file `my_answer.sh` that will print it when executed.
-## Utilisation
+### Utilisation
```console
student@ubuntu:~/piscine/test$ ./my_answer.sh | cat -e
@@ -16,6 +16,6 @@ John Doe$
student@ubuntu:~/piscine/test$
```
-## Hint
+### Hint
"You could combine `head` and `tail`s..."
diff --git a/subjects/now-get-to-work.fr.md b/subjects/now-get-to-work.fr.md
index 93050dee..c42efb01 100644
--- a/subjects/now-get-to-work.fr.md
+++ b/subjects/now-get-to-work.fr.md
@@ -1,6 +1,6 @@
-# now-get-to-work
+## now-get-to-work
-## Instructions
+### Instructions
"Quelque chose de terrible est arrivé"
@@ -8,7 +8,7 @@ Faîtes un clone de repo : https://github.com/01-edu/the-final-cl-test
Rendez votre solution dans un fichier `my_answer.sh` qui l'affichera quand exécuté.
-## Usage
+### Usage
```console
student@ubuntu:~/piscine/test$ ./my_answer.sh | cat -e
@@ -16,6 +16,6 @@ John Doe$
student@ubuntu:~/piscine/test$
```
-## Hint
+### Hint
"Vous pouvez combinez `head` et `tail`s..."
diff --git a/subjects/nrune.en.md b/subjects/nrune.en.md
index b9e06a69..3cafbf16 100644
--- a/subjects/nrune.en.md
+++ b/subjects/nrune.en.md
@@ -1,10 +1,10 @@
-# nrune
+## nrune
-## Instructions
+### Instructions
Write a function that returns the nth `rune` of a `string`.
-## Expected function
+### Expected function
```go
func NRune(s string, n int) rune {
@@ -12,7 +12,7 @@ func NRune(s string, n int) rune {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/nrune.fr.md b/subjects/nrune.fr.md
index 4df28cc2..8e69dec2 100644
--- a/subjects/nrune.fr.md
+++ b/subjects/nrune.fr.md
@@ -1,10 +1,10 @@
-# nrune
+## nrune
-## Instructions
+### Instructions
Écrire une fonction qui retourne la énième `rune` d'une `string`.
-## Fonction attendue
+### Fonction attendue
```go
func NRune(s string, n int) rune {
@@ -12,7 +12,7 @@ func NRune(s string, n int) rune {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/pointone.en.md b/subjects/pointone.en.md
index 1ba47cef..0329c3f4 100755
--- a/subjects/pointone.en.md
+++ b/subjects/pointone.en.md
@@ -1,10 +1,10 @@
-# pointone
+## pointone
-## Instructions
+### Instructions
- Write a function that takes a **pointer to an int** as argument and gives to this int the value of 1.
-## Expected function
+### Expected function
```go
func PointOne(n *int) {
@@ -12,7 +12,7 @@ func PointOne(n *int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/pointone.fr.md b/subjects/pointone.fr.md
index 0097705b..1b02b779 100755
--- a/subjects/pointone.fr.md
+++ b/subjects/pointone.fr.md
@@ -1,10 +1,10 @@
-# pointone
+## pointone
-## Instructions
+### Instructions
- Écrire une fonction qui prend un **pointeur sur int** en argument et qui assignes à cet int la valeur 1.
-## Fonction attendue
+### Fonction attendue
```go
func PointOne(n *int) {
@@ -12,7 +12,7 @@ func PointOne(n *int) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/printalphabet.en.md b/subjects/printalphabet.en.md
index 4af6e052..bf9efc56 100644
--- a/subjects/printalphabet.en.md
+++ b/subjects/printalphabet.en.md
@@ -1,12 +1,12 @@
-# printalphabet
+## printalphabet
-## Instructions
+### Instructions
Write a [program](TODO-LINK) that prints the Latin alphabet in lowercase on a single line.
A line is a sequence of characters preceding the [end of line](https://en.wikipedia.org/wiki/Newline) character (`'\n'`).
-## Usage
+### Usage
```console
student@ubuntu:~/piscine/printalphabet$ go build
diff --git a/subjects/printalphabet.fr.md b/subjects/printalphabet.fr.md
index f464adcb..8275d980 100644
--- a/subjects/printalphabet.fr.md
+++ b/subjects/printalphabet.fr.md
@@ -1,12 +1,12 @@
-# printalphabet
+## printalphabet
-## Instructions
+### Instructions
Écrire un [programme](TODO-LINK) qui affiche l'alphabet latin en minuscule sur une seule ligne.
Une ligne est une suite de caractères précédant le caractère [fin de ligne](https://en.wikipedia.org/wiki/Newline) (`'\n'`).
-## Utilisation
+### Utilisation
```console
student@ubuntu:~/piscine/printalphabet$ go build
diff --git a/subjects/printcomb.en.md b/subjects/printcomb.en.md
index d0373dff..a836e1a9 100755
--- a/subjects/printcomb.en.md
+++ b/subjects/printcomb.en.md
@@ -1,12 +1,12 @@
-# printcomb
+## printcomb
-## Instructions
+### Instructions
Write a [function](TODO-LINK) that prints in ascending order on a single line all unique combinations of three different digits so that the first digit is less than the second and the second is less than the third.
These combinations are separated by a comma and a space.
-## Expected function
+### Expected function
```go
func PrintComb() {
@@ -14,7 +14,7 @@ func PrintComb() {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printcomb.fr.md b/subjects/printcomb.fr.md
index ef5a1053..f224897a 100755
--- a/subjects/printcomb.fr.md
+++ b/subjects/printcomb.fr.md
@@ -1,12 +1,12 @@
-# printcomb
+## printcomb
-## Instructions
+### Instructions
Écrire une [fonction](TODO-LINK) qui affiche sur une seule ligne dans l'ordre croissant toutes les combinaisons possibles de trois chiffres différents tels que le premier est inférieur au second et le second est inférieur au troisième.
Les combinaisons sont séparées par une virgule et un espace.
-## Fonction attendue
+### Fonction attendue
```go
func PrintComb() {
@@ -14,7 +14,7 @@ func PrintComb() {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/printcomb2.en.md b/subjects/printcomb2.en.md
index 71f25f7c..356253bf 100755
--- a/subjects/printcomb2.en.md
+++ b/subjects/printcomb2.en.md
@@ -1,12 +1,12 @@
-# printcomb2
+## printcomb2
-## Instructions
+### Instructions
Write a [function](TODO-LINK) that prints in ascending order on a single line all possible combinations of two different two-digit numbers.
These combinations are separated by a comma and a space.
-## Expected function
+### Expected function
```go
func PrintComb2() {
@@ -14,7 +14,7 @@ func PrintComb2() {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printcomb2.fr.md b/subjects/printcomb2.fr.md
index 42533406..fc32dabe 100755
--- a/subjects/printcomb2.fr.md
+++ b/subjects/printcomb2.fr.md
@@ -1,12 +1,12 @@
-# printcomb2
+## printcomb2
-## Instructions
+### Instructions
Écrire une [fonction](TODO-LINK) qui affiche sur une seule ligne dans l'ordre croissant toutes les combinaisons possibles de deux nombres différents à deux chiffres.
Les combinaisons sont séparées par une virgule et un espace.
-## Fonction attendue
+### Fonction attendue
```go
func PrintComb2() {
@@ -14,7 +14,7 @@ func PrintComb2() {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/printcombn.en.md b/subjects/printcombn.en.md
index 71387068..88154648 100755
--- a/subjects/printcombn.en.md
+++ b/subjects/printcombn.en.md
@@ -1,6 +1,6 @@
-# printcombn
+## printcombn
-## Instructions
+### Instructions
- Write a function that prints all possible combinations of **n** different digits in ascending order.
@@ -12,7 +12,7 @@ below are your references for the **printing format** expected.
- (for n = 3) '012, 013, 014, 015, 016, 017, 018, 019, 023,...689, 789'
-## Expected function
+### Expected function
```go
func PrintCombN(n int) {
@@ -20,7 +20,7 @@ func PrintCombN(n int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printcombn.fr.md b/subjects/printcombn.fr.md
index 34f69e93..7cb65dbb 100755
--- a/subjects/printcombn.fr.md
+++ b/subjects/printcombn.fr.md
@@ -1,6 +1,6 @@
-# printcombn
+## printcombn
-## Instructions
+### Instructions
- Écrire une fonction qui affiche toutes les combinaisons possibles de **n** chiffres différents en ordre croissant.
@@ -12,7 +12,7 @@ ci-dessous vos références pour le **format d'affichage** attendu.
- (pour n = 3) '012, 013, 014, 015, 016, 017, 018, 019, 023,...689, 789'
-## Fonction attendue
+### Fonction attendue
```go
func PrintCombN(n int) {
diff --git a/subjects/printdigits.en.md b/subjects/printdigits.en.md
index c5798a3e..1824df87 100755
--- a/subjects/printdigits.en.md
+++ b/subjects/printdigits.en.md
@@ -1,12 +1,12 @@
-# printdigits
+## printdigits
-## Instructions
+### Instructions
Write a [program](TODO-LINK) that prints the decimal digits in ascending order (from `0` to `9`) on a single line.
A line is a sequence of characters preceding the [end of line](https://en.wikipedia.org/wiki/Newline) character (`'\n'`).
-## Usage
+### Usage
```console
student@ubuntu:~/piscine/printdigits$ go build
diff --git a/subjects/printdigits.fr.md b/subjects/printdigits.fr.md
index 58c2cefd..b81d59ec 100755
--- a/subjects/printdigits.fr.md
+++ b/subjects/printdigits.fr.md
@@ -1,12 +1,12 @@
-# printdigits
+## printdigits
-## Instructions
+### Instructions
Écrire un [programme](TODO-LINK) qui affiche les chiffres décimaux dans l'ordre croissant (de `0` à `9`) sur une seule ligne.
Une ligne est une suite de caractères précédant le caractère [fin de ligne](https://en.wikipedia.org/wiki/Newline) (`'\n'`).
-## Utilisation
+### Utilisation
```console
student@ubuntu:~/piscine/printdigits$ go build
diff --git a/subjects/printnbr.en.md b/subjects/printnbr.en.md
index 8466dba5..eefde512 100644
--- a/subjects/printnbr.en.md
+++ b/subjects/printnbr.en.md
@@ -1,12 +1,12 @@
-# printnbr
+## printnbr
-## Instructions
+### Instructions
Write a function that prints an `int` passed in parameter.
All possible values of type `int` have to go through.
You cannot convert to `int64`.
-## Expected function
+### Expected function
```go
func PrintNbr(int n) {
@@ -14,7 +14,7 @@ func PrintNbr(int n) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printnbr.fr.md b/subjects/printnbr.fr.md
index 60598591..93101b86 100644
--- a/subjects/printnbr.fr.md
+++ b/subjects/printnbr.fr.md
@@ -1,12 +1,12 @@
-# printnbr
+## printnbr
-## Instructions
+### Instructions
Écrire une fonction qui affiche un `int` passé en paramètre.
Toutes les valeurs de type `int` doivent être affichables.
Vous ne pouvez pas convertir en `int64`.
-## Fonction attendue
+### Fonction attendue
```go
func PrintNbr(int n) {
@@ -14,7 +14,7 @@ func PrintNbr(int n) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/printnbrbase.en.md b/subjects/printnbrbase.en.md
index b009ca6d..27ba70dc 100644
--- a/subjects/printnbrbase.en.md
+++ b/subjects/printnbrbase.en.md
@@ -1,6 +1,6 @@
-# putnbrbase
+## putnbrbase
-## Instructions
+### Instructions
Write a function that prints an `int` in a `string` base passed in parameters.
@@ -14,7 +14,7 @@ Validity rules for a base :
The function has to manage negative numbers. (as shown in the example)
-## Expected function
+### Expected function
```go
func PrintNbrBase(nbr int, base string) () {
@@ -22,7 +22,7 @@ func PrintNbrBase(nbr int, base string) () {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printnbrbase.fr.md b/subjects/printnbrbase.fr.md
index 05dd4d63..73bb5fa8 100644
--- a/subjects/printnbrbase.fr.md
+++ b/subjects/printnbrbase.fr.md
@@ -1,6 +1,6 @@
-# putnbrbase
+## putnbrbase
-## Instructions
+### Instructions
Écrire une fonction qui affiche un `int` dans une base en `string` passés en paramètres.
@@ -14,7 +14,7 @@ Régles de validité d'une base :
La fonction doit gérer les nombres négatifs. (comme montré sur l'exemple)
-## Fonction attendue
+### Fonction attendue
```go
func PrintNbrBase(nbr int, base string) () {
@@ -22,7 +22,7 @@ func PrintNbrBase(nbr int, base string) () {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/printparams.en.md b/subjects/printparams.en.md
index eeffcae2..1697e284 100644
--- a/subjects/printparams.en.md
+++ b/subjects/printparams.en.md
@@ -1,6 +1,6 @@
-# printparams
+## printparams
-## Instructions
+### Instructions
Write a **program** that prints the arguments received in the command line.
diff --git a/subjects/printparams.fr.md b/subjects/printparams.fr.md
index f96d8ac0..8cbc719f 100644
--- a/subjects/printparams.fr.md
+++ b/subjects/printparams.fr.md
@@ -1,6 +1,6 @@
-# printparams
+## printparams
-## Instructions
+### Instructions
Écrire un **programme** qui affiche les arguments en ligne de commande.
diff --git a/subjects/printprogramname.en.md b/subjects/printprogramname.en.md
index 0da4a270..114c0b61 100644
--- a/subjects/printprogramname.en.md
+++ b/subjects/printprogramname.en.md
@@ -1,6 +1,6 @@
-# printprogramname
+## printprogramname
-## Instructions
+### Instructions
Write a **program** that prints the name of the program.
diff --git a/subjects/printprogramname.fr.md b/subjects/printprogramname.fr.md
index 6f957490..6888887e 100644
--- a/subjects/printprogramname.fr.md
+++ b/subjects/printprogramname.fr.md
@@ -1,6 +1,6 @@
-# printprogramname
+## printprogramname
-## Instructions
+### Instructions
Écrire un **programme** qui affiche le nom du programme.
diff --git a/subjects/printreversealphabet.en.md b/subjects/printreversealphabet.en.md
index ddf3e45f..cbaf35b6 100755
--- a/subjects/printreversealphabet.en.md
+++ b/subjects/printreversealphabet.en.md
@@ -1,12 +1,12 @@
-# printreversealphabet
+## printreversealphabet
-## Instructions
+### Instructions
Write a [program](TODO-LINK) that prints the Latin alphabet in lowercase in reverse order (from `'z'` to `'a'`) on a single line.
A line is a sequence of characters preceding the [end of line](https://en.wikipedia.org/wiki/Newline) character (`'\n'`).
-## Usage
+### Usage
```console
student@ubuntu:~/piscine/printreversealphabet$ go build
diff --git a/subjects/printreversealphabet.fr.md b/subjects/printreversealphabet.fr.md
index a92bbeb9..bce51820 100755
--- a/subjects/printreversealphabet.fr.md
+++ b/subjects/printreversealphabet.fr.md
@@ -1,12 +1,12 @@
-# printreversealphabet
+## printreversealphabet
-## Instructions
+### Instructions
Écrire un [programme](TODO-LINK) qui affiche l'alphabet latin en minuscule dans l'ordre inverse (de `'z'` à `'a'`) sur une seule ligne.
Une ligne est une suite de caractères précédant le caractère [fin de ligne](https://en.wikipedia.org/wiki/Newline) (`'\n'`).
-## Utilisation
+### Utilisation
```console
student@ubuntu:~/piscine/printreversealphabet$ go build
diff --git a/subjects/printstr.en.md b/subjects/printstr.en.md
index 7d366f32..93896033 100755
--- a/subjects/printstr.en.md
+++ b/subjects/printstr.en.md
@@ -1,10 +1,10 @@
-# printstr
+## printstr
-## Instructions
+### Instructions
- Write a function that prints one by one the characters of a string on the screen.
-## Expected function
+### Expected function
```go
func PrintStr(str string) {
@@ -12,7 +12,7 @@ func PrintStr(str string) {
}
```
-## Hints
+### Hints
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printstr.fr.md b/subjects/printstr.fr.md
index a553a6d5..5f02e1c1 100755
--- a/subjects/printstr.fr.md
+++ b/subjects/printstr.fr.md
@@ -1,10 +1,10 @@
-# putstr
+## putstr
-## Instructions
+### Instructions
- Écrire une fonction qui affiche un à un les caractères d'une chaîne à l'écran.
-## Fonction attendue
+### Fonction attendue
```go
func PrintStr(str string) {
@@ -12,7 +12,7 @@ func PrintStr(str string) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/printwordstables.en.md b/subjects/printwordstables.en.md
index bf49cd1c..248af853 100644
--- a/subjects/printwordstables.en.md
+++ b/subjects/printwordstables.en.md
@@ -1,6 +1,6 @@
-# printwordstables
+## printwordstables
-## Instructions
+### Instructions
Write a function that prints the words of a `string` array that will be returned a function `SplitWhiteSpaces`. (the testing will be done with ours)
@@ -8,14 +8,14 @@ Each word is on a single line.
Each word ends with a `\n`.
-## Expected function
+### Expected function
```go
func PrintWordsTables(table []string) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printwordstables.fr.md b/subjects/printwordstables.fr.md
index 3df6abd2..b040b60a 100644
--- a/subjects/printwordstables.fr.md
+++ b/subjects/printwordstables.fr.md
@@ -1,6 +1,6 @@
-# printwordstables
+## printwordstables
-## Instructions
+### Instructions
Écrire une fonction qui affiche les mots d'un tableau de `string` qui sera le resultat d'une fonction `SplitWhiteSpaces`. (les tests seront effectués avec la notre)
@@ -8,14 +8,14 @@ Chaque mot est sur une seule ligne.
Chaque mot fini avec un `\n`.
-## Fonction attendue
+### Fonction attendue
```go
func PrintWordsTables(table []string) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/public.en.md b/subjects/public.en.md
index 369177c5..7f8d501a 100644
--- a/subjects/public.en.md
+++ b/subjects/public.en.md
@@ -1 +1 @@
-# public
+## public
diff --git a/subjects/recursivefactorial.en.md b/subjects/recursivefactorial.en.md
index cce40b24..fa267a35 100644
--- a/subjects/recursivefactorial.en.md
+++ b/subjects/recursivefactorial.en.md
@@ -1,6 +1,6 @@
-# recursivefactorial
+## recursivefactorial
-## Intructions
+### Intructions
Write a **recursive** function that returns the factorial of the `int` passed as parameter.
@@ -8,7 +8,7 @@ Errors (non possible values or overflows) will return `0`.
`for` is **forbidden** for this exercise.
-## Expected function
+### Expected function
```go
func RecursiveFactorial(int nb) int {
@@ -16,7 +16,7 @@ func RecursiveFactorial(int nb) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/recursivefactorial.fr.md b/subjects/recursivefactorial.fr.md
index 7b1a4d3f..fba6dfaf 100644
--- a/subjects/recursivefactorial.fr.md
+++ b/subjects/recursivefactorial.fr.md
@@ -1,6 +1,6 @@
-# recursivefactorial
+## recursivefactorial
-## Intructions
+### Intructions
Écrire une fonction **récursive** qui renvoie la factorielle d'un `int` passé en paramètre.
@@ -8,7 +8,7 @@ Les erreurs (valeurs non possibles ou overflows) renverront `0`.
`for` est **interdit** pour cet exercice.
-## Fonction attendue
+### Fonction attendue
```go
func RecursiveFactorial(int nb) int {
@@ -16,7 +16,7 @@ func RecursiveFactorial(int nb) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/recursivepower.en.md b/subjects/recursivepower.en.md
index eb52192c..90c58c67 100644
--- a/subjects/recursivepower.en.md
+++ b/subjects/recursivepower.en.md
@@ -1,6 +1,6 @@
-# recursivepower
+## recursivepower
-## Intructions
+### Intructions
Write an **recursive** function that returns the power of the `int` passed as parameter.
@@ -8,7 +8,7 @@ Negative powers will return `0`. Overflows do **not** have to be dealt with.
`for` is **forbidden** for this exercise.
-## Expected function
+### Expected function
```go
func RecursivePower(int nb, int power) int {
@@ -16,7 +16,7 @@ func RecursivePower(int nb, int power) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/recursivepower.fr.md b/subjects/recursivepower.fr.md
index c2b255ff..b47509c8 100644
--- a/subjects/recursivepower.fr.md
+++ b/subjects/recursivepower.fr.md
@@ -1,6 +1,6 @@
-# recursivepower
+## recursivepower
-## Intructions
+### Intructions
Écrire une fonction **récursive** qui renvoie la puissance de deux `int` passés en paramètre.
@@ -8,7 +8,7 @@ Les puissances négatives renverront `0`. Les overflows **ne doivent pas** être
`for` est **interdit** pour cet exercice.
-## Fonction attendue
+### Fonction attendue
```go
func RecursivePower(int nb, int power) int {
@@ -16,7 +16,7 @@ func RecursivePower(int nb, int power) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/revparams.en.md b/subjects/revparams.en.md
index 33dcf10a..d387913a 100644
--- a/subjects/revparams.en.md
+++ b/subjects/revparams.en.md
@@ -1,6 +1,6 @@
-# revparams
+## revparams
-## Instructions
+### Instructions
Write a **program** that prints the arguments received in the command line in a reverse order.
diff --git a/subjects/revparams.fr.md b/subjects/revparams.fr.md
index 35cd2526..7c775531 100644
--- a/subjects/revparams.fr.md
+++ b/subjects/revparams.fr.md
@@ -1,6 +1,6 @@
-# revparams
+## revparams
-## Instructions
+### Instructions
Écrire un **programme** qui affiche les arguments en ligne de commande en ordre inverse.
diff --git a/subjects/set.en.md b/subjects/set.en.md
index b673118b..ef45e24f 100644
--- a/subjects/set.en.md
+++ b/subjects/set.en.md
@@ -1,12 +1,12 @@
-# set
+## set
-## Setting up your development workspace
+### Setting up your development workspace
[GitHub account](TODO-VIDEO-LINK)
-### Choose your code editor
+#### Choose your code editor
- [VS Code](TODO-LINK)
- [Sublime Text](TODO-LINK)
-### [How to submit your code with Git](TODO-VIDEO-LINK)
+#### [How to submit your code with Git](TODO-VIDEO-LINK)
diff --git a/subjects/sortedlistmerge.en.md b/subjects/sortedlistmerge.en.md
index 948738d0..7653c3e0 100644
--- a/subjects/sortedlistmerge.en.md
+++ b/subjects/sortedlistmerge.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `SortedListMerge` that mereges two lists, `l1` and `l2`, but it as to join them in ascending order.
@@ -8,7 +8,7 @@ Write a function `SortedListMerge` that mereges two lists, `l1` and `l2`, but it
- Use pointers when ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -21,7 +21,7 @@ func SortedListMerge(l1 *node, l2 *node) *node {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/sortedlistmerge.fr.md b/subjects/sortedlistmerge.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/sortedlistmerge.fr.md
+++ b/subjects/sortedlistmerge.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/sortintegertable.en.md b/subjects/sortintegertable.en.md
index 0828b745..ca2ff301 100755
--- a/subjects/sortintegertable.en.md
+++ b/subjects/sortintegertable.en.md
@@ -1,10 +1,10 @@
-# sortintegertable
+## sortintegertable
-## Instructions
+### Instructions
- Write a function that reorder an array of `int` in ascending order.
-## Expected function
+### Expected function
```go
func SortIntegerTable(table []int) {
@@ -12,7 +12,7 @@ func SortIntegerTable(table []int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/sortintegertable.fr.md b/subjects/sortintegertable.fr.md
index 06c2a1bf..3c92b2f0 100755
--- a/subjects/sortintegertable.fr.md
+++ b/subjects/sortintegertable.fr.md
@@ -1,10 +1,10 @@
-# sortintegertable
+## sortintegertable
-## Instructions
+### Instructions
- Écrire une fonction qui trie un tableau d'`int` (entier) par ordre croissant.
-## Fonction attendue
+### Fonction attendue
```go
func SortIntegerTable(table []int) {
@@ -12,7 +12,7 @@ func SortIntegerTable(table []int) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/sortlistinsert.en.md b/subjects/sortlistinsert.en.md
index fb578726..b84a35b9 100644
--- a/subjects/sortlistinsert.en.md
+++ b/subjects/sortlistinsert.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `SortListInsert` that inserts `data_ref` in the linked list, but it as to remain sorted in ascending order.
@@ -8,7 +8,7 @@ Write a function `SortListInsert` that inserts `data_ref` in the linked list, bu
- Use pointers when ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -21,7 +21,7 @@ func SortListInsert(l *node, data_ref int) *node{
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/sortlistinsert.fr.md b/subjects/sortlistinsert.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/sortlistinsert.fr.md
+++ b/subjects/sortlistinsert.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/sortparams.en.md b/subjects/sortparams.en.md
index 1aee36b8..bd482d0a 100644
--- a/subjects/sortparams.en.md
+++ b/subjects/sortparams.en.md
@@ -1,6 +1,6 @@
-# sortparams
+## sortparams
-## Instructions
+### Instructions
Write a **program** that prints the arguments received in the command line in ASCII order.
diff --git a/subjects/sortparams.fr.md b/subjects/sortparams.fr.md
index c644312a..f5c6e5ca 100644
--- a/subjects/sortparams.fr.md
+++ b/subjects/sortparams.fr.md
@@ -1,6 +1,6 @@
-# sortparams
+## sortparams
-## Instructions
+### Instructions
Écrire un **programme** qui affiche les arguments en ligne de commande en ordre asscii.
diff --git a/subjects/sortwordarr.en.md b/subjects/sortwordarr.en.md
index da2efbda..f1e10c7c 100644
--- a/subjects/sortwordarr.en.md
+++ b/subjects/sortwordarr.en.md
@@ -1,17 +1,17 @@
-# sortwordarr
+## sortwordarr
-## Instructions
+### Instructions
Write a function `SortWordArr` that sorts by `ascii` a `string` array.
-## Expected function
+### Expected function
```go
func SortWordArr(array []string) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/sortwordarr.fr.md b/subjects/sortwordarr.fr.md
index f37fdf0e..6a0d81d7 100644
--- a/subjects/sortwordarr.fr.md
+++ b/subjects/sortwordarr.fr.md
@@ -1,17 +1,17 @@
-# sortwordarr
+## sortwordarr
-## Instructions
+### Instructions
Écrire une fonction `SortWordArr` qui trie par ordre `ascii` un tableau de `string`.
-## Fonction attendue
+### Fonction attendue
```go
func SortWordArr(array []string) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/split.en.md b/subjects/split.en.md
index c6b31e7b..f1c3366c 100644
--- a/subjects/split.en.md
+++ b/subjects/split.en.md
@@ -1,19 +1,19 @@
-# split
+## split
-## Instructions
+### Instructions
Write a function that seperates the words of a `string` and puts them in a `string` array.
The separators are the characters of the charset `string` given in parameter.
-## Expected function
+### Expected function
```go
func Split(str, charset string) []string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/split.fr.md b/subjects/split.fr.md
index d6b1bdd0..efa7f9d4 100644
--- a/subjects/split.fr.md
+++ b/subjects/split.fr.md
@@ -1,19 +1,19 @@
-# split
+## split
-## Instructions
+### Instructions
Écrire une fonction qui sépare les mots d'une `string` et les met dans un tableau de `string`.
Les séparateurs sont les charactéres de la `string` charset donnée en paramétre.
-## Fonction attendue
+### Fonction attendue
```go
func Split(str, charset string) []string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/splitwhitespaces.en.md b/subjects/splitwhitespaces.en.md
index 7930d310..e358921e 100644
--- a/subjects/splitwhitespaces.en.md
+++ b/subjects/splitwhitespaces.en.md
@@ -1,19 +1,19 @@
-# splitwhitespaces
+## splitwhitespaces
-## Instructions
+### Instructions
Write a function that separates the words of a `string` and puts them in a `string` array.
The separators are spaces, tabs and newlines.
-## Expected function
+### Expected function
```go
func SplitWhiteSpaces(str string) []string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/splitwhitespaces.fr.md b/subjects/splitwhitespaces.fr.md
index 6c85718e..0f9776e1 100644
--- a/subjects/splitwhitespaces.fr.md
+++ b/subjects/splitwhitespaces.fr.md
@@ -1,19 +1,19 @@
-# splitwhitespaces
+## splitwhitespaces
-## Instructions
+### Instructions
Écrire une fonction qui sépare les mots d'une `string` et les met dans un tableau de `string`.
Les séparateurs sont les espaces, les tabulations et les retours à la ligne.
-## Fonction attendue
+### Fonction attendue
```go
func SplitWhiteSpaces(str string) []string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/sqrt.en.md b/subjects/sqrt.en.md
index 7b82042b..c6a5373c 100644
--- a/subjects/sqrt.en.md
+++ b/subjects/sqrt.en.md
@@ -1,10 +1,10 @@
-# sqrt
+## sqrt
-## Intructions
+### Intructions
Write a function that returns the square root of the `int` passed as parameter if that square root is a whole number. Otherwise it returns `0`.
-## Expected function
+### Expected function
```go
func Sqrt(int nb) int {
@@ -12,7 +12,7 @@ func Sqrt(int nb) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/sqrt.fr.md b/subjects/sqrt.fr.md
index 148422ad..076385ed 100644
--- a/subjects/sqrt.fr.md
+++ b/subjects/sqrt.fr.md
@@ -1,10 +1,10 @@
-# sqrt
+## sqrt
-## Intructions
+### Intructions
Écrire une fonction qui renvoie la racine carré d'un `int` passé en paramètre as parameter si cette racine carré est un nombre entier. Autrement elle renvoie `0`.
-## Fonction attendue
+### Fonction attendue
```go
func Sqrt(int nb) int {
@@ -12,7 +12,7 @@ func Sqrt(int nb) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/strlen.en.md b/subjects/strlen.en.md
index a0197e8a..9e3e5dee 100755
--- a/subjects/strlen.en.md
+++ b/subjects/strlen.en.md
@@ -1,10 +1,10 @@
-# strlen
+## strlen
-## Instructions
+### Instructions
- Write a function that counts the characters of a string and that returns that count.
-## Expected function
+### Expected function
```go
func StrLen(str string) int {
@@ -12,7 +12,7 @@ func StrLen(str string) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/strlen.fr.md b/subjects/strlen.fr.md
index b5d957e0..a880e7ae 100755
--- a/subjects/strlen.fr.md
+++ b/subjects/strlen.fr.md
@@ -1,10 +1,10 @@
-# strlen
+## strlen
-## Instructions
+### Instructions
- Écrire une fonction qui compte le nombre de caractères d'une chaîne et qui retourne le nombre trouvé.
-## Fonction attendue
+### Fonction attendue
```go
func StrLen(str string) int {
@@ -12,7 +12,7 @@ func StrLen(str string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/strrev.en.md b/subjects/strrev.en.md
index 643f0ab3..a5ee9cd8 100755
--- a/subjects/strrev.en.md
+++ b/subjects/strrev.en.md
@@ -1,12 +1,12 @@
-# strrev
+## strrev
-## Instructions
+### Instructions
- Write a function that reverses a `string`.
- This function will **return** the s `string`.
-## Expected function
+### Expected function
```go
func StrRev(s string) string {
@@ -14,7 +14,7 @@ func StrRev(s string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/strrev.fr.md b/subjects/strrev.fr.md
index c5a60aa1..e8b34f35 100755
--- a/subjects/strrev.fr.md
+++ b/subjects/strrev.fr.md
@@ -1,12 +1,12 @@
-# strrev
+## strrev
-## Instructions
+### Instructions
- Écrire une fonction qui inverse une chaîne de caractères(`string`).
- Cette fonction **retournera** la chaîne de caractères s(`string`).
-## Fonction attendue
+### Fonction attendue
```go
func StrRev(s string) string {
@@ -14,7 +14,7 @@ func StrRev(s string) string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/swap.en.md b/subjects/swap.en.md
index 31d0c61a..82d0d04f 100755
--- a/subjects/swap.en.md
+++ b/subjects/swap.en.md
@@ -1,10 +1,10 @@
-# swap
+## swap
-## Instructions
+### Instructions
- Write a function that swaps the contents of two **pointers to an int** (`*int`).
-## Expected function
+### Expected function
```go
func Swap(a *int, b *int) {
@@ -12,7 +12,7 @@ func Swap(a *int, b *int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/swap.fr.md b/subjects/swap.fr.md
index 879d3844..42fdc85f 100755
--- a/subjects/swap.fr.md
+++ b/subjects/swap.fr.md
@@ -1,10 +1,10 @@
-# swap
+## swap
-## Instructions
+### Instructions
- Écrire une fonction qui échange les contenus de deux **pointeurs sur entier** (`*int`).
-## Fonction attendue
+### Fonction attendue
```go
func Swap(a *int, b *int) {
@@ -12,7 +12,7 @@ func Swap(a *int, b *int) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/to-git-or-not-to-git.en.md b/subjects/to-git-or-not-to-git.en.md
index 324bdea2..c312c410 100644
--- a/subjects/to-git-or-not-to-git.en.md
+++ b/subjects/to-git-or-not-to-git.en.md
@@ -1,11 +1,11 @@
-# to-git-or-not-to-git-?
+## to-git-or-not-to-git-?
-## Instructions
+### Instructions
Write in a file `to-git-or-not-to-git.sh` the command that isolates your `gitHub id`.
Only the numbers will appears.
-## Usage
+### Usage
```console
$ ./to-git-or-not-to-git.sh
diff --git a/subjects/to-git-or-not-to-git.fr.md b/subjects/to-git-or-not-to-git.fr.md
index 83baac4b..7e9c5ba7 100644
--- a/subjects/to-git-or-not-to-git.fr.md
+++ b/subjects/to-git-or-not-to-git.fr.md
@@ -1,11 +1,11 @@
-# to-git-or-not-to-git-?
+## to-git-or-not-to-git-?
-## Instructions
+### Instructions
Écrire dans un fichier `to-git-or-not-to-git.sh` la commande qui isoles votre `gitHub id`.
Seulement les chiffres apparaitront.
-## Utilisation
+### Utilisation
```console
$ ./to-git-or-not-to-git.sh
diff --git a/subjects/tolower.en.md b/subjects/tolower.en.md
index 3975d788..0f366d8a 100644
--- a/subjects/tolower.en.md
+++ b/subjects/tolower.en.md
@@ -1,10 +1,10 @@
-# tolower
+## tolower
-## Instructions
+### Instructions
Write a function that lowercases each letter of `string`.
-## Expected function
+### Expected function
```go
func ToLower(s string) string {
@@ -12,7 +12,7 @@ func ToLower(s string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/tolower.fr.md b/subjects/tolower.fr.md
index e1b70b85..b709621b 100644
--- a/subjects/tolower.fr.md
+++ b/subjects/tolower.fr.md
@@ -1,10 +1,10 @@
-# tolower
+## tolower
-## Instructions
+### Instructions
Écrire une fonction qui met en minuscule chaque lettre d'une `string`.
-## Fonction attendue
+### Fonction attendue
```go
func ToLower(s string) string {
@@ -12,7 +12,7 @@ func ToLower(s string) string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/toupper.en.md b/subjects/toupper.en.md
index 09d5a3db..62aad29c 100644
--- a/subjects/toupper.en.md
+++ b/subjects/toupper.en.md
@@ -1,10 +1,10 @@
-# toupper
+## toupper
-## Instructions
+### Instructions
Write a function that capitalizes each letter of `string`.
-## Expected function
+### Expected function
```go
func ToUpper(s string) string {
@@ -12,7 +12,7 @@ func ToUpper(s string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/toupper.fr.md b/subjects/toupper.fr.md
index 94ac9200..2750bf08 100644
--- a/subjects/toupper.fr.md
+++ b/subjects/toupper.fr.md
@@ -1,10 +1,10 @@
-# toupper
+## toupper
-## Instructions
+### Instructions
Écrire une fonction qui met en majuscule chaque lettre d'une `string`.
-## Fonction attendue
+### Fonction attendue
```go
func ToUpper(s string) string {
@@ -12,7 +12,7 @@ func ToUpper(s string) string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/ultimatedivmod.en.md b/subjects/ultimatedivmod.en.md
index b1d65f51..0f07bd8c 100755
--- a/subjects/ultimatedivmod.en.md
+++ b/subjects/ultimatedivmod.en.md
@@ -1,10 +1,10 @@
-# ultimatedivmod
+## ultimatedivmod
-## Instructions
+### Instructions
- Write a function that will be formatted as below.
-## Expected function
+### Expected function
```go
func UltimateDivMod(a *int, b *int) {
@@ -16,7 +16,7 @@ func UltimateDivMod(a *int, b *int) {
- The result of this division will be stored in the int pointed by **a**.
- The remainder of this division will be stored in the int pointed by **b**.
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/ultimatedivmod.fr.md b/subjects/ultimatedivmod.fr.md
index 5514f268..c4fe57c9 100755
--- a/subjects/ultimatedivmod.fr.md
+++ b/subjects/ultimatedivmod.fr.md
@@ -1,10 +1,10 @@
-# ultimatedivmod
+## ultimatedivmod
-## Instructions
+### Instructions
- Écrire une fonction qui aura le format ci-dessous.
-## Fonction attendue
+### Fonction attendue
```go
func UltimateDivMod(a *int, b *int) {
@@ -16,7 +16,7 @@ func UltimateDivMod(a *int, b *int) {
- Le résultat de la division sera stocké dans l'int pointé par **a**.
- Le reste de cette division sera stocké dans l'int pointé par **b**.
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/ultimatepointone.en.md b/subjects/ultimatepointone.en.md
index aab539a6..acbdb7e2 100755
--- a/subjects/ultimatepointone.en.md
+++ b/subjects/ultimatepointone.en.md
@@ -1,10 +1,10 @@
-# ultimatepointone
+## ultimatepointone
-## Instructions
+### Instructions
- Write a function that takes a **pointer to a pointer to a pointer to an int** as argument and gives to this int the value of 1.
-## Expected function
+### Expected function
```go
func UltimatePointOne(n ***int) {
@@ -12,7 +12,7 @@ func UltimatePointOne(n ***int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/ultimatepointone.fr.md b/subjects/ultimatepointone.fr.md
index b229f624..8b4bdaad 100755
--- a/subjects/ultimatepointone.fr.md
+++ b/subjects/ultimatepointone.fr.md
@@ -1,10 +1,10 @@
-# ultimatepointone
+## ultimatepointone
-## Instructions
+### Instructions
- Écrire une fonction qui prend un **pointeur sur pointeur sur pointeur sur int** en argument et qui assignes à cet int la valeur 1.
-## Fonction attendue
+### Fonction attendue
```go
func UltimatePointOne(n ***int) {
@@ -12,7 +12,7 @@ func UltimatePointOne(n ***int) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/who-are-you.en.md b/subjects/who-are-you.en.md
index 63b9e33a..f6e29717 100644
--- a/subjects/who-are-you.en.md
+++ b/subjects/who-are-you.en.md
@@ -1,6 +1,6 @@
-# who-are-you
+## who-are-you
-## Instructions
+### Instructions
"You just woke up in a dark alley...
You can not remember who you are...
diff --git a/subjects/who-are-you.fr.md b/subjects/who-are-you.fr.md
index 441e6f63..0b6aa9dd 100644
--- a/subjects/who-are-you.fr.md
+++ b/subjects/who-are-you.fr.md
@@ -1,6 +1,6 @@
-# who-are-you
+## who-are-you
-## Instructions
+### Instructions
"Vous venez de vous réveillez dans une allée sombre...
Vous n'arrivez pas à vous souvenir qui vous êtes...
From 1477f9303ec39160fb15ea0dc2b00bfda0f52394 Mon Sep 17 00:00:00 2001
From: Clement Denis
Date: Wed, 24 Apr 2019 18:20:39 +0100
Subject: [PATCH 069/104] rename previous and cleanup doubles
---
subjects/{abort.md => abort.en.md} | 0
subjects/{activebits.md => activebits.en.md} | 0
.../{alphamirror.md => alphamirror.en.md} | 0
subjects/{bool.md => bool.en.md} | 0
...pplybylevel.md => btreeapplybylevel.en.md} | 0
...reedeletenode.md => btreedeletenode.en.md} | 0
.../{btreeisbinary.md => btreeisbinary.en.md} | 0
...reelevelcount.md => btreelevelcount.en.md} | 0
subjects/{btreemax.md => btreemax.en.md} | 0
subjects/{btreemin.md => btreemin.en.md} | 0
...reetransplant.md => btreetransplant.en.md} | 0
subjects/{cat.md => cat.en.md} | 0
...atzcountdown.md => collatzcountdown.en.md} | 0
subjects/{comcheck.md => comcheck.en.md} | 0
subjects/{compact.md => compact.en.md} | 0
subjects/{countdown.md => countdown.en.md} | 0
subjects/{createelem.md => createelem.en.md} | 0
.../{dispfirstpar.md => dispfirstpar.en.md} | 0
.../{displastpar.md => displastpar.en.md} | 0
subjects/{displaya.md => displaya.en.md} | 0
.../{displayalpham.md => displayalpham.en.md} | 0
.../{displayalrevm.md => displayalrevm.en.md} | 0
.../{displayfile.md => displayfile.en.md} | 0
subjects/{displayz.md => displayz.en.md} | 0
subjects/{enigma.md => enigma.en.md} | 0
subjects/{firstword.md => firstword.en.md} | 0
subjects/{fixthemain.md => fixthemain.en.md} | 0
subjects/{hello.md => hello.en.md} | 0
subjects/{inter.md => inter.en.md} | 0
subjects/join.md | 43 -------
subjects/{lastword.md => lastword.en.md} | 0
subjects/listat.md | 60 ----------
subjects/listclear.md | 77 -------------
subjects/listfind.md | 64 -----------
subjects/listforeach.md | 65 -----------
subjects/listforeachif.md | 105 ------------------
subjects/listlast.md | 58 ----------
subjects/listmerge.md | 78 -------------
subjects/listpushback.md | 60 ----------
subjects/listpushfront.md | 60 ----------
.../{listpushpara.md => listpushpara.en.md} | 0
subjects/listremoveif.md | 99 -----------------
subjects/listreverse.md | 65 -----------
subjects/listsize.md | 56 ----------
subjects/listsort.md | 89 ---------------
subjects/{max.md => max.en.md} | 0
subjects/{onlya.md => onlya.en.md} | 0
subjects/{onlyz.md => onlyz.en.md} | 0
subjects/{pilot.md => pilot.en.md} | 0
subjects/{point.md => point.en.md} | 0
subjects/{printbits.md => printbits.en.md} | 0
subjects/{rectangle.md => rectangle.en.md} | 0
.../{repeatalpha.md => repeatalpha.en.md} | 0
.../{reversebits.md => reversebits.en.md} | 0
subjects/{rot13.md => rot13.en.md} | 0
subjects/{rot14.md => rot14.en.md} | 0
.../{searchreplace.md => searchreplace.en.md} | 0
subjects/sortedlistmerge.md | 71 ------------
subjects/sortlistinsert.md | 87 ---------------
subjects/strlen.md | 24 ----
subjects/{swapbits.md => swapbits.en.md} | 0
subjects/{switchcase.md => switchcase.en.md} | 0
subjects/{union.md => union.en.md} | 0
subjects/{unmatch.md => unmatch.en.md} | 0
subjects/{wdmatch.md => wdmatch.en.md} | 0
subjects/{ztail.md => ztail.en.md} | 0
66 files changed, 1161 deletions(-)
rename subjects/{abort.md => abort.en.md} (100%)
rename subjects/{activebits.md => activebits.en.md} (100%)
rename subjects/{alphamirror.md => alphamirror.en.md} (100%)
rename subjects/{bool.md => bool.en.md} (100%)
rename subjects/{btreeapplybylevel.md => btreeapplybylevel.en.md} (100%)
rename subjects/{btreedeletenode.md => btreedeletenode.en.md} (100%)
rename subjects/{btreeisbinary.md => btreeisbinary.en.md} (100%)
rename subjects/{btreelevelcount.md => btreelevelcount.en.md} (100%)
rename subjects/{btreemax.md => btreemax.en.md} (100%)
rename subjects/{btreemin.md => btreemin.en.md} (100%)
rename subjects/{btreetransplant.md => btreetransplant.en.md} (100%)
rename subjects/{cat.md => cat.en.md} (100%)
rename subjects/{collatzcountdown.md => collatzcountdown.en.md} (100%)
rename subjects/{comcheck.md => comcheck.en.md} (100%)
rename subjects/{compact.md => compact.en.md} (100%)
rename subjects/{countdown.md => countdown.en.md} (100%)
rename subjects/{createelem.md => createelem.en.md} (100%)
rename subjects/{dispfirstpar.md => dispfirstpar.en.md} (100%)
rename subjects/{displastpar.md => displastpar.en.md} (100%)
rename subjects/{displaya.md => displaya.en.md} (100%)
rename subjects/{displayalpham.md => displayalpham.en.md} (100%)
rename subjects/{displayalrevm.md => displayalrevm.en.md} (100%)
rename subjects/{displayfile.md => displayfile.en.md} (100%)
rename subjects/{displayz.md => displayz.en.md} (100%)
rename subjects/{enigma.md => enigma.en.md} (100%)
rename subjects/{firstword.md => firstword.en.md} (100%)
rename subjects/{fixthemain.md => fixthemain.en.md} (100%)
rename subjects/{hello.md => hello.en.md} (100%)
rename subjects/{inter.md => inter.en.md} (100%)
delete mode 100644 subjects/join.md
rename subjects/{lastword.md => lastword.en.md} (100%)
delete mode 100644 subjects/listat.md
delete mode 100644 subjects/listclear.md
delete mode 100644 subjects/listfind.md
delete mode 100644 subjects/listforeach.md
delete mode 100644 subjects/listforeachif.md
delete mode 100644 subjects/listlast.md
delete mode 100644 subjects/listmerge.md
delete mode 100644 subjects/listpushback.md
delete mode 100644 subjects/listpushfront.md
rename subjects/{listpushpara.md => listpushpara.en.md} (100%)
delete mode 100644 subjects/listremoveif.md
delete mode 100644 subjects/listreverse.md
delete mode 100644 subjects/listsize.md
delete mode 100644 subjects/listsort.md
rename subjects/{max.md => max.en.md} (100%)
rename subjects/{onlya.md => onlya.en.md} (100%)
rename subjects/{onlyz.md => onlyz.en.md} (100%)
rename subjects/{pilot.md => pilot.en.md} (100%)
rename subjects/{point.md => point.en.md} (100%)
rename subjects/{printbits.md => printbits.en.md} (100%)
rename subjects/{rectangle.md => rectangle.en.md} (100%)
rename subjects/{repeatalpha.md => repeatalpha.en.md} (100%)
rename subjects/{reversebits.md => reversebits.en.md} (100%)
rename subjects/{rot13.md => rot13.en.md} (100%)
rename subjects/{rot14.md => rot14.en.md} (100%)
rename subjects/{searchreplace.md => searchreplace.en.md} (100%)
delete mode 100644 subjects/sortedlistmerge.md
delete mode 100644 subjects/sortlistinsert.md
delete mode 100644 subjects/strlen.md
rename subjects/{swapbits.md => swapbits.en.md} (100%)
rename subjects/{switchcase.md => switchcase.en.md} (100%)
rename subjects/{union.md => union.en.md} (100%)
rename subjects/{unmatch.md => unmatch.en.md} (100%)
rename subjects/{wdmatch.md => wdmatch.en.md} (100%)
rename subjects/{ztail.md => ztail.en.md} (100%)
diff --git a/subjects/abort.md b/subjects/abort.en.md
similarity index 100%
rename from subjects/abort.md
rename to subjects/abort.en.md
diff --git a/subjects/activebits.md b/subjects/activebits.en.md
similarity index 100%
rename from subjects/activebits.md
rename to subjects/activebits.en.md
diff --git a/subjects/alphamirror.md b/subjects/alphamirror.en.md
similarity index 100%
rename from subjects/alphamirror.md
rename to subjects/alphamirror.en.md
diff --git a/subjects/bool.md b/subjects/bool.en.md
similarity index 100%
rename from subjects/bool.md
rename to subjects/bool.en.md
diff --git a/subjects/btreeapplybylevel.md b/subjects/btreeapplybylevel.en.md
similarity index 100%
rename from subjects/btreeapplybylevel.md
rename to subjects/btreeapplybylevel.en.md
diff --git a/subjects/btreedeletenode.md b/subjects/btreedeletenode.en.md
similarity index 100%
rename from subjects/btreedeletenode.md
rename to subjects/btreedeletenode.en.md
diff --git a/subjects/btreeisbinary.md b/subjects/btreeisbinary.en.md
similarity index 100%
rename from subjects/btreeisbinary.md
rename to subjects/btreeisbinary.en.md
diff --git a/subjects/btreelevelcount.md b/subjects/btreelevelcount.en.md
similarity index 100%
rename from subjects/btreelevelcount.md
rename to subjects/btreelevelcount.en.md
diff --git a/subjects/btreemax.md b/subjects/btreemax.en.md
similarity index 100%
rename from subjects/btreemax.md
rename to subjects/btreemax.en.md
diff --git a/subjects/btreemin.md b/subjects/btreemin.en.md
similarity index 100%
rename from subjects/btreemin.md
rename to subjects/btreemin.en.md
diff --git a/subjects/btreetransplant.md b/subjects/btreetransplant.en.md
similarity index 100%
rename from subjects/btreetransplant.md
rename to subjects/btreetransplant.en.md
diff --git a/subjects/cat.md b/subjects/cat.en.md
similarity index 100%
rename from subjects/cat.md
rename to subjects/cat.en.md
diff --git a/subjects/collatzcountdown.md b/subjects/collatzcountdown.en.md
similarity index 100%
rename from subjects/collatzcountdown.md
rename to subjects/collatzcountdown.en.md
diff --git a/subjects/comcheck.md b/subjects/comcheck.en.md
similarity index 100%
rename from subjects/comcheck.md
rename to subjects/comcheck.en.md
diff --git a/subjects/compact.md b/subjects/compact.en.md
similarity index 100%
rename from subjects/compact.md
rename to subjects/compact.en.md
diff --git a/subjects/countdown.md b/subjects/countdown.en.md
similarity index 100%
rename from subjects/countdown.md
rename to subjects/countdown.en.md
diff --git a/subjects/createelem.md b/subjects/createelem.en.md
similarity index 100%
rename from subjects/createelem.md
rename to subjects/createelem.en.md
diff --git a/subjects/dispfirstpar.md b/subjects/dispfirstpar.en.md
similarity index 100%
rename from subjects/dispfirstpar.md
rename to subjects/dispfirstpar.en.md
diff --git a/subjects/displastpar.md b/subjects/displastpar.en.md
similarity index 100%
rename from subjects/displastpar.md
rename to subjects/displastpar.en.md
diff --git a/subjects/displaya.md b/subjects/displaya.en.md
similarity index 100%
rename from subjects/displaya.md
rename to subjects/displaya.en.md
diff --git a/subjects/displayalpham.md b/subjects/displayalpham.en.md
similarity index 100%
rename from subjects/displayalpham.md
rename to subjects/displayalpham.en.md
diff --git a/subjects/displayalrevm.md b/subjects/displayalrevm.en.md
similarity index 100%
rename from subjects/displayalrevm.md
rename to subjects/displayalrevm.en.md
diff --git a/subjects/displayfile.md b/subjects/displayfile.en.md
similarity index 100%
rename from subjects/displayfile.md
rename to subjects/displayfile.en.md
diff --git a/subjects/displayz.md b/subjects/displayz.en.md
similarity index 100%
rename from subjects/displayz.md
rename to subjects/displayz.en.md
diff --git a/subjects/enigma.md b/subjects/enigma.en.md
similarity index 100%
rename from subjects/enigma.md
rename to subjects/enigma.en.md
diff --git a/subjects/firstword.md b/subjects/firstword.en.md
similarity index 100%
rename from subjects/firstword.md
rename to subjects/firstword.en.md
diff --git a/subjects/fixthemain.md b/subjects/fixthemain.en.md
similarity index 100%
rename from subjects/fixthemain.md
rename to subjects/fixthemain.en.md
diff --git a/subjects/hello.md b/subjects/hello.en.md
similarity index 100%
rename from subjects/hello.md
rename to subjects/hello.en.md
diff --git a/subjects/inter.md b/subjects/inter.en.md
similarity index 100%
rename from subjects/inter.md
rename to subjects/inter.en.md
diff --git a/subjects/join.md b/subjects/join.md
deleted file mode 100644
index 2c88c853..00000000
--- a/subjects/join.md
+++ /dev/null
@@ -1,43 +0,0 @@
-## join
-
-### Instructions
-
-Write a function, Join, that returns the elements of a slice strings (arstr) join together in one string. Using the string 'sep' as a separator between each element of the array
-
-The function must have the next signature.
-
-### Expected function
-
-```go
-func Join(arstr []string, sep string) string {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- student ".."
-)
-
-func main() {
- arrStr := []string{"hello", "how", "are", "you"}
- joined := student.Join(arrStr, "--")
- fmt.Println(joined)
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/student/join$ go build
-student@ubuntu:~/student/join$ ./join
-hello--how--are--you
-student@ubuntu:~/student/join$
-```
diff --git a/subjects/lastword.md b/subjects/lastword.en.md
similarity index 100%
rename from subjects/lastword.md
rename to subjects/lastword.en.md
diff --git a/subjects/listat.md b/subjects/listat.md
deleted file mode 100644
index f71b4a60..00000000
--- a/subjects/listat.md
+++ /dev/null
@@ -1,60 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListAt` that haves one pointer to the list, `l`, and an `int` as parameters. This function should print a `Node` of the linked list, depending on the number, `nbr`.
-
-- In case of error it should print `nil`
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-
-func ListAt(l *Node, nbr int) *Node{
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &Node{}
-
- ListPushBack(link, "hello")
- ListPushBack(link, "how are")
- ListPushBack(link, "you")
- ListPushBack(link, 1)
-
- fmt.Println()
-
- fmt.Println(ListAt(link, 3).Data)
- fmt.Println(ListAt(link, 1).Data)
- fmt.Println(ListAt(link, 7))
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-you
-hello
-
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listclear.md b/subjects/listclear.md
deleted file mode 100644
index 5c059197..00000000
--- a/subjects/listclear.md
+++ /dev/null
@@ -1,77 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListClear` that delets all `nodes` from a linked list, deleting the link between the list.
-
-- Tip: assign the list's pointer to nil
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListClear(l *List) {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-type List = piscine.List
-type Node = piscine.Node
-
-func PrintList(l *List) {
- link := l.Head
- for link != nil {
- fmt.Print(link.Data, " -> ")
- link = link.Next
- }
- fmt.Println(nil)
-}
-
-func main() {
- link := &List{}
-
- piscine.ListPushBack(link, "I")
- piscine.ListPushBack(link, 1)
- piscine.ListPushBack(link, "something")
- piscine.ListPushBack(link, 2)
-
- fmt.Println("------list------")
- PrintList(link)
- piscine.ListClear(link)
- fmt.Println("------updated list------")
- PrintList(link)
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-------list------
-I -> 1 -> something -> 2 ->
-------updated list------
-
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listfind.md b/subjects/listfind.md
deleted file mode 100644
index e4023cff..00000000
--- a/subjects/listfind.md
+++ /dev/null
@@ -1,64 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListFind` that returns the value of the first link that the function in the arguments its equal.
-
-- For this you shoud use the function `CompStr`.
-
-- Use pointers when ever you can.
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func CompStr(l *list) bool {
-
-}
-
-func ListFind(l *List, comp func(l *List) bool) *interface{} {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &List{}
-
- piscine.ListPushBack(link, 1)
- piscine.ListPushBack(link, "hello")
- piscine.ListPushBack(link, "hello2")
- piscine.ListPushBack(link, "hello3")
-
- fmt.Println(piscine.ListFind(link, CompStr))
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-hello
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listforeach.md b/subjects/listforeach.md
deleted file mode 100644
index 7dbfd9b2..00000000
--- a/subjects/listforeach.md
+++ /dev/null
@@ -1,65 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListForEach` that applies a function given as argument to the information within each of the list's links.
-
-- The function given as argument must have a pointer as argument: `l *list`
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListForEach(l *list, f func(l *list)) {
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &List{}
-
- piscine.ListPushBack(link, 1)
- piscine.ListPushBack(link, 2)
- piscine.ListPushBack(link, 3)
- piscine.ListPushBack(link, 4)
-
- piscine.ListForEach(link, piscine.ListReverse)
-
- for link.Head != nil {
- fmt.Println(link.Head.Data)
- link.Head = link.Head.Next
- }
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-4
-3
-2
-1
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listforeachif.md b/subjects/listforeachif.md
deleted file mode 100644
index 81589024..00000000
--- a/subjects/listforeachif.md
+++ /dev/null
@@ -1,105 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListForEachIf` that applies a function given as argument to the information within some links of the list.
-
-- For this you will have to create a function `CompStr`, that returns a `bool`, to compare each elemente of the linked list, to see if it is a string, and than apply the function in the argument of `ListForEachIf`.
-
-- The function given as argument as to have a pointer as argument: `l *list`.
-
-- Use pointers wen ever you can.
-
-### Expected function and structure
-
-```go
-type node struct {
- data interface{}
- next *node
-}
-
-type list struct {
- head *node
- tail *node
-}
-
-func CompStr(l *list) bool {
-
-}
-
-func ListForEachIf(l *list, f func(l *list), comp func(l *list) bool) {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func PrintElem(l *list) {
- fmt.Println(l.head.data)
-}
-
-func StringToInt(l *list) {
- count := 1
- l.head.data = count
-}
-
-func PrintList(l *list) {
- m := l.head
- for m != nil {
- fmt.Print(m.data, " -> ")
- m = m.next
- }
-
- fmt.Print(l.tail)
-}
-
-func main() {
- link := &list{}
-
- piscine.ListPushBack(link, 1)
- piscine.ListPushBack(link, "hello")
- piscine.ListPushBack(link, 3)
- piscine.ListPushBack(link, "there")
- piscine.ListPushBack(link, 23)
- piscine.ListPushBack(link, "!")
- piscine.ListPushBack(link, 54)
-
- PrintAllList(link)
-
- fmt.Println()
- fmt.Println("--------function applied--------")
- piscine.ListForEachIf(link, PrintElem, CompStr)
-
- piscine.ListForEachIf(link, StringToInt, CompStr)
-
- fmt.Println("--------function applied--------")
- PrintAllList(link)
-
- fmt.Println()
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-1 -> hello -> 3 -> there -> 23 -> ! -> 54 ->
---------function applied--------
-hello
-there
-!
---------function applied--------
-1 -> 1 -> 3 -> 1 -> 23 -> 1 -> 54 ->
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listlast.md b/subjects/listlast.md
deleted file mode 100644
index c53d4df8..00000000
--- a/subjects/listlast.md
+++ /dev/null
@@ -1,58 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListLast` that returns the last element of the linked list.
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListLast(l *list) *list {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &list{}
- link2 := &list{}
-
- piscine.ListPushBack(link, "three")
- piscine.ListPushBack(link, 3)
- piscine.ListPushBack(link, "1")
-
- fmt.Println(piscine.ListLast(link).head)
- fmt.Println(piscine.ListLast(link2).head)
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-&{1 }
-
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listmerge.md b/subjects/listmerge.md
deleted file mode 100644
index 49cafa93..00000000
--- a/subjects/listmerge.md
+++ /dev/null
@@ -1,78 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListMerge` that places elements of a list `l2` at the end of an other list `l1`.
-
-- You can't create new elements!
-
-- Use pointers when ever you can.
-
-### Expected function and structure
-
-```go
-type NodeL struct {
- Data interface{}
- Next *NodeL
-}
-
-type List struct {
- Head *NodeL
- Tail *NodeL
-}
-
-func listMerge(l1 *List, l2 *List) {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- student ".."
-)
-
-func PrintList(l *List) {
- m := l.Head
- for m != nil {
- fmt.Print(m.Data, " -> ")
- m = m.Next
- }
-
- fmt.Print(nil)
- fmt.Println()
-}
-
-func main() {
- link := &List{}
- link2 := &List{}
-
- student.ListPushBack(link, "a")
- student.ListPushBack(link, "b")
- student.ListPushBack(link, "c")
- student.ListPushBack(link, "d")
-
- student.ListPushBack(link2, "e")
- student.ListPushBack(link2, "f")
- student.ListPushBack(link2, "g")
- student.ListPushBack(link2, "h")
-
- student.ListMerge(link, link2)
- PrintList(link)
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/student/test$ go build
-student@ubuntu:~/student/test$ ./test
-a -> b -> c -> d -> e -> f -> g -> h ->
-student@ubuntu:~/student/test$
-```
diff --git a/subjects/listpushback.md b/subjects/listpushback.md
deleted file mode 100644
index eada7bf9..00000000
--- a/subjects/listpushback.md
+++ /dev/null
@@ -1,60 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListPushBack` that inserts a new element `Node` at the end of the list, using the structure `List`
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListPushBack(l *List, data interface{}) {
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
-
- link := &List{}
-
- piscine.ListPushBack(link, "Hello")
- piscine.ListPushBack(link, "man")
- piscine.ListPushBack(link, "how are you")
-
- for link.Head != nil {
- fmt.Println(link.Head.Data)
- link.Head = link.Head.Next
- }
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-Hello
-man
-how are you
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listpushfront.md b/subjects/listpushfront.md
deleted file mode 100644
index 5ef0ea07..00000000
--- a/subjects/listpushfront.md
+++ /dev/null
@@ -1,60 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListPushBack` that inserts a new element `node` at the beginning of the list using `list`
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListPushFront(l *list, data interface{}) {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &list{}
-
- piscine.ListPushFront(link, "Hello")
- piscine.ListPushFront(link, "man")
- piscine.ListPushFront(link, "how are you")
-
- for link.head != nil {
- fmt.Println(link.head.data)
- link.head = link.head.next
- }
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-how are you
-man
-Hello
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listpushpara.md b/subjects/listpushpara.en.md
similarity index 100%
rename from subjects/listpushpara.md
rename to subjects/listpushpara.en.md
diff --git a/subjects/listremoveif.md b/subjects/listremoveif.md
deleted file mode 100644
index 04ee54ab..00000000
--- a/subjects/listremoveif.md
+++ /dev/null
@@ -1,99 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListRemoveIf` that removes all elements that are equal to the `data_ref` introduced in the argument of the function.
-
-- Use pointers wen ever you can.
-
-### Expected function and structure
-
-```go
-type NodeL struct {
- Data interface{}
- Next *NodeL
-}
-
-type List struct {
- Head *NodeL
- Tail *NodeL
-}
-
-func ListPushFront(l *List, data interface{}) {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func PrintList(l *List) {
- m := l.Head
- for m != nil {
- fmt.Print(m.Data, " -> ")
- m = m.Next
- }
-
- fmt.Print(nil)
- fmt.Println()
-}
-
-func main() {
- link := &List{}
- link2 := &List{}
- link3 := &List{}
-
-
- fmt.Println("----normal state----")
- student.ListPushBack(link2, 1)
- PrintList(link2)
- ListRemoveIf(link2, 1)
- fmt.Println("------answer-----")
- PrintList(link)
- fmt.Println()
-
- fmt.Println("----normal state----")
- student.ListPushBack(link, 1)
- student.ListPushBack(link, "Hello")
- student.ListPushBack(link, 1)
- student.ListPushBack(link, "There")
- student.ListPushBack(link, 1)
- student.ListPushBack(link, 1)
- student.ListPushBack(link, "How")
- student.ListPushBack(link, 1)
- student.ListPushBack(link, "are")
- student.ListPushBack(link, "you")
- student.ListPushBack(link, 1)
- PrintList(link)
-
- ListRemoveIf(link, 1)
- fmt.Println("------answer-----")
- PrintList(link)
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/student/test$ go build
-student@ubuntu:~/student/test$ ./test
-----normal state----
-1 ->
-------answer-----
-
-
-----normal state----
-1 -> Hello -> 1 -> There -> 1 -> 1 -> How -> 1 -> are -> you -> 1 ->
-------answer-----
-Hello -> There -> How -> are -> you ->
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listreverse.md b/subjects/listreverse.md
deleted file mode 100644
index 0ca64fc0..00000000
--- a/subjects/listreverse.md
+++ /dev/null
@@ -1,65 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListReverse` that reverses the elements order of a given linked list.
-
-- Use pointers when ever you can
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListReverse(l *list) {
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &List{}
-
- listPushBack(link, 1)
- listPushBack(link, 2)
- listPushBack(link, 3)
- listPushBack(link, 4)
-
- listReverse(link)
-
- for link.Head != nil {
- fmt.Println(link.Head.Data)
- link.Head = link.Head.Next
- }
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-4
-3
-2
-1
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listsize.md b/subjects/listsize.md
deleted file mode 100644
index 2b48b3f8..00000000
--- a/subjects/listsize.md
+++ /dev/null
@@ -1,56 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListSize` that returns the number of elements in the list.
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListSize(l *List) int {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &List{}
-
- piscine.ListPushFront(link, "Hello")
- piscine.ListPushFront(link, "2")
- piscine.ListPushFront(link, "you")
- piscine.ListPushFront(link, "man")
-
- fmt.Println(piscine.ListSize(link))
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-4
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listsort.md b/subjects/listsort.md
deleted file mode 100644
index 09401c9b..00000000
--- a/subjects/listsort.md
+++ /dev/null
@@ -1,89 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListSort` that sorts the linked list by ascending order.
-
-- This time you only will have the `Nodee` structure.
-
-- Try to use recursive.
-
-- Use pointers when ever you can.
-
-### Expected function and structure
-
-```go
-type Nodee struct {
- Data int
- Next *Nodee
-}
-
-func ListSort(l *NodeL) *NodeL {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- student ".."
-)
-
-//Prints the list
-func PrintList(l *Nodee) {
- m := l
- for m != nil {
- fmt.Print(m.Data, " -> ")
- m = m.next
- }
-
- fmt.Print(nil)
- fmt.Println()
-}
-
-//insert elements
-func listPushBack(l *Nodee, Data int) {
-
- n := &Nodee{}
- n.Data = Data
- n.next = nil
-
- if l == nil {
- l = n
- return
- }
-
- iterator := l
- for iterator.next != nil {
- iterator = iterator.next
- }
- iterator.next = n
-}
-
-func main() {
- link := &Nodee{}
-
- listPushBack(link, 5)
- listPushBack(link, 4)
- listPushBack(link, 3)
- listPushBack(link, 2)
- listPushBack(link, 1)
-
- PrintList(student.ListSort(link))
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/student/test$ go build
-student@ubuntu:~/student/test$ ./test
-0 -> 1 -> 2 -> 3 -> 4 -> 5 ->
-student@ubuntu:~/student/test$
-```
diff --git a/subjects/max.md b/subjects/max.en.md
similarity index 100%
rename from subjects/max.md
rename to subjects/max.en.md
diff --git a/subjects/onlya.md b/subjects/onlya.en.md
similarity index 100%
rename from subjects/onlya.md
rename to subjects/onlya.en.md
diff --git a/subjects/onlyz.md b/subjects/onlyz.en.md
similarity index 100%
rename from subjects/onlyz.md
rename to subjects/onlyz.en.md
diff --git a/subjects/pilot.md b/subjects/pilot.en.md
similarity index 100%
rename from subjects/pilot.md
rename to subjects/pilot.en.md
diff --git a/subjects/point.md b/subjects/point.en.md
similarity index 100%
rename from subjects/point.md
rename to subjects/point.en.md
diff --git a/subjects/printbits.md b/subjects/printbits.en.md
similarity index 100%
rename from subjects/printbits.md
rename to subjects/printbits.en.md
diff --git a/subjects/rectangle.md b/subjects/rectangle.en.md
similarity index 100%
rename from subjects/rectangle.md
rename to subjects/rectangle.en.md
diff --git a/subjects/repeatalpha.md b/subjects/repeatalpha.en.md
similarity index 100%
rename from subjects/repeatalpha.md
rename to subjects/repeatalpha.en.md
diff --git a/subjects/reversebits.md b/subjects/reversebits.en.md
similarity index 100%
rename from subjects/reversebits.md
rename to subjects/reversebits.en.md
diff --git a/subjects/rot13.md b/subjects/rot13.en.md
similarity index 100%
rename from subjects/rot13.md
rename to subjects/rot13.en.md
diff --git a/subjects/rot14.md b/subjects/rot14.en.md
similarity index 100%
rename from subjects/rot14.md
rename to subjects/rot14.en.md
diff --git a/subjects/searchreplace.md b/subjects/searchreplace.en.md
similarity index 100%
rename from subjects/searchreplace.md
rename to subjects/searchreplace.en.md
diff --git a/subjects/sortedlistmerge.md b/subjects/sortedlistmerge.md
deleted file mode 100644
index 392e5a6d..00000000
--- a/subjects/sortedlistmerge.md
+++ /dev/null
@@ -1,71 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `SortedListMerge` that mereges two lists, `l1` and `l2`, but you have to join them in ascending order.
-
-- Tip each list as to be already sorted, and initialized with 0.
-
-- Use pointers when ever you can.
-
-### Expected function and structure
-
-```go
-type Nodee struct {
- Data interface{}
- Next *Nodee
-}
-
-func SortedListMerge(l1 *Nodee, l2 *Nodee) *Nodee {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func PrintList(l *Nodee) {
- m := l
- for m != nil {
- fmt.Print(m.Data, " -> ")
- m = m.Next
- }
-
- fmt.Print(nil)
- fmt.Println()
-}
-
-func main() {
- link := &Nodee{}
- link2 := &Nodee{}
-
- piscine.ListPushBack(link, "5")
- piscine.ListPushBack(link, "3")
- piscine.ListPushBack(link, "7")
-
- piscine.ListPushBack(link2, "1")
- piscine.ListPushBack(link2, "-2")
- piscine.ListPushBack(link2, "4")
- piscine.ListPushBack(link2, "6")
-
- PrintList(SortedListMerge(link, link2))
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
--2 -> 0 -> 0 -> 1 -> 3 -> 4 -> 5 -> 6 -> 7 ->
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/sortlistinsert.md b/subjects/sortlistinsert.md
deleted file mode 100644
index 09340e70..00000000
--- a/subjects/sortlistinsert.md
+++ /dev/null
@@ -1,87 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `SortListInsert` that inserts `Data_ref` in the linked list, but it as to remain sorted in ascending order.
-
-- The list as to be alredy sorted.
-
-- Use pointers when ever you can.
-
-### Expected function and structure
-
-```go
-type Nodee struct {
- Data int
- Next *Nodee
-}
-
-func SortListInsert(l *Nodee, Data_ref int) *Nodee{
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-//Prints the list
-func PrintList(l *Nodee) {
- m := l
- for m != nil {
- fmt.Print(m.Data, " -> ")
- m = m.Next
- }
- fmt.Print(nil)
- fmt.Println()
-}
-
-//insert elements
-func listPushBack(l *Nodee, Data int) {
- n := &Nodee{}
- n.Data = Data
- n.Next = nil
- if l == nil {
- l = n
- return
- }
- iterator := l
- for iterator.Next != nil {
- iterator = iterator.Next
- }
- iterator.Next = n
-}
-
-func main() {
-
- link := &Nodee{}
-
- listPushBack(link, 1)
- listPushBack(link, 4)
- listPushBack(link, 9)
-
- PrintList(link)
-
- link = sortListInsert(link, -2)
- link = sortListInsert(link, 2)
- PrintList(link)
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
--2 -> 0 -> 1 -> 2 -> 4 -> 9 ->
-lee@lee:~/Documents/work/day11/11-16-sortlistinsert/so
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/strlen.md b/subjects/strlen.md
deleted file mode 100644
index f129f9f6..00000000
--- a/subjects/strlen.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## strlen
-
-### Instructions
-
-Write a function that returns the length of a string.
-
-- `len` is forbidden
-
-### Expected function and structure
-
-```go
-func Strlen(str string) int {
-
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-4
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/swapbits.md b/subjects/swapbits.en.md
similarity index 100%
rename from subjects/swapbits.md
rename to subjects/swapbits.en.md
diff --git a/subjects/switchcase.md b/subjects/switchcase.en.md
similarity index 100%
rename from subjects/switchcase.md
rename to subjects/switchcase.en.md
diff --git a/subjects/union.md b/subjects/union.en.md
similarity index 100%
rename from subjects/union.md
rename to subjects/union.en.md
diff --git a/subjects/unmatch.md b/subjects/unmatch.en.md
similarity index 100%
rename from subjects/unmatch.md
rename to subjects/unmatch.en.md
diff --git a/subjects/wdmatch.md b/subjects/wdmatch.en.md
similarity index 100%
rename from subjects/wdmatch.md
rename to subjects/wdmatch.en.md
diff --git a/subjects/ztail.md b/subjects/ztail.en.md
similarity index 100%
rename from subjects/ztail.md
rename to subjects/ztail.en.md
From 0a558ba1ef8027a542ee13f3a17fa579089291c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Barthe=CC=81lemy=20de=20Mazenod?=
Date: Wed, 24 Apr 2019 18:16:25 +0100
Subject: [PATCH 070/104] object attribute done
---
docs/object-attribute-system.md | 58 +++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
create mode 100644 docs/object-attribute-system.md
diff --git a/docs/object-attribute-system.md b/docs/object-attribute-system.md
new file mode 100644
index 00000000..0a8cb27e
--- /dev/null
+++ b/docs/object-attribute-system.md
@@ -0,0 +1,58 @@
+# Object Attributes System
+
+> This document cover two notions, the edition of attributes and the impact it has relatively to the others Objects.
+
+## Edition of Attributes
+
+> There is no limit to how many attributes can be defined to an Object.
+
+In the "Object Attributes" section of the "Object Edit" Page, the first row is a form to create and append a new attribute. It requires two elements, the name of the attribute and its type (`String`, `Number`, `Boolean`, `Array`, `Object`, `Function`, `Null`). Click 'Add' to create the attribute.
+
+> Within a same Object, each attribute's name must be uniq.
+
+Once created, the new attributes appears right bellow and the ability to associate a value to it is now available. Depending on the type of the attribute, the interface will vary.
+
+- String value input is type String.
+- Number value input is type Number.
+- Booleans value input appears as a switch, true by default.
+- Arrays and Objects content are hideable / showable via the "Show/Hide content" button on the right of the attribute. There is no limit on the depth of Object/Array, however, after a certain level, the interface will start to feel narrow.
+- String value input is type String.
+- Null will not display any input.
+- Function will offer to select from all available functions, save on select.
+
+Any attribute can be delete by clicking on the 'trash' icon on the right hand of it.
+
+Here an example of how the section looks like.
+![object-attributes](https://user-images.githubusercontent.com/15313830/56677487-88675600-66b8-11e9-9781-26dc0ee6301d.png)
+
+## Attributes and RelationShips
+
+When an attributes is set to an Object, other Objects, associated to this particular Object, will have access to it. Which means that, if an Object A is added as a child of an Object B, A will embed its attributes within the instance of B.
+
+Object's attributes follow a hierarchy when associated to an other Object.
+The Original Attributes of a child, the ones defined in the original Object are the weakest ones. A Children Attribute is applied to all the children and overload the Original Attributes. Finally, child attribute is the strongest one, it overlaod Original Attributes and Children Attributes.
+
+When an object and its relationship are resolved, the three structures ("attrs", "childrenAttrs", "childAttrs") are flattened.
+
+The following json shows how the next object would be resolved.
+
+```json
+{
+ "childrenAttrs": {
+ "xp": 800
+ },
+ "children": {
+ "printalphabet": {
+ "duration": 3600,
+ "xp": 800,
+ "isBonus": true
+ }
+ }
+}
+```
+
+Children
+![children](https://user-images.githubusercontent.com/15313830/56679319-b189e580-66bc-11e9-8f2a-3d51eb1486d4.png)
+
+Child
+![chilld-capture](https://user-images.githubusercontent.com/15313830/56679320-b189e580-66bc-11e9-90ab-c8f69f531876.png)
From fa23db5fc365269ea2f6d992e26d65a3f6b090f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment?=
Date: Thu, 25 Apr 2019 11:53:25 +0100
Subject: [PATCH 071/104] Update object-attribute-system.md
---
docs/object-attribute-system.md | 118 ++++++++++++++++++++++++++++++--
1 file changed, 111 insertions(+), 7 deletions(-)
diff --git a/docs/object-attribute-system.md b/docs/object-attribute-system.md
index 0a8cb27e..8aea0fc1 100644
--- a/docs/object-attribute-system.md
+++ b/docs/object-attribute-system.md
@@ -8,7 +8,7 @@
In the "Object Attributes" section of the "Object Edit" Page, the first row is a form to create and append a new attribute. It requires two elements, the name of the attribute and its type (`String`, `Number`, `Boolean`, `Array`, `Object`, `Function`, `Null`). Click 'Add' to create the attribute.
-> Within a same Object, each attribute's name must be uniq.
+> Within a same Object, each attribute's name must be unique.
Once created, the new attributes appears right bellow and the ability to associate a value to it is now available. Depending on the type of the attribute, the interface will vary.
@@ -30,17 +30,14 @@ Here an example of how the section looks like.
When an attributes is set to an Object, other Objects, associated to this particular Object, will have access to it. Which means that, if an Object A is added as a child of an Object B, A will embed its attributes within the instance of B.
Object's attributes follow a hierarchy when associated to an other Object.
-The Original Attributes of a child, the ones defined in the original Object are the weakest ones. A Children Attribute is applied to all the children and overload the Original Attributes. Finally, child attribute is the strongest one, it overlaod Original Attributes and Children Attributes.
+The **defaults attributes** of a child, the ones defined in the original Object are the weakest ones. A **children attribute** is applied to all the children and override the default attributes. Finally, **relation attribute** is the strongest one, it override Default Attributes and Children Attributes.
-When an object and its relationship are resolved, the three structures ("attrs", "childrenAttrs", "childAttrs") are flattened.
+When an object and its relationship are resolved, the three structures (`attrs`, `childrenAttrs`, `childAttrs`) are merged.
-The following json shows how the next object would be resolved.
+The following json shows how the object would be represented:
```json
{
- "childrenAttrs": {
- "xp": 800
- },
"children": {
"printalphabet": {
"duration": 3600,
@@ -56,3 +53,110 @@ Children
Child
![chilld-capture](https://user-images.githubusercontent.com/15313830/56679320-b189e580-66bc-11e9-90ab-c8f69f531876.png)
+
+## Detailed example
+
+Let's create a few `exercises` objects
+
+> swap
+
+```js
+{
+ "id": 12344,
+ "title": "swap",
+ "attrs": {
+ "language": "go",
+ "duration": 7200
+ }
+}
+```
+
+> printalphabet
+
+```js
+{
+ "id": 12345,
+ "title": "printalphabet-v2",
+ "attrs": {
+ "language": "go",
+ "duration": 3600
+ }
+}
+```
+
+We can now create a parent object that will reference them and link them.
+
+This allow you to specify the structuration of your pedagocial content.
+
+I'll make a quest that regroup those 2 exercises:
+
+> quest-03
+
+```js
+{
+ "id": 12346,
+ "title": "quest-03",
+ "attrs": {},
+ "childrenAttrs": {
+ "xp": 800,
+ "duration": 4800,
+ },
+ "children": {
+ "printalphabet": {
+ "ref": 12345,
+ "index": 0,
+ "attrs": {
+ "duration": 7200
+ }
+ },
+ "swap": {
+ "ref": 12344,
+ "index": 1,
+ "attrs": {}
+ }
+ }
+}
+```
+
+All done, now when rendering an object, attributes are merged like so:
+
+> rendered quest object
+
+```js
+{
+ "id": 12346,
+ "title": "quest-03",
+ "attrs": {},
+ "children": {
+ "printalphabet": {
+ "ref": 12345,
+ "index": 0,
+ "attrs": {
+ "language": "go",
+ "xp": 800,
+ "duration": 7200
+ }
+ },
+ "swap": {
+ "ref": 12344,
+ "index": 1,
+ "attrs": {
+ "language": "go",
+ "xp": 800,
+ "duration": 4800
+ }
+ }
+ }
+}
+```
+
+First we apply the **default attributes** from the referenced object.
+> Here `duration` and `language` are applied.
+
+Then we apply the **children attributes** to every child.
+> In this case we override every `duration` to 4800 and add the new `xp` attribute.
+
+After that we apply the **relation attributes**, that are the most specific and as such,
+override all others attributes.
+> In this case only the `printalphabet` relation had attributes and so we apply
+the given `duration` to the final merged object.
From b196f8c44b72d554524a30a0adca121149609b36 Mon Sep 17 00:00:00 2001
From: Christopher Fremond
Date: Thu, 25 Apr 2019 11:59:49 +0100
Subject: [PATCH 072/104] reformatting
---
subjects/{wdmatch.md => wdmatch.en.md} | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
rename subjects/{wdmatch.md => wdmatch.en.md} (52%)
diff --git a/subjects/wdmatch.md b/subjects/wdmatch.en.md
similarity index 52%
rename from subjects/wdmatch.md
rename to subjects/wdmatch.en.md
index abe62560..b7da8da2 100644
--- a/subjects/wdmatch.md
+++ b/subjects/wdmatch.en.md
@@ -2,18 +2,17 @@
## Instructions
+Write a program that takes two strings and checks whether it is possible to write the first string with characters from the second string, while respecting the order in which these characters appear in the second string.
-Write a program that takes two strings and checks whether it's possible to write the first string with characters from the second string, while respecting the order in which these characters appear in the second string.
-
-- If it's possible, the program displays the string followed by a `\n`, otherwise it simply displays a `\n`.
+- If it is possible, the program displays the string followed by a `\n`, otherwise it simply displays a `\n`.
- If the number of arguments is not 2, the program displays `\n`.
-## Expected output
+Example of output :
```console
student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test "faya" "fgvvfdxcacpolhyghbreda"
+student@ubuntu:~/piscine/test$ ./test "faya" "fgvvfdxcacpolhyghbreda"
faya
student@ubuntu:~/piscine/test$ ./test "faya" "fgvvfdxcacpolhyghbred"
@@ -21,7 +20,7 @@ student@ubuntu:~/piscine/test$ ./test "error" rrerrrfiiljdfxjyuifrrvcoojh
student@ubuntu:~/piscine/test$ ./test "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq "
quarante deux
-student@ubuntu:~/piscine/test$ ./test
+student@ubuntu:~/piscine/test$ ./test
-student@ubuntu:~/piscine/test$
-```
\ No newline at end of file
+student@ubuntu:~/piscine/test$
+```
From a0c9b8aa57a8d8e214129111d12a3cf9ae14e86d Mon Sep 17 00:00:00 2001
From: Christopher Fremond
Date: Thu, 25 Apr 2019 12:02:54 +0100
Subject: [PATCH 073/104] correction of title
---
subjects/wdmatch.en.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/subjects/wdmatch.en.md b/subjects/wdmatch.en.md
index 046efc0e..8eb821c5 100644
--- a/subjects/wdmatch.en.md
+++ b/subjects/wdmatch.en.md
@@ -1,5 +1,4 @@
-
-# switchcase
+# wdmatch
## Instructions
From 9a2adb35a901efea782a46773017aafcd79c1e54 Mon Sep 17 00:00:00 2001
From: Augusto
Date: Fri, 19 Apr 2019 17:25:05 +0100
Subject: [PATCH 074/104] reverse range exam exercise
---
subjects/reverserange.md | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 subjects/reverserange.md
diff --git a/subjects/reverserange.md b/subjects/reverserange.md
new file mode 100644
index 00000000..b6c63cd3
--- /dev/null
+++ b/subjects/reverserange.md
@@ -0,0 +1,25 @@
+# reverserange
+## Instructions
+
+Write the function ReverseRange, it must allocate (with make()) an array of integers, fill it with consecutive
+values that begin at end and end at start (Including start and end !), then
+return that array.
+
+This function must be declare as follows
+
+## Expected function
+
+```go
+
+func ReverseRange(start, end int) []int {
+
+}
+
+```
+
+And its output :
+
+- With (1, 3) you will return an array containing 3, 2 and 1
+- With (-1, 2) you will return an array containing 2, 1, 0 and -1.
+- With (0, 0) you will return an array containing 0.
+- With (0, -3) you will return an array containing -3, -2, -1 and 0.
\ No newline at end of file
From 13f525305d9ccfc3564ec2767323a64cbbc13743 Mon Sep 17 00:00:00 2001
From: Christopher Fremond
Date: Thu, 25 Apr 2019 17:14:12 +0100
Subject: [PATCH 075/104] reformatting and correction of title
---
subjects/reverserange.en.md | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 subjects/reverserange.en.md
diff --git a/subjects/reverserange.en.md b/subjects/reverserange.en.md
new file mode 100644
index 00000000..6e3a92b4
--- /dev/null
+++ b/subjects/reverserange.en.md
@@ -0,0 +1,24 @@
+## reverserange
+
+### Instructions
+
+Write the function ReverseRange which must:
+
+- allocate (with make()) an array of integers.
+- fill it with consecutive values that begin at `end` and end at `start` (Including `start` and `end` !)
+- finally return that array.
+
+### Expected function
+
+```go
+func ReverseRange(start, end int) []int {
+
+}
+```
+
+Examples of output :
+
+- With (1, 3) the function will return an array containing 3, 2 and 1.
+- With (-1, 2) the function will return an array containing 2, 1, 0 and -1.
+- With (0, 0) the function will return an array containing 0.
+- With (0, -3) the function will return an array containing -3, -2, -1 and 0.
From 91d79279f8e244a5a72fea8c2be7e1bb2ef2a6f1 Mon Sep 17 00:00:00 2001
From: Augusto
Date: Fri, 19 Apr 2019 18:30:58 +0100
Subject: [PATCH 076/104] hidden parameter exam exercise
---
subjects/hiddenp.md | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 subjects/hiddenp.md
diff --git a/subjects/hiddenp.md b/subjects/hiddenp.md
new file mode 100644
index 00000000..f18f947e
--- /dev/null
+++ b/subjects/hiddenp.md
@@ -0,0 +1,27 @@
+# hiddenp
+## Instructions
+
+Write a program named hidenp that takes two strings and displays 1
+followed by a newline if the first string is hidden in the second one,
+otherwise displays 0 followed by a newline.
+
+Let s1 and s2 be strings. We say that s1 is hidden in s2 if it's possible to
+find each character from s1 in s2, in the same order as they appear in s1.
+Also, the empty string is hidden in any string.
+
+If the number of parameters is not 2, the program displays a newline.
+
+And its output :
+
+```console
+student@ubuntu:~/student/hiddenp$ go build
+student@ubuntu:~/student/hiddenp$ ./hiddenp "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e
+1$
+student@ubuntu:~/student/hiddenp$ ./hiddenp "abc" "2altrb53c.sse" | cat -e
+1$
+student@ubuntu:~/student/hiddenp$ ./hiddenp "abc" "btarc" | cat -e
+0$
+student@ubuntu:~/student/hiddenp$ ./hiddenp | cat -e
+$
+student@ubuntu:~/student/hiddenp$
+```
From 39ebf85d83136cc6bbaf6c0f3d43d06a6d6203db Mon Sep 17 00:00:00 2001
From: Christopher Fremond
Date: Thu, 25 Apr 2019 18:17:37 +0100
Subject: [PATCH 077/104] reformatting and correction of title
---
subjects/hiddenp.en.md | 28 ++++++++++++++++++++++++++++
subjects/hiddenp.md | 27 ---------------------------
2 files changed, 28 insertions(+), 27 deletions(-)
create mode 100644 subjects/hiddenp.en.md
delete mode 100644 subjects/hiddenp.md
diff --git a/subjects/hiddenp.en.md b/subjects/hiddenp.en.md
new file mode 100644
index 00000000..7a71d84e
--- /dev/null
+++ b/subjects/hiddenp.en.md
@@ -0,0 +1,28 @@
+## hiddenp
+
+### Instructions
+
+Write a program named hiddenp that takes two strings and that, if the first string is hidden in the second one, displays 1
+followed by a newline, otherwise it displays 0 followed by a newline.
+
+Let s1 and s2 be strings. It is considered that s1 is hidden in s2 if it is possible to
+find each character from s1 in s2, **in the same order as they appear in s1.**
+
+If s1 is an empty string it is considered hidden in any string.
+
+If the number of parameters is not 2, the program displays a newline.
+
+Example of output :
+
+```console
+student@ubuntu:~/student/hiddenp$ go build
+student@ubuntu:~/student/hiddenp$ ./hiddenp "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e
+1$
+student@ubuntu:~/student/hiddenp$ ./hiddenp "abc" "2altrb53c.sse" | cat -e
+1$
+student@ubuntu:~/student/hiddenp$ ./hiddenp "abc" "btarc" | cat -e
+0$
+student@ubuntu:~/student/hiddenp$ ./hiddenp | cat -e
+$
+student@ubuntu:~/student/hiddenp$
+```
diff --git a/subjects/hiddenp.md b/subjects/hiddenp.md
deleted file mode 100644
index f18f947e..00000000
--- a/subjects/hiddenp.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# hiddenp
-## Instructions
-
-Write a program named hidenp that takes two strings and displays 1
-followed by a newline if the first string is hidden in the second one,
-otherwise displays 0 followed by a newline.
-
-Let s1 and s2 be strings. We say that s1 is hidden in s2 if it's possible to
-find each character from s1 in s2, in the same order as they appear in s1.
-Also, the empty string is hidden in any string.
-
-If the number of parameters is not 2, the program displays a newline.
-
-And its output :
-
-```console
-student@ubuntu:~/student/hiddenp$ go build
-student@ubuntu:~/student/hiddenp$ ./hiddenp "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e
-1$
-student@ubuntu:~/student/hiddenp$ ./hiddenp "abc" "2altrb53c.sse" | cat -e
-1$
-student@ubuntu:~/student/hiddenp$ ./hiddenp "abc" "btarc" | cat -e
-0$
-student@ubuntu:~/student/hiddenp$ ./hiddenp | cat -e
-$
-student@ubuntu:~/student/hiddenp$
-```
From 94355f40474697fb6dab5110d1b2a042aa6634b3 Mon Sep 17 00:00:00 2001
From: Christopher Fremond
Date: Thu, 25 Apr 2019 17:23:09 +0100
Subject: [PATCH 078/104] deleting extra file
---
subjects/reverserange.md | 25 -------------------------
1 file changed, 25 deletions(-)
delete mode 100644 subjects/reverserange.md
diff --git a/subjects/reverserange.md b/subjects/reverserange.md
deleted file mode 100644
index b6c63cd3..00000000
--- a/subjects/reverserange.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# reverserange
-## Instructions
-
-Write the function ReverseRange, it must allocate (with make()) an array of integers, fill it with consecutive
-values that begin at end and end at start (Including start and end !), then
-return that array.
-
-This function must be declare as follows
-
-## Expected function
-
-```go
-
-func ReverseRange(start, end int) []int {
-
-}
-
-```
-
-And its output :
-
-- With (1, 3) you will return an array containing 3, 2 and 1
-- With (-1, 2) you will return an array containing 2, 1, 0 and -1.
-- With (0, 0) you will return an array containing 0.
-- With (0, -3) you will return an array containing -3, -2, -1 and 0.
\ No newline at end of file
From 79b89502038177ab4c089ea40fbfe1031b69fb3d Mon Sep 17 00:00:00 2001
From: Augusto
Date: Wed, 24 Apr 2019 12:34:12 +0100
Subject: [PATCH 079/104] reverse string capitalizer exam exercise
---
subjects/reversestrcap.md | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 subjects/reversestrcap.md
diff --git a/subjects/reversestrcap.md b/subjects/reversestrcap.md
new file mode 100644
index 00000000..3ec67321
--- /dev/null
+++ b/subjects/reversestrcap.md
@@ -0,0 +1,26 @@
+# reversestrcap
+## Instructions
+
+Write a program that takes one or more strings and, for each argument, puts
+the last character of each word (if it's a letter) in uppercase and the rest
+in lowercase, then displays the result followed by a \n.
+
+A word is a section of string delimited by spaces/tabs or the start/end of the
+string. If a word has a single letter, it must be capitalized.
+
+If there are no parameters, display \n.
+
+## Expected output
+
+```console
+student@ubuntu:~/student/reversestrcap$ go build
+student@ubuntu:~/student/reversestrcap$ ./reversestrcap "First SMALL TesT" | cat -e
+firsT smalL tesT$
+student@ubuntu:~/student/reversestrcap$ ./reversestrcap go run reversestrcap.go "SEconD Test IS a LItTLE EasIEr" "bEwaRe IT'S NoT HARd WhEN " " Go a dernier 0123456789 for the road e" | cat -e
+seconD tesT iS A littlE easieR$
+bewarE it'S noT harD wheN $
+ gO A dernieR 0123456789 foR thE roaD E$
+student@ubuntu:~/student/reversestrcap$ ./reversestrcap | cat -e
+$
+student@ubuntu:~/student/reversestrcap$
+```
From 59c00df372ac7e28ecf90929b786057505b144b0 Mon Sep 17 00:00:00 2001
From: Christopher Fremond
Date: Thu, 25 Apr 2019 19:52:16 +0100
Subject: [PATCH 080/104] reformatting and correction of title
---
subjects/reversestrcap.en.md | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 subjects/reversestrcap.en.md
diff --git a/subjects/reversestrcap.en.md b/subjects/reversestrcap.en.md
new file mode 100644
index 00000000..3dc04544
--- /dev/null
+++ b/subjects/reversestrcap.en.md
@@ -0,0 +1,27 @@
+## reversestrcap
+
+### Instructions
+
+Write a program that takes one or more strings and that, **for each argument**:
+-puts the last character of each word (if it is a letter) in uppercase and the rest
+in lowercase
+-then it displays the result followed by a `\n`.
+
+A word is a sequence of alphanumerical characters.
+
+If there are no parameters, the program displays a `\n`.
+
+Examples of outputs :
+
+```console
+student@ubuntu:~/student/reversestrcap$ go build
+student@ubuntu:~/student/reversestrcap$ ./reversestrcap "First SMALL TesT" | cat -e
+firsT smalL tesT$
+student@ubuntu:~/student/reversestrcap$ ./reversestrcap go run reversestrcap.go "SEconD Test IS a LItTLE EasIEr" "bEwaRe IT'S NoT HARd WhEN " " Go a dernier 0123456789 for the road e" | cat -e
+seconD tesT iS A littlE easieR$
+bewarE it'S noT harD wheN $
+ gO A dernieR 0123456789 foR thE roaD E$
+student@ubuntu:~/student/reversestrcap$ ./reversestrcap | cat -e
+$
+student@ubuntu:~/student/reversestrcap$
+```
From 11e1bf592b74ffa0c1cd862ef0097673d7761cfb Mon Sep 17 00:00:00 2001
From: Christopher Fremond
Date: Thu, 25 Apr 2019 19:58:48 +0100
Subject: [PATCH 081/104] deletion of extra file
---
subjects/reversestrcap.md | 26 --------------------------
1 file changed, 26 deletions(-)
delete mode 100644 subjects/reversestrcap.md
diff --git a/subjects/reversestrcap.md b/subjects/reversestrcap.md
deleted file mode 100644
index 3ec67321..00000000
--- a/subjects/reversestrcap.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# reversestrcap
-## Instructions
-
-Write a program that takes one or more strings and, for each argument, puts
-the last character of each word (if it's a letter) in uppercase and the rest
-in lowercase, then displays the result followed by a \n.
-
-A word is a section of string delimited by spaces/tabs or the start/end of the
-string. If a word has a single letter, it must be capitalized.
-
-If there are no parameters, display \n.
-
-## Expected output
-
-```console
-student@ubuntu:~/student/reversestrcap$ go build
-student@ubuntu:~/student/reversestrcap$ ./reversestrcap "First SMALL TesT" | cat -e
-firsT smalL tesT$
-student@ubuntu:~/student/reversestrcap$ ./reversestrcap go run reversestrcap.go "SEconD Test IS a LItTLE EasIEr" "bEwaRe IT'S NoT HARd WhEN " " Go a dernier 0123456789 for the road e" | cat -e
-seconD tesT iS A littlE easieR$
-bewarE it'S noT harD wheN $
- gO A dernieR 0123456789 foR thE roaD E$
-student@ubuntu:~/student/reversestrcap$ ./reversestrcap | cat -e
-$
-student@ubuntu:~/student/reversestrcap$
-```
From 20081821881be3a8d5b853f63918885b9fa237fb Mon Sep 17 00:00:00 2001
From: Augusto
Date: Wed, 24 Apr 2019 16:22:16 +0100
Subject: [PATCH 082/104] expand string exam exercise readme
---
subjects/expandstr.md | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 subjects/expandstr.md
diff --git a/subjects/expandstr.md b/subjects/expandstr.md
new file mode 100644
index 00000000..aec0964b
--- /dev/null
+++ b/subjects/expandstr.md
@@ -0,0 +1,28 @@
+## expandstr
+
+### Instructions
+
+Write a program that takes a string and displays it with exactly three spaces
+between each word, with no spaces or tabs either at the beginning or the end,
+followed by a newline.
+
+A word is a section of string delimited either by spaces/tabs, or by the
+start/end of the string.
+
+If the number of parameters is not 1, or if there are no words, simply display
+a newline.
+
+Example of output :
+
+```console
+student@ubuntu:~/student/expandstr$ go build
+student@ubuntu:~/student/expandstr$ ./expandstr "you see it's easy to display the same thing" | cat -e
+you see it's easy to display the same thing$
+student@ubuntu:~/student/expandstr$ ./expandstr " only it's harder " | cat -e
+only it's harder$
+student@ubuntu:~/student/expandstr$ ./expandstr " how funny it is" "did you hear, Mathilde ?" | cat -e
+$
+student@ubuntu:~/student/expandstr$ ./expandstr | cat -e
+$
+student@ubuntu:~/student/expandstr$
+```
From 44aadee2c90768671c7beac248e510c41fab3d9b Mon Sep 17 00:00:00 2001
From: Christopher Fremond
Date: Thu, 25 Apr 2019 20:09:22 +0100
Subject: [PATCH 083/104] reformatting and correction of title
---
subjects/{expandstr.md => expandstr.en.md} | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
rename subjects/{expandstr.md => expandstr.en.md} (75%)
diff --git a/subjects/expandstr.md b/subjects/expandstr.en.md
similarity index 75%
rename from subjects/expandstr.md
rename to subjects/expandstr.en.md
index aec0964b..62be75bf 100644
--- a/subjects/expandstr.md
+++ b/subjects/expandstr.en.md
@@ -3,16 +3,16 @@
### Instructions
Write a program that takes a string and displays it with exactly three spaces
-between each word, with no spaces or tabs either at the beginning or the end,
-followed by a newline.
+between each word, with no spaces or tabs at either the beginning nor the end.
-A word is a section of string delimited either by spaces/tabs, or by the
-start/end of the string.
+The string will be followed by a newline.
-If the number of parameters is not 1, or if there are no words, simply display
+A word is a sequence of alphanumerical characters.
+
+If the number of parameters is not 1, or if there are no words, the program displays
a newline.
-Example of output :
+Examples of outputs :
```console
student@ubuntu:~/student/expandstr$ go build
From 8377fed2445bdbb833a37aaaa5282c24f9fa50ff Mon Sep 17 00:00:00 2001
From: Augusto
Date: Wed, 24 Apr 2019 17:19:59 +0100
Subject: [PATCH 084/104] parameters counter exam exercise readme
---
subjects/paramcount.md | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 subjects/paramcount.md
diff --git a/subjects/paramcount.md b/subjects/paramcount.md
new file mode 100644
index 00000000..cc93c365
--- /dev/null
+++ b/subjects/paramcount.md
@@ -0,0 +1,21 @@
+## paramcount
+
+### Instructions
+
+Write a program that displays the number of arguments passed to it, followed by
+a newline.
+
+If there are no arguments, just display a 0 followed by a newline.
+
+Example of output :
+
+```console
+student@ubuntu:~/student/paramcount$ go build
+student@ubuntu:~/student/paramcount$ ./paramcount 1 2 3 5 7 24
+6
+student@ubuntu:~/student/paramcount$ ./paramcount 6 12 24 | cat -e
+3$
+student@ubuntu:~/student/paramcount$ ./paramcount | cat -e
+0$
+student@ubuntu:~/student/paramcount$
+```
From 9f71a71e5672d8827af041018b37e68f012460a7 Mon Sep 17 00:00:00 2001
From: Christopher Fremond
Date: Fri, 26 Apr 2019 12:48:02 +0100
Subject: [PATCH 085/104] reformatting and correction of title
---
subjects/{paramcount.md => paramcount.en.md} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename subjects/{paramcount.md => paramcount.en.md} (89%)
diff --git a/subjects/paramcount.md b/subjects/paramcount.en.md
similarity index 89%
rename from subjects/paramcount.md
rename to subjects/paramcount.en.md
index cc93c365..c11c7171 100644
--- a/subjects/paramcount.md
+++ b/subjects/paramcount.en.md
@@ -2,12 +2,12 @@
### Instructions
-Write a program that displays the number of arguments passed to it, followed by
+Write a program that displays the number of arguments passed to it. This number will be followed by
a newline.
If there are no arguments, just display a 0 followed by a newline.
-Example of output :
+Examples of outputs :
```console
student@ubuntu:~/student/paramcount$ go build
From 8d30c012851da32513f5aa5de046423549d6858d Mon Sep 17 00:00:00 2001
From: Augusto
Date: Wed, 24 Apr 2019 18:26:31 +0100
Subject: [PATCH 086/104] itoa
---
subjects/itoa.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 subjects/itoa.md
diff --git a/subjects/itoa.md b/subjects/itoa.md
new file mode 100644
index 00000000..9295201d
--- /dev/null
+++ b/subjects/itoa.md
@@ -0,0 +1,14 @@
+## itoa
+
+### Instructions
+
+Write a function that takes an int and converts it to a string.
+The function returns the result in a char array that you must allocate.
+
+## Expected function
+
+```go
+func Itoa(n int) int {
+
+}
+```
\ No newline at end of file
From 43c9b48f154997886eaca3d6f0c7ea7fcfbe5e58 Mon Sep 17 00:00:00 2001
From: Christopher Fremond
Date: Fri, 26 Apr 2019 16:38:27 +0100
Subject: [PATCH 087/104] remaning and reformating of instructions
---
subjects/itoa.en.md | 15 +++++++++++++++
subjects/itoa.md | 14 --------------
2 files changed, 15 insertions(+), 14 deletions(-)
create mode 100644 subjects/itoa.en.md
delete mode 100644 subjects/itoa.md
diff --git a/subjects/itoa.en.md b/subjects/itoa.en.md
new file mode 100644
index 00000000..f613beb4
--- /dev/null
+++ b/subjects/itoa.en.md
@@ -0,0 +1,15 @@
+## itoa
+
+### Instructions
+
+- Write a function that simulates the behaviour of the `Itoa` function in Go. `Itoa` transforms a number represented as an`int` in a number represented as a `string`.
+
+- For this exercise the handling of the signs + or - **does have** to be taken into account.
+
+## Expected function
+
+```go
+func Itoa(n int) string {
+
+}
+```
diff --git a/subjects/itoa.md b/subjects/itoa.md
deleted file mode 100644
index 9295201d..00000000
--- a/subjects/itoa.md
+++ /dev/null
@@ -1,14 +0,0 @@
-## itoa
-
-### Instructions
-
-Write a function that takes an int and converts it to a string.
-The function returns the result in a char array that you must allocate.
-
-## Expected function
-
-```go
-func Itoa(n int) int {
-
-}
-```
\ No newline at end of file
From e10adba2f9f2d95b9f6ec33a4e4b23f463c3d741 Mon Sep 17 00:00:00 2001
From: Frenchris <34804391+Frenchris@users.noreply.github.com>
Date: Fri, 26 Apr 2019 19:56:12 +0100
Subject: [PATCH 088/104] Correction of Subject
---
subjects/gcd.en.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/subjects/gcd.en.md b/subjects/gcd.en.md
index c9e4e30f..b4080384 100644
--- a/subjects/gcd.en.md
+++ b/subjects/gcd.en.md
@@ -10,6 +10,8 @@ strictly positive integer).
If the number of parameters is not 2, display a newline.
+All arguments tested will be valid positive `int` values.
+
Example of output :
```console
@@ -24,5 +26,7 @@ student@ubuntu:~/student/gcd$ ./gcd 17 3 | cat -e
1$
student@ubuntu:~/student/gcd$ ./gcd | cat -e
$
+student@ubuntu:~/student/gcd$ ./gcd 50 12 4 | cat -e
+$
student@ubuntu:~/student/gcd$
```
From 2a0ae8159c0b41264e9815cf37fc71b05978bd99 Mon Sep 17 00:00:00 2001
From: Louise Foussat
Date: Fri, 26 Apr 2019 11:02:32 +0100
Subject: [PATCH 089/104] update modular step doc with new input type
countries, better form step example, rename subtypes (to form-step/sign step)
---
docs/modular-steps-management.md | 81 ++++++++++++++++++--------------
1 file changed, 45 insertions(+), 36 deletions(-)
diff --git a/docs/modular-steps-management.md b/docs/modular-steps-management.md
index ccaf253c..78263f64 100644
--- a/docs/modular-steps-management.md
+++ b/docs/modular-steps-management.md
@@ -36,7 +36,7 @@
-* Add a new key **subtype** of type `String` with the exact value 'onb-adm-form-generator'
+* Add a new key **subtype** of type `String` with the exact value 'form-step'
* Add a new key **form** of type `Object`
* Form can have several sections. Each section is displayed with a title, and its inputs.
> NB: The submission of the form will check the required inputs of all the sections created for the form.
@@ -48,13 +48,13 @@
> The values will be considered as the properties of your input.
#### Defining an input:
-* A **type** key of type `String` must be declared. It defines the type of the input : `tel`, `text`, `date`, `select`, `radio`, `switch`, `checkbox`, `textarea` (and soon a special type `countries`).
+* A **type** key of type `String` must be declared. It defines the type of the input : `tel`, `text`, `date`, `select`, `radio`, `switch`, `checkbox`, `textarea`, `countries`.
* All other attributes needed for the input can be added to the object, according to the input type: `placeholder`, `id`, `required`, `label`, `items`, `emptyItems`, `index`, etc...
#### Important indication:
* The **index** property is used to order the inputs. It will not be passed onto the input. Be mindful not to set the same index twice.
* The **type** property is required. It will be used to determine the kind of input should be generated. It is passed onto the input only if the input type attribute is required (type 'tel' or 'text' for example, but not for type 'select' - in this case, we will generate a select element)
- * At the moment, our team is creating a special type 'countries' (a `Select` displaying all the countries). Documentation will be updated as soon as it is available.
+ * A special type 'countries' has been added to the classicals. It generate a `Select` (containing all the countries) with a search bar. 'Items' property is handled by the app.
* `onChange` prop are ignored as the event is handled by the app.
* For `switch` and `checkbox` input types, the default value has to be set as a boolean property named **value**.
* More information for each inputs is available in the design documentation:
@@ -68,74 +68,83 @@
### Examples
Here is an example of the form step's attributes. It presents a form with two sections, and an example of each kind of input type.
-> NB : this example object will soon be provided in the admin.
+> NB : this example object is provided in the admin, in the onboarding section: 'Form step example'.
```json
{
- "subtype": "onb-adm-form",
+ "subtype": "form-step",
"form": {
"section1": {
"title": "My section title",
"inputs": {
- "firstName": {
+ "typeText": {
"index": 0,
- "placeholder": "First name",
+ "placeholder": "Text placeholder",
+ "maxLength": 50,
"type": "text",
"required": true
},
- "tel": {
+ "typeTel": {
"index": 1,
"required": true,
"type": "tel",
- "label": "Phone number",
+ "label": "Tel label",
"placeholder": "+333 33 33 33 33",
"pattern": "[+][3][0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}"
},
- "medicalInfo": {
- "label": "Medical informations",
- "index": 6,
- "placeholder": "Medical Informations",
+ "typeTextArea": {
+ "label": "Textarea label",
+ "index": 7,
+ "maxLength": 250,
+ "placeholder": "Textarea placeholder",
"type": "textarea"
},
- "dateOfBirth": {
+ "typeDate": {
"index": 2,
"required": true,
"type": "date",
- "label": "Date of birth",
+ "label": "Date label",
"value": "2000-01-01"
},
- "gender": {
+ "typeCountries": {
+ "index": 4,
+ "id": "countries",
+ "type": "countries",
+ "required": true,
+ "emptyItem": { "label": "Select your country label" }
+ },
+ "typeSelect": {
"index": 3,
"type": "select",
- "id": "genders",
+ "id": "typeSelect",
"required": true,
- "emptyItem": { "label": "Select your gender" },
+ "emptyItem": { "label": "Special emply item" },
"items": [
- { "label": "Male", "data": "male" },
- { "label": "Female", "data": "female" }
+ { "label": "Item 1", "data": "item1" },
+ { "label": "Item 2", "data": "item2" }
]
},
- "environment": {
- "index": 4,
+ "typeRadio": {
+ "index": 5,
"type": "radio",
"required": true,
- "label": "Which environment do you live in ?",
+ "label": "Radio label - choose your radio",
"inlineBlock": true,
"items": [
- { "label": "City", "data": "city" },
- { "label": "Countryside", "data": "countryside" }
+ { "label": "Radio 1", "data": "radio1" },
+ { "label": "Radio 2", "data": "radio2" }
]
},
- "programmingAbilities": {
- "index": 5,
+ "typeSwitch": {
+ "index": 6,
"type": "switch",
- "label": "I am new in programming",
+ "label": "Switch label",
"value": true
},
- "generalConditions": {
- "index": 7,
+ "typeCheckbox": {
+ "index": 8,
"type": "checkbox",
- "label": "I have read and I accept the general conditions",
+ "label": "Checkbox label",
"value": false
}
}
@@ -143,9 +152,9 @@ Here is an example of the form step's attributes. It presents a form with two se
"section2": {
"title": "My second section title",
"inputs": {
- "firstName": {
+ "typeText": {
"index": 0,
- "placeholder": "First name",
+ "placeholder": "Text placeholder",
"type": "text",
"required": true
}
@@ -157,7 +166,7 @@ Here is an example of the form step's attributes. It presents a form with two se
This 'form' step would look like this:
-![form step example](https://user-images.githubusercontent.com/35296671/56503976-012aae80-650f-11e9-82c8-dd7d026b6eb1.png)
+![form step example](https://user-images.githubusercontent.com/35296671/56800060-1a36a680-6812-11e9-9357-28311046641e.png)
## Settings for a `document to sign` step
The newly created child can be customized with these attributes :
@@ -176,7 +185,7 @@ The newly created child can be customized with these attributes :
1. Edit you step object
2. Go to *Object attributes*
3. Add the following attributes:
- * Add a new key **subtype** of type `String` with the exact value 'onb-adm-sign'
+ * Add a new key **subtype** of type `String` with the exact value 'sign-step'
* Add a new key **text** of type `String` with the text of your document to sign as value
* Add a new key **buttonText** of type `String` with the text that you want to display in the submit button of your step. Default value for this attribute is 'Sign'.
* Add a new key **checkbox** of type `Object`, if the user has to be forced to click on a checkbox before validating his document (ex: 'I have read and accepted the conditions'). In the checkbox object, the following attributes should be defined:
@@ -191,7 +200,7 @@ Here is an example of the structure a 'document to sign' step could have:
```json
{
- "subtype": "onb-adm-sign",
+ "subtype": "sign-step",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent ornare non sem eu pretium. Integer porttitor risus eget nibh iaculis, ac lacinia orci dictum. Nunc ullamcorper consequat enim in posuere. Aliquam volutpat est odio, vel maximus arcu maximus sit amet. Donec ultricies faucibus magna id luctus. Duis et dapibus elit. In vestibulum ipsum erat, at commodo tortor convallis vel. Nunc ut ultrices nulla. Etiam lorem justo, consequat a consectetur a, porttitor non turpis. Mauris eu mollis nisl, id dignissim quam. Curabitur condimentum sollicitudin rutrum. Aenean blandit, arcu nec ullamcorper rhoncus, lectus sem lacinia lorem, venenatis dignissim velit mi et sapien. Nullam posuere augue ut magna ullamcorper dignissim. Ut rhoncus sapien vel nulla commodo finibus. Cras non leo vel urna finibus volutpat. Praesent et ex eget diam tincidunt suscipit. Phasellus bibendum neque vel placerat iaculis. Vestibulum bibendum ultrices ipsum, non sodales lectus. Cras eget orci eget elit blandit scelerisque at ut nulla. Integer ligula eros, eleifend quis sodales a, porttitor sit amet neque. Fusce mollis magna at lectus varius, quis suscipit mi cursus. Etiam id imperdiet metus, in malesuada quam. Aliquam facilisis nunc non sapien condimentum, quis iaculis nisl auctor. Nunc lorem sapien, interdum vel efficitur ac, dapibus a diam. Ut ante urna, sodales in bibendum vel, lacinia ut mauris. In vel placerat leo. In libero dui, tincidunt at sem id, faucibus sollicitudin elit.",
"buttonText": "Sign chart",
"checkbox": {
From 0ad9c2919a0562f55948439ac8bbb13afdb0ba38 Mon Sep 17 00:00:00 2001
From: Louise Foussat
Date: Fri, 26 Apr 2019 11:08:36 +0100
Subject: [PATCH 090/104] add little warning on type date
---
docs/modular-steps-management.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/docs/modular-steps-management.md b/docs/modular-steps-management.md
index 78263f64..ac6ed47e 100644
--- a/docs/modular-steps-management.md
+++ b/docs/modular-steps-management.md
@@ -54,7 +54,8 @@
#### Important indication:
* The **index** property is used to order the inputs. It will not be passed onto the input. Be mindful not to set the same index twice.
* The **type** property is required. It will be used to determine the kind of input should be generated. It is passed onto the input only if the input type attribute is required (type 'tel' or 'text' for example, but not for type 'select' - in this case, we will generate a select element)
- * A special type 'countries' has been added to the classicals. It generate a `Select` (containing all the countries) with a search bar. 'Items' property is handled by the app.
+ * A special type 'countries' has been added to the classicals. It generate a `Select` (containing all the countries) with a search bar. 'Items' property is handled by the app.
+ * It's recommended to add 'min' and 'max' properties to input type 'date' (no default value are set).
* `onChange` prop are ignored as the event is handled by the app.
* For `switch` and `checkbox` input types, the default value has to be set as a boolean property named **value**.
* More information for each inputs is available in the design documentation:
@@ -103,6 +104,8 @@ Here is an example of the form step's attributes. It presents a form with two se
"index": 2,
"required": true,
"type": "date",
+ "min": "1621-07-08",
+ "max": "2019-01-01",
"label": "Date label",
"value": "2000-01-01"
},
From 8bf0bc3e7c12f84b7df56c6fb03136ee3a4cd1f0 Mon Sep 17 00:00:00 2001
From: Louise Foussat
Date: Fri, 26 Apr 2019 15:42:51 +0100
Subject: [PATCH 091/104] form step example with concrete data
---
docs/modular-steps-management.md | 52 +++++++++++++++++---------------
1 file changed, 28 insertions(+), 24 deletions(-)
diff --git a/docs/modular-steps-management.md b/docs/modular-steps-management.md
index ac6ed47e..735e6362 100644
--- a/docs/modular-steps-management.md
+++ b/docs/modular-steps-management.md
@@ -76,88 +76,92 @@ Here is an example of the form step's attributes. It presents a form with two se
"subtype": "form-step",
"form": {
"section1": {
- "title": "My section title",
+ "title": "Identification",
"inputs": {
- "typeText": {
+ "firstName": {
"index": 0,
- "placeholder": "Text placeholder",
+ "placeholder": "First name",
"maxLength": 50,
"type": "text",
"required": true
},
- "typeTel": {
+ "tel": {
"index": 1,
"required": true,
"type": "tel",
- "label": "Tel label",
+ "label": "Phone number",
"placeholder": "+333 33 33 33 33",
"pattern": "[+][3][0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}"
},
- "typeTextArea": {
- "label": "Textarea label",
+ "medicalInfo": {
+ "label": "Medical informations",
+ "placeholder": "Medical Informations",
"index": 7,
"maxLength": 250,
- "placeholder": "Textarea placeholder",
"type": "textarea"
},
- "typeDate": {
+ "dateOfBirth": {
"index": 2,
"required": true,
"type": "date",
+ "label": "Date of birth",
"min": "1621-07-08",
- "max": "2019-01-01",
- "label": "Date label",
+ "max": "1900-01-01",
"value": "2000-01-01"
},
- "typeCountries": {
+ "country": {
"index": 4,
"id": "countries",
"type": "countries",
"required": true,
"emptyItem": { "label": "Select your country label" }
},
- "typeSelect": {
+ "gender": {
"index": 3,
"type": "select",
- "id": "typeSelect",
+ "id": "genders",
"required": true,
- "emptyItem": { "label": "Special emply item" },
+ "emptyItem": { "label": "Select your gender" },
"items": [
+ { "label": "Male", "data": "male" },
+ { "label": "Female", "data": "female" }
{ "label": "Item 1", "data": "item1" },
{ "label": "Item 2", "data": "item2" }
]
},
- "typeRadio": {
+ "environment": {
"index": 5,
"type": "radio",
"required": true,
- "label": "Radio label - choose your radio",
+ "label": "Which environment do you live in ?",
"inlineBlock": true,
"items": [
+ { "label": "City", "data": "city" },
+ { "label": "Countryside", "data": "countryside" }
{ "label": "Radio 1", "data": "radio1" },
{ "label": "Radio 2", "data": "radio2" }
]
},
- "typeSwitch": {
+ "programmingAbilities": {
"index": 6,
"type": "switch",
- "label": "Switch label",
+ "label": "I am new in programming",
"value": true
},
- "typeCheckbox": {
+ "generalConditions": {
"index": 8,
"type": "checkbox",
- "label": "Checkbox label",
+ "label": "I have read and I accept the general conditions",
"value": false
}
}
},
"section2": {
- "title": "My second section title",
+ "title": "More about you",
"inputs": {
- "typeText": {
+ "favoriteColor": {
"index": 0,
- "placeholder": "Text placeholder",
+ "placeholder": "Your favorite color",
"type": "text",
"required": true
}
From 6731e25e42f47c07326ea96a7a16b6cb2c4d738b Mon Sep 17 00:00:00 2001
From: Louise Foussat
Date: Fri, 26 Apr 2019 15:52:10 +0100
Subject: [PATCH 092/104] corrections on jsonb
---
docs/modular-steps-management.md | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/docs/modular-steps-management.md b/docs/modular-steps-management.md
index 735e6362..941eb5ce 100644
--- a/docs/modular-steps-management.md
+++ b/docs/modular-steps-management.md
@@ -75,7 +75,7 @@ Here is an example of the form step's attributes. It presents a form with two se
{
"subtype": "form-step",
"form": {
- "section1": {
+ "identification": {
"title": "Identification",
"inputs": {
"firstName": {
@@ -95,7 +95,7 @@ Here is an example of the form step's attributes. It presents a form with two se
},
"medicalInfo": {
"label": "Medical informations",
- "placeholder": "Medical Informations",
+ "placeholder": "Your medical Informations",
"index": 7,
"maxLength": 250,
"type": "textarea"
@@ -125,8 +125,6 @@ Here is an example of the form step's attributes. It presents a form with two se
"items": [
{ "label": "Male", "data": "male" },
{ "label": "Female", "data": "female" }
- { "label": "Item 1", "data": "item1" },
- { "label": "Item 2", "data": "item2" }
]
},
"environment": {
@@ -138,8 +136,6 @@ Here is an example of the form step's attributes. It presents a form with two se
"items": [
{ "label": "City", "data": "city" },
{ "label": "Countryside", "data": "countryside" }
- { "label": "Radio 1", "data": "radio1" },
- { "label": "Radio 2", "data": "radio2" }
]
},
"programmingAbilities": {
@@ -156,7 +152,7 @@ Here is an example of the form step's attributes. It presents a form with two se
}
}
},
- "section2": {
+ "moreAboutYou": {
"title": "More about you",
"inputs": {
"favoriteColor": {
From 88a976ccd4b00fa8746619180e98d6f40f0bcf81 Mon Sep 17 00:00:00 2001
From: Louise Foussat
Date: Fri, 26 Apr 2019 15:54:26 +0100
Subject: [PATCH 093/104] update picture of form step example
---
docs/modular-steps-management.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/modular-steps-management.md b/docs/modular-steps-management.md
index 941eb5ce..280f6daf 100644
--- a/docs/modular-steps-management.md
+++ b/docs/modular-steps-management.md
@@ -169,7 +169,7 @@ Here is an example of the form step's attributes. It presents a form with two se
This 'form' step would look like this:
-![form step example](https://user-images.githubusercontent.com/35296671/56800060-1a36a680-6812-11e9-9357-28311046641e.png)
+![form step example](https://user-images.githubusercontent.com/35296671/56816457-7cf06800-683b-11e9-9003-6f83b4545033.png)
## Settings for a `document to sign` step
The newly created child can be customized with these attributes :
From 1f7435e436f5a1fa392ce972eeae2111325af661 Mon Sep 17 00:00:00 2001
From: Xavier Petit
Date: Mon, 29 Apr 2019 02:34:18 +0100
Subject: [PATCH 094/104] Add Ubuntu installation scripts
---
scripts/bash_tweaks.sh | 59 ++++++++
scripts/clean.sh | 55 ++++++++
scripts/common_packages.txt | 64 +++++++++
scripts/dconfig.txt | 131 ++++++++++++++++++
scripts/firewall.sh | 15 ++
scripts/fx.sh | 9 ++
scripts/go.sh | 24 ++++
scripts/grub.sh | 25 ++++
scripts/install_client.sh | 89 ++++++++++++
scripts/nodejs.sh | 10 ++
scripts/set.sh | 34 +++++
scripts/ssh.sh | 25 ++++
scripts/sublime.sh | 17 +++
scripts/system/etc/gdm3/PostLogin/Default | 73 ++++++++++
scripts/system/etc/gdm3/PostSession/Default | 25 ++++
.../system/etc/udev/rules.d/10-local.rules | 1 +
scripts/system/usr/local/bin/lock_screen | 13 ++
scripts/system/usr/local/bin/suspend_session | 13 ++
.../share/applications/lock_screen.desktop | 8 ++
.../applications/suspend_session.desktop | 8 ++
.../usr/share/initramfs-tools/hooks/copy_mkfs | 22 +++
.../scripts/init-premount/reformat | 20 +++
scripts/ubuntu_tweaks.sh | 116 ++++++++++++++++
scripts/vscode.sh | 35 +++++
24 files changed, 891 insertions(+)
create mode 100755 scripts/bash_tweaks.sh
create mode 100755 scripts/clean.sh
create mode 100644 scripts/common_packages.txt
create mode 100644 scripts/dconfig.txt
create mode 100755 scripts/firewall.sh
create mode 100755 scripts/fx.sh
create mode 100755 scripts/go.sh
create mode 100755 scripts/grub.sh
create mode 100755 scripts/install_client.sh
create mode 100755 scripts/nodejs.sh
create mode 100755 scripts/set.sh
create mode 100755 scripts/ssh.sh
create mode 100755 scripts/sublime.sh
create mode 100755 scripts/system/etc/gdm3/PostLogin/Default
create mode 100755 scripts/system/etc/gdm3/PostSession/Default
create mode 100644 scripts/system/etc/udev/rules.d/10-local.rules
create mode 100755 scripts/system/usr/local/bin/lock_screen
create mode 100755 scripts/system/usr/local/bin/suspend_session
create mode 100644 scripts/system/usr/share/applications/lock_screen.desktop
create mode 100644 scripts/system/usr/share/applications/suspend_session.desktop
create mode 100755 scripts/system/usr/share/initramfs-tools/hooks/copy_mkfs
create mode 100755 scripts/system/usr/share/initramfs-tools/scripts/init-premount/reformat
create mode 100755 scripts/ubuntu_tweaks.sh
create mode 100755 scripts/vscode.sh
diff --git a/scripts/bash_tweaks.sh b/scripts/bash_tweaks.sh
new file mode 100755
index 00000000..f876ed3e
--- /dev/null
+++ b/scripts/bash_tweaks.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+# Configure Terminal
+
+SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
+cd $SCRIPT_DIR
+. set.sh
+
+# Makes bash case-insensitive
+cat <> /etc/inputrc
+set completion-ignore-case On
+EOF
+
+# Enhance Linux prompt
+cat < /etc/issue
+Kernel build: \v
+Kernel package: \r
+Date: \d \t
+IP address: \4
+Terminal: \l@\n.\O
+
+EOF
+
+# Enable Bash completion
+apt-get -y install bash-completion
+
+cat <> /etc/bash.bashrc
+if ! shopt -oq posix; then
+ if [ -f /usr/share/bash-completion/bash_completion ]; then
+ . /usr/share/bash-completion/bash_completion
+ elif [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+ fi
+fi
+EOF
+
+# Set-up all users
+for DIR in $(ls -1d /root /home/* 2>/dev/null || true)
+do
+ # Hide login informations
+ touch $DIR/.hushlogin
+
+ # Add convenient aliases & behaviors
+ cat <<-'EOF'>> $DIR/.bashrc
+ HISTCONTROL=ignoreboth
+ export HISTFILESIZE=
+ export HISTSIZE=
+ export HISTTIMEFORMAT="%F %T "
+ alias l="ls $LS_OPTIONS -al --si"
+ alias df="df --si"
+ alias du="du -cs --si"
+ alias free="free -h --si"
+ alias pstree="pstree -palU"
+ EOF
+
+ # Fix rights
+ USR=$(echo "$DIR" | rev | cut -d/ -f1 | rev)
+ chown -R $USR:$USR $DIR
+done
diff --git a/scripts/clean.sh b/scripts/clean.sh
new file mode 100755
index 00000000..21a0834f
--- /dev/null
+++ b/scripts/clean.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+# Clean system
+
+SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
+cd $SCRIPT_DIR
+. set.sh
+
+# Purge useless packages
+apt-get -y autoremove --purge
+apt-get autoclean
+apt-get clean
+apt-get install
+
+rm -rf /root/.local
+
+# Remove connection logs
+> /var/log/lastlog
+> /var/log/wtmp
+> /var/log/btmp
+
+# Remove machine ID
+> /etc/machine-id
+
+# Remove logs
+cd /var/log
+rm -rf alternatives.log*
+rm -rf apt/*
+rm -rf auth.log
+rm -rf dpkg.log*
+rm -rf gpu-manager.log
+rm -rf installer
+rm -rf journal/d6e982aa8c9d4c1dbcbdcff195642300
+rm -rf kern.log
+rm -rf syslog
+rm -rf sysstat
+
+# Remove random seeds
+rm -rf /var/lib/systemd/random-seed
+rm -rf /var/lib/NetworkManager/secret_key
+
+# Remove network configs
+rm -rf /etc/NetworkManager/system-connections/*
+rm -rf /var/lib/bluetooth/*
+rm -rf /var/lib/NetworkManager/*
+
+# Remove caches
+rm -rf /var/lib/gdm3/.cache/*
+rm -rf /root/.cache
+rm -rf /home/student/.cache
+
+rm -rf /home/student/.sudo_as_admin_successful /home/student/.bash_logout
+
+rm -rf /tmp/*
+rm -rf /tmp/.* || true
diff --git a/scripts/common_packages.txt b/scripts/common_packages.txt
new file mode 100644
index 00000000..2048b823
--- /dev/null
+++ b/scripts/common_packages.txt
@@ -0,0 +1,64 @@
+apache2-utils
+apt-utils
+arp-scan
+autossh
+bash-completion
+binutils
+build-essential
+console-data
+console-setup
+cron
+curl
+dialog
+dmidecode
+dnsutils
+file
+firmware-linux-nonfree
+git
+hdparm
+iftop
+ifupdown
+iotop
+iptables
+iputils-ping
+isc-dhcp-client
+isc-dhcp-common
+jq
+less
+linux-headers-amd64
+linux-image-amd64
+lm-sensors
+locales
+lsb-release
+lshw
+lsof
+lzop
+man
+mc
+mdadm
+moreutils
+nano
+net-tools
+nmap
+ntpdate
+nvme-cli
+pciutils
+psmisc
+python
+python3
+rsync
+rsyslog
+ssh
+stress
+sudo
+sysstat
+telnet
+tig
+traceroute
+tree
+tzdata
+unzip
+usbutils
+wget
+zerofree
+zip
diff --git a/scripts/dconfig.txt b/scripts/dconfig.txt
new file mode 100644
index 00000000..3057624f
--- /dev/null
+++ b/scripts/dconfig.txt
@@ -0,0 +1,131 @@
+[org/gnome/desktop/calendar]
+show-weekdate=true
+
+[org/gnome/desktop/wm/preferences]
+resize-with-right-button=true
+
+[org/gnome/desktop/peripherals/keyboard]
+delay=uint32 350
+
+[desktop/ibus/panel/emoji]
+unicode-hotkey=@as []
+hotkey=@as []
+
+[org/gnome/desktop/peripherals/touchpad]
+two-finger-scrolling-enabled=true
+disable-while-typing=false
+
+[org/gnome/login-screen]
+enable-smartcard-authentication=false
+enable-fingerprint-authentication=false
+
+[org/gnome/desktop/privacy]
+report-technical-problems=false
+remember-recent-files=false
+
+[org/gnome/desktop/screensaver]
+lock-enabled=false
+
+[org/gnome/desktop/search-providers]
+disable-external=true
+
+[org/gnome/desktop/interface]
+gtk-im-module='gtk-im-context-simple'
+clock-show-seconds=true
+enable-animations=false
+cursor-blink=false
+clock-show-weekday=true
+gtk-theme='Yaru-dark'
+
+[org/gnome/terminal/legacy]
+menu-accelerator-enabled=false
+
+[org/gnome/desktop/media-handling]
+automount-open=false
+automount=false
+autorun-never=true
+
+[org/gnome/terminal/legacy/keybindings]
+reset-and-clear='l'
+
+[org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9]
+allow-bold=false
+default-size-rows=48
+bold-is-bright=true
+audible-bell=false
+scrollback-lines=2147483647
+cursor-shape='ibeam'
+default-size-columns=160
+
+[org/gnome/desktop/background]
+show-desktop-icons=false
+
+[org/gnome/desktop/peripherals/mouse]
+accel-profile='flat'
+
+[org/gnome/settings-daemon/plugins/color]
+night-light-enabled=true
+night-light-schedule-automatic=true
+
+[org/gnome/desktop/lockdown]
+disable-print-setup=true
+disable-printing=true
+disable-user-switching=true
+user-administration-disabled=true
+
+[org/gnome/settings-daemon/plugins/media-keys]
+custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']
+screensaver=''
+
+[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0]
+binding='l'
+command='lock_screen'
+name='Lock screen'
+
+[org/gnome/settings-daemon/plugins/smartcard]
+active=false
+
+[org/gnome/settings-daemon/plugins/remote-display]
+active=false
+
+[org/gnome/settings-daemon/plugins/sharing]
+active=false
+
+[org/gnome/settings-daemon/plugins/screensaver-proxy]
+active=false
+
+[org/gnome/settings-daemon/plugins/gsdwacom]
+active=false
+
+[org/gnome/settings-daemon/plugins/power]
+sleep-inactive-ac-type='nothing'
+sleep-inactive-ac-timeout=0
+
+[org/gnome/shell]
+enable-hot-corners=true
+favorite-apps=['firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop', 'sublime_text.desktop', 'vscodium.desktop', 'org.gnome.Calculator.desktop', 'gnome-control-center.desktop', 'org.gnome.tweaks.desktop', 'lock_screen.desktop', 'suspend_session.desktop', 'yelp.desktop']
+
+[org/gnome/system/location]
+enabled=false
+
+[org/gnome/desktop/session]
+idle-delay=uint32 0
+
+[org/gnome/mutter]
+center-new-windows=true
+
+[org/gnome/calculator]
+source-currency=''
+source-units='degree'
+button-mode='advanced'
+word-size=64
+show-zeroes=false
+base=10
+angle-units='degrees'
+accuracy=9
+show-thousands=false
+window-position=(1906, 826)
+refresh-interval=604800
+target-units='radian'
+number-format='fixed'
+target-currency=''
diff --git a/scripts/firewall.sh b/scripts/firewall.sh
new file mode 100755
index 00000000..78f1f66e
--- /dev/null
+++ b/scripts/firewall.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# Install firewall
+
+SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
+cd $SCRIPT_DIR
+. set.sh
+
+SSH_PORT=${1:-521}
+
+apt-get -y install ufw
+
+ufw logging off
+ufw allow in "$SSH_PORT"/tcp
+ufw --force enable
diff --git a/scripts/fx.sh b/scripts/fx.sh
new file mode 100755
index 00000000..07f724c2
--- /dev/null
+++ b/scripts/fx.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Install FX: command-line JSON processing tool (https://github.com/antonmedv/fx)
+
+SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
+cd $SCRIPT_DIR
+. set.sh
+
+npm install -g fx
diff --git a/scripts/go.sh b/scripts/go.sh
new file mode 100755
index 00000000..d9409459
--- /dev/null
+++ b/scripts/go.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# Install Go
+
+SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
+cd $SCRIPT_DIR
+. set.sh
+
+apt-get -y install golang
+
+# Set-up all users
+for DIR in $(ls -1d /root /home/* 2>/dev/null || true)
+do
+ # Add convenient aliases & behaviors
+ cat <<-'EOF'>> $DIR/.bashrc
+ GOPATH=$HOME/go
+ PATH=$PATH:$GOPATH/bin
+ alias gobuild='CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w"'
+ EOF
+
+ # Fix rights
+ USR=$(echo "$DIR" | rev | cut -d/ -f1 | rev)
+ chown -R $USR:$USR $DIR
+done
diff --git a/scripts/grub.sh b/scripts/grub.sh
new file mode 100755
index 00000000..ad767811
--- /dev/null
+++ b/scripts/grub.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Install Grub
+
+SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
+cd $SCRIPT_DIR
+. set.sh
+
+DISK=$1
+
+apt-get -y install grub-efi-amd64
+
+sed -i -e 's/message=/message_null=/g' /etc/grub.d/10_linux
+
+cat <> /etc/default/grub
+GRUB_TIMEOUT=0
+GRUB_RECORDFAIL_TIMEOUT=0
+GRUB_TERMINAL=console
+GRUB_DISTRIBUTOR=``
+GRUB_DISABLE_OS_PROBER=true
+GRUB_DISABLE_SUBMENU=y
+EOF
+
+update-grub
+grub-install $DISK
diff --git a/scripts/install_client.sh b/scripts/install_client.sh
new file mode 100755
index 00000000..d78c2fc0
--- /dev/null
+++ b/scripts/install_client.sh
@@ -0,0 +1,89 @@
+#!/bin/bash
+
+# Configure Z01 client
+
+# Log stdout & stderr
+exec > >(tee -i /tmp/install_client.log)
+exec 2>&1
+
+SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
+cd $SCRIPT_DIR
+. set.sh
+
+# Set root password
+passwd root
+
+# Remove user password
+passwd -d student
+cp /etc/shadow /etc/shadow-
+
+SSH_PORT=521
+DISK=$(lsblk -o tran,kname,hotplug,type,fstype -pr |
+ grep -e nvme -e sata |
+ grep '0 disk' |
+ cut -d' ' -f2 |
+ sort |
+ head -n1)
+
+apt-get update
+apt-get -y upgrade
+apt-get -y autoremove --purge
+
+. bash_tweaks.sh
+. ssh.sh
+. firewall.sh
+. ubuntu_tweaks.sh
+. grub.sh "$DISK"
+. go.sh
+. nodejs.sh
+. fx.sh
+. sublime.sh
+. vscode.sh
+
+# Install additional packages
+PKGS="
+emacs
+f2fs-tools
+golang-mode
+vim
+xfsprogs
+"
+
+apt-get -y install $PKGS
+
+# Remove fsck because the system partition will be read-only (overlayroot)
+rm /usr/share/initramfs-tools/hooks/fsck
+
+# Copy system files
+
+cp -r system /tmp
+cd /tmp/system
+sed -i -e "s|::DISK::|$DISK|g" etc/udev/rules.d/10-local.rules
+
+# Fourth local partition
+PART=$(lsblk -o tran,kname,hotplug,type,fstype -pr |
+ grep -v usb |
+ grep '0 part' |
+ cut -d' ' -f2 |
+ sort |
+ head -n4 |
+ tail -n1)
+sed -i -e "s|::PART::|$PART|g" usr/share/initramfs-tools/scripts/init-premount/reformat
+
+apt-get -y install overlayroot
+echo overlayroot=\"device:dev=$DISK,recurse=0\" >> /etc/overlayroot.conf
+
+# Fix permissions
+find . -type d -exec chmod 755 {} \;
+find . -type f -exec chmod 644 {} \;
+find . -type f -exec /bin/sh -c "file {} | grep -q 'shell script' && chmod +x {}" \;
+cp --preserve=mode -RT . /
+
+cd $SCRIPT_DIR
+rm -rf /tmp/system
+
+update-initramfs -u
+
+apt-get -y purge sudo
+
+. clean.sh
diff --git a/scripts/nodejs.sh b/scripts/nodejs.sh
new file mode 100755
index 00000000..c08f012a
--- /dev/null
+++ b/scripts/nodejs.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# Install Node.js
+
+SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
+cd $SCRIPT_DIR
+. set.sh
+
+curl -sL https://deb.nodesource.com/setup_10.x | bash -
+apt-get -y install nodejs
diff --git a/scripts/set.sh b/scripts/set.sh
new file mode 100755
index 00000000..690e3018
--- /dev/null
+++ b/scripts/set.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# Set scripting variables
+
+# Treat unset variables as an error when substituting.
+set -u
+
+# Exit immediately if a command exits with a non-zero status.
+set -e
+
+# Set the variable corresponding to the return value of a pipeline is the status
+# of the last command to exit with a non-zero status, or zero if no command
+# exited with a non-zero status
+set -o pipefail
+
+# Separate tokens on newlines only
+IFS='
+'
+
+# The value of this parameter is expanded like PS1 and the expanded value is the
+# prompt printed before the command line is echoed when the -x option is set
+# (see The Set Builtin). The first character of the expanded value is replicated
+# multiple times, as necessary, to indicate multiple levels of indirection.
+# \D{%F %T} prints date like this : 2019-12-31 23:59:59
+PS4='-\D{%F %T} '
+
+# Print commands and their arguments as they are executed.
+set -x
+
+# Skip dialogs during apt-get install commands
+export DEBIAN_FRONTEND=noninteractive # DEBIAN_PRIORITY=critical
+
+export LC_ALL=C LANG=C
+export SHELL=/bin/bash
diff --git a/scripts/ssh.sh b/scripts/ssh.sh
new file mode 100755
index 00000000..3e0a5677
--- /dev/null
+++ b/scripts/ssh.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Install OpenSSH
+
+SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
+cd $SCRIPT_DIR
+. set.sh
+
+SSH_PORT=${1:-521}
+
+# Install dependencies
+apt-get -y install ssh
+
+cat <> /etc/ssh/sshd_config
+Port $SSH_PORT
+PasswordAuthentication no
+AllowUsers root
+EOF
+
+mkdir -p /root/.ssh
+chmod -f 700 /root/.ssh
+# echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH30lZP4V26RVWWvAW91jM7UBSN68+xkuJc5cRionpMc' >> /root/.ssh/authorized_keys
+chmod -f 600 /root/.ssh/authorized_keys || true
+
+systemctl restart sshd.service
diff --git a/scripts/sublime.sh b/scripts/sublime.sh
new file mode 100755
index 00000000..b79ee4b1
--- /dev/null
+++ b/scripts/sublime.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# Install Sublime Text & Sublime Merge
+
+SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
+cd $SCRIPT_DIR
+. set.sh
+
+wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | apt-key add -
+apt-get install -y apt-transport-https
+
+cat < /etc/apt/sources.list.d/sublime-text.list
+deb https://download.sublimetext.com/ apt/stable/
+EOF
+
+apt-get update
+apt-get install -y sublime-text sublime-merge libgtk2.0-0
diff --git a/scripts/system/etc/gdm3/PostLogin/Default b/scripts/system/etc/gdm3/PostLogin/Default
new file mode 100755
index 00000000..2f709a79
--- /dev/null
+++ b/scripts/system/etc/gdm3/PostLogin/Default
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+# Mount home as an overlay filesystem
+
+# Log stdout & stderr
+exec > >(tee -i /tmp/gdm3_postlogin.log)
+exec 2>&1
+
+# Treat unset variables as an error when substituting.
+set -u
+
+# Exit immediately if a command exits with a non-zero status.
+set -e
+
+# Separate tokens on newlines only
+IFS='
+'
+
+# The value of this parameter is expanded like PS1 and the expanded value is the
+# prompt printed before the command line is echoed when the -x option is set
+# (see The Set Builtin). The first character of the expanded value is replicated
+# multiple times, as necessary, to indicate multiple levels of indirection.
+# \D{%F %T} prints date like this : 2019-12-31 23:59:59
+PS4='-\D{%F %T} '
+
+# Print commands and their arguments as they are executed.
+set -x
+
+sleep 0.5
+
+# Find the first removable F2FS partition
+PART=$(lsblk -o tran,kname,hotplug,type,fstype -pr |
+ grep '1 part f2fs' |
+ cut -d' ' -f2 |
+ sort |
+ head -n1)
+
+# Make sure the mountpoints are free
+(
+ lsof -t $HOME | xargs kill -9
+ umount $HOME
+ umount /mnt
+) || true
+
+if test "$PART"
+then
+ mount -o noatime "$PART" /mnt
+else
+ # No removable F2FS partition found, use the third local partition instead
+ PART=$(lsblk -o tran,kname,hotplug,type,fstype -pr |
+ grep -v usb |
+ grep '0 part' |
+ cut -d' ' -f2 |
+ sort |
+ head -n3 |
+ tail -n1)
+
+ if test -z "$PART"
+ then
+ # No local partition found, error
+ exit 1
+ fi
+
+ # We don't care about data consistency since the partition is temporary
+ /sbin/mke2fs -t ext4 -O ^has_journal -F "$PART"
+ mount -o noatime,nobarrier "$PART" /mnt
+fi
+
+USER_PATH=/mnt/.01/$USER
+TEMP_PATH=/mnt/.01/tmp
+
+mkdir -p $USER_PATH $TEMP_PATH
+mount -t overlay -o lowerdir=$HOME,upperdir=$USER_PATH,workdir=$TEMP_PATH overlay $HOME
diff --git a/scripts/system/etc/gdm3/PostSession/Default b/scripts/system/etc/gdm3/PostSession/Default
new file mode 100755
index 00000000..803df884
--- /dev/null
+++ b/scripts/system/etc/gdm3/PostSession/Default
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Log stdout & stderr
+exec > >(tee -i /tmp/gdm3_postsession.log)
+exec 2>&1
+
+# Exit immediately if a command exits with a non-zero status.
+set -e
+
+# The value of this parameter is expanded like PS1 and the expanded value is the
+# prompt printed before the command line is echoed when the -x option is set
+# (see The Set Builtin). The first character of the expanded value is replicated
+# multiple times, as necessary, to indicate multiple levels of indirection.
+# \D{%F %T} prints date like this : 2019-12-31 23:59:59
+PS4='-\D{%F %T} '
+
+# Print commands and their arguments as they are executed.
+set -x
+
+passwd -d $USER
+sync
+sleep 0.5
+lsof -t $HOME | xargs kill || true
+umount -l $HOME
+umount -l /mnt
diff --git a/scripts/system/etc/udev/rules.d/10-local.rules b/scripts/system/etc/udev/rules.d/10-local.rules
new file mode 100644
index 00000000..dc335275
--- /dev/null
+++ b/scripts/system/etc/udev/rules.d/10-local.rules
@@ -0,0 +1 @@
+KERNEL=="::DISK::*", ENV{UDISKS_IGNORE}="1"
diff --git a/scripts/system/usr/local/bin/lock_screen b/scripts/system/usr/local/bin/lock_screen
new file mode 100755
index 00000000..d4f63f24
--- /dev/null
+++ b/scripts/system/usr/local/bin/lock_screen
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# Exits if a command fails
+set -e
+
+if passwd -S | grep NP
+then
+ # No password set, so ask user to set one
+ gnome-terminal.real -t "" --geometry=40x10 --wait -- passwd
+ sleep 1
+fi
+
+i3lock -c000000
diff --git a/scripts/system/usr/local/bin/suspend_session b/scripts/system/usr/local/bin/suspend_session
new file mode 100755
index 00000000..021e8bf1
--- /dev/null
+++ b/scripts/system/usr/local/bin/suspend_session
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# Exits if a command fails
+set -e
+
+if passwd -S | grep NP
+then
+ # No password set, so ask user to set one
+ gnome-terminal.real -t "" --geometry=40x10 --wait -- passwd
+ sleep 1
+fi
+
+systemctl suspend
diff --git a/scripts/system/usr/share/applications/lock_screen.desktop b/scripts/system/usr/share/applications/lock_screen.desktop
new file mode 100644
index 00000000..2ff2a328
--- /dev/null
+++ b/scripts/system/usr/share/applications/lock_screen.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Lock Screen
+Comment=Sets a password if needed and then lock screen
+Exec=/usr/local/bin/lock_screen
+Icon=system-lock-screen
+Terminal=false
+Type=Application
+StartupNotify=true
diff --git a/scripts/system/usr/share/applications/suspend_session.desktop b/scripts/system/usr/share/applications/suspend_session.desktop
new file mode 100644
index 00000000..4691bf3c
--- /dev/null
+++ b/scripts/system/usr/share/applications/suspend_session.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Suspend session
+Comment=Sets a password if needed and then suspend session
+Exec=/usr/local/bin/suspend_session
+Icon=media-playback-pause
+Terminal=false
+Type=Application
+StartupNotify=true
diff --git a/scripts/system/usr/share/initramfs-tools/hooks/copy_mkfs b/scripts/system/usr/share/initramfs-tools/hooks/copy_mkfs
new file mode 100755
index 00000000..8f5f117f
--- /dev/null
+++ b/scripts/system/usr/share/initramfs-tools/hooks/copy_mkfs
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+PREREQ=""
+
+prereqs () {
+ echo "${PREREQ}"
+}
+
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+. /usr/share/initramfs-tools/hook-functions
+
+copy_exec /sbin/mke2fs /bin
+
+exit 0
diff --git a/scripts/system/usr/share/initramfs-tools/scripts/init-premount/reformat b/scripts/system/usr/share/initramfs-tools/scripts/init-premount/reformat
new file mode 100755
index 00000000..4a04b992
--- /dev/null
+++ b/scripts/system/usr/share/initramfs-tools/scripts/init-premount/reformat
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+PREREQ=""
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+. /scripts/functions
+
+/bin/mke2fs -F -t ext4 -O ^has_journal ::PART:: > /dev/null 2>&1
+
+exit 0
diff --git a/scripts/ubuntu_tweaks.sh b/scripts/ubuntu_tweaks.sh
new file mode 100755
index 00000000..bb388b27
--- /dev/null
+++ b/scripts/ubuntu_tweaks.sh
@@ -0,0 +1,116 @@
+#!/bin/bash
+
+# Configure ubuntu desktop systems
+
+SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
+cd "$SCRIPT_DIR"
+. set.sh
+
+# Install dependencies
+apt-get -y install lz4
+
+# Change ext4 default mount options
+sed -i -e 's/ errors=remount-ro/ noatime,nodelalloc,errors=remount-ro/g' /etc/fstab
+
+# Disable GTK hidden scroll bars
+echo GTK_OVERLAY_SCROLLING=0 >> /etc/environment
+
+# Reveal boot messages
+sed -i -e 's/TTYVTDisallocate=yes/TTYVTDisallocate=no/g' /etc/systemd/system/getty.target.wants/getty@tty1.service
+
+# Speedup boot
+sed -i 's/MODULES=most/MODULES=dep/g' /etc/initramfs-tools/initramfs.conf
+sed -i 's/COMPRESS=gzip/COMPRESS=lz4/g' /etc/initramfs-tools/initramfs.conf
+
+# Reveal autostart services
+sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop
+
+# Remove password complexity constraints
+sed -i 's/ obscure / minlen=1 /g' /etc/pam.d/common-password
+
+# Remove splash screen (plymouth) and hide kernel output
+sed -i 's/quiet splash/quiet vt.global_cursor_default=0 console=ttyS0/g' /etc/default/grub
+
+update-initramfs -u
+update-grub
+
+# Disable swapfile
+swapoff /swapfile || true
+rm -f /swapfile
+sed -i '/swapfile/d' /etc/fstab
+
+# Prevent gnome-shell segfault from happening
+sed -i 's/#WaylandEnable=false/WaylandEnable=false/g' /etc/gdm3/custom.conf
+
+# Purge unused Ubuntu packages
+PKGS="
+apport
+bind9
+bolt
+cups*
+exim*
+friendly-recovery
+gnome-initial-setup
+gnome-online-accounts
+gnome-power-manager
+gnome-software
+gnome-software-common
+memtest86+
+orca
+popularity-contest
+python3-update-manager
+secureboot-db
+spice-vdagent
+ubuntu-report
+ubuntu-software
+unattended-upgrades
+update-inetd
+update-manager-core
+update-notifier
+update-notifier-common
+whoopsie
+xdg-desktop-portal
+"
+
+apt-get -y purge $PKGS
+apt-get -y autoremove --purge
+
+SERVICES="
+apt-daily-upgrade.timer
+apt-daily.timer
+console-setup.service
+keyboard-setup.service
+motd-news.timer
+remote-fs.target
+"
+systemctl disable $SERVICES
+
+SERVICES="
+grub-common.service
+NetworkManager-wait-online.service
+plymouth-quit-wait.service
+"
+systemctl mask $SERVICES
+
+# Install packages
+PKGS="$(cat common_packages.txt)
+baobab
+blender
+chromium-browser
+dconf-editor
+firefox
+gimp
+gnome-calculator
+gnome-system-monitor
+gnome-tweaks
+i3lock
+mpv
+zenity
+"
+
+# Replace debian packages with ubuntu's
+PKGS=${PKGS/linux-image-amd64/linux-image-generic}
+PKGS=${PKGS/linux-headers-amd64/linux-headers-generic}
+PKGS=${PKGS/firmware-linux-nonfree}
+
+apt-get -y install $PKGS
diff --git a/scripts/vscode.sh b/scripts/vscode.sh
new file mode 100755
index 00000000..cd2cd3ab
--- /dev/null
+++ b/scripts/vscode.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# Install VSCode
+
+SCRIPT_DIR="$(cd -P "$(dirname "$BASH_SOURCE")" && pwd)"
+cd $SCRIPT_DIR
+. set.sh
+
+wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | apt-key add -
+echo 'deb https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/repos/debs/ vscodium main' > /etc/apt/sources.list.d/vscodium.list
+apt-get update && apt-get -y install vscodium
+
+# Set-up all users
+for DIR in $(ls -1d /home/* 2>/dev/null || true)
+do
+ # Add convenient aliases & behaviors
+ mkdir -p $DIR/.config/VSCodium/User
+ cat <<-'EOF'> $DIR/.config/VSCodium/User/settings.json
+ {
+ "telemetry.enableCrashReporter": false,
+ "update.enableWindowsBackgroundUpdates": false,
+ "update.mode": "none",
+ "update.showReleaseNotes": false,
+ "extensions.autoCheckUpdates": false,
+ "extensions.autoUpdate": false,
+ "workbench.enableExperiments": false,
+ "workbench.settings.enableNaturalLanguageSearch": false,
+ "npm.fetchOnlinePackageInfo": false
+ }
+ EOF
+
+ # Fix rights
+ USR=$(echo "$DIR" | rev | cut -d/ -f1 | rev)
+ chown -R $USR:$USR $DIR
+done
From a6edfebefbd5edd5f3e81a8c44094bc3f35f5ce1 Mon Sep 17 00:00:00 2001
From: Xavier Petit
Date: Mon, 29 Apr 2019 13:56:54 +0100
Subject: [PATCH 095/104] Fix bug
---
scripts/install_client.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/install_client.sh b/scripts/install_client.sh
index d78c2fc0..6c6417e2 100755
--- a/scripts/install_client.sh
+++ b/scripts/install_client.sh
@@ -71,7 +71,7 @@ PART=$(lsblk -o tran,kname,hotplug,type,fstype -pr |
sed -i -e "s|::PART::|$PART|g" usr/share/initramfs-tools/scripts/init-premount/reformat
apt-get -y install overlayroot
-echo overlayroot=\"device:dev=$DISK,recurse=0\" >> /etc/overlayroot.conf
+echo overlayroot=\"device:dev=$PART,recurse=0\" >> /etc/overlayroot.conf
# Fix permissions
find . -type d -exec chmod 755 {} \;
From 44dadd114a7ea7175b41acfd78465610a2dc7a99 Mon Sep 17 00:00:00 2001
From: Xavier Petit
Date: Mon, 29 Apr 2019 13:57:01 +0100
Subject: [PATCH 096/104] Remove snap applications
---
scripts/ubuntu_tweaks.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/ubuntu_tweaks.sh b/scripts/ubuntu_tweaks.sh
index bb388b27..c5912d3e 100755
--- a/scripts/ubuntu_tweaks.sh
+++ b/scripts/ubuntu_tweaks.sh
@@ -60,6 +60,7 @@ orca
popularity-contest
python3-update-manager
secureboot-db
+snapd
spice-vdagent
ubuntu-report
ubuntu-software
From 5e0512720037a5828014a6a0091ebd6308391727 Mon Sep 17 00:00:00 2001
From: Xavier Petit
Date: Mon, 29 Apr 2019 17:33:11 +0100
Subject: [PATCH 097/104] Allow multiple types of F2FS disks
---
scripts/system/etc/gdm3/PostLogin/Default | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/system/etc/gdm3/PostLogin/Default b/scripts/system/etc/gdm3/PostLogin/Default
index 2f709a79..e39c9950 100755
--- a/scripts/system/etc/gdm3/PostLogin/Default
+++ b/scripts/system/etc/gdm3/PostLogin/Default
@@ -30,7 +30,7 @@ sleep 0.5
# Find the first removable F2FS partition
PART=$(lsblk -o tran,kname,hotplug,type,fstype -pr |
- grep '1 part f2fs' |
+ grep -e '1 part f2fs' -e '1 disk f2fs' |
cut -d' ' -f2 |
sort |
head -n1)
From a3ecc56a44aeae803b3f5b4d40ba8d24553b334a Mon Sep 17 00:00:00 2001
From: Xavier Petit
Date: Mon, 29 Apr 2019 17:33:50 +0100
Subject: [PATCH 098/104] Do not remove sudo for now
---
scripts/install_client.sh | 2 --
1 file changed, 2 deletions(-)
diff --git a/scripts/install_client.sh b/scripts/install_client.sh
index 6c6417e2..c5659782 100755
--- a/scripts/install_client.sh
+++ b/scripts/install_client.sh
@@ -84,6 +84,4 @@ rm -rf /tmp/system
update-initramfs -u
-apt-get -y purge sudo
-
. clean.sh
From 5347f984af72203227ee9c38e8162b1fbcfd5667 Mon Sep 17 00:00:00 2001
From: Xavier Petit
Date: Tue, 30 Apr 2019 13:35:06 +0100
Subject: [PATCH 099/104] Fix home folder rights
---
scripts/system/etc/gdm3/PostLogin/Default | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/system/etc/gdm3/PostLogin/Default b/scripts/system/etc/gdm3/PostLogin/Default
index e39c9950..d0fa55e0 100755
--- a/scripts/system/etc/gdm3/PostLogin/Default
+++ b/scripts/system/etc/gdm3/PostLogin/Default
@@ -70,4 +70,5 @@ USER_PATH=/mnt/.01/$USER
TEMP_PATH=/mnt/.01/tmp
mkdir -p $USER_PATH $TEMP_PATH
+chown -R $USER:$USER $USER_PATH $TEMP_PATH
mount -t overlay -o lowerdir=$HOME,upperdir=$USER_PATH,workdir=$TEMP_PATH overlay $HOME
From db60da7cdca81b2b9e71d6fe7da1070fc2ed81e7 Mon Sep 17 00:00:00 2001
From: Xavier Petit
Date: Tue, 30 Apr 2019 22:05:52 +0100
Subject: [PATCH 100/104] Ignore chown failure
---
scripts/bash_tweaks.sh | 2 +-
scripts/go.sh | 2 +-
scripts/vscode.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/bash_tweaks.sh b/scripts/bash_tweaks.sh
index f876ed3e..88ec69e1 100755
--- a/scripts/bash_tweaks.sh
+++ b/scripts/bash_tweaks.sh
@@ -55,5 +55,5 @@ do
# Fix rights
USR=$(echo "$DIR" | rev | cut -d/ -f1 | rev)
- chown -R $USR:$USR $DIR
+ chown -R $USR:$USR $DIR || true
done
diff --git a/scripts/go.sh b/scripts/go.sh
index d9409459..c3a27a4a 100755
--- a/scripts/go.sh
+++ b/scripts/go.sh
@@ -20,5 +20,5 @@ do
# Fix rights
USR=$(echo "$DIR" | rev | cut -d/ -f1 | rev)
- chown -R $USR:$USR $DIR
+ chown -R $USR:$USR $DIR || true
done
diff --git a/scripts/vscode.sh b/scripts/vscode.sh
index cd2cd3ab..ddc5292a 100755
--- a/scripts/vscode.sh
+++ b/scripts/vscode.sh
@@ -31,5 +31,5 @@ do
# Fix rights
USR=$(echo "$DIR" | rev | cut -d/ -f1 | rev)
- chown -R $USR:$USR $DIR
+ chown -R $USR:$USR $DIR || true
done
From 3423c62d00266b69ca3d6a4aa03946cb44ddd9f2 Mon Sep 17 00:00:00 2001
From: Xavier Petit
Date: Tue, 30 Apr 2019 22:07:16 +0100
Subject: [PATCH 101/104] Fix comment
---
scripts/vscode.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/vscode.sh b/scripts/vscode.sh
index ddc5292a..43728442 100755
--- a/scripts/vscode.sh
+++ b/scripts/vscode.sh
@@ -13,7 +13,7 @@ apt-get update && apt-get -y install vscodium
# Set-up all users
for DIR in $(ls -1d /home/* 2>/dev/null || true)
do
- # Add convenient aliases & behaviors
+ # Disable most of the telemetry and auto-updates
mkdir -p $DIR/.config/VSCodium/User
cat <<-'EOF'> $DIR/.config/VSCodium/User/settings.json
{
From c5dd0a98078ecc8ee6187e34f321121a6867a163 Mon Sep 17 00:00:00 2001
From: Xavier Petit
Date: Tue, 30 Apr 2019 23:58:11 +0100
Subject: [PATCH 102/104] Add doc
---
docs/ubuntu-installation.md | 64 +++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
create mode 100644 docs/ubuntu-installation.md
diff --git a/docs/ubuntu-installation.md b/docs/ubuntu-installation.md
new file mode 100644
index 00000000..9799cadf
--- /dev/null
+++ b/docs/ubuntu-installation.md
@@ -0,0 +1,64 @@
+# Ubuntu
+
+## OS Installation
+
+Download and boot the [last Ubuntu release](http://releases.ubuntu.com/19.04/ubuntu-19.04-desktop-amd64.iso).
+
+Follow the steps :
+
+![img1](https://user-images.githubusercontent.com/32063953/56804679-85867580-681e-11e9-8965-e87c6a89fac0.png)
+![img2](https://user-images.githubusercontent.com/32063953/56963599-3eb3bb00-6b51-11e9-9778-4f3bb9993c74.png)
+![img3](https://user-images.githubusercontent.com/32063953/56963600-3eb3bb00-6b51-11e9-94cc-279406f37def.png)
+
+The partitioning is :
+
+- 256 MB : EFI partition
+- 20 GB : system partition
+- 32 GB : unused partition (will be used later)
+- rest : unused partition (will be used later)
+
+![img4](https://user-images.githubusercontent.com/32063953/56963602-3eb3bb00-6b51-11e9-8977-38e4e67d6ce1.png)
+![img5](https://user-images.githubusercontent.com/32063953/56963603-3f4c5180-6b51-11e9-9349-46ab90287691.png)
+![img6](https://user-images.githubusercontent.com/32063953/56963604-3f4c5180-6b51-11e9-8df2-5016771e6e07.png
+)
+
+Remove the installation disk and then reboot.
+
+Skip the welcoming window.
+
+Don't install updates if Ubuntu asks to. The scripts will.
+
+![img8](https://user-images.githubusercontent.com/32063953/56804701-8d461a00-681e-11e9-8825-dfc69f8268bf.png)
+![img9](https://user-images.githubusercontent.com/32063953/56804703-8d461a00-681e-11e9-840c-498ccab7d911.png)
+![img10](https://user-images.githubusercontent.com/32063953/56804704-8ddeb080-681e-11e9-96ff-6c8783c5aacc.png)
+![img11](https://user-images.githubusercontent.com/32063953/56804706-8ddeb080-681e-11e9-85e1-20c5b6956a36.png)
+
+## OS configuration
+
+```shell
+student@tmp-hostname:~$ wget github.com/01-edu/public/archive/master.zip
+student@tmp-hostname:~$ unzip master.zip
+student@tmp-hostname:~$ cd public-master/scripts
+student@tmp-hostname:~$ sudo ./install_client.sh
+[...]
+Ask for student user password (will be removed later)
+[...]
+Ask to set the root password
+[...]
+Long installation/configuration process
+[...]
+student@tmp-hostname:~$ cat dconfig.txt | dconf load /
+student@tmp-hostname:~$ reboot
+```
+
+The system is now read-only, every data is written to a temporary partition.
+
+The session is password-less.
+
+To gain a superuser terminal with read/write access to the filesystem, type these commands:
+
+```shell
+student@tmp-hostname:~$ su -
+Password:
+root@tmp-hostname:~# overlayroot-chroot
+```
From f101c3990d0fc4d3530ec838f254280fda63346e Mon Sep 17 00:00:00 2001
From: Xavier Petit
Date: Tue, 30 Apr 2019 23:58:22 +0100
Subject: [PATCH 103/104] Add useless package to purge
---
scripts/ubuntu_tweaks.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/ubuntu_tweaks.sh b/scripts/ubuntu_tweaks.sh
index c5912d3e..a1d4e139 100755
--- a/scripts/ubuntu_tweaks.sh
+++ b/scripts/ubuntu_tweaks.sh
@@ -49,6 +49,7 @@ bind9
bolt
cups*
exim*
+fprintd
friendly-recovery
gnome-initial-setup
gnome-online-accounts
From be9a68fd3b2263983bb7e7edfdfdbd128aade7d3 Mon Sep 17 00:00:00 2001
From: Frenchris <34804391+Frenchris@users.noreply.github.com>
Date: Sat, 27 Apr 2019 00:34:30 +0100
Subject: [PATCH 104/104] Trnaslation update
---
subjects/doop.fr.md | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/subjects/doop.fr.md b/subjects/doop.fr.md
index 8acbf79e..904d0217 100644
--- a/subjects/doop.fr.md
+++ b/subjects/doop.fr.md
@@ -10,10 +10,12 @@ Le programme doit être utilisé avec trois arguments:
- Un opérateur
- Une autre valeur
-En cas d'argument invalide le programme affiche `0`.
+En cas d'opérateur invalide le programme affiche `0`.
En cas de nombre invalide d'arguments le programme affiche rien.
+Le programme doit géré les opérations modulo et division par 0 comme dans les examples ci-dessous.
+
`fmt.Print` est autorisé.
### Utilisation
@@ -23,8 +25,8 @@ student@ubuntu:~/piscine/test$ go build doop.go
student@ubuntu:~/piscine/test$ ./doop
student@ubuntu:~/piscine/test$ ./doop 1 + 1
2
-student@ubuntu:~/piscine/test$ ./doop hello + 1
-0
+student@ubuntu:~/piscine/test$ ./doop hello + 1 | cat -e
+0$
student@ubuntu:~/piscine/test$ ./doop 1 p 1
0
student@ubuntu:~/piscine/test$ ./doop 1 + 1