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
var app = angular.module('logger', ['pouchdb']); | |
/** | |
* @author: Jean Lucas de Carvalho | |
* | |
* Serviço que abstrai configurações do pouchDB e retorna uma instância | |
* do pouchDB | |
* | |
* TODO: permitir múltiplas instâncias do banco local e do remoto | |
*/ |
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
<html> | |
<head> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.15/angular.min.js"></script> | |
<script src="//rawgit.com/angular/router/master/dist/router.es5.js"></script> | |
</head> | |
<body ng-app="app" ng-controller="AppController as app"> | |
<h1>Angular 2 - Novo Router</h1> | |
<p>Nome: {{app.nome}}</p> |
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
#lo sauer, 2013 - www.lsauer.com | |
#see: http://www.lsauer.com/2013/05/mysql-fuzzy-searching-fulltext-queries.html | |
#Note: In MySQL SUBSTRING, the string-index starts at position 1 | |
SELECT * FROM tablename | |
WHERE SOUNDEX(tablename_field) | |
LIKE CONCAT('%',SUBSTRING(SOUNDEX('Fuzti serch derm'),2),'%'); |
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
<!-- Boa parte desse HTML será fixo no backend --> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Layout</title> | |
<style> | |
body { | |
width: 100%; | |
height: 100%; |
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
var request = require("request"), | |
cheerio = require("cheerio"), | |
url = "https://www.google.com/search?q=data+mining", | |
corpus = {}, | |
totalResults = 0, | |
resultsDownloaded = 0; | |
function callback () { | |
resultsDownloaded++; |
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
# Retorna dados sobre o pregão | |
http://www.bmfbovespa.com.br/Pregao-Online/ExecutaAcaoCarregarDados.asp?CodDado=IBOV,ticker&CA=undefined | |
# Retorna ações e seus últimos valores negociados | |
http://www.bmfbovespa.com.br/Pregao-OnLine/ExecutaAcaoCarregarDados.asp?CodDado=Ticker | |
# Retorna o histórico do dia de um papel | |
http://www.bmfbovespa.com.br/Pregao-Online/ExecutaAcaoCarregarDadosPapeis.asp?CodDado=petr4 | |
# Retorna dados de um papel |
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
$('.nav__trigger').on('click', function(e){ | |
e.preventDefault(); | |
$(this).parent().toggleClass('nav--active'); | |
}); |
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
for (var line=1; line<60; line++) { | |
for(var i=1;i<29;i++) { | |
var s = (Math.floor((Math.random()*2)%2)) ? "╱" : "╲"; | |
document.write(s); | |
} | |
document.writeln("<br>"); | |
} |
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
// Rock | |
$(document).ready(function() { | |
console.clear(); | |
var step = 1, | |
$steps = $('#cssteps'), | |
$steps_list = $('li', $steps), | |
steps = $steps_list.length; | |
$steps_list.attr('contenteditable','true'); | |
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
var sound = new Audio('http://media.soundcloud.com/stream/BkDZIahFB7ME.mp3'); | |
sound | |
.isPlayed = false | |
.volume = 1; | |
$('#butt').on('click',function(){ | |
if (!sound.isPlayed) { | |
sound.play(); // Play sound |