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
for (var i=0,n=1;i<=21;n=(i+=n)-n) i; |
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 ( global, undefined ) { | |
var observer = {}, | |
topics = {}; | |
observer.on = function ( topic, fn ) { | |
if ( !topics[topic] ) topics[topic] = []; | |
topics[topic].push( fn ); | |
return topics[topic].length - 1; | |
}; | |
observer.trigger = function () { | |
var args = Array.prototype.slice.call( arguments ), |
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 ( global, undefined ) { | |
function slugify ( str ) { | |
return str | |
.toLowerCase() | |
.replace( /á|à|â|ã/g, 'a' ) | |
.replace( /é|è|ê/g, 'e' ) | |
.replace( /í|ì|î/g, 'i' ) | |
.replace( /ó|ò|ô|õ/g, 'o' ) | |
.replace( /ú|ù|û/g, 'u' ) | |
.replace( /ç/g , 'c' ) |
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 ( global, undefined ) { | |
var months = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro']; | |
function monthName ( month, short ) { | |
month = parseInt( month ) - 1; | |
return short && month !== 4 ? months[month].slice( 0, 3 ) : months[month]; | |
} | |
global.monthName = global.monthName || monthName; | |
} ( this )); |
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 ( context, undefined ) { | |
function instance ( node ) { | |
if ( node.id && !global[node.id] ) | |
global[node.id] = node; | |
if ( node.children.length ) | |
for ( var i = 0, l = node.children.length ; i < l ; i++ ) | |
instance( node.children[i] ); | |
}( context ); | |
} ( document.body )); |
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 MOUT = window.MOUT || {}; | |
(function (module) { | |
var _rKind = /^\[object (.*)\]$/, | |
_toString = Object.prototype.toString, | |
UNDEF; | |
function kindOf(val) { | |
if (val === null) { | |
return 'Null'; | |
} else if (val === UNDEF) { |
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 | |
class DataLayer { | |
public $header; | |
public $data; | |
public function __construct ($header, $data) { | |
$this->header = $header; | |
$this->data = $data; | |
} | |
public function get ($key) { | |
return $this->data[array_search($key, $this->header)]; |
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 | |
Quota::with( | |
array( | |
'codes' => function($query) { | |
$query->where('number', '=', 11); | |
} | |
) | |
) | |
->where('label', '=', 'foo') |
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
define([ | |
'angular', | |
'bar_controller', | |
'router' | |
], | |
function(angular, barCtrl, router) | |
{ | |
var app, | |
appName = 'foo'; | |
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
<!-- prefix : thousands : decimals : numdecimals : sufix --> | |
<!-- $ 1,234.567 --> | |
<input type="text" data-numformat="$ :comma:dot:3:"> | |
<!-- R$ 1.234,56 reais --> | |
<input type="text" data-numformat="R$ :dot:comma:2: reais"> | |
<!-- 1234.56 --> | |
<input type="text" data-numformat="::dot:2:"> |
OlderNewer