- exemplo de cifra clássica: cifra de césar
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
class EventListener<T> { | |
private callbacks:{(user : T) : void}[] = []; | |
addEventListener(callback:{(user : T) : void}):void { | |
this.callbacks.push(callback); | |
} | |
removeEventListener(callback:{(user: T) : void}):void { | |
this.callbacks.splice(this.callbacks.lastIndexOf(callback)); | |
} |
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
/* | |
criar uma funcao que ENCRIPTA o valor | |
mas tem que ter 1 funcao diferente pra cada tipo de valor | |
Number ou String | |
*/ | |
const data = { name: 'Suissero Veio', password: 'p3g4n4min4', id: 666 } |
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
const cheerio = require('cheerio') | |
const rp = require('request-promise') | |
const links = require('./links') | |
const createFile = require('./createFile') | |
const options = { | |
uri: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/`, | |
transform: (body) => cheerio.load(body), | |
} |
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
import {IPositionTracker} from "IPositionTracker"; | |
import GeoLocationPositionTracker from "GeoLocationPositionTracker"; | |
class App { | |
constructor(private positionTracker : IPositionTracker) { | |
} | |
start(): void { | |
this.positionTracker.subscribe(c => { | |
alert(`Lat: ${c.latitude}; Lon: ${c.longitude}`); |
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
http://gabsferreira.com/instalando-o-git-e-configurando-github/ |
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
https://github.com/hushnymous | |
muito provável que a bateria do seu Smartphone já tenha deixado você na mão. Muitos têm que carregar o celular todos os dias, e alguns tipos de invenções com hidrogênio, alumínio e fontes de energia solar não ajudam muito. Mas, pesquisadores da Universidade de Purdue, nos EUA criaram uma ferramenta nova para os usuários de smartphones Android que reduz o consumo de bateria. | |
Os pesquisadores, em parceria com a Intel, estudaram o uso de 2.000 smartphones Samsung Galaxy S3 e S4 com diversas operadoras de 61 países. Foi descoberto que 45,9% do consumo da bateria acontece quando as telas dos smartphones estão desligadas. | |
Além disso, 28,9% do consumo de bateria acontece devido a aplicativos que trabalham em segundo plano no dispositivo. Nem todos aplicativos são importantes para o funcionamento do celular e de acordo com os pesquisadores a maior parte do descarregamento da bateria acontece em erros de aplicativos que ficam em segundo plano. | |
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
#!/bin/bash | |
mkdir provas | |
cd provas | |
for i in {1..6} | |
do | |
mkdir per$i | |
cd per$i | |
for j in {1..8} | |
do | |
touch p$j.txt |