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(input, markers) { | |
return input.split('\n').map((line) => { | |
let lineRv = ""; | |
for(let i =0; i< line.length;i++){ | |
if (markers.includes(line[i])){ | |
i = line.length + 1; | |
} else { | |
lineRv += line[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
CREATE TABLE books ( | |
id SERIAL PRIMARY KEY, | |
title VARCHAR(100) NOT NULL, | |
primary_author VARCHAR(100) NULL | |
); | |
SELECT * FROM books WHERE title = 'goosebumps' | |
INSERT INTO books(title, author) VALUES | |
('goosebumps', 'R. L. Stine'); |
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
//GENERATES RANDOM HEX COLOR | |
function getRandomColor() { | |
var letters = '0123456789ABCDEF'; | |
var color = '#'; | |
for (var i = 0; i < 6; i++) { | |
color += letters[Math.floor(Math.random() * 16)]; | |
} | |
return color; | |
} |
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
$.ajax({ | |
type: "POST", | |
url: url, | |
data: JSON.stringify(data), | |
contentType: 'application/json', | |
success: function (resp) { | |
console.log("success") | |
} | |
}); |