-
CORS is a mechanism which uses additional http headers to tell the browser whether a specefic web app can share resource with another web app (only if they have different origin)
-
In same origin can share resources very easily
-
Back then, when CORS was not standardize browser never allow applications to share resources between different origins.
- A url redirect is a process that navigates a user from one url to another
- Sometimes we need to redirect a user to a different page in our website without them clicking on a link
- We can use javascript to navigate through the history
-
http://www.letstravelsomewhere.com/ (I like the arrow down button for display of pages idea, it gives a story telling vibe.) Humans understand more in terms of stories. -Yuval Noah Harari
-
https://onomatet.com/ (This is rather simple yet modern looking website with geometrical vibe.) Simplicity is the ultimate sophistication.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Recro https://recro.io/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Write a program to find out if two rectangles R1 and R2 are overlapping? | |
const overlappingRectangle = ( | |
R1x1, | |
R1x2, | |
R1y1, | |
R1y2, | |
R2x1, | |
R2x2, | |
R2y1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//How to find the maximum occurring character in given String? | |
const maxOccuringChar = str => { | |
if (typeof str !== "string" || !str.length) { | |
return null; | |
} | |
const count = {}; | |
let max = 0; | |
let maxChar = null; |
I would like to pitch few ideas and suggestions for the home page of the website.
-
I was thinking of splitting home page into two parts.
-
Part one would be like this, more of a welcome page, with your full size picture in it, so that people could feel instantly connected, nice and warm. People should feel like they know the person they are seeking advice from. (from empathy point of view)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Inheritance example in js | |
class Rectangle { | |
constructor(length, width) { | |
this.length = length; | |
this.width = width; | |
} | |
Area() { | |
return this.length * this.width; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How do you find the length of the longest substring without repeating | |
//characters? | |
const longestSubstring = str => { | |
if (typeof str !== "string" || !str.length) { | |
return null; | |
} | |
const letters = str | |
.toLowerCase() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//How do you find the second highest number in an integer array? | |
const secondHighestNumber = arr => { | |
if (!Array.isArray(arr) || !arr.length) { | |
return null; | |
} | |
let largestNum = Math.max(...arr); | |
arr.splice(arr.indexOf(largestNum), 1); | |
let secondHighestNum = Math.max(...arr); |
NewerOlder