Skip to content

Instantly share code, notes, and snippets.

Avatar
🌊
Trying to find my way, every single day...

Leon Lourenço leon-lourenco

🌊
Trying to find my way, every single day...
View GitHub Profile
@leon-lourenco
leon-lourenco / ResponseEntityParser.java
Created Jul 26, 2019
Parser de JSON para response entitys em lista e em objeto
View ResponseEntityParser.java
package me.fullcam.toolsapi.util;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.http.ResponseEntity;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
@leon-lourenco
leon-lourenco / YouTubeViewer.java
Created Mar 26, 2019
A embed YouTube video on a Swing application
View YouTubeViewer.java
public class YouTubeViewer {
public static void main(String[] args) {
NativeInterface.open();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame frame = new JFrame("YouTube Viewer");
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.getContentPane().add(getBrowserPanel(), BorderLayout.CENTER);
frame.setSize(800, 600);
@leon-lourenco
leon-lourenco / BubbleSortExample.java
Created Mar 25, 2019
Bubble Sort Simple Example
View BubbleSortExample.java
public class BubbleSortExample {
public static void main(String[] args) {
int[] literallyAnything = {10, 2, 39, 666, 1823, 38853, 31, 2, 64, 231, 7};
int[] show = bubbleSort(literallyAnything);
for (int a = 0; a < show.length; a++) {
System.out.println(show[a]);
}
}
public static int[] bubbleSort(int v[]) {