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
{ | |
"payment_auth": [ | |
{ | |
"id": 1, | |
"instrument_token": "aaa-bb" | |
}, | |
{ | |
"instrument_token": 2, | |
"id": 2 | |
}, |
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
mongoimport --port 27018 -d qanda -c qanda --type csv --fields question.string\(\),ans_1.string\(\),ans_2.string\(\),ans_3.string\(\),ans_4.string\(\),ans_5.string\(\),locationId.string\(\),status.boolean\(\) --columnsHaveTypes --file qanda.csv |
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
"use strict"; | |
function PriorityQueue() { | |
this.collection = []; | |
} | |
PriorityQueue.prototype.enqueue = function(element) { | |
if (this.isEmpty()) { | |
this.collection.push(element); | |
} else { |
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
//for nodejs | |
FROM node:carbon-alpine | |
WORKDIR /usr/src/app | |
COPY . . | |
RUN apk -U upgrade && npm install && npm install -g nodemon && rm -rf /var/cache/apk/* | |
EXPOSE 5000 | |
CMD ["npm", "run", "start:dev"] |
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
#use yield to make get calls | |
import requests | |
urls = ["https://jsonplaceholder.typicode.com/todos/1", | |
"https://jsonplaceholder.typicode.com/todos/2"] | |
#find number in a column-sorted and row-sorted 2D list | |
arr = [[1, 5, 9, 11], |
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
What will be the output of the code below? Explain your answer. | |
def extendList(val, list=[]): | |
list.append(val) | |
return list | |
list1 = extendList(10) | |
list2 = extendList(123,[]) | |
list3 = extendList('a') |
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
R&D Spend | Administration | Marketing Spend | State | Profit | |
---|---|---|---|---|---|
165349.2 | 136897.8 | 471784.1 | New York | 192261.83 | |
162597.7 | 151377.59 | 443898.53 | California | 191792.06 | |
153441.51 | 101145.55 | 407934.54 | Florida | 191050.39 | |
144372.41 | 118671.85 | 383199.62 | New York | 182901.99 | |
142107.34 | 91391.77 | 366168.42 | Florida | 166187.94 | |
131876.9 | 99814.71 | 362861.36 | New York | 156991.12 | |
134615.46 | 147198.87 | 127716.82 | California | 156122.51 | |
130298.13 | 145530.06 | 323876.68 | Florida | 155752.6 | |
120542.52 | 148718.95 | 311613.29 | New York | 152211.77 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
class ResourceNotFoundError extends Error { | |
constructor(...args) { | |
super(...args); | |
this.trace = args[0]; | |
this.name = "ResourceNotFoundError"; | |
Error.captureStackTrace(this, ResourceNotFoundError); | |
} | |
} | |
const getUser = (user_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
function (user, context, callback) { | |
// this rule requires the following configuration values: | |
// CAPTCHA_SECRET: a 32 bytes string that will be the shared secret between | |
// the rule and the webtask | |
// AUTH0_DOMAIN: your auth0 domain (e.g. account.auth0.com) | |
// CAPTCHA_REDIRECT: the URL for the webtask that will show and process CAPTCHA | |
// Put a specific client ID if you dont want CAPTCHA for every client | |
// if (context.clientID !== '[your client id]') |
OlderNewer