В стандартных реализациях поддерживаюся
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
| /** | |
| * Create array of unique entries in dataset (not deep) | |
| * @Example | |
| * const data = [ { regionId: 123, indicatorId: 345 }, { regionId: 123, indicatorId: 345 }, { regionId: 678, indicatorId: 910 }] | |
| * extractListFrom('regionId', 'indicatorId')(data); | |
| */ | |
| export function extractListFrom(...args) { | |
| const accum = args.reduce((ac, arg) => { ac[arg] = new Set(); return ac }, {}); | |
| return data => data.reduce((acc, m) => { | |
| Object.keys(acc).forEach(key => acc[key].add(m[key])) |
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 data = | |
| [ | |
| { | |
| "val": 30, | |
| "children": [ | |
| { | |
| "val": 123, | |
| "children": [ | |
| { |
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
| { | |
| "childrens": [ | |
| { | |
| "name": "foo_lvl_1", | |
| "childrens": [ | |
| { | |
| "name": "foo1_lvl_2", | |
| "value": 13 | |
| }, | |
| { |
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
| /** | |
| * Find branch in tree by omen pair - key-value | |
| * @param {Object} omen - how to find branch. Example - { id: 123456 } | |
| * @param {Object} options [{children: 'children', returnChild: true}]; | |
| * @param {Boolean} options.returnChild - | |
| * if true return branch started from found child, | |
| * else return whole branch where child founded | |
| */ | |
| function findBranchByOmen(omen, options) { | |
| const [[omenProp, omenValue]] = Object.entries(omen); |
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
| export function chainQueries(queries) { | |
| const defaultOptions = { errorPolicy: 'all' }; | |
| const checkLoadingAndError = allData => allData.loading || allData.error; | |
| const maybeFunction = (t, args) => typeof t === 'function' ? t(args) : t; | |
| const findQueryName = query => query.definitions[0].selectionSet.selections[0].name.value; | |
| const queryNamesBuffer = []; | |
| const pipeline = queries.map((q, i)=> { | |
| if (q.kind === 'Document') { // Not sure about this way for detect query |
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
| bumblebeed -vv --driver nvidia # start demon in debug mode | |
| optirun -vvv glxgears # start optirun in debug mode | |
| grep -i glx /var/log/Xorg.0.log # glx loading log |
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
| Cross-Origin Read Blocking (CORB) blocked cross-origin response http://0.0.0.0:8612/graphql with MIME type application/json. | |
| See https://www.chromestatus.com/feature/5629709824032768 for more details. |
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
| export default class Watcher { | |
| constructor() { | |
| this._mem = []; | |
| } | |
| _compareFunction(val1, val2) { | |
| return Object.is(val1, val2); | |
| } | |
| setCallbacks(callbacks) { |
- Leaflet https://geo.by/navigation/map#13/53.89427433456289/27.556114196777344
- Mapbox https://api.mapbox.com/styles/v1/mapbox/streets-v9.html?title=true&access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4M29iazA2Z2gycXA4N2pmbDZmangifQ.-g_vE53SD2WrJ6tFX7QHmA#2.6/40.76/-37.17
https://docs.mapbox.com/mapbox-gl-js/example/dancing-buildings/