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
Sure, here are the steps on how to set up a staging server on GoDaddy, numbered: | |
1. Go to the GoDaddy website and log in to your account. | |
2. Click on the **Hosting** tab and select the **Staging Servers** option. | |
3. Click on the **Create Staging Server** button. | |
4. Enter the following information: | |
* The name of your staging server | |
* The domain name of your staging server | |
* The operating system for your staging server | |
* The amount of storage space you need for your staging server |
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
// -- The "API" fakes | |
const surveys = [ | |
{ id: "surveyID-01",name: "Survey A" }, | |
{ id: "surveyID-02",name: "Survey B" }, | |
] | |
const prompts = [ | |
{ | |
id: 'promptId-01', | |
survey_id: 'surveyID-01', |
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
{ | |
"name": "date_trader", | |
"version": "0.0.1", | |
"description": "Basic CRUD template in React and Redux", | |
"main": "index.js", | |
"scripts": { | |
"start": "react-scripts start", | |
"build": "react-scripts build", | |
"test": "react-scripts test --env=jsdom", | |
"eject": "react-scripts eject" |
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
{ | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true, | |
"jest": true | |
}, | |
"extends": [ | |
"airbnb", | |
"plugin:jsx-a11y/recommended", |
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
// ANSWER: | |
function solution(A) { | |
// make a dictionary of expected values: O(n) | |
let map = [] | |
for (let i = 0; i < A.length + 1; i+= 1) { | |
map[i] = { num: i+1, bool: -1 } | |
} | |
// evaluate subset against dictionary, marking included values: O(n) |
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 solution(X, Y, D) { | |
let range = (Y - X); // max distance to go | |
// special cases | |
let hops = D === Y ? 0 : parseInt(range / D); // whole jumps [1] | |
let extra = range % D; // any left over hops required | |
console.log(`===>| X:${X} | Y:${Y} | D:${D} | range:${range} | hops:${hops} | extra:${extra} |`) | |
return extra ? hops + 1 : hops | |
} | |
// [1] parseInt() [at least in Chrome] exhibits wonky behavior when working with small fractions. For example: |
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
// ===== ANSWER: | |
function solution(A) { | |
let set = new Set(); // holds a unique set of values | |
let max = 1; // largest number in set | |
let min = 1; // smallest number in set | |
let n = A.length | |
for (let i = 0; i < n; i += 1) { | |
let num = A[i]; |
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
// ===== ANSWER | |
function solution(H) { | |
// write your code in JavaScript (Node.js 8.9.4) | |
let stack = []; | |
let count = 0; | |
let height = 0; | |
// adds a block to the stack when value exceeds current height | |
const addBlock = (value) => { |
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
##The Challenge | |
Given a string S and a set of words D, find the longest word in D that is a subsequence of S. | |
Word W is a subsequence of S if some number of characters, possibly zero, can be deleted from S to form W, without reordering the remaining characters. | |
Note: D can appear in any format (list, hash table, prefix tree, etc. | |
For example, given the input of S = "abppplee" and D = {"able", "ale", "apple", "bale", "kangaroo"} the correct output would be "apple" | |
The words "able" and "ale" are both subsequences of S, but they are shorter than "apple". |
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
const numCom = (x) => { | |
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
} |
NewerOlder