This text is italic This text is italic
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
// define window variables for storage | |
window.storedLocation = ''; | |
window.usageData = { | |
screenCount: {}, | |
flows: {}, | |
clicksFeed: [], | |
location: { | |
latitude: '', | |
longitude: '', | |
}, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
* { | |
box-sizing: border-box; | |
} | |
.outer { | |
background-color: blue; |
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
MongoDB | |
NoSQL Database - Document Database Type in NoSQL | |
Data is stored in json like syntax | |
Good to use when there is no ton of inter connected relations | |
Database, Collections, Document | |
data/db folder inside MongoDB |
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
var obj = { | |
a: 5, | |
b: 10, | |
add: function() { | |
return this.a + this.b; | |
}, | |
}; | |
console.log('1: ', obj.add()); | |
var another = obj.add; |
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
// Reference: https://levelup.gitconnected.com/learn-redux-by-building-redux-from-scratch-dcbcbd31b0d0 | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<div>Random Count: <span id="count"></span></div> |
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
def getBestTwoTestScores(score1, score2, score3): | |
if score1 >= score2: | |
x = score1 | |
if score2 >= score3: | |
y = score2 | |
else: | |
y = score3 | |
if score2 >= score3: | |
x = score2 |
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
import math | |
class ClassRoom: | |
students = { } | |
mean = 0 | |
stdDeviation = 0 | |
def get_total_students(self): | |
return len(self.students) | |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"os" | |
) | |
type content struct { |
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
// Anagram Check | |
const anagram = (str1, str2) => helper(str1) === helper(str2); | |
const helper = (str) => str.toLowerCase().split('').sort().join(''); | |
console.log('Anagram: ', anagram('Dormitory', 'DirtyRoom')); | |
const getChunkArray = (arr, len) => { | |
const chunkArray = []; | |
let i = 0; |
NewerOlder