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
| interface LeitorDeArquivos{ | |
| public List<String> ler(File arquivo); | |
| } | |
| class LeitorTXT implements LeitorDeArquivos{ | |
| public ArrayList<String> ler(File arquivo){ | |
| //Processamento java para retornar as linhas do arquivo de texto. |
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
| Array.prototype.contains = function(valor_desejado){ | |
| var quantidade = 0; | |
| this.forEach(function(valor_atual,indice){ | |
| if (valor_atual === valor_desejado){ | |
| quantidade += 1; | |
| } | |
| }); | |
| if (quantidade > 0){ |
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
| <?php | |
| class Slugfy{ | |
| public static function getSlug($string){ | |
| $string = stripslashes($string); | |
| $string = preg_replace('/[[:punct:]]+/',' ',$string); | |
| $string = preg_replace('/[[:space:]]+/',' ',$string); | |
| $string = ltrim($string,". "); |
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
| <input type="" name="" placeholder="Input 1"> | |
| <input type="" name="" placeholder="Input 2"> | |
| <input type="" name="" placeholder="Input 3"> | |
| <button>Botão 3</button> | |
| <script type="text/javascript"> | |
| let botoes = document.querySelectorAll("input"); |
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
| # -*- coding:utf-8 -*- | |
| vogais = "aeiou" | |
| def limpar_console(): | |
| import os | |
| os.system('cls||clear') | |
| def normalizar_dados(): | |
| for arquivo in ["arquivo_encript.txt","palavras.txt"]: |
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
| Calendar dataAtual = Calendar.getInstance(); | |
| Calendar anterior = Calendar.getInstance(); | |
| anterior.set(Calendar.MONTH,Calendar.APRIL); | |
| anterior.set(Calendar.YEAR, 2018); | |
| anterior.set(Calendar.DAY_OF_MONTH, 25); | |
| DateFormat formato = new SimpleDateFormat("dd/MM/yyyy"); | |
| System.out.println("Anterior: " + formato.format(anterior.getTime())); |
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
| lista1 = [] | |
| lista2 = [] | |
| lista3 = [] | |
| print("Lista 1\n") | |
| for i in range(10): | |
| numero = input("Digite o número {}: ".format(i)) | |
| lista1.append(numero) | |
| print("Lista 2\n") |
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
| # Validação field a field | |
| def is_valid(self,field): | |
| if field is None | |
| raise Exception | |
| return field | |
| def validate_name(self,name): | |
| return is_valid(name) | |
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 sys | |
| from urllib import urlretrieve | |
| from mutagen.mp3 import MP3 | |
| file_musics = sys.argv[1] | |
| with open(file_musics) as file_music: | |
| url_musics = [link.strip() for link in file_music.readlines()] |
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 ContaCorrente{ | |
| private String agencia; | |
| private String conta; | |
| private String correntista; | |
| private double saldo; | |
| // getters and setters |