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
<?php | |
/* | |
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
:: | |
:: GIFEncoder Version 2.0 by László Zsidi, http://gifs.hu | |
:: | |
:: This class is a rewritten 'GifMerge.class.php' version. | |
:: | |
:: Modification: | |
:: - Simplified and easy code, |
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 Mutex = function() { | |
this.queues = []; | |
this.locked = false; | |
}; | |
Mutex.prototype = { | |
push: function(callback) { | |
var self = this; | |
this.queues.push(callback); | |
if (!this.locked) { |
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
<?php | |
/** | |
* @name Mutlidimensional Array Sorter. | |
* @author Tufan Barış YILDIRIM | |
* @link http://www.tufanbarisyildirim.com | |
* @github http://github.com/tufanbarisyildirim | |
* | |
* This function can be used for sorting a multidimensional array by sql like order by clause | |
* | |
* @param mixed $array |
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 convertMS(ms) { | |
var d, h, m, s; | |
s = Math.floor(ms / 1000); | |
m = Math.floor(s / 60); | |
s = s % 60; | |
h = Math.floor(m / 60); | |
m = m % 60; | |
d = Math.floor(h / 24); | |
h = h % 24; | |
return { d: d, h: h, m: m, s: s }; |