Skip to content

Instantly share code, notes, and snippets.

View robertleeplummerjr's full-sized avatar

Robert Plummer robertleeplummerjr

View GitHub Profile
class ReactUnitComponent {
constructor(reactComponent = {}, parent = null, root) {
this.type = reactComponent.type;
let key = this.key = reactComponent.key;
let ref = this.ref = reactComponent.ref;
console.log(reactComponent._store);
const { _store } = reactComponent;
const { props: storeProps } = _store || {};
this.props = Object.assign({ key, ref },
//current code
var h0 = this.multiply(hiddenMatrix.weight, inputVector, this);
var h1 = this.multiply(hiddenMatrix.transition, hiddenPrev, this);
var hiddenD = this.relu(this.add(this.add(h0, h1, this), hiddenMatrix.bias, this), this);
//psuedo strongeryly typed relationship of above code
hiddenMatrix.weight.next = inputVector;
hiddenMatrix.weight.action = multiply;
hiddenMatrix.transition.next = hiddenPrev;
var fs = something(require('fs'));
fs.readFile('')
.then(function(str) {})
.then(function() {})
.done(function() {})
.error(function (err) {
//this is an optional fn that is already defined to throw the error, but can be overridden
@robertleeplummerjr
robertleeplummerjr / index.html
Last active March 22, 2021 22:40
Many polygons with leaflet experiment upgrade to latest earcut
<!doctype html>
<html>
<head>
<title>Many polygons with leaflet, earcut and WebGL</title>
<meta charset="utf-8">
<style>
html, body {
height: 100%;
padding: 0;
@robertleeplummerjr
robertleeplummerjr / README.md
Last active November 26, 2015 14:35 — forked from dustinlarimer/README.md
Ant Colony Optimization in D3.js

Crude implementation of ACO in D3js, based on the awesome work of Joel Wenzel et al.

@robertleeplummerjr
robertleeplummerjr / RequestListener.js
Created October 29, 2015 14:34
XMLHttpRequest Listener
var XMLHttpRequest = window.XMLHttpRequest;
function RequestListener(objParameters) {
var self = this
, realRequest = this.realRequest = new XMLHttpRequest(objParameters)
;
realRequest.onload = function() {
if (self.onload) {
self.onload.apply(realRequest, arguments);
//depends on https://github.com/padolsey/operative
var jsonThreadedStreamer = (function (operative) {
var i = 0,
threads = [];
function thread() {
var t = threads[i],
limit = thread.limit;
@robertleeplummerjr
robertleeplummerjr / issue.js
Created March 18, 2015 20:22
Infamous merging issue in jQuery.sheet
var div = $('<div>')
.appendTo('body')
.append(tableify(' \t \t \t \t \n\
\t \t \t \t \n\
\t \t \t \t \n\
\t \t \t \t \n\
\t \t \t \t \n'))
.append(tableify(' \t \t \t \t \n\
\t \t \t \t \n\
\t \t \t \t \n\
@robertleeplummerjr
robertleeplummerjr / anchor.html
Created February 17, 2015 02:21
Medium.js with Anchor
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Medium.js to make an Anchor</title>
<script src="bower_components/undo/undo.js"></script>
<script src="bower_components/rangy-official/rangy-core.min.js"></script>
<script src="bower_components/rangy-official/rangy-classapplier.min.js"></script>
<script src="medium.js"></script>
<link href="medium.css" rel="stylesheet">
@robertleeplummerjr
robertleeplummerjr / iframe.html
Created February 12, 2015 17:02
Medium.js with IFrame
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Medium.js with an Iframe</title>
<script src="bower_components/undo/undo.js"></script>
<script src="bower_components/rangy-official/rangy-core.min.js"></script>
<script src="bower_components/rangy-official/rangy-classapplier.min.js"></script>
<script src="medium.js"></script>
<link href="medium.css" rel="stylesheet">