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
| <!DOCTYPE html> | |
| <html xmlns:th="http://www.thymeleaf.org"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Sistema de Gestão de Pessoas</title> | |
| <link rel="stylesheet" | |
| href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" | |
| integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" | |
| crossorigin="anonymous"> |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <persistence version="2.0" | |
| xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> | |
| <persistence-unit name="exemploPU" transaction-type="RESOURCE_LOCAL"> | |
| <properties> | |
| <property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:exemplo;shutdown=true;hsqldb.write_delay=false"/> |
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
| public class FormatadorColunas { | |
| private int numeroColunas; | |
| public FormatadorColunas(int numeroColunas) { | |
| this.numeroColunas = numeroColunas; | |
| } | |
| public String formatarFrase(String frase) { |
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 java.util.Arrays; | |
| import java.util.Scanner; | |
| public class Avaliacao { | |
| public static void main(String[] args) { | |
| Scanner entrada = new Scanner(System.in); | |
| System.out.println("Exercicio 1"); |
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
| public class Inversions { | |
| public static long calcInversions(int[] input) { | |
| if (input.length == 1) { | |
| return 0; | |
| } | |
| long numberOfInversions = 0; | |
| int halfLength = input.length / 2; | |
| int leftLength = halfLength; | |
| int rightLength = halfLength; |
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
| lowerBound = MST | |
| upperBound = todos os vértices conectados na raiz | |
| G = (V, E) | |
| e[] = sort(E) //as arestas serão usadas para particionar o espaço de soluções | |
| bestSoFar = upperBound(G) | |
| live[] = branch(e.dequeue()) //aqui gera as possibilidade: 1- com p0, 2 - sem p0 |
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
| ... | |
| fp = fopen(file_input, "r"); | |
| ... | |
| for (int k = 1; k <= 2*M_arcos; k += 2) | |
| { | |
| fscanf(fp, "%s %d %d %d", line_parse, &i, &j, &w); | |
| I_arco[k] = i; | |
| J_arco[k] = j; | |
| I_arco[k+1] = j; | |
| J_arco[k+1] = i; |
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
| def prime?(n) | |
| (2..Math.sqrt(n)).each do |i| | |
| return false if n % 2 > 0 | |
| end | |
| return true | |
| end |
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 Caixa | |
| attr_reader :peso, :capacidade | |
| def initialize(peso, capacidade) | |
| @peso = peso | |
| @capacidade = capacidade | |
| end | |
| end | |
| class Pilha |
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 ShuntingYard | |
| @@op_precedence = { | |
| '+' => 2, | |
| '-' => 2, | |
| '*' => 3, | |
| '/' => 3, | |
| '^' => 4 | |
| } |
NewerOlder