Virtual grid with that works like a flat spatial index
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 intersection(...lists) { | |
const result = []; | |
const resultLUT = {}; | |
for(let i = 0; i < lists.length; i++) { | |
const currentList = lists[i]; | |
for(let y = 0; y < currentList.length; y++) { | |
const currentValue = currentList[y]; | |
if(!resultLUT[currentValue]) { | |
let existsInAll = true; |
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
pipeline { | |
agent { dockerfile true } | |
environment { | |
npm_config_cache = 'npm-cache' | |
} | |
stages { | |
stage('Install') { | |
steps { | |
echo 'Ensure SSH keys' | |
// set the credentials to be able to access private repos |
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 React, { useReducer, Reducer, createContext, ReactNode, Dispatch } from "react"; | |
type Action = <A>(dispatch: Dispatch<A>) => Function; | |
export default function <S, A extends Action>( | |
reducer: Reducer<S, A>, | |
actions: Record<string, A>, | |
initialState: S | |
) { | |
const Context = createContext<S>({} as S); |
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
var isArray = Array.isArray; | |
class EventTarget { | |
/** | |
* @param {string} name | |
* @param {function} cb | |
* @return {EventTarget} | |
*/ |
Drag from an existing node to add a new node or link. Click to select/deselect nodes/links. Hit the DELETE key to remove the selected node or link. Drag to pan. Scroll to zoom.
Built with D3.js.
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
export default function sortedArrayToBST(data) { | |
let root = {}; | |
const Q = [root]; | |
const stack = [0, data.length - 1]; | |
while (Q.length !== 0) { | |
const right = stack.pop(); | |
const left = stack.pop(); | |
const cur = Q.pop(); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
license: mit | |
height: 500 | |
border: no |
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 React, { PureComponent } from "react"; | |
import { StyleSheet } from "react-native"; | |
import ReglView from "./ReglView"; | |
import mat4 from "gl-mat4"; | |
import bunny from "bunny"; | |
export default class Bunny extends PureComponent { | |
drawCommand = regl => { | |
return regl({ | |
vert: ` |