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
// Post repeat directive for logging the rendering time | |
angular.module('myApp').directive('postRepeatDirective', | |
['$timeout', | |
function($timeout) { | |
return function(scope) { | |
if (scope.$first) | |
window.a = new Date(); // window.a can be updated anywhere if to reset counter at some action if ng-repeat is not getting started from $first | |
if (scope.$last) | |
$timeout(function(){ | |
console.log("## DOM rendering list took: " + (new Date() - window.a) + " ms"); |
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 MongoAPI{ | |
private $db; | |
private $col; | |
private $apiKey; | |
public function __construct($db,$col,$apiKey){ | |
$this->db = $db; | |
$this->col = $col; |
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 first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
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
$('*').each(function () { | |
var colors = ['aqua', 'blue', 'fuchsia', 'gray', 'green', 'lime', 'maroon', 'navy', 'olive', 'orange', 'purple', 'red', 'silver', 'teal', 'yellow']; | |
$(this).css('background-color', colors[Math.floor(Math.random()*colors.length)]); | |
$(this).css('font-family', 'Comic Sans MS'); | |
}); | |
$('img').each(function () { | |
var imgs = [ | |
'http://www.animatedgif.net/devilish/coolskul.gif', | |
'http://www.animatedgif.net/devilish/devildance_e0.gif', |
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
/* | |
* True Match Team (original 2) | |
* | |
* If you are unfamiliar with js, try visit: | |
* http://www.malkafly.com.br | |
* adaptado da versão de R. Alviani: https://gist.github.com/rodrigoalviani/977351b31da2c14b9b72 | |
*/ | |
'use strict'; | |
var i = 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
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers']) | |
.run(function(DB) { | |
DB.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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication1 | |
{ |
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 cidades=[{"id":1,"nome":"Acrelandia","ide":1,"cap":0},{"id":2,"nome":"Assis Brasil","ide":1,"cap":0},{"id":3,"nome":"Brasileia","ide":1,"cap":0},{"id":4,"nome":"Bujari","ide":1,"cap":0},{"id":5,"nome":"Capixaba","ide":1,"cap":0},{"id":6,"nome":"Cruzeiro do Sul","ide":1,"cap":0},{"id":7,"nome":"Epitaciolandia","ide":1,"cap":0},{"id":8,"nome":"Feijo","ide":1,"cap":0},{"id":9,"nome":"Jordao","ide":1,"cap":0},{"id":10,"nome":"Mancio Lima","ide":1,"cap":0},{"id":11,"nome":"Manoel Urbano","ide":1,"cap":0},{"id":12,"nome":"Marechal Thaumaturgo","ide":1,"cap":0},{"id":13,"nome":"Placido de Castro","ide":1,"cap":0},{"id":14,"nome":"Porto Acre","ide":1,"cap":0},{"id":15,"nome":"Porto Walter","ide":1,"cap":0},{"id":16,"nome":"Rio Branco","ide":1,"cap":1},{"id":17,"nome":"Rodrigues Alves","ide":1,"cap":0},{"id":18,"nome":"Santa Rosa","ide":1,"cap":0},{"id":19,"nome":"Sena Madureira","ide":1,"cap":0},{"id":20,"nome":"Senador Guiomard","ide":1,"cap":0},{"id":21,"nome":"Tarauaca","ide":1,"cap":0},{"id":22,"nome":"Xapuri |
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 | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
// I blantantly stole, tweaked and happily used this code from: | |
// Lord of Ports http://www.experts-exchange.com/M_1736399.html | |
$ky = 'lkirwf897+22#bbtrm8814z5qq=498j5'; // 32 * 8 = 256 bit key | |
$iv = '741952hheeyy66#cs!9hjv887mxx7@8y'; // 32 * 8 = 256 bit iv |
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
<ol> | |
<li> | |
<div class="fade-in one"> | |
<div class="box" style="background:#d10000;"></div> | |
</div> | |
</li> | |
<li> | |
<div class="fade-in two"> | |
<div class="box" style="background:#ff6622;"></div> |
OlderNewer