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
package bean; | |
import javax.faces.application.FacesMessage; | |
import javax.faces.context.FacesContext; | |
import dao.VacinaDao; | |
import entidades.Vacina; | |
import java.util.List; |
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
// Modelo | |
class Championship{ | |
static ranking = [] | |
static rounds = [] | |
static new(){ | |
Championship.ranking = TeamGenerator.generate() | |
return Championship |
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 masonite.provider import ServiceProvider | |
from masonite.routes import Route | |
class RouteCompilerProvider(ServiceProvider): | |
wsgi = False | |
def boot(self, route: Route): | |
route.compile('any', r'(.+)') |
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
// Método que chama a geração de relatório | |
public void visualizarRelatorio(){ | |
// Montando o Map pra passar para o query interna. | |
HashMap<String, Object> argumentos = new HashMap<>(); | |
argumentos.put("unidade", sessaoUsuarioMB.getUnidadeSelecionada()); |
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'), |
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
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
# 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
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
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())); |