Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deniz-khadija-class14, deniz-yeşim-class15, deniz-yesim-minesweeper, ayshe-deniz-firebase-router #158

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b7d3e84
class12
udenizdemirbilek May 17, 2021
84310f8
class13
udenizdemirbilek May 17, 2021
db5c3fe
Merge branch 'main' of github.com:ReCoded-Org/bootcamp-turkey-2021-ap…
udenizdemirbilek May 18, 2021
282395a
madLibz
udenizdemirbilek May 18, 2021
4026aa8
Merge branch 'main' of github.com:ReCoded-Org/bootcamp-turkey-2021-ap…
udenizdemirbilek May 21, 2021
dde2e67
class14
udenizdemirbilek May 21, 2021
07f2357
Merge branch 'main' of github.com:ReCoded-Org/bootcamp-turkey-2021-ap…
udenizdemirbilek May 22, 2021
1750406
oop car demo
udenizdemirbilek May 22, 2021
b5723cb
oop-car-demo
udenizdemirbilek May 22, 2021
a6de87a
Delete index.js
udenizdemirbilek May 22, 2021
ed3ee18
Merge branch 'main' of github.com:ReCoded-Org/bootcamp-turkey-2021-ap…
udenizdemirbilek May 26, 2021
8b453e8
minesweeper
udenizdemirbilek May 26, 2021
6754310
minesweeper
udenizdemirbilek May 26, 2021
bc5de61
minesweeper
udenizdemirbilek May 26, 2021
0762963
Merge branch 'main' of github.com:udenizdemirbilek/bootcamp-turkey-2…
udenizdemirbilek May 26, 2021
08bc0ee
Merge branch 'main' of github.com:ReCoded-Org/bootcamp-turkey-2021-ap…
udenizdemirbilek Jun 3, 2021
bb8205c
jsReview
udenizdemirbilek Jun 3, 2021
5077499
Merge branch 'ReCoded-Org:main' into main
udenizdemirbilek Jun 26, 2021
3b23fb3
Merge branch 'main' of github.com:ReCoded-Org/bootcamp-turkey-2021-ap…
udenizdemirbilek Jun 26, 2021
a5ba518
Merge branch 'main' of github.com:ReCoded-Org/bootcamp-turkey-2021-ap…
udenizdemirbilek Jun 30, 2021
53564d0
Ayshe-Deniz/
udenizdemirbilek Jun 30, 2021
21db178
Merge branch 'main' of github.com:udenizdemirbilek/bootcamp-turkey-20…
udenizdemirbilek Jun 30, 2021
085a79c
board
udenizdemirbilek Jul 17, 2021
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
41 changes: 41 additions & 0 deletions class-14-js-wheresWaldo/deniz-khadija/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//Partners Khadija and Deniz
function whereIsWaldo (arrayOfArrays) {
//Store array length as number base
const base = arrayOfArrays[0].length
//Flatten the arrays into one array
const flattenedArray = arrayOfArrays.flat(2);
//Check if the first two elements are the same, if they are pick the first as the filler element and find the different elements index, return it in 1 indexed coordinates [row, column]
if (flattenedArray[0] === flattenedArray[1]){
const index = flattenedArray.findIndex(e => e !== flattenedArray[0])
const rowIndex = Math.floor((index) / base)
const columnIndex = (index) % base;
// Convert the 0-indexed coordinates into 1 indexed coordinates
return [rowIndex + 1, columnIndex + 1]
// If the first element and the third is the same, then the different element is [1,2]
} else if (flattenedArray[0] === flattenedArray[2]){
return [1,2]
//If the second element and the third is the same, then the different element is [1,1]
} else {
return [1,1]
}
}

whereIsWaldo([
["A", "A", "A"],
["A", "b", "A"],
["A", "A", "A"]
]) //➞ [3, 2]

// whereIsWaldo([
// ["c", "c", "c", "c"],
// ["c", "c", "c", "d"]
// ]) //➞ [2, 4]

// whereIsWaldo([
// ["O", "O", "O", "O"],
// ["O", "O", "O", "O"],
// ["O", "O", "O", "O"],
// ["O", "O", "3", "O"],
// ["O", "O", "O", "O"],
// ["O", "O", "O", "O"]
// ])// ➞ [5, 1]
67 changes: 67 additions & 0 deletions class-15-js-OOP/deniz-yesim/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
//Partners Deniz and Yeşim
class Car {
// Part 1. Constructor (REVIEW)
constructor(name, color, fuelType) {
this.name = name;
this.color = color;
this.fuelType = fuelType;
}

// Method.
paint(newColor) {
return this.color = newColor;
}

// Part 2. Static methods.
hasTheSameProperties(car2){
return this.color === car2.color &&
this.fuelType === car2.fuelType
}

static hasTheSamePropertiesStatic(car1, car2) {
return car1.color === car2.color &&
car1.fuelType === car2.fuelType
}

static compareSpeed (car1, car2){
if (car1.speed> car2.speed) {
return car1;
} else return car2;
}
// Part 3. Getter, setter.
get speedKmH() {
return this.speed
}

set speedKmH(newTopSpeedKmH) {
if (newTopSpeedKmH > 300) {
throw Error("Slow down, Tiger!")

} else{
this.speed = newTopSpeedKmH
}
}

get speedInMiles() {
return this.speed * 0.621371
}

get speedInKmSec() {
return this.speed / 3600 + " kmSec"
}

}



const audi = new Car("audi","red","gas")
const tesla = new Car("tesla",'red', "electric")

audi.paint('blue')

