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
file = File.open("input"); | |
lines = file.readlines | |
arr = [] | |
subA = [] | |
i = 0 | |
for line in lines do | |
i += 1 | |
n = line.to_i | |
if n > 0 |
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
import { types } from 'mobx-state-tree'; | |
const StatusModel = types | |
.model('StatusModel', { | |
statusValue: types.optional(types.enumeration('status', ['initial', 'loading', 'success', 'failed']), 'initial'), | |
statusResponseReasonMessage: types.maybe(types.string), | |
}) | |
.views(self => ({ | |
get isInitial() { | |
return self.statusValue === 'initial'; |
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
github - https://github.com/pvpshoot | |
vk - http://vkontakte.ru/pvpshoot | |
tw - https://twitter.com/pvpshoot | |
telegram - @pvpshoot |
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
const COLORS = { | |
blue: ['#1E88E5', '#90CAF9'], | |
brown: ['#6D4C41', '#D7CCC8'], | |
gray: ['#212121', '#BDBDBD'], | |
green: ['#388E3C', '#A5D6A7'], | |
red: ['#E53935', '#EF9A9A'], | |
orange: ['#F4511E', '#FFAB91'], | |
purple: ['#8E24AA', '#E1BEE7'], | |
yellow: ['#FFD600', '#FFF59D'], | |
} |
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
import { | |
applyMiddleware, | |
combineReducers, | |
compose, | |
createStore as createReduxStore, | |
} from 'redux'; | |
import { connectRoutes } from 'redux-first-router'; | |
import thunk from 'redux-thunk'; | |
import createHistory from 'history/createBrowserHistory'; |
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
{"lastUpload":"2018-03-10T09:18:02.381Z","extensionVersion":"v2.9.0"} |
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
const trace = tag => x => { | |
console.log(tag, x); | |
return x; | |
}; |
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
const patternMatch = (o, cond, or) => { | |
if (typeof o[cond] !== 'function') { | |
return or || null; | |
} | |
return o[cond](); | |
} | |
const TEST = { | |
lol(){ return: 'lol' }, |
This file has been truncated, but you can view the full file.
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(modules) { // webpackBootstrap | |
/******/ var parentHotUpdateCallback = this["webpackHotUpdate"]; | |
/******/ this["webpackHotUpdate"] = | |
/******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars | |
/******/ hotAddUpdateChunk(chunkId, moreModules); | |
/******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules); | |
/******/ } | |
/******/ | |
/******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars | |
/******/ var head = document.getElementsByTagName("head")[0]; |
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 Maybe{ | |
constructor(val){ | |
this._value = val; | |
} | |
static of = x => new Maybe(x); | |
isNothing = () => (this.__value === null || this.__value === undefined); | |
map = () => this.isNothing() ? Maybe.of(null) : Maybe.of(f(this.__value)); | |
NewerOlder