Skip to content

Commit 07bd06f

Browse files
authored
Merge branch 'master' into patch-24
2 parents 88acf25 + 2582638 commit 07bd06f

16 files changed

Lines changed: 100 additions & 73 deletions

File tree

subjects/ascii-art-web/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Implement the following HTTP endpoints:
1515
1. GET `/`: Sends HTML response, the main page.\
1616
1.1. GET Tip: [go templates](https://golang.org/pkg/html/template/) to receive and display data from the server.
1717

18-
2. POST `/ascii-art`: that sends data to Go server (text and a banner)\
19-
2.1. POST Tip: use form and other types of [tags](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) to make the post request.\
18+
2. POST `/ascii-art`: that sends data (text and specified banner) to the Go server.\
19+
2.1. POST Tip: use form and other types of [tags](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) to make the post request.
2020

2121
The way you display the result from the POST is up to you. What we recommend are one of the following :
2222

@@ -25,18 +25,18 @@ The way you display the result from the POST is up to you. What we recommend are
2525

2626
The main page must have:
2727

28-
- text input
29-
- radio buttons, select object or anything else to switch between banners
30-
- button, which sends a POST request to '/ascii-art' and outputs the result on the page.
28+
- a text input field
29+
- radio buttons, select object or another method to switch between banners
30+
- a button that sends a POST request to '/ascii-art' and displays the result on the page.
3131

3232
### HTTP status code
3333

3434
Your endpoints must return appropriate HTTP status codes.
3535

36-
- OK (200), if everything went without errors.
37-
- Not Found, if nothing is found, for example templates or banners.
38-
- Bad Request, for incorrect requests.
39-
- Internal Server Error, for unhandled errors.
36+
- 200 OK, if everything went without errors.
37+
- 404 Not Found, if nothing is found, for example templates or banners.
38+
- 400 Bad Request, for incorrect requests.
39+
- 500 Internal Server Error, for unhandled errors.
4040

4141
## Markdown
4242

subjects/ascii-art/README.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ $$@@$$$$$$$$``````````@@$$@@$$$$$$
3636
- It is recommended to have **test files** for [unit testing](https://go.dev/doc/tutorial/add-a-test).
3737

3838
- Some **banner** files with a specific graphical template representation using ASCII will be given. The files are formatted in a way that is not necessary to change them.
39-
4039
- [shadow](shadow.txt)
4140
- [standard](standard.txt)
4241
- [thinkertoy](thinkertoy.txt)
@@ -113,32 +112,32 @@ student$ go run . "HeLlO" | cat -e
113112
$
114113
$
115114
student$ go run . "Hello There" | cat -e
116-
_ _ _ _ _______ _ $
117-
| | | | | | | | |__ __| | | $
118-
| |__| | ___ | | | | ___ | | | |__ ___ _ __ ___ $
119-
| __ | / _ \ | | | | / _ \ | | | _ \ / _ \ | '__| / _ \ $
120-
| | | | | __/ | | | | | (_) | | | | | | | | __/ | | | __/ $
121-
|_| |_| \___| |_| |_| \___/ |_| |_| |_| \___| |_| \___| $
122-
$
123-
$
115+
_ _ _ _ _______ _ $
116+
| | | | | | | | |__ __| | | $
117+
| |__| | ___ | | | | ___ | | | |__ ___ _ __ ___ $
118+
| __ | / _ \ | | | | / _ \ | | | _ \ / _ \ | '__| / _ \ $
119+
| | | | | __/ | | | | | (_) | | | | | | | | __/ | | | __/ $
120+
|_| |_| \___| |_| |_| \___/ |_| |_| |_| \___| |_| \___| $
121+
$
122+
$
124123
student$ go run . "1Hello 2There" | cat -e
125-
_ _ _ _ _______ _ $
126-
_ | | | | | | | | ____ |__ __| | | $
127-
/ | | |__| | ___ | | | | ___ |___ \ | | | |__ ___ _ __ ___ $
128-
| | | __ | / _ \ | | | | / _ \ __) | | | | _ \ / _ \ | '__| / _ \ $
129-
| | | | | | | __/ | | | | | (_) | / __/ | | | | | | | __/ | | | __/ $
130-
|_| |_| |_| \___| |_| |_| \___/ |_____| |_| |_| |_| \___| |_| \___| $
131-
$
132-
$
124+
_ _ _ _ _______ _ $
125+
_ | | | | | | | | ____ |__ __| | | $
126+
/ | | |__| | ___ | | | | ___ |___ \ | | | |__ ___ _ __ ___ $
127+
| | | __ | / _ \ | | | | / _ \ __) | | | | _ \ / _ \ | '__| / _ \ $
128+
| | | | | | | __/ | | | | | (_) | / __/ | | | | | | | __/ | | | __/ $
129+
|_| |_| |_| \___| |_| |_| \___/ |_____| |_| |_| |_| \___| |_| \___| $
130+
$
131+
$
133132
student$ go run . "{Hello There}" | cat -e
134-
__ _ _ _ _ _______ _ __ $
135-
/ / | | | | | | | | |__ __| | | \ \ $
136-
| | | |__| | ___ | | | | ___ | | | |__ ___ _ __ ___ | | $
137-
/ / | __ | / _ \ | | | | / _ \ | | | _ \ / _ \ | '__| / _ \ \ \ $
138-
\ \ | | | | | __/ | | | | | (_) | | | | | | | | __/ | | | __/ / / $
139-
| | |_| |_| \___| |_| |_| \___/ |_| |_| |_| \___| |_| \___| | | $
140-
\_\ /_/ $
141-
$
133+
__ _ _ _ _ _______ _ __ $
134+
/ / | | | | | | | | |__ __| | | \ \ $
135+
| | | |__| | ___ | | | | ___ | | | |__ ___ _ __ ___ | | $
136+
/ / | __ | / _ \ | | | | / _ \ | | | _ \ / _ \ | '__| / _ \ \ \ $
137+
\ \ | | | | | __/ | | | | | (_) | | | | | | | | __/ | | | __/ / / $
138+
| | |_| |_| \___| |_| |_| \___/ |_| |_| |_| \___| |_| \___| | | $
139+
\_\ /_/ $
140+
$
142141
student$ go run . "Hello\nThere" | cat -e
143142
_ _ _ _ $
144143
| | | | | | | | $

