Skip to content

Instantly share code, notes, and snippets.

package hod.btlg.persistence
import hod.btlg.DBFiddle
import io.getquill.*
import org.scalatest.BeforeAndAfterAll
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
import java.time.{ OffsetDateTime, ZoneOffset }
import scala.compiletime.uninitialized
package hod.btlg.persistence
import hod.btlg.DBFiddle
import io.getquill.*
import io.getquill.extras.OffsetDateTimeOps // Add this import
import java.time.OffsetDateTime
case class Feedback(
internalId: Long,
package hod.euler
import scala.collection.{immutable, mutable}
object Euler185 {
object Problems {
val simpleTest = List(
12345L -> 4,
99999L -> 1,
package hod.btlg.flowchart
import java.awt.{Color, Dimension, Graphics, GridLayout}
import javax.swing.*
import scala.collection.mutable
import scala.collection.mutable.{ArrayBuffer, ListBuffer}
import scala.util.Random
object DemoGraph {
package hod.btlg.spacefighter
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport.*
import akka.http.scaladsl.server.Directives.*
import io.getquill.{PostgresJdbcContext, SnakeCase}
import spray.json.DefaultJsonProtocol.*
import spray.json.*
import io.getquill.*
[ {
"nodeId" : "72b2ae67-2644-4520-815a-f94dcaf98f15",
"phrase" : {
"speaker" : "Dinkel",
"outfit" : "Default",
"mood" : "Neutral",
"goto" : null,
"text" : [ "Welcome. Are you awake yet? If so, please confirm." ]
}
}, {
[ {
"nodeId" : "d5575ad3-0528-44c4-bd50-3c645ab12706",
"phrase" : {
"speaker" : "Luray",
"outfit" : "Blue",
"mood" : "Neutral",
"goto" : null,
"text" : [ "Where am I?", "I've never seen a place like this before." ]
}
}, {
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;
public class GUIHangMan extends JFrame {
private String[] words = {"hello", "world", "java", "hangman", "game"};
private String word = words[new Random().nextInt(words.length)];
private char[] wordChars = new char[word.length()];
package hod.other.trainingold.training;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Hangman {
public static String printTheThing(String word, Set<Character> guessed) {
package gpt4;
public class Sudoku {
private int[][] board;
public static final int EMPTY = 0; // empty cell
public static final int SIZE = 9; // size of our Sudoku grids
public Sudoku(int[][] board) {
this.board = new int[SIZE][SIZE];