Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 34 additions & 0 deletions exercises/0000.App/assets/javascripts/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@


// Main JavaScript

/* Page Tags */
const body = document.querySelectorAll ("body");
const html = document.querySelectorAll ("html");
const button = document.querySelectorAll ("button");
const div = document.querySelectorAll ("div");
const span = document.querySelectorAll ("span");
const header = document.querySelectorAll ("header");
const aside = document.querySelectorAll ("aside");
const main = document.querySelectorAll ("main");
const footer = document.querySelectorAll ("footer");
const anchor = document.querySelectorAll ("a");
const image = document.querySelectorAll ("img");
const section = document.querySelectorAll ("section");
const ul = document.querySelectorAll ("ul");
const ol = document.querySelectorAll ("ol");
const li = document.querySelectorAll ("li");
const table = document.querySelectorAll ("table");
const thead = document.querySelectorAll ("thead");
const tbody = document.querySelectorAll ("tbody");
const tr = document.querySelectorAll ("tr");
const th = document.querySelectorAll ("th");
const td = document.querySelectorAll ("td");
const form = document.querySelectorAll ("form");
const link = document.querySelectorAll ("link");
const meta = document.querySelectorAll ("meta");
const script = document.querySelectorAll ("script");
const blockquote = document.querySelectorAll ("blockquote");
const hr = document.querySelectorAll ("hr");
const br = document.querySelectorAll ("br");
/* Page Tags end */
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions exercises/0000.App/assets/styles/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@


/* Main Stylesheet */

* {
margin: 0;
padding: 0;
transition: all .3s ease-in-out;
}

html {
box-sizing: border-box;
position: relative;
}

body {}

a:hover {
cursor: pointer;
}

button {
padding: .5em;
border: 1px solid black;
border-radius: 5%;
}

button:hover {
cursor: pointer;
background-color: black;
color: azure;
border: 1px solid azure;
border-radius: 5%;
}

li {
cursor: pointer;
}

.clear {}
41 changes: 41 additions & 0 deletions exercises/0000.App/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@


<!DOCTYPE html>

<html>
<head>
<!-- Page Title -->
<title>Page Title</title>
<!-- Page Title ends -->

<!-- Meta Tags -->
<meta charset="UTF-8">
<meta name="description" content="Page description here.. .">
<meta name="keywords" content="page, keywords, here">
<meta name="author" content="Sharif Jobayed">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Meta Tags end -->

<!-- Internal Stylesheets -->
<link rel="stylesheet" href="./assets/styles/main.css">
<!-- Internal Stylesheets end -->

<!-- External Stylesheets -->
<!-- External Stylesheets ends -->

<!-- Site Favicon -->
<link rel="shortcut icon" href="./assets/media/images/SJ Logos & Banners/favicon.png" type="image/x-icon">
<!-- Site Favicon ends -->
</head>

<body>


<!-- Internal JavaScripts -->
<script src="./assets/javascripts/main.js"></script>
<!-- Internal JavaScripts end -->

<!-- External JavaScripts -->
<!-- External JavaScripts end -->
</body>
</html>
70 changes: 70 additions & 0 deletions exercises/0001.MapGameGraphicOptions/assets/javascripts/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

const graphicOptions = new Map(
[
[`Textures`, `High`],
[`Shadows`, `Medium`],
[`AntiAliasing`, `TAA or FXAA`],
[`AmbientOcclusion`, `SSAO`],
[`Lighting`, `High`],
[`Effects`, `Medium`],
[`PostProcessing`, `High (Motion Blur Off)`],
[`Reflections`, `Medium`],
[`SSR`, `Medium`],
[`WaterQuality`, `Medium`],
[`Foliage`, `Medium`],
[`VolumetricEffects`, `Medium`],
[`MotionBlur`, `Off`],
[`DepthOfField`, `Medium`],
[`Tessellation`, `Off or Low`],
[`MeshQuality`, `High`],
[`ParticleQuality`, `Medium`],
[`TerrainQuality`, `High`],
[`ViewDistance`, `Medium to High`],
[`FOV`, `90-100 degrees`],
[`vSync`, `Off (or Adaptive in drivers)`],
[`DynamicResolutionScaling`, `Off`],
[`FutureFrameRendering`, `On`],
[`HairRendering`, `Off or Low`],
[`RayTracing`, `Off`],
[`SubsurfaceScattering`, `Medium`],
[`AdvancedPhysX`, `Off`],
[`Bloom`, `On (Medium)`],
[`ChromaticAberration`, `Off`],
[`SharpeningFilter`, `On (Low to Medium)`],
[`FilmGrain`, `Off`],
]
);

console.log(graphicOptions.size);

// Sorted by Key
const sortedByKey = new Map(
[...graphicOptions.entries()].sort((a, b) => a[0].localeCompare(b[0]))
);

