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.barlasgarden; | |
import java.util.concurrent.atomic.AtomicInteger; | |
public class SimpleRendezvous { | |
public void test() throws Exception { | |
long start = System.currentTimeMillis(); | |
final int max = 10_000_000; |
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 bench; | |
import java.util.ArrayList; | |
import java.util.Comparator; | |
import java.util.IntSummaryStatistics; | |
import java.util.List; | |
import java.util.PriorityQueue; | |
import java.util.Random; | |
import java.util.stream.IntStream; |
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 loomtest; | |
import jdk.incubator.concurrent.StructuredTaskScope; | |
import java.io.IOException; | |
import java.net.URI; | |
import java.net.http.HttpClient; | |
import java.net.http.HttpRequest; | |
import java.net.http.HttpResponse; | |
import java.time.Duration; |
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 org.microhttp; | |
import java.io.IOException; | |
import java.util.List; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.ScheduledExecutorService; | |
import java.util.concurrent.TimeUnit; | |
public class ConcurrencyServer { |
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 org.microhttp; | |
import java.io.IOException; | |
import java.util.List; | |
public class ThroughputServer { | |
public static void main(String[] args) throws IOException { | |
Response response = new Response( | |
200, |
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
#include <chrono> | |
#include "SDL.h" | |
int main() { | |
if (SDL_Init(SDL_INIT_VIDEO) < 0) { | |
SDL_Log("SDL could not initialize. SDL error: %s", SDL_GetError()); | |
return 1; | |
} | |
SDL_Window *window = SDL_CreateWindow( |
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 interview; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
public class GameOfLife { | |
public static void main(String[] args) throws InterruptedException { |
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.awt.Color; | |
import java.awt.Graphics; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
public class GameOfLife { | |
public static void main(String[] args) throws InterruptedException { | |
String glider = """ | |
........................*........... |
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
cmake_minimum_required(VERSION 3.20) | |
project(sdl_demo) | |
set(CMAKE_CXX_STANDARD 17) | |
set(CMAKE_VERBOSE_MAKEFILE ON) | |
include(FetchContent) | |
FetchContent_Declare( | |
SDL |
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
cmake_minimum_required(VERSION 3.20) | |
project(...) | |
set(CMAKE_CXX_STANDARD 20) | |
include(FetchContent) | |
FetchContent_Declare(ftxui | |
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui | |
GIT_TAG v2.0.0 |
NewerOlder