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
/** | |
* List | |
* | |
* @author Dustin Breuer <dustin.breuer@thedust.in> | |
* @version 1.0 | |
* @category Util | |
* @licence MIT http://opensource.org/licenses/MIT | |
*/ | |
/** |
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
.message { | |
margin: 1em 0; | |
padding: 4px 8px; | |
color: #333 ; | |
border-radius: 5px; | |
a { | |
color: #333; | |
text-decoration: underline; | |
} |
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 | |
$fYIQ = (($iRed * 299) + ($iGreen * 587) + ($iBlue * 114)) / 1000; | |
if($fYIQ >= 128){ | |
echo 'Black textcolor.'; | |
} else { | |
echo 'White textcolor.'; | |
} |
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 | |
static $aTypesOrder = array( | |
'PDF', 'DOC', 'BMP', 'PSD', 'AI', | |
); | |
/** | |
* @param array $aAssetA | |
* @param array $aAssetB | |
* |
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 | |
/** | |
* ArrayUtils | |
* | |
* @author Dustin Breuer <developer@thedust.in> | |
* @license 2015 MIT | |
*/ | |
namespace TheDusti\Util; |
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
/** | |
* | |
* @param {Number} iFrom | |
* @param {Number} iTo | |
* @param {Number} iDuration | |
* @param {Function} cSetterFunction | |
*/ | |
function simpleAnimatedValue(iFrom, iTo, iDuration, cSetterFunction){ | |
var iDiff = (iTo - iFrom), | |
iAnimationEnd = (Date.now() + iDuration), |
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 | |
// $arrUrls = ["http://...", ...] | |
$arrCurls = array(); | |
$resMultiCurl = curl_multi_init(); | |
$arrReturn = array(); | |
foreach ( $arrUrls as $strUrl ) { | |
$resCurl = curl_init(); |
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
/** | |
* Avoid `console` errors in browsers that lack a console. | |
* @link https://github.com/h5bp/html5-boilerplate/blob/master/src/js/plugins.js | |
*/ | |
(function() { | |
var method, | |
noop = function() {}, | |
methods = [ | |
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', |
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
jQuery(function($){ | |
var maxHeight = Math.round( $( window ).height() * 0.6 ); | |
$('#TextArea').on( 'keyup input paste cut', function() { | |
$(this) | |
.css( 'height', '' ) | |
.css( 'height', Math.min( this.scrollHeight, maxHeight ) ); | |
} ); | |
}); |
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 | |
/** | |
* Berechnet den überblendeten Farbwert für eine einzige Farbe nach<br /> | |
* <pre>(alpha / 255) * argb.r() + (1 - alpha / 255) * blend.r()</pre><br /> | |
* Diese Funktion wird für jeden Farbanteil seperat aufgerufen. | |
* @param int $color Die Farbe die über eine andere Farbe gelegt werden soll | |
* @param float $alpha Der Alpha-Wert der Farbe <i>color</i> die über <i>blend</i> gelegt wird | |
* @param int $blend Der Farbwert der darunterliegenden Farbe (selben Types, also R-Angabe bei R,...).<br /> | |
* Standard ist 255 (Weiß) |
OlderNewer