Skip to content

Instantly share code, notes, and snippets.

View syntacsdev's full-sized avatar

syntaxdev syntacsdev

View GitHub Profile
@syntacsdev
syntacsdev / RecursionDemo.py
Last active April 25, 2026 01:13
A brief(ish) explainer of a recursive definition compared to an iterative definition in Python.
from tabulate import tabulate
# an integer is a whole number — 1, 2, 3, etc.
# the factorial of an integer is the product of that integer and every integer lesser than it, not including zero
# factorial of 1: 1 = 1
# factorial of 2: 1 * 2 = 2
# factorial of 3: 1 * 2 * 3 = 6
# factorial of 5: 1 * 2 * 3 * 4 * 5 = 120
# what if i wanted the factorial of 50? given the definition of factorial, we should be able to write a loop for that.
@syntacsdev
syntacsdev / ItemBuilder.java
Created December 28, 2017 03:21
A class for easily constructing ItemStacks. Made for fans of the StringBuilder class.
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.DyeColor;
@syntacsdev
syntacsdev / F.java
Created October 26, 2014 03:05
A utility String class.
public class F {
/**
* String formatting class.
* @author Incomprehendable
*/
private static Plugin plg = Main.getInstance();
private static Server serv = Bukkit.getServer();