Crude implementation of ACO in D3js, based on the awesome work of Joel Wenzel et al.
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
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 }, |
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
//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; |
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
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 |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Many polygons with leaflet, earcut and WebGL</title> | |
<meta charset="utf-8"> | |
<style> | |
html, body { | |
height: 100%; | |
padding: 0; |
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
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); |
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
//depends on https://github.com/padolsey/operative | |
var jsonThreadedStreamer = (function (operative) { | |
var i = 0, | |
threads = []; | |
function thread() { | |
var t = threads[i], | |
limit = thread.limit; |
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
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\ |
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
<!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"> |
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
<!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"> |