- 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
| /* | |
| 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
| 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)); | |
| } |
como corrigir essa falha
module parse failed ionic 2 geolocation
nsa@verneck:/Documentos/prodest/projeto-espm-bopm$ cd es-na-palma-da-mao-mobilensa@verneck:/Documentos/prodest/projeto-espm-bopm/es-na-palma-da-mao-mobile$ yarn install
yarn install v0.18.1
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.0.14: The platform "linux" is incompatible with this module.
info "fsevents@1.0.14" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning Unmet peer dependency "stylus@>=0.52.4".
warning Incorrect peer dependency "tslint@^3.0.0".
warning Incorrect peer dependency "webpack@1.5.x".
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
| nota1 = int(input("Digite a primeira nota: ")) | |
| nota2 = int(input("Digite a segunda nota: ")) | |
| nota3 = int(input("Digite a terceira nota: ")) | |
| nota4 = int(input("Digite a quarta nota: ")) | |
| media = (nota1 + nota2 + nota3 + nota4) / 4 | |
| print("A média aritmética é", media) |
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
| numero = int(input("Digite um número inteiro: ")) | |
| digitoDezena = 0 if (numero < 10) else (numero // 10 % 10) | |
| print("O dígito das dezenas é", digitoDezena) |
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
| totalSegundos = int(input("Por favor, entre com o número de segundos que deseja converter: ")) | |
| segundosRestantes = totalSegundos % 3600 | |
| segundos = segundosRestantes % 60 | |
| minutos = segundosRestantes // 60 | |
| horas = (totalSegundos // 3600) % 24 | |
| dias = (totalSegundos // 3600) // 24 | |
| print(dias, "dias,", horas, "horas,", minutos, "minutos e", segundos, "segundos.") |
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
| ladqudrado = int(input("Digite o valor correspondente ao lado de um quadrado: ")) | |
| perimetro = ladqudrado * 4 | |
| area = ladqudrado * ladqudrado | |
| print("perímetro:", perimetro, "- área", area) |