Skip to content

Instantly share code, notes, and snippets.

View ParadauxIO's full-sized avatar
👩‍💻
Hacking the mainframe

Rían Errity ParadauxIO

👩‍💻
Hacking the mainframe
View GitHub Profile
@ParadauxIO
ParadauxIO / email-template.html
Created November 6, 2020 15:26
Computer Science Friendly Verification System
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td bgcolor="#238F8A" align="center">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td bgcolor="#238F8A" align="center">
<table width="600" cellspacing="0" cellpadding="0" border="0" align="center">
<tbody>
@ParadauxIO
ParadauxIO / TotalAverageCalculator.java
Created November 2, 2020 16:29
Calculate the average of the provided integers
import java.util.InputMismatchException;
import java.util.Scanner;
public class TotalAverageCalculator {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int populationSum = 0;
int populationSize;
@ParadauxIO
ParadauxIO / PlantClassifier.java
Last active October 28, 2020 02:03
Depending on a series of yes/no questions return the plant type
import java.util.InputMismatchException;
import java.util.Scanner;
import java.util.regex.Pattern;
public class PlantClassifier {
// Used for the final sentence
static final Pattern STARTS_WITH_VOWEL = Pattern.compile("^[aeiouy]", Pattern.CASE_INSENSITIVE);
// Let's at least standardise this code for future re-use.
@ParadauxIO
ParadauxIO / LoanRepaymentCalculator.java
Last active October 25, 2020 16:49
Implementation of the Mortgage Amortisation Formula in Java taking input via a scanner
import java.text.DecimalFormat;
import java.util.InputMismatchException;
import java.util.Scanner;
public class LoanRepaymentCalculator {
// Just in case earth's orbit changes drastically
final static int MONTHS_IN_YEAR = 12;
public static void main(String[] args) {
@ParadauxIO
ParadauxIO / TriangleArea.java
Last active October 19, 2020 18:45
Calculate a triangle's area given comma seperated points, which are then seperated by a space
import java.util.Arrays;
import java.util.Scanner;
import java.util.logging.Logger;
public class TriangleArea {
static Logger logger;
static Scanner scanner;
public static void main(String[] args) {
@ParadauxIO
ParadauxIO / BMI.java
Created October 19, 2020 12:44
Calculate a user's BMI when prompted for their weight and height.
import java.util.InputMismatchException;
import java.util.Scanner;
public class BMI {
static double userWeight; // Given to the nearest kilogram
static double userHeight; // Given in meters
static float userBMI; //
/**
@ParadauxIO
ParadauxIO / StandardDeviation.java
Created October 19, 2020 12:42
Calculate the standard deviation of space-seperated terms, supplied via STDIN
import java.util.logging.Logger;
public class StandardDeviation {
public static void main(String[] args) {
Logger logger = Logger.getLogger("Standard Deviation");
double populationMean = 0;
double stdDeviationNumerator = 0;