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.Scanner; | |
public class TicTacToe { | |
private static char[][] board = new char[3][3]; | |
private static char currentPlayer = 'X'; | |
public static void main(String[] args) { | |
initializeBoard(); | |
playGame(); |
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; | |
public class C64Emulator { | |
private static final int MEMORY_SIZE = 65536; // 64KB memory | |
private byte[] memory = new byte[MEMORY_SIZE]; | |
// 6502 CPU registers | |
private int pc; // Program Counter | |
private byte sp; // Stack Pointer |
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
package com.evolutionnext.demo.virtualthreads; | |
import java.io.BufferedReader; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.net.URI; | |
import java.nio.charset.StandardCharsets; | |
import java.util.Arrays; | |
import java.util.concurrent.*; |
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
package com.evolutionnext.demo.virtualthreads; | |
import java.io.BufferedReader; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.net.URI; | |
import java.nio.charset.StandardCharsets; | |
import java.util.Arrays; | |
import java.util.concurrent.*; |
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
static class GroupBy<T, K> implements Gatherer<T, HashMap<K, List<T>>, Map.Entry<K, List<T>>> { | |
private final Function<T, K> groupFunction; | |
public GroupBy(Function<T, K> groupFunction) { | |
this.groupFunction = groupFunction; | |
} | |
@Override | |
public Supplier<HashMap<K, List<T>>> initializer() { |
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
#!/bin/bash | |
# Function to check a single git repository | |
check_git_repo() { | |
local dir=$1 | |
cd "$dir" || return | |
# Check for uncommitted changes | |
uncommitted_changes=$(git status --porcelain) | |
if [ ! -z "$uncommitted_changes" ]; then |
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.concurrent.ExecutionException; | |
import java.util.concurrent.StructuredTaskScope; | |
import java.util.concurrent.atomic.AtomicLong; | |
public class MillionsOfTasks { | |
private final AtomicLong atomicLong; | |
public MillionsOfTasks() { | |
atomicLong = new AtomicLong(); | |
} |
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
[ | |
{ | |
"type": "record", | |
"namespace": "MyEvents", | |
"name": "PhoneNumber", | |
"fields": [ | |
{ | |
"name": "countryCode", | |
"type": "string" | |
}, |
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
annotations: | |
dns.alpha.kubernetes.io/internal: api.internal.dik8ssecurity01.k8s.local | |
kubectl.kubernetes.io/default-container: kube-apiserver | |
creationTimestamp: null | |
labels: | |
k8s-app: kube-apiserver | |
name: kube-apiserver |
NewerOlder