Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions legacy/databases/lesson3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,45 +69,45 @@ Create these queries

#### Meal

| Queries to write |
| ----------------------------------------------------------------------------------------- |
| Get all meals |
| Add a new meal |
| Get a meal with any id, fx 1 |
| Update a meal with any id, fx 1. Update any attribute fx the title or multiple attributes |
| Delete a meal with any id, fx 1 |
| Queries to write |
| --------------------------------------------------------------------------------------------- |
| Get all meals |
| Add a new meal |
| Get a meal with any id, e.g. 1 |
| Update a meal with any id, e.g. 1. Update any attribute e.g. the title or multiple attributes |
| Delete a meal with any id, e.g. 1 |

#### Reservation

| Queries to write |
| ------------------------------------------------------------------------------------------------ |
| Get all reservations |
| Add a new reservation |
| Get a reservation with any id, fx 1 |
| Update a reservation with any id, fx 1. Update any attribute fx the title or multiple attributes |
| Delete a reservation with any id, fx 1 |
| Queries to write |
| ---------------------------------------------------------------------------------------------------- |
| Get all reservations |
| Add a new reservation |
| Get a reservation with any id, e.g. 1 |
| Update a reservation with any id, e.g. 1. Update any attribute e.g. the title or multiple attributes |
| Delete a reservation with any id, e.g. 1 |

#### Review

| Queries to write |
| ------------------------------------------------------------------------------------------- |
| Get all reviews |
| Add a new review |
| Get a review with any id, fx 1 |
| Update a review with any id, fx 1. Update any attribute fx the title or multiple attributes |
| Delete a review with any id, fx 1 |
| Queries to write |
| ----------------------------------------------------------------------------------------------- |
| Get all reviews |
| Add a new review |
| Get a review with any id, e.g. 1 |
| Update a review with any id, e.g. 1. Update any attribute e.g. the title or multiple attributes |
| Delete a review with any id, e.g. 1 |

#### Additional queries

Now add a couple of different meals, reservations and reviews with different attributes. With those meals create the following queries

| Functionality |
| -------------------------------------------------------------------------------------------------------------- |
| Get meals that has a price smaller than a specific price fx 90 |
| Get meals that has a price smaller than a specific price e.g. 90 |
| Get meals that still has available reservations |
| Get meals that partially match a title. `Rød grød med` will match the meal with the title `Rød grød med fløde` |
| Get meals that has been created between two dates |
| Get only specific number of meals fx return only 5 meals |
| Get only specific number of meals e.g. return only 5 meals |
| Get the meals that have good reviews |
| Get reservations for a specific meal sorted by created_date |
| Sort all meals by average number of stars in the reviews |
Expand Down
2 changes: 1 addition & 1 deletion legacy/databases/lesson3/social_media_exercise.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ It should however **not** be possible for a user to react to something with the

### Friendship

Fx: User 1 is friends with user 2
e.g. User 1 is friends with user 2
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you already have such a repository, just go on to the next step.

1. Once the repository has been made, head over to your terminal and clone that repository into a directory of your choosing.
2. Once the repository been cloned to your computer, open the project folder in VS Code.
3. Create a folder for your APIs or just create a file in the root of the repository. You might want to organize it into a folder (fx. “data”) if you plan to create more APIs in the future and/or if you plan to also host your site on Github Pages. In the case of your JS project, you would just copy and paste the array of objects that you have been using so far and perhaps add more objects to it, if needed.
3. Create a folder for your APIs or just create a file in the root of the repository. You might want to organize it into a folder (e.g. “data”) if you plan to create more APIs in the future and/or if you plan to also host your site on Github Pages. In the case of your JS project, you would just copy and paste the array of objects that you have been using so far and perhaps add more objects to it, if needed.
4. Once you are ready with your JSON file, add, commit and push the changes to `main` so that you have the file on your repository.
5. Head over to the repo on GitHub and verify that your file is there and that all is good.

Expand Down
2 changes: 1 addition & 1 deletion legacy/javascript/javascript1/week1/lesson-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Remember to add the code you wrote in the class to the relevant class branch's class work folder. If the branch has not been created just create and push it :) If you don't have access, write to one from the core team. You can see an example below!

