-
Crie uma pasta chamada hello
-
Crie uma pasta chamada WEB-INF dentro de hello
-
Crie uma pasta chamada classes dentro de WEB-INF
-
Crie uma pasta chamada hello dentro de classes
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
public class HeapSort { | |
public static void main(String[] args) { | |
int[] v = new int[] {9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; | |
int n = v.length; | |
for(int i = n / 2 - 1; i >= 0; i--) | |
heapify(v, n, i); | |
for(int j = n - 1; j > 0; j--) { |
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 br.com.willams.datastructures.impl; | |
import java.util.Comparator; | |
import java.util.function.Consumer; | |
import br.com.willams.datastructures.BinarySearchTree; | |
import br.com.willams.datastructures.TraversalType; | |
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
@Component | |
@Slf4j | |
public class ConsumerListener { | |
private final BiometryConsumerProcessor consumerProcessor; | |
private final ApplicationConfig appConfig; | |
private Executor executor; | |
public ConsumerListener(BiometryConsumerProcessor consumerProcessor, ApplicationConfig appConfig) { | |
this.consumerProcessor = consumerProcessor; |
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 com.willams; | |
import java.util.concurrent.*; | |
public class AsyncWithFuture { | |
public static void main(String[] args) { | |
ExecutorService executorService = Executors.newCachedThreadPool(); | |
Future<Double> future = executorService.submit(new Callable<Double>() { | |
public Double call() { |
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
public class ConsolePrinter { | |
public enum Color { | |
BLACK, RED, GREEN, YELLOW, BLUE, PURPLE, CYAN, WHITE, | |
} | |
public enum Style { | |
NORMAL, BOLD, DUMMY1, DUMMY2, UNDERLINE | |
} | |
private static final String ESCAPE_CODE = "\033["; |
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
// essa aplicação demonstra o uso do Spring Web MVC com o paradigma funcional e sem o paradigma funcional (usando anotações) | |
// As classes estão no mesmo arquivo por brevidade, | |
// mas estariam em seus respectivos pacotes numa aplicação real (model, service, controller) | |
@SpringBootApplication | |
public class ExcecuteApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(ExcecuteApplication.class, args); | |
} | |
// esse bean equivale a um PersonController |
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
#include <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
#define BASE 8 | |
int main() | |
{ | |
// coloca de forma manual o valor "1234" | |
char minha_string[5]; |
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
#pragma once | |
namespace ventania | |
{ | |
namespace math3d | |
{ | |
template<class T> | |
class vector3 | |
{ | |
public: |
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
#pragma once | |
namespace ventania | |
{ | |
struct Window | |
{ | |
HWND handle = 0; | |
WNDCLASS wc; | |
}; |