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 pipe = (...fns) => x => fns.reduce((y, f) => f(y), x); | |
const users = [ | |
{ name: "Jeff", age: 34 }, | |
{ name: "Jack", age: 28 }, | |
{ name: "Milady", age: 29 }, | |
]; | |
export const extractFirstName = cb => arr => arr.map(cb); | |
export const transformNames = cb => arr => arr.map(cb); |
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
/* | |
Your previous Markdown content is preserved below: | |
## Instructions | |
Welcome to Atrium's technical code challenge! | |
CoderPad will allow you to write and run code in the language of your choice. Switch the language in the upper right corner of the window. | |
Please complete the code challenge in no more than one hour from your scheduled time. Only code completed within one hour and developed within coderpad will be reviewed. |
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
/* | |
Your previous Markdown content is preserved below: | |
## Instructions | |
Welcome to Atrium's technical code challenge! | |
CoderPad will allow you to write and run code in the language of your choice. Switch the language in the upper right corner of the window. | |
Please complete the code challenge in no more than one hour from your scheduled time. Only code completed within one hour and developed within coderpad will be reviewed. |
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 https = require('https') | |
const request = require('request'); | |
const port = 3000; | |
const url = 'https://api.appspot.com/api/instagram/account/1'; | |
function makeRequest() { | |
request.get(url, function(error, response, body) { | |
console.log('response', response.statusCode) // 404 |
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: % FRS with Requests By Month 08089 | |
-- DISPLAY: Percent FRS with Requests By Month | |
-- ID 35146 | |
WITH | |
help_requested_sessions AS (SELECT DISTINCT session_id FROM is_oaklabs.production_mirror_events | |
WHERE event='help.requested' AND oakos_location LIKE '%08089%'), | |
help_requested_session_inits AS (SELECT DISTINCT h.session_id, e.event, e.event_timestamp, DATE_TRUNC('month', e.event_timestamp) FROM help_requested_sessions h | |
LEFT JOIN is_oaklabs.production_mirror_events e | |
ON h.session_id = e.session_id |
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
// [Log] Response From API Call Two On 'item.change' Event | |
var response = {}; | |
response.data = { | |
"product": { | |
"_id": "5620b8a8398a4b537d0df56d", | |
"id": 71048306, | |
"storeCode": "POLO", | |
"gc": 4259989, |
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 results = []; | |
var app = { | |
initialize: function() { | |
var arr = [ | |
this.generateMediaObj('imgs/avengers.jpg', "Avengers", "2012"), | |
this.generateMediaObj('imgs/blade_runner.jpg', "Blade Runner", "1982") | |
]; | |
/* eachLimit(arr, limit, iterator, callback) */ | |
async.eachLimit(arr, 1, this.makeRequest, this.onComplete); |
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 Media(boxCover, searchName, year) { | |
this.boxCover = boxCover; | |
this.searchName = searchName; | |
this.year = year; | |
this.genre = ""; | |
this.imdbRating = ""; | |
module.apiCall(this, module.init); | |
} | |
var module = { |
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
/* | |
A user makes a request via his parking meter app on his iPhone. | |
The request is received by the actual parking meter and it now has the user obj. | |
The parking meter finds the user by id. | |
It checks the status, and if its expired it returns a response saying its expired. | |
-- Waterfall BreakPoint -- | |
And if not, then by default the req body will have a minsToAdd prop (thats how they built it lol) |
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(host, guest, session, callback){ | |
sessionFindOne({sessionId: session.sessionId}).then(function(promisedSession) { | |
/* | |
This assert test checks that the original session's _id is the same as the session _id in the one that gets pulled down. | |
This test wil throw an error. | |
When you log the result instead of running an assert test the strings are identical but ... | |
console.log("identical looking session id used to find session" === "identical looking promised session id") ... |
NewerOlder