console.log("Sorted by Key:");
console.log(sortedByKey);

// Sorted by Value
const sortedByValue = new Map(
[...graphicOptions.entries()].sort((a, b) => a[1].localeCompare(b[1]))
);

console.log("Sorted by Value:");
console.log(sortedByValue);

// Reverse Sorted by Key
const reverseSortedByKey = new Map(
[...graphicOptions.entries()].sort((a, b) => b[0].localeCompare(a[0]))
);

console.log("Reverse Sorted by Key:");
console.log(reverseSortedByKey);

// Reverse Sorted by Value
const reverseSortedByValue = new Map(
[...graphicOptions.entries()].sort((a, b) => b[1].localeCompare(a[1]))
);

console.log("Reverse Sorted by Value:");
console.log(reverseSortedByValue);
40 changes: 40 additions & 0 deletions exercises/0001.MapGameGraphicOptions/assets/styles/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@


/* Main Stylesheet */

* {
margin: 0;
padding: 0;
transition: all .3s ease-in-out;
}

html {
box-sizing: border-box;
position: relative;
}

body {}

a:hover {
cursor: pointer;
}

button {
padding: .5em;
border: 1px solid black;
border-radius: 5%;
}

button:hover {
cursor: pointer;
background-color: black;
color: azure;
border: 1px solid azure;
border-radius: 5%;
}

li {
cursor: pointer;
}

.clear {}
41 changes: 41 additions & 0 deletions exercises/0001.MapGameGraphicOptions/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@


<!DOCTYPE html>

<html>
<head>
<!-- Page Title -->
<title>Page Title</title>
<!-- Page Title ends -->

<!-- Meta Tags -->
<meta charset="UTF-8">
<meta name="description" content="Page description here.. .">
<meta name="keywords" content="page, keywords, here">
<meta name="author" content="Sharif Jobayed">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Meta Tags end -->

<!-- Internal Stylesheets -->
<link rel="stylesheet" href="./assets/styles/main.css">
<!-- Internal Stylesheets end -->

<!-- External Stylesheets -->
<!-- External Stylesheets ends -->

<!-- Site Favicon -->
<!-- <link rel="shortcut icon" href="./assets/media/images/SJ Logos & Banners/favicon.png" type="image/x-icon"> -->
<!-- Site Favicon ends -->
</head>

<body>


<!-- Internal JavaScripts -->
<script src="./assets/javascripts/main.js"></script>
<!-- Internal JavaScripts end -->

<!-- External JavaScripts -->
<!-- External JavaScripts end -->
</body>
</html>
77 changes: 77 additions & 0 deletions exercises/0002.promises/assets/javascripts/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

// A Veriable
let v = 50;

// Create a Promise
let p = new Promise((resolve, reject) => {
if (v === 50) {
resolve(`The "v" veriable is 50`);
} else {
reject(`The "v" veriable is not 50`);
}
});

// Output the Promise
p
.then((message/*then takes "resolve" into the message*/) => {
console.log(message);
})
.catch((message/*catch takes "reject" into the message*/) => {
console.log(message);
});

/*----------------------------------------------------------------------*/

let a = 80;

var p1 = new Promise((parameterA, parameterB) => {
if (p1 === 78) {
parameterA(`The veriable "a" is equal to 78`);
} else {
parameterB(`The veriable "a" is not equal to 78`);
}
});

p1
.then((result) => {
console.log(result);
})
.catch((result) => {
console.log(result);
});

/*----------------------------------------------------------------------*/

let value = 1000;

const PROMISE_01 = new Promise((resolve, reject) => {
if (value <= 1000) {
resolve("Promise resolved");
} else if (value > 1000) {
reject("Promise rejected");
} else {
throw new Error("Promise returns invalid");
}
});

PROMISE_01
.then((result) => {
console.log(result);
})
.catch((error) => {
console.log(error);
})
.finally(() => {
console.log("The promise has been settled.");
});

/*----------------------------------------------------------------------*/

let value2 = 800;

Promise.resolve(value2)
.then(() => {
console.log(`Short promise works!`)
});

/*----------------------------------------------------------------------*/
40 changes: 40 additions & 0 deletions exercises/0002.promises/assets/styles/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@


/* Main Stylesheet */

* {
margin: 0;
padding: 0;
transition: all .3s ease-in-out;
}

html {
box-sizing: border-box;
position: relative;
}

body {}

a:hover {
cursor: pointer;
}

button {
padding: .5em;
border: 1px solid black;
border-radius: 5%;
}

button:hover {
cursor: pointer;
background-color: black;
color: azure;
border: 1px solid azure;
border-radius: 5%;
}

li {
cursor: pointer;
}

.clear {}
Loading