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
(function() { | |
function getTracks() { | |
var tracks = []; | |
$('.section-player').each(function() { | |
tracks.push({ | |
title: $(this).find('.track_name').text().replace(/\s+/g, ' ').trim() + '.mp3', | |
url: $(this).find('.dl').find('a').attr('href'), | |
}); | |
}); | |
return tracks; |
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
function getValues(line) { | |
return line.split(' ').map((i) => Number(i)); | |
} | |
function processData(input) { | |
var lines = input.split('\n'); | |
var inputValues = getValues(lines[0]); | |
var array = getValues(lines[1]); | |
fastest(inputValues[0], inputValues[1], array); |
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 { assert } = require('chai'); | |
function isError(e) { | |
if (typeof e === 'string') { | |
return Promise.reject(new Error(e)); | |
} | |
return Promise.resolve(e); | |
} | |