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
| ;; fib-rec: nat -> nat | |
| ;; | |
| ;; Calculates the fibonacci numbers recursive. | |
| ;; | |
| ;; Example: (fib-rec 4) = 3 | |
| (define (fib-rec n) | |
| (cond | |
| [(= n 0) 0] | |
| [(= n 1) 1] | |
| [else (+ (fib-rec (- n 1)) (fib-rec (- n 2)))])) |
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 ninja.leaping.configurate.objectmapping.Setting; | |
| public class Config { | |
| @Setting(comment = "") | |
| private boolean scoreboardDisplay = true; | |
| public boolean isScoreboardDisplay() { | |
| return scoreboardDisplay; | |
| } |
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.lang.reflect.Method; | |
| import java.util.concurrent.ConcurrentMap; | |
| import java.util.concurrent.TimeUnit; | |
| import com.google.common.base.Ticker; | |
| import com.google.common.cache.CacheBuilder; | |
| import com.google.common.cache.CacheLoader; | |
| import com.google.common.cache.RemovalListener; | |
| /** |
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
| package com.github.games647.fastlogin.core; | |
| import com.google.common.collect.ImmutableList; | |
| import java.io.IOException; | |
| import java.net.InetAddress; | |
| import java.net.Socket; | |
| import java.net.UnknownHostException; | |
| import java.util.List; | |
| import java.util.concurrent.atomic.AtomicInteger; |
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 com.google.common.base.Charsets; | |
| import java.security.InvalidKeyException; | |
| import java.security.Key; | |
| import java.security.KeyPair; | |
| import java.security.KeyPairGenerator; | |
| import java.security.MessageDigest; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.PrivateKey; | |
| import java.security.PublicKey; |
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 com.google.common.collect.Maps; | |
| import java.util.Map; | |
| import org.apache.commons.lang.mutable.MutableInt; | |
| import org.bukkit.entity.Player; | |
| /** | |
| * Handling all updates for a player in a performance optimized variant. This | |
| * class split the updates over the ticks much smoother. |
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
| package com.github.games647.scoreboardstats; | |
| import com.google.common.base.Objects; | |
| import com.google.common.collect.ComparisonChain; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
| import org.apache.commons.lang.builder.ToStringBuilder; | |
| import org.bukkit.Bukkit; |
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
| /** | |
| * Disable or enable the use of class caching. Workaround for linking to an | |
| * old jar version while the plugin jar was changed during a reload. | |
| * | |
| * @param status should the cache be activated | |
| * @return if the process succeed. | |
| */ | |
| public static boolean setClassCache(boolean status) { | |
| try { | |
| Field cacheField = URLConnection.class.getDeclaredField("defaultUseCaches"); |
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
| package com.github.games647.scoreboardstats.pvpstats; | |
| import com.avaje.ebeaninternal.server.util.ClassPathReader; | |
| import org.apache.commons.lang.ArrayUtils; | |
| /** | |
| * This is workaround to a bug in Java 6. eBean 2.7.3 has a bug catching up | |
| * the wrong exception while scanning through the ebean.properties. Spigot | |
| * fixed this with updating eBean to 2.8.1 and newer versions of eBean has |