Skip to content

Instantly share code, notes, and snippets.

View RichardBradley's full-sized avatar

Richard Bradley RichardBradley

  • http://www.softwire.com
  • London & Darlington
View GitHub Profile
import java.io.{FileInputStream, IOException, InputStream}
import java.nio.charset.StandardCharsets
import java.nio.file.{Files, Paths}
import scala.io.Source
object q5221524 {
def main(args: Array[String]): Unit = {
// Setup
object MainClass {
def main(args: Array[String]): Unit = {
println("Output from main class")
}
}
package my.app;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.appender.AbstractAppender;
import org.apache.logging.log4j.core.config.AppenderRef;
import org.apache.logging.log4j.core.config.Configuration;
import org.apache.logging.log4j.core.config.LoggerConfig;
@RichardBradley
RichardBradley / 1212672.ahk
Created June 6, 2018 21:54
superuser.com q 1212672
#IfWinExist ahk_class iTunes
Media_Play_Pause::ControlSend, , ^p, Windows Media Player
#IfWinExist ahk_class iTunes
Media_Next::ControlSend, , ^f, Windows Media Player
#IfWinExist ahk_class iTunes
Media_Prev::ControlSend, , ^b, Windows Media Player
@RichardBradley
RichardBradley / ChipsPuzzle.java
Last active February 19, 2020 16:15
mathsbombe 4
import org.apache.commons.math3.distribution.BinomialDistribution;
/**
* https://www.maths.manchester.ac.uk/mathsbombe/problem.php?index=4
*/
public class ChipsPuzzle {
public static void main(String[] args) {
// expected time to ok after a shuffle
@RichardBradley
RichardBradley / MarketChaserMain.java
Created March 12, 2020 10:24
AWS Gameday 2020 Market Chaser
import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClientBuilder;
import com.amazonaws.services.dynamodbv2.model.AttributeValue;
import com.amazonaws.services.dynamodbv2.model.DeleteItemRequest;
import com.amazonaws.services.dynamodbv2.model.PutItemRequest;
import com.amazonaws.services.dynamodbv2.model.ScanResult;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.*;
import java.io.File;
import java.util.Vector;
import static com.google.common.base.Preconditions.checkState;
public class Q73228364 {