Skip to content

Instantly share code, notes, and snippets.

View SrBalbucio's full-sized avatar

João Gabriel SrBalbucio

View GitHub Profile
@anjackson
anjackson / SwingFXWebView.java
Created January 19, 2012 15:41
Embedding a JavaFX WebView in a Swing panel.
import com.sun.javafx.application.PlatformImpl;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javafx.application.Platform;
import javafx.collections.ObservableList;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Group;
import javafx.scene.Node;
package fr.vinetos.util.scoreboard;
import fr.krilouja.game.team.Team;
import net.minecraft.server.v1_8_R3.IScoreboardCriteria;
import net.minecraft.server.v1_8_R3.PacketPlayOutScoreboardScore;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import java.lang.reflect.Field;
import java.util.Collections;
@eddiecorrigall
eddiecorrigall / java.md
Last active May 6, 2024 01:43
Java and the Garbage Collector

Java

  • Polymorphism
    • the ability of a variable, function, or object to take multiple forms
    • to define one interface with multiple implementations
    • compile-time: - using the same method name, but different signature
    • run-time: - using a reference type to control which method is called
  • @Override Annodation
    • Runtime polymorphism
  • Java determins which version super/sub class method to execute based on reference type of call
@saumilsdk
saumilsdk / SslUtil.java
Last active October 26, 2023 09:53 — forked from rohanag12/SslUtil.java
Create an SslSocketFactory using PEM encrypted certificate files
/**
* Utility class to read encrypted PEM files and generate a SSL Socket Factory based on the provided certificates.
* This utility also support an option to enable and disable server hostname verification.
*
* Note: Java use jks (Java KeyStore) format, but openssl usual use pem format. We can convert it by keytool (jdk build-in tool), or use
* BouncyCastle library to handle pem.
*
* The original code is by Sharon Asher (link below). I have modified it to use a newer version of the BouncyCastle Library (v1.68)
* Add below dependencies to work with this util.
* org.bouncycastle:bcpkix-jdk15on:1.68