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
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 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
from string import ascii_lowercase as lower_letters | |
input_text = str(input()).lower() | |
def to_string_ordered(string): | |
new_string = string.replace(" ","") | |
new_string = list(set(new_string)) | |
new_string.sort() | |
new_string = "".join(new_string) |
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
<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 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 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 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 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 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 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 |
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
ROUTES = [ | |
RouteGroup([ | |
Get('api/projects',"ProjectController@list").name('all'), | |
Post('api/projects',"ProjectController@create").name('create'), | |
Delete('api/projects',"ProjectController@delete").name("delete") | |
], name="project."), | |
RouteGroup([ | |
Get('projects',"ClientController@index").name('all'), |