Skip to content

Instantly share code, notes, and snippets.

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];
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;
public class ReplSweeper {
public static class SimpleMinesweeper {
private enum CellStatus {
EMPTY, BOMB
}
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;
public class ReplSweeper {
public static class SimpleMinesweeper {
private enum CellStatus {
EMPTY, BOMB, MARKED
}
from flask import Flask, request, jsonify
from pymongo import MongoClient
app = Flask(__name__)
client = MongoClient("mongodb://localhost:27017")
db = client.hashmap_db
hashmap = db.hashmap
@app.route('/<key>', methods=['GET'])
def get_value(key):
import com.mongodb.client.MongoClients;
import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoDatabase;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.model.UpdateOptions;
import com.mongodb.client.result.DeleteResult;
import org.bson.Document;
import static com.mongodb.client.model.Filters.eq;
import com.google.gson.Gson;
import static spark.Spark.*;
from flask import Flask, request, jsonify
from pymongo import MongoClient
app = Flask(__name__)
client = MongoClient("mongodb://localhost:27017")
db = client.hashmap_db
hashmap = db.hashmap
@app.route('/<key>', methods=['GET'])
def get_value(key):
package fun;
public class SubsetsGenerator {
public static void main(String[] args) {
String input = "cat";
for (int i = 0; i <= input.length(); i++) {
generateCombinations(input, "", 0, i);
}
}
package superprof;
public class SudokuChecker {
public static void main(String[] args) {
// Ein Beispiel-Sudoku-Raster
int[][][] sudoku = {
{
{5, 3, 4},
{6, 7, 2},
{1, 9, 8}
package superprof;
public class ReadCode {
public static int findSmallest1(int a, int b, int c, int d, int e, int f) {
int smallest = a;
if (b < smallest) {
smallest = b;
}
if (c < smallest) {
smallest = c;
package superprof;
public class SchleifenBeispiel {
public static void main(String[] args) {
// Schleife 1: Code im Körper der Schleife
for (int i = 0; i < 5; ) {
aktion(i);
i++;
}