This file contains hidden or 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.31) | |
project(erwin_school_work) | |
set(CMAKE_CXX_STANDARD 23) | |
add_executable(erwin_school_work main.cpp) |
This file contains hidden or 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
using System.Collections.Immutable; | |
using System.Diagnostics.CodeAnalysis; | |
interface ILookup<out T> | |
{ | |
// For more information, read the docs here: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/interface#static-abstract-and-virtual-members | |
static abstract IEnumerable<T> GetAll(); | |
} |
This file contains hidden or 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
const int countOfWorkersToRunInParallel = 3; | |
const int countOfWorkersToRunConcurrently = 12; | |
var cancellationTokenSource = new CancellationTokenSource(); | |
var cancellationToken = cancellationTokenSource.Token; | |
var semaphore = new SemaphoreSlim(countOfWorkersToRunInParallel); | |
_ = Task.Run(async () => | |
{ | |
await Console.In.ReadLineAsync(cancellationToken); |
This file contains hidden or 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
using System.Collections.Concurrent; | |
using System.Text.Json; | |
using System.Text.Json.Serialization; | |
var messageService = new MessageService(); | |
var noisyThings = new NoisyThings(messageService); | |
var cancellationTokenSource = new CancellationTokenSource(Constants.RunSimulationFor); | |
var runningTasks = noisyThings | |
.GetNoisyThings() |
This file contains hidden or 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
.idea | |
.dockerignore | |
Dockerfile | |
**/obj/ | |
**/bin/ |
This file contains hidden or 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
public class JavaFiddle | |
{ | |
public static void main(String[] args) | |
{ | |
BoulderMenu menu = new BoulderMenu(2, 4); | |
menu.showMenu(); | |
System.out.println("now...."); | |
This file contains hidden or 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
using System; | |
using System.Collections.Immutable; | |
using System.Diagnostics; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Linq; | |
using Xunit; | |
using Xunit.Abstractions; | |
namespace JoeEncoder | |
{ |
This file contains hidden or 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
using System.Diagnostics; | |
using Xunit; | |
using Xunit.Abstractions; | |
namespace Tests | |
{ | |
public sealed class CalculatorTests | |
{ | |
private readonly ITestOutputHelper _testOutputHelper; |
This file contains hidden or 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
public class Example | |
{ | |
public static void main(String[] args) | |
{ | |
double twoFiftyInTheAfternoonUTC = 14.5d; | |
double acstTimeZoneOffset = 9.3; | |
double twoFiftyInTheAfternoonUTCInACST = add(twoFiftyInTheAfternoonUTC, acstTimeZoneOffset); | |
System.out.print(twoFiftyInTheAfternoonUTCInACST); | |
} |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <zconf.h> | |
static const int MAX_INPUT_LENGTH = 30; | |
static const int MAX_CIRCLE_COUNT = 3; | |
struct Point { | |
long x; | |
long y; |
NewerOlder