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 readline = require("readline").createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
}); | |
readline.question("Insert a Number: ", (number) => { | |
for (i = 0; i < number; i++) { | |
a = 1; | |
b = 1; | |
c = 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
def pipeline(*funcs): | |
def helper(arg): | |
argCount = len(funcs) | |
if argCount > 0: | |
res = [] | |
for elem in funcs: | |
if(len(res) > 0): | |
helper = elem(res.pop()) | |
else: | |
helper = elem(arg) |
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
def unique_names(names1, names2): | |
names1 = list(dict.fromkeys(names1)) | |
names2 = list(dict.fromkeys(names2)) | |
names1.extend(x for x in names2 if x not in names1) | |
return names1 | |
names1 = ["Ava", "Emma", "Olivia"] | |
names2 = ["Olivia", "Sophia", "Emma"] | |
print(unique_names(names1, names2)) # should print Ava, Emma, Olivia, Sophia |
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
SELECT name | |
FROM employees | |
WHERE id NOT IN (SELECT managerId FROM employees WHERE managerId IS NOT NULL); |
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
SELECT DISTINCT userId, AVG(duration) | |
FROM sessions | |
GROUP BY userId | |
HAVING COUNT(userId) > 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
<!DOCTYPE html><html><head><meta name="google" content="notranslate"><meta http-equiv="X-UA-Compatible" content="IE=edge;"><style>@font-face{font-family:'Roboto';font-style:italic;font-weight:400;src:local('Roboto Italic'),local('Roboto-Italic'),url(//fonts.gstatic.com/s/roboto/v18/KFOkCnqEu92Fr1Mu51xIIzc.ttf)format('truetype');}@font-face{font-family:'Roboto';font-style:normal;font-weight:300;src:local('Roboto Light'),local('Roboto-Light'),url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fBBc9.ttf)format('truetype');}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;src:local('Roboto Regular'),local('Roboto-Regular'),url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxP.ttf)format('truetype');}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:local('Roboto Bold'),local('Roboto-Bold'),url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfBBc9.ttf)format('truetype');}</style><meta name="referrer" content="origin"><title>SanFrancisco_Neighborhoods.json - Google |