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
// passing 100% of tests | |
function getStartPosition(m) { | |
let position = ''; | |
m.forEach((row, x) => { | |
const cells = row.split(''); | |
const y = cells.indexOf('*'); | |
if (y !== -1) { | |
position += x + ','; | |
position += y; | |
} |
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
[ | |
{ "keys": ["ctrl+shift+n"], "command": "new_window" }, | |
{ "keys": ["ctrl+shift+w"], "command": "close_window" }, | |
{ "keys": ["ctrl+o"], "command": "prompt_open_file" }, | |
{ "keys": ["ctrl+shift+t"], "command": "reopen_last_file" }, | |
{ "keys": ["alt+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} }, | |
{ "keys": ["ctrl+n"], "command": "new_file" }, | |
{ "keys": ["ctrl+s"], "command": "save" }, | |
{ "keys": ["ctrl+shift+s"], "command": "prompt_save_as" }, | |
{ "keys": ["ctrl+f4"], "command": "close_file" }, |
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
/* eslint-disable no-console */ | |
/* eslint-disable no-undef */ | |
window.client = (function() { | |
function getTimers(success, onError) { | |
return fetch('/api/timers', { | |
// tell the server we'll only accept a JSON response | |
headers: { | |
Accept: 'application/json', | |
}, | |
}).then(checkStatus) |
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 TimersDashboard = React.createClass({ | |
getInitialState: function() { | |
return { | |
timers: [], | |
serverError: false, | |
timerError: false, | |
}; | |
}, |
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
// get element Y position | |
function elmYPosition(eID) { | |
var elm = document.getElementById(eID), | |
y = elm.offsetTop - 65, | |
node = elm; | |
while (node.offsetParent && node.offsetParent != document.body) { | |
node = node.offsetParent; | |
y += node.offsetTop; | |
} | |
return y; |
NewerOlder