This file contains hidden or 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
const calculator = require('field-change-effects-calculator'); | |
const changesCalculator = calculator(rules); | |
const calculateChanges = (event) => { | |
const state = getState() | |
const { name, value } = event.target | |
const changes = changesCalculator(state)(name, ['path', 'of', 'field', 'in', 'the', 'state', 'object'], value) | |
return changes | |
} |
This file contains hidden or 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
const rules = { | |
country: [ | |
{ | |
name: 'phoneNumber', | |
path: ['fields', 'phoneNumber'], | |
props: (countryNewValue, state) => ({ | |
editable: countryNewValue && countryNewValue !== '', | |
countryPhoneCode: countryPhoneCodeMapper[countryNewValue] | |
}) | |
} |
This file contains hidden or 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
.OpsPortalCore { | |
width: 100%; | |
height: 100%; | |
padding-top: 50px; | |
} | |
.chargeInput input { | |
color: rgba(255, 255, 255, 1) !important; | |
text-align: center !important; | |
background-color: rgba(13, 93, 184, 1) !important; |
This file contains hidden or 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
/** | |
*** SIMPLE GRID | |
*** (C) ZACH COLE 2016 | |
**/ | |
@import url(https://fonts.googleapis.com/css?family=Lato:400,300,300italic,400italic,700,700italic); | |
/* UNIVERSAL */ | |
html, |
This file contains hidden or 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
/*** OVERRIDES of Image Gallery Component by Copart Team ***/ | |
.image-gallery-thumbnail { | |
display: inline-block; | |
} | |
.image-gallery-thumbnails { | |
background: none; | |
} | |
.image-gallery-thumbnail { | |
padding: 0 2px; |
This file contains hidden or 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
/* | |
Note by Revanth: | |
We modified this specifically for UK Engineering. | |
*/ | |
@charset "UTF-8"; | |
/*! | |
Ionicons, v2.0.0 | |
Created by Ben Sperry for the Ionic Framework, http://ionicons.com/ |
This file contains hidden or 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 Node(val) { | |
this.val = val | |
this.rightCount = 1 | |
this.left = null | |
this.right = null | |
} | |
/** | |
* @param {number} k | |
* @param {number[]} nums |
This file contains hidden or 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
class Relationship { | |
constructor(root) { | |
this.relObj = {} | |
this.iterate(root, null, 0) | |
} | |
iterate(root, parent, level) { | |
if (root) { | |
this.relObj[root.val] = { level: level, parent: parent } | |
this.iterate(root.left, root, level + 1) |
This file contains hidden or 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
class Stack { | |
constructor(root) { | |
this.stack = [] | |
while (root) { | |
this.stack.push(root) | |
root = root.left | |
} | |
} | |
hasNext() { |
This file contains hidden or 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
const hashMap = {} | |
function countNumberOfWays (steps) { | |
if (steps <= 0) { | |
return 0 | |
} else if (steps === 1) { | |
return 1 | |
} else if (steps === 2) { | |
return 2 | |
} else { |