// audi.speedKmH = 220
tesla.speedKmH = 350

// we call getter without paranthies

// console.log(audi.hasTheSameProperties(tesla))
30 changes: 30 additions & 0 deletions class-17-js-review/abdulrahman-deniz/bootcamp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"title":"Turkey Bootcamp",
"instructors":["Halit", "Muhannad", "Shrreya", "Ammar"],
"students" : [
"Abduallah barmu",
"Abdulkadir İsa Tekinkaya",
"Ali Rıza Şahin",
"AYSE CIMEN BASAR",
"Ayşe Saflo",
"aziza iliasova",
"Belal Awad",
"Buse Şentürk",
"Ceyhun Gülbaş",
"Derya Kaygisiz",
"Hafise Nur Bacaksız",
"Khadija hawa",
"Kutay Kağan Özen",
"Mahmoud Moulham Hallak",
"MHD ABDULRAHMAN TAJI",
"Mohamad Moumen Hallak",
"Mohamad Ziada",
"Mohammed Alalaya",
"Muhammed Menar Yazıcı",
"Mustafa Şükrü Güldağ",
"Nidal Alrifai",
"Rahaf Shora",
"Ufuk Deniz Demirbilek",
"Yeşim Nur Akar"
]
}
28 changes: 28 additions & 0 deletions class-17-js-review/abdulrahman-deniz/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<h3>A list of students first name</h3>
<div id="studentsFirstName"></div>
<hr>
<h3>A list of students names start with "M"</h3>
<div id="studentsNamesStartWthM"></div>
<hr>
<h3>Number of students names starts with "A"</h3>
<div id="NumberOfStudentsNamesStartsWithA"></div>
<hr>
<h3>Index of first student name starts with "H"</h3>
<div id="IndexOfFirstStudentNameStartsWithH"></div>

<script src="script.js">
</script>
</body>

</html>
103 changes: 103 additions & 0 deletions class-17-js-review/abdulrahman-deniz/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
//Partners Abdulrahman Taji and Deniz

// Q1: Write a variable that fetches the data from bootcamp.json and uses `await` to store it. We didn't learn await; you will have to practice your Google skills to look up an example (it's similar to .then()).
// To be clear:
// * jsonResult is not a function. When you console.log it, it should be an object
// * it should not depend on any variables outside of scope
// * it should not modify any other variables
//
// Every question after question 1 should look something like:
// jsonResult.map(), jsonResult.filter(), etc.
// const jsonResult = <<your code here>>;

async function getJson () {
const response = await fetch("./bootcamp.json");
const data = await response.json();
// console.log(data)
return data;
}


// Q2: Using map(), write a function that returns a new array with the students' first names with "-" before each one and displays it in the div with ID "studentsFirstName".

async function q2 () {
const div = document.querySelector('#studentsFirstName')
const object = await getJson()
const result = object.students.map(element => "-" + element)
div.innerHTML = result
}
q2()

// Q3: Using filter(), write a function that returns an array with students' names that starts with the letter 'm' and display it in the div with ID "studentsNamesStartWthM".

async function q3 () {
const div = document.querySelector('#studentsNamesStartWthM')
const object = await getJson()
const result = object.students.filter(student => student.charAt(0) === "M" || student.charAt(0) === "m" )
div.innerHTML = result
}
q3()

// Q4: Using reduce(), Write a function that returns the number of students that their first name start with the letter 'a' using reduce and display it in div with ID "NumberOfStudentsNamesStartsWithA"

async function q4 () {
const div = document.querySelector('#NumberOfStudentsNamesStartsWithA')
const object = await getJson()
const result = object.students.reduce((acc,curr) => {
if (curr.charAt(0) === "A" || curr.charAt(0) === "a")
{return acc + 1}
return acc},0)
div.innerText = result
}
q4()

// Q5: Write a function that returns the index of the first student name that starts with the letter 'h' and display it in the div with ID "IndexOfFirstStudentNameStartsWithH".


async function q5 () {
const div = document.querySelector('#IndexOfFirstStudentNameStartsWithH')
const object = await getJson()
const result = object.students.findIndex(word => word.charAt(0) === "H" || word.charAt(0) === "h")
div.innerText = result
}
q5()

// Q6: Write a function that adds the instructors array to the beginning of the students array and returns a new array called everybody.
// 1) Console log the new array
// 2) Use a spread operator to achieve this

async function q6 () {
const object = await getJson()
const result = [...object.instructors, ...object.students]
console.log(result)
}
// q6()

// Q7: Write a function to update the key: "title" to the value "Re:Coded Istanbul Bootcamp" to the object that you fetched in Q1.
// Did this modify the JSON file? Why or why not?

async function q7() {
const object = await getJson()
object.title = "Re:Coded Istanbul Bootcamp"
console.log(object)
}
q7()
//It didn't change the JSON, it only changed the local object that is in memory and in this function scope which is created from the JSON file.

// Q8: Write a function to add the key: "program manager" and the value "Jaime Mikush" to the object that you fetched in Q1.

async function q8() {
const object = await getJson()
object["program manager"] = "Jaime Mikush"
// console.log(object)
}
q8()

// Q9: Print the object that you fetched in Q1.

async function q9() {
const object = await getJson()
// console.log(object)
}
q9()
// good luck 😈
Empty file.
23 changes: 23 additions & 0 deletions final-board-project/Board/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
Binary file added final-board-project/Board/Board.zip
Binary file not shown.
70 changes: 70 additions & 0 deletions final-board-project/Board/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
Loading