subjects/blockchain/retrieve-transaction-in-out/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ _+ 0.01 fee_
1515

1616
### Instructions
1717

18-
Using a local Bitcoin node RPC API, create a function `retrieveTxValue()` that takes as input a hash of a simple transaction, and returns an object with an array of inputs values and an array outputs values in this transaction.
18+
Using a local Bitcoin node RPC API, create a function `retrieveTransactionInOut()` that takes as input a hash of a simple transaction, and returns an object with an array of inputs values and an array outputs values in this transaction.
1919

2020
The Bitcoin node RPC interface is expected to be running with the following parameters:
2121

@@ -29,8 +29,8 @@ rpcpassword=multipass
2929
### Usage
3030

3131
```js
32-
txHash = 'd030023d96b9170af9ec2fe5d9b62a5eacbcbf144c68f3f45d68bca72d1d3649'
33-
retrieveTxData(txHash)
32+
txHash = "d030023d96b9170af9ec2fe5d9b62a5eacbcbf144c68f3f45d68bca72d1d3649";
33+
retrieveTxData(txHash);
3434
/* Expected :
3535
{
3636
in: [ 0.18075094 ],

subjects/box_recursion/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ pub struct WorkEnvironment {
3030
pub grade: Link,
3131
}
3232

33-
pub type Link;
33+
pub type Link = _; // Complete type alias
3434

3535
#[derive(Debug)]
3636
pub struct Worker {
37-
pub role: String,
37+
pub role: Role,
3838
pub name: String,
3939
pub next: Link,
4040
}

subjects/get_document_id/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Create the following structures which will help you get the `document_id` of the
1313

1414
The `u32` is the `id` of the office generating the error.
1515

16-
Beside the structures, you must create a **function** named `get_document_id`, and associate it to the `OfficeOne` structure.
16+
Besides the structures, you must create a **function** named `get_document_id`, and associate it to the `OfficeOne` structure.
1717

1818
This **function** should return the `Result` value in the `OfficeFour` structure or the first `Err` it finds in the chain.
1919

subjects/java/raids/jraffic/README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,24 @@ East --------------- --------------- West
4747

4848
Position traffic lights at the points where each lane enters the intersection. Your traffic lights should only have two colors: red and green.
4949

50-
You can use any algorithm to control the traffic lights. However, the system should be efficient enough to avoid traffic congestion (8 or more vehicles). The primary aim of the traffic light system is to prevent collisions at the intersection.
50+
You can implement any algorithm you choose to control the traffic lights system, but bear in mind that **traffic congestion should remain below the lane’s maximum capacity**.
51+
52+
> **Dynamic Congestion Rule:**
53+
> The maximum allowed queue length for each lane is calculated based on the lane’s physical length, vehicle length, and safety gap between vehicles:
54+
>
55+
> ```
56+
> capacity = floor(lane_length / (vehicle_length + safety_gap))
57+
> ```
58+
>
59+
> Where:
60+
>
61+
> - `lane_length`: Distance from the stop line to the vehicle spawn point
62+
> - `vehicle_length`: Approximate car length in simulation units (e.g., pixels or meters)
63+
> - `safety_gap`: Minimum safe distance between vehicles
64+
>
65+
> If the number of vehicles in a lane reaches this capacity, the traffic light logic should adjust (e.g., extend green time for that lane) to prevent overflow.
66+
67+
The primary function of your traffic light system is to avoid collisions between vehicles passing through the intersection, while dynamically adapting to congestion.
5168
5269
**3. Vehicles**
5370
@@ -56,6 +73,7 @@ You can use any algorithm to control the traffic lights. However, the system sho
5673
/|_||_\`.__
5774
=`-(_)--(_)-'
5875
```
76+
5977
The vehicles traveling through your capital city's new junction must follow these rules:
6078
6179
- Vehicles must be painted in a color that illustrates the route they will follow. The colors are up to you to decide, and your choices will need to be made available during the audit of the raid. For example, all cars which make a right turn could be painted yellow. It's really up to you though.
@@ -87,21 +105,21 @@ You will use your keyboard to spawn vehicles for your simulation. You will use t
87105
88106
> A safe distance is any distance which enables the vehicles to avoid crashing into each other.
89107
90-
91108
### Example
92109
93110
You can see an example for road_intersection [here](https://www.youtube.com/watch?v=6B0-ZBET6mo).
94111
95112
### Bonus
113+
96114
You can implement the following optional features:
97115
98116
- Vehicle and traffic light animations, and image rendering. You can find some cool assets here:
99-
100117
- [limezu](https://limezu.itch.io/)
101118
- [finalbossblue](http://finalbossblues.com/timefantasy/free-graphics/).
102119
- [mobilegamegraphics](https://mobilegamegraphics.com/product-category/all_products/freestuff/).
103120
- [spriters-resource](https://www.spriters-resource.com/).
104121
105122
### Notions
123+
106124
- [JavaFX](https://openjfx.io/openjfx-docs/)
107125
- [Java KeyEvents](https://docs.oracle.com/javase/tutorial/uiswing/events/keylistener.html)

subjects/java/raids/jraffic/audit/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
#### Comprehension
1+
#### Comprehension
2+
3+
**_Is the student able to justify his choices and explain the following:_**
4+
**_Note:_** Ask the student to show you the implementation in the source code when necessary.
25

3-
***Is the student able to justify his choices and explain the following:***
4-
***Note:*** Ask the student to show you the implementation in the source code when necessary.
56
###### Can the student explain why he uses this library?
67

78
###### Can the student explain how he manages the High-Traffic congestion
@@ -12,7 +13,7 @@
1213

1314
###### Can the student explain how he manages the key hooks?
1415

15-
#### Functional
16+
#### Functional
1617

1718
##### Try to run the application.
1819

@@ -94,7 +95,7 @@
9495

9596
###### Was the simulation ended?
9697

97-
###### High traffic congestion is when there are 8 or more vehicles in the same lane without proceeding. Was there low traffic congestion while running the simulation?
98+
###### High traffic congestion is when there are **Max Capacity** in the same lane without proceeding. Was there low traffic congestion while running the simulation?
9899

99100
#### General
100101

subjects/make-your-game/score-handling/audit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#### Functional
22

3-
###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/))
3+
###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/) and [Gorilla](https://pkg.go.dev/github.com/gorilla/websocket))
44

55
##### Play and finish the game.
66

subjects/previousprime/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### Instructions
44

5-
Create a **function** which returns the first prime number which is less than or equal to the `u64` passed as an argument.
5+
Create a **function** which returns the biggest prime number which is smaller than the `u64` passed as an argument.
66

77
If there are no smaller primes, the function should return `0`.
88

@@ -13,13 +13,13 @@ If there are no smaller primes, the function should return `0`.
1313

1414
```rust
1515
pub fn prev_prime(nbr: u64) -> u64 {
16-
16+
todo!()
1717
}
1818
```
1919

2020
### Usage
2121

22-
Here is a possible program to test your function :
22+
Here is a possible program to test your function:
2323

2424
```rust
2525
use previousprime::*;
@@ -29,7 +29,7 @@ fn main() {
2929
}
3030
```
3131

32-
And its output :
32+
And its output:
3333

3434
```console
3535
$ cargo run

subjects/previousprime/main.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)