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
<!-- A script to get max call stack size in browser | |
In my Macbook pro | |
Firefox 28: | |
maxStackSize = 350801 (dynamic, but always above 300000) | |
error: InternalError: too much recursion | |
Safari 7.0.2 | |
maxStackSize = 58034 | |
error: RangeError: Maximum call stack size exceeded. | |
Chrome 33: |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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
function getRotationAngle(target) | |
{ | |
const obj = window.getComputedStyle(target, null); | |
const matrix = obj.getPropertyValue('-webkit-transform') || | |
obj.getPropertyValue('-moz-transform') || | |
obj.getPropertyValue('-ms-transform') || | |
obj.getPropertyValue('-o-transform') || | |
obj.getPropertyValue('transform'); | |
let angle = 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
function circumcircle(a, b, c) { | |
this.a = a | |
this.b = b | |
this.c = c | |
var A = b.x - a.x, | |
B = b.y - a.y, | |
C = c.x - a.x, | |
D = c.y - a.y, | |
E = A * (a.x + b.x) + B * (a.y + b.y), |
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
import threading | |
def set_interval(func, sec): | |
def func_wrapper(): | |
set_interval(func, sec) | |
func() | |
t = threading.Timer(sec, func_wrapper) | |
t.start() | |
return t |
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
Code | |
$("button").single_double_click(function () { | |
alert("Try double-clicking me!") | |
}, function () { | |
alert("Double click detected, I'm hiding") | |
$(this).hide() | |
}) | |
NewerOlder