This file contains 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.util.logging.Logger; | |
public class StandardDeviation { | |
public static void main(String[] args) { | |
Logger logger = Logger.getLogger("Standard Deviation"); | |
double populationMean = 0; | |
double stdDeviationNumerator = 0; |
This file contains 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.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; // | |
/** |
This file contains 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.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) { |
This file contains 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.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) { |
This file contains 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.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. |
This file contains 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.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; |
This file contains 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
<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> |
This file contains 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.util.*; | |
public class FactorialTutorial { | |
// Used if the user wishes to exit the program. | |
private static final Set<String> EXIT_COMMANDS; | |
// Assign the values of EXIT_COMMANDS (initialisation block) | |
static { | |
final SortedSet<String> exitCommands = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); |
This file contains 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
/* | |
* Copyright (c) 2020, Rían Errity. All rights reserved. | |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
* | |
* This code is free software; you can redistribute it and/or modify it | |
* under the terms of the GNU General Public License version 3 only, as | |
* published by the Free Software Foundation. | |
* | |
* This code is distributed in the hope that it will be useful, but WITHOUT | |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
This file contains 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
<?php | |
error_reporting(E_ERROR); | |
$tokens = array("somepassword", "someotherpassword"); //Tokens go here | |
$sharexdir = "img/"; | |
$lengthofstring = 5; | |
function RandomString($length) { | |
$keys = array_merge(range(0,9), range('a', 'z')); | |
for($i=0; $i < $length; $i++) { |
OlderNewer