To find examples of what teachers have taught before go to the class branches in the classwork folder, Fx [class 07](https://github.com/HackYourFuture-CPH/JavaScript/tree/class07/JavaScript1/Week1/classwork)
To find examples of what teachers have taught before go to the class branches in the classwork folder, e.g. [class 07](https://github.com/HackYourFuture-CPH/JavaScript/tree/class07/JavaScript1/Week1/classwork)

If you find anything that could be improved then please create a pull request! We welcome changes, so please get involved if you have any ideas!!!

Expand Down
6 changes: 3 additions & 3 deletions legacy/javascript/javascript1/week2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- [ ] Global vs local scope
- [ ] For loop

Teaching note. Start off explaining functions with how to use a function fx explain why the Math.random function is smart, or Math.max.
Teaching note. Start off explaining functions with how to use a function e.g. explain why the Math.random function is smart, or Math.max.

## Relevant links

Expand Down Expand Up @@ -78,7 +78,7 @@ console.log(randomNumber); // logs out some number between 0 and 1

Here `Math.random` is a function. To activate the function we call it using parentheses `()`. When calling it we get a randomNumber! We now don't need to think about all the code it takes to create a random number in javascript, we simply call the function and get a random number. Code has been abstracted away for us!

Some functions is called with arguments fx:
Some functions is called with arguments, for example:

```js
const maxNumber = Math.max(3, 5); // 3 and 5 are arguments
Expand Down Expand Up @@ -142,7 +142,7 @@ multiply(10 * 4);

##### Return value

Sometimes we want to get a value back when calling a function. Fx in the sum example. We want to call the function and get the sum back!
Sometimes we want to get a value back when calling a function. e.g. in the sum example. We want to call the function and get the sum back!

```js
function sum(a, b) {
Expand Down
4 changes: 2 additions & 2 deletions legacy/javascript/javascript1/week2/lesson-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Remember to add the code you wrote in the class to the relevant class branch's class work folder. If the branch has not been created just create and push it :) If you don't have access, write to one from the core team. You can see an example below!

To find examples of what teachers have taught before go to the class branches in the classwork folder, Fx [class 07](https://github.com/HackYourFuture-CPH/JavaScript/tree/class07/JavaScript1/Week1/classwork)
To find examples of what teachers have taught before go to the class branches in the classwork folder, e.g. [class 07](https://github.com/HackYourFuture-CPH/JavaScript/tree/class07/JavaScript1/Week1/classwork)

If you find anything that could be improved then please create a pull request! We welcome changes, so please get involved if you have any ideas!!!

Expand Down Expand Up @@ -38,7 +38,7 @@ If you find anything that could be improved then please create a pull request! W
- [Exercise string logger](#for-loop-1)
- [Exercise send emails](#send-emails)

The students really struggle with the **return** value. What it means, how it is captured. What happens when nothing is returned etc. Try really hammering in this concept with lots of simple examples and exercises! Fx if a function is called get something. That means that something is returned from that function.
The students really struggle with the **return** value. What it means, how it is captured. What happens when nothing is returned etc. Try really hammering in this concept with lots of simple examples and exercises! e.g. if a function is called get something. That means that something is returned from that function.

Zoey Zou made a nice Notion lesson plan here: <https://www.notion.so/JS1-Week2-8f2d4b7e7ba0425ea4a9e97816e9ceb7>

Expand Down
2 changes: 1 addition & 1 deletion legacy/javascript/javascript1/week3/homework.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Array's has lots of helper functions, that is used all the time when developing js applications. It is super helpful to be able to **manipulate an array** like **removing elements** or **adding elements** at specific indexes. Another helpful function of arrays is to know **where a specific item is** in the array.

Objects can be used for **representing data** and it can **help structure your code**. An object can fx represent a user that has a firstname, surname, profile picture and a list of friends. It is constantly used in javascript and **essential to learning the language**.
Objects can be used for **representing data** and it can **help structure your code**. An object can e.g. represent a user that has a firstname, surname, profile picture and a list of friends. It is constantly used in javascript and **essential to learning the language**.

If you struggle to do this weeks homework there are a couple of things to do:

Expand Down
2 changes: 1 addition & 1 deletion legacy/javascript/javascript1/week3/lesson-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Remember to add the code you wrote in the class to the relevant class branch's class work folder. If the branch has not been created just create and push it :) If you don't have access, write to one from the core team. You can see an example below!

To find examples of what teachers have taught before go to the class branches in the classwork folder, Fx [class 07](https://github.com/HackYourFuture-CPH/JavaScript/tree/class07/JavaScript1/Week1/classwork)
To find examples of what teachers have taught before go to the class branches in the classwork folder, e.g. [class 07](https://github.com/HackYourFuture-CPH/JavaScript/tree/class07/JavaScript1/Week1/classwork)

If you find anything that could be improved then please create a pull request! We welcome changes, so please get involved if you have any ideas!!!

Expand Down
4 changes: 2 additions & 2 deletions legacy/javascript/javascript1/week4/homework.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ These are the commands you should be able to give the voice assistant:
- `Add fishing to my todo` - Should respond with "fishing added to your todo". Should add fishing to a list of todos
- `Add singing in the shower to my todo` - Should add singing in the shower to a list of todos
- `Remove fishing from my todo` - Should respond with "Removed fishing from your todo"
- `What is on my todo?` - should respond with the todos. Fx you have 2 todos - fishing and singing in the shower
- `What is on my todo?` - should respond with the todos. e.g. you have 2 todos - fishing and singing in the shower
- `What day is it today?` - Should respond with the date in a human readable format. E.g. if today is 30/8/2019 then it should respond with 30. of August 2019
- Should be able to do simple math. fx `what is 3 + 3` should respond with 6. Or `what is 4 * 12` should respond with 48
- Should be able to do simple math. e.g. `what is 3 + 3` should respond with 6. Or `what is 4 * 12` should respond with 48
- `Set a timer for 4 minutes` - Should respond with "Timer set for 4 minutes". When 4 minutes is up: "Timer done". How do we set a timer in js? Google is your friend here!
- Add one or more command to your voice assistant

Expand Down
8 changes: 5 additions & 3 deletions legacy/javascript/javascript1/week4/lesson-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Remember to add the code you wrote in the class to the relevant class branch's class work folder. If the branch has not been created just create and push it :) If you don't have access, write to one from the core team. You can see an example below!

To find examples of what teachers have taught before go to the class branches in the classwork folder, Fx [class 07](https://github.com/HackYourFuture-CPH/JavaScript/tree/class07/JavaScript1/Week1/classwork)
To find examples of what teachers have taught before go to the class branches in the classwork folder, e.g. [class 07](https://github.com/HackYourFuture-CPH/JavaScript/tree/class07/JavaScript1/Week1/classwork)

If you find anything that could be improved then please create a pull request! We welcome changes, so please get involved if you have any ideas!!!

Expand Down Expand Up @@ -74,7 +74,7 @@ When that works. Make the two number for multiples into parameters. So it can be

A sentiment analyzer is some functionality that figures out how positive/negative a sentence is.

Fx the sentence `I am mega super awesome happy" Should have a high score
For example, the sentence `I am mega super awesome happy" Should have a high score
The sentence "I hate doing boring stuff" should have a low score.

Create a function that takes a string as a parameter. calling the function will return an object with `score`, `positiveWords` and `negativeWords`. You decide how the score should be implemented and what words are negative and positive.
Expand All @@ -96,7 +96,9 @@ console.log(sentimentScoreObject);

### Credit card number formatter

This is a very real world example of a problem i got at my previous work. I was tasked to implement one of the smart credit card input fields, where the credit card numbers are separated with a space. Fx inputting 123456789 would show 1234 5678 9.
This is a very real world example of a problem i got at my previous work. I
was tasked to implement one of the smart credit card input fields, where the
credit card numbers are separated with a space. e.g. inputting 123456789 would show 1234 5678 9.

![Credit card formatter](assets/credit-card-formatter.gif)

Expand Down
2 changes: 1 addition & 1 deletion legacy/javascript/javascript2/week1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Events in JavaScript are things like:
A timer has just finished, a user clicked a button, our page has loaded,
someone types into an input element or we have just gotten some data from a server.
When these events happen, we usually want to add some functionality.
Fx when a user clicks the like button (event), we want to increment the like counter and color the like button blue.
For example, when a user clicks the like button (event), we want to increment the like counter and color the like button blue.
Or when someone clicks "Close cookies" (event) we want to remove the cookie div.

Lets first try to create some js that waits for 2 seconds and the console.logs out "2 seconds has elapsed!"
Expand Down
2 changes: 1 addition & 1 deletion legacy/javascript/javascript2/week1/lesson-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Remember to add the code you wrote in the class to the relevant class branch's class work folder. If the branch has not been created just create and push it :) If you don't have access, write to one from the core team. You can see an example below!

To find examples of what teachers have taught before go to the class branches in the classwork folder, Fx [class 07](https://github.com/HackYourFuture-CPH/JavaScript/tree/class07/JavaScript1/Week1/classwork)
To find examples of what teachers have taught before go to the class branches in the classwork folder, e.g. [class 07](https://github.com/HackYourFuture-CPH/JavaScript/tree/class07/JavaScript1/Week1/classwork)

If you find anything that could be improved then please create a pull request! We welcome changes, so please get involved if you have any ideas!!!

Expand Down
4 changes: 2 additions & 2 deletions legacy/javascript/javascript2/week1/optional-homework.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ notThisFunctionName(danishString2); // returns {total: 4, æ: 1, ø: 2, å: 1}

## 2. Spirit animal name generator

Let's create a page where **a user writes his name** in an input element. The user then clicks a button. The user will now **receive a spirit animal name**, fx Benjamin - The fullmoon wolf.
Let's create a page where **a user writes his name** in an input element. The user then clicks a button. The user will now **receive a spirit animal name**, e.g. Benjamin - The fullmoon wolf.

### 2.1. Markup time!

Expand All @@ -50,7 +50,7 @@ When the user clicks the button, get the name the user wrote in the input field.

### 2.3. Spirit animal part

Now we can get the users name, next step is to **add the spirit animal string** and display that the users name, a dash and then the spirit animal. Fx Name: Peter: Peter - The crying butterfly
Now we can get the users name, next step is to **add the spirit animal string** and display that the users name, a dash and then the spirit animal. e.g. Name: Peter: Peter - The crying butterfly
For creating the spirit animal create an array with 10 string representing spirit animals. Now get a random item in the array that will represent the spirit animal.

### 2.4. New spirit animal
Expand Down
Loading