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
/** | |
* lol() | |
* improving the console.log through dynamic LULZ injection | |
* | |
* history | |
* - v0.0 RC - 2014-08-08 - 13h01 : initial release | |
* - v0.1 RC - 2014-08-08 - 13h29 : DogeScript support | |
* | |
* Licensed under WTFPL | |
* |
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
/** | |
* checks if a value has a given bit set to 1 | |
* @value the int / uint to test | |
* @mask the bits to check | |
**/ | |
function bit_isset( value, mask ) | |
{ | |
return ( value & mask ) != 0; | |
} |
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
/* | |
the quick sort method is described here : | |
http://antjanus.com/blog/web-development-tutorials/understanding-quicksort-js-native-implementation/ | |
*/ | |
function tripletSort( arr ) | |
{ |
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 console = (window.console = window.console || {}); | |
var original = console[ 'log' ]; | |
console[ "log" ] = function() | |
{ | |
var args = Array.prototype.slice.apply( arguments ); | |
original.apply( console, args ); | |
try | |
{ | |
throw new Error(); | |
} |
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 dijkstra( graph_array, source, target) | |
{ | |
//builds adjacency list | |
var vertices = []; | |
var neighbours = {}; | |
graph_array.forEach( function( edge ) | |
{ | |
//store the vertex 0 |
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
//sorts an array by storing highest values in the "center" | |
function sortGauss( array ) | |
{ | |
array.sort( function(a,b) | |
{ | |
return a - b; | |
}); | |
var a = []; | |
var b = []; | |
while( array.length > 0 ) |
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 bresenhamCircle( cx,cy,r ) | |
{ | |
var x = 0,y = r,p; | |
ctx.fillRect( cx+x,cy-y, 1, 1 ); | |
p=3-(2*r); | |
for(x=0;x<=y;x++) | |
{ |
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>MIXER</title> | |
<style> | |
head, body{ | |
width:100%; | |
height:100%; | |
overflow: hidden; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>postmortem</title> | |
<style> | |
html, body{ | |
width:100%; | |
height:100%; | |
overflow: hidden; |
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
/** | |
* Created by nico on 19/02/14. | |
*/ | |
var Object3d = function( node, position, rotation ) | |
{ | |
this.node = node; | |
this.parent = null; |
OlderNewer