Skip to content

Instantly share code, notes, and snippets.

@maccesch
maccesch / CytoscapeDotLayout.ts
Created November 7, 2018 11:11
cytoscape.js dot layout using viz.js
import Viz from 'viz.js';
import {Module, render} from 'viz.js/full.js.opaque';
function CytoscapeDotLayout(options) {
this.options = options;
}
CytoscapeDotLayout.prototype.run = function () {
let dotStr = 'digraph G {';
@maccesch
maccesch / iTween.cs
Last active June 30, 2020 03:48
Unity3D iTween patched to work in the new Unity GUI (uGUI).
// Copyright (c) 2011 Bob Berkebile (pixelplacment)
// Please direct any bugs/comments/suggestions to http://pixelplacement.com
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
@maccesch
maccesch / lagrange.js
Created May 27, 2011 12:27
Lagrange Polynomial Interpolation. Example: http://jsfiddle.net/maccesch/jgU3Y/
/**
* At least two points are needed to interpolate something.
* @class Lagrange polynomial interpolation.
* The computed interpolation polynomial will be reffered to as L(x).
* @example
* var l = new Lagrange(0, 0, 1, 1);
* var index = l.addPoint(0.5, 0.8);
* console.log(l.valueOf(0.1));
*
* l.changePoint(index, 0.5, 0.1);