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 React, { useState, useEffect } from 'react' | |
import AspectRatio from 'react-aspect-ratio' | |
import handleViewport from 'react-in-viewport' | |
import BootstrapImage from 'react-bootstrap/Image' | |
// Utils | |
import { INIT, LOADING, LOADED } from '../../utils/constants' | |
// Scss | |
import './lazyImage.scss' |
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
// Globally Scoped Variables | |
var mickeyMouse = "Mickey Mouse" | |
let age = 90 | |
const creator = "Walt Disney" | |
doMagic() | |
function doMagic () { | |
console.log(`${mickeyMouse} is ${90} years old. He was created by ${creator}`) | |
} |
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
if(true) { | |
var globallyScoped = 'globallyScoped' | |
} | |
console.log(globallyScoped) | |
// returns | |
// globallyScoped |
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
function outer(){ | |
var variable1 = 'variable1' | |
const variable2 = 'variable2' | |
let variable3 = 'variable3' | |
function inner() { | |
console.log(variable1) | |
console.log(variable2) | |
console.log(variable3) | |
} |
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
function blockScope() { | |
if(true) { | |
// I am inside the block | |
var functionScopeVariable = 'functionScopeVariable' | |
const blockScopedVariable1 = 'blockScopedVariable1' | |
let blockScopedVariable2 = 'blockScopedVariable2' | |
} | |
console.log(functionScopeVariable) | |
console.log(blockScopedVariable1) |
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
function whatIsDisneyLand() { | |
// Functionally Scoped Variables | |
var themeParkLocation = "Disneyland is Happiest Place on Earth" | |
let question = "Have you been?" | |
const response = "Too Many Times" | |
console.log(`${themeParkLocation} ${question} ${response}`) | |
} |
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
// Globally Scoped Variables | |
var mickeyMouse = "Mickey Mouse" | |
let age = 90 | |
const creator = "Walt Disney" | |
doMagic() | |
function doMagic () { | |
console.log(`${mickeyMouse} is ${90} years old. He was created by ${creator}`) | |
} |
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
# To Delete Team Roles | |
lender = Lender.find(2327) | |
lender.team_roles.destroy_all | |
# To Create Team Roles, associate team role with existing loan files (if applicable), and set default to true (if applicable) | |
teams = [1368, 1600, 1520, 1154, 1596, 1440, 1442, 1463, 1457, 1374, 1377, 1458, 1583, 1714, 1152, 1475, 1439, 1218, 1593, 1444, 1433, 1507, 1698, 1412, 1397, 1363, 1487, 1361, 1379, 1420, 1454, 1409, 1362, 1465, 1427, 1445, 1485, 1604, 1699, 1506, 1474, 1403, 1586, 1148, 1364, 1434, 1408, 1513, 1150, 1384, 1483, 1484, 1373, 1438, 1149, 1605, 1488, 1548, 1776, 1452, 1503, 1153, 1505, 1429, 1481, 1493, 1517, 1467, 1450, 1468, 1472, 1576, 1636, 1460, 1461, 1549, 980, 1490, 1478, 1432, 1446, 1694, 1151, 1510, 1612, 1219, 1389, 1441, 1508, 1428, 1599, 1217, 1437, 1391, 1500, 1410, 1464, 1497, 1701, 1456, 1386, 1489, 1477, 1371, 1592, 1394, 1502, 1491, 1406, 1390, 1591, 1383, 1376, 1518, 1398, 1511, 1365, 1220, 1606, 1713, 1607, 1215, 1367, 1417, 1515, 1393, 1521, 1421, 1436, 1550, 1501, 1405, 1575, 1431, 151 |
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 React from 'react' | |
import jsxToString from 'jsx-to-string' | |
import BootstrapModal from 'components/utils/bootstrap_modal' | |
import Spinner from 'components/utils/spinner' | |
export class DemoModal extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
show: false, |
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
handleChange = (event) => { | |
const { target: { name, value } } = event | |
this.setState({ [name]: value }) | |
} |
NewerOlder