instruction
stringlengths
71
95.1k
g = input().split() N, M = int(g[0]), int(g[1]) high = 2 ** 32 - 1 map = [[(high) for i in range(N)] for i in range(N)] for i in range(M): g = input().split() left, right, value = int(g[0])-1, int(g[1])-1, int(g[2]) map[left][right] = min(value, map[left][right]) map[right][left] = min(value, map[right]...
I have recently decided to build an event library for the Arduino/ESP microcontrollers, the idea is simple - if an action happens, it invokes a function. In the code it requires holding a vector of function pointers in each Event object. Since the microcontrollers are limited in RAM, especially Arduino, I thought about...
I have four arrays of the same object which I use for a form. They work as pairs such as list_1 contains all possible values and list_1_filtered contains the choosen values, and the same goes with list_2 and list_2_filtered. The thing is that they can share similar objects with the same object.id and I want to filter i...
I am trying to make a UIImageView class / extension that can load an image from a URL. the image view should not get confused with concurrency when scrolling through a UICollectionView and the data task should be cancellable. Also downloaded images should be cached (I'm not sure if NSCache or URLCache should be used he...
I have written the below shared code and wanted to ask for some optimization tips or even alternative (more elegant?) ways of solving the task at hand (maybe without gotos?). My code, even if 'crude', should work properly. The exercise basically asks me to recreate a Rock, Paper, Scissors game with the CPU (randomizing...
I have a simple code that loops through a text file to fix a few things in it and I use mostly dictionaries to find and handle the adjustment. However, with larger files (about 30K lines) it seems to get exponentially slower in a specific line of a loop. This line shouldn't be so slow because it just has to access an e...
I have implemented the K-Way Partitioning algorithm which is based on the Peter Taylor's solution. Which works but i want fill the q array which is the borders of each pivot. also note that the array of pivots is already given and i need to implement it without the use of std functions. i think it should be similar to ...
I've written a simple calculator in Python. I want to show not much effect of the action but the logic behind it, by that I mean console menu implementation in the Menu class. I'm curious about what I can improve in the Menu class, what do you think about it and other helper functions? I'd like to hear also what useful...
Continuing to slowly progress through The C Programming Language by Brian Kernighan and Dennis Ritchie. The code I came up with below is for Exercise 1-19 - Write a function reverse(s) that reverses the character string s. Use it to write a program that reverses its input a line at a time. Feedback is much appreciated....
Overview I’m trying to learn Rust, so I’m reading The Rust Programming Language. At Chapter 8, there was a task to write a program that calculates the median and mode of a bunch of numbers. I originally skipped the task and kept reading but I’ve returned to it as I think it will give me some practice with the language....
a few weeks ago I started learning Flexbox and to practice my skills I did the following exercise: Piet Mondrian was a 20th century Dutch painter whose paintings emphasized simple geometric elements. Inside a file called mondrian.html, create this Piet Mondrian painting (https://artmiamimagazine.com/wp-content/uploads...
I tried implementing a lexer in rust that peeks ahead at the next character and makes a decision based on that. However, i am told that this is bad practice, and instead i should be using finite-state-machines. However, my implementation is slower than the original lexer, going from 1MB per 20ms to 1MB per 50ms to 1MB ...
I usually do not create Streams, but it seems that JavaScript doesn't have a built-in one and I figured I would do it for a personal project I am working on. This code seems to work as intended and does what I want just fine, but I have concerns mainly about how often I am checking my buffer. I am mainly looking for a ...
Input: "Uno dos tres cuatro cinco" Output: {"": ["Uno"], "Uno": ["dos"], "dos": ["tres"], "tres": ["cuatro"], "cuatro": ["cinco"]} I created a function, that received 1 string argument. Function devide str to list and then to dict. First element in dictionary need to look like {"":null_index_in_the_string}. Function: d...
I'm building web scraper application which takes name, code and price from few sites. I thought factory pattern would fit in my application. I would like to someone review my code and tell if I something missed out. I have class Item which holds scraped data. public class Item { public string Code { get; set; } ...
I want to improve the performance of my equation solver So I have an expression:- 42a + 75b - 30c + 80d + 25e + 50f, let's call it D. Variables a, b, c, d, e, f are positive integers with values from 0 to 150. I need to find and filter solutions to D = -(v + 1) equation for each v, where v is an integer in the range fr...
The previous generic dynamic array I asked a review for here was written using only the preprocessor and so while the array itself was type-safe, all the manipulating macros where not. In this try I wrote a dynamic array that stores the element size, and then a macro interface that hides it as an implementation detail....
I have two proposals for parsing arguments: Method A const char * cmp_skip (const char *key, const char *str) { int len = strlen (key); return strncmp (key, str, len) ? NULL : str + len; } void parser (int argc, const char **argv) { for (int i = 0; i < argc; i++) { const char *str, *arg = argv[i]; if ((...
I wrote an implementation of Robert Heaton's Programming Exercise for Advanced Beginners #4 (photomosaics) in C99 using the MagickCore library. The full code is as follows: #include <assert.h> #include <errno.h> #include <getopt.h> #include <limits.h> #include <locale.h> #include <math.h> #include <stdbool.h> #include ...
In trying to answer this question on StackOverflow about using the gocarina/gocsv package to read a CSV with a header column name that has a comma, I got to thinking about how to preprocess the first record of a CSV as it's being read. I thought of a reader/fixer which takes a reader of CSV data, reads the first (heade...
I'm creating a functionality that detects idle time for an app if there's no activity within an hour. It works ok but I'm not sure if the approach to handling inactivity is correct? and how do I make it reusable by making it into reusable hook? and should I place this in the app.component? function App() { const [las...
This is an inversion-of-control object store. It is meant to be for a multithreaded application where it can load components at start-up based on complex environmental setup, Worker threads can retrieve individual components on demand. Do I need 2 overloaded functions of registerInstance()? #include <iostream> #includ...
I have some get function like this get customersAreNotValid(): boolean { let customerIsValid = false; if (this.customersOverview.mainCustomer) { if (!this.customersOverview.mainCustomer.company) { const { companyName, vatNumber, box, ...customer } = this.customersOverview.mainCustomer; ...
I just wrote my first C program for storing the time of the sunset and sunrise for a location given in latitude and longitude in a SQLite database. I usually write C# only. Since this runs on a RaspberryPi I decided to do it in C and I don't really need all that extra stuff that C++ has and I dislike writing anything i...
I asked the same question Web scraper for e-commerce sites yesterday and I'm now posting the revised code here. I'm building web scraper application which takes name, code and price from few sites. I thought factory pattern would fit in my application. I would like to someone review my code and tell if I'm missing some...
I'm learning Python Scrapy, and I'm scraping product information from the following website: https://apotheekdedeyne.be/ This project is for personal learning & practice. The following Spider works as expected; however, it is very, very slow. It took several minutes to complete: import scrapy class DedeyneSpider(scra...
I am currently working on my first WordPress plugin. I display custom post types on a google map with pins. The custom post types also have additional information by ACF fields which are displayed in an info window on the marker. You can filter the pins on the map by a filter dropdown, which refers to the custom post t...
I'm working on a simple waiter implementation, waiter - is a code that polls an external API until a desired response is received within a given period of time. I would like to keep it simple, but at the same time write it in the native Golang style. At the moment I come up with the following code (the actual API reque...
I stumbled upon this unsolved problem of math named Euler's brick. I wrote a program in C++ to generate solutions for Euler's brick problem. It searches from 1 to 10,000 in about 10 seconds. It took 10.977153 minutes to search from 1 to 50,000. How can I increase the performance further so I can search for larger limit...
As some of you know, I have made a programming language, called AEC, and written two compilers for it, one targetting x86 and other targetting WebAssembly. Recently, I have tried to write two shell scripts to download, compile and use those compilers, and run the Analog Clock example. I have put those two shell scripts...
Continuing my K&R journey! Please see below for my solution to: Exercise 1-20: Write a program detab that replaces tabs in the input with the proper number of blanks to space to the next tab stop. Assume a fixed set of tab stops, say every n columns. #include <stdio.h> #define TAB '\t' // character t...
I created a code to archive files in a folder by year. It writes subs of the root folder into an array, then writes the sub of those subs into an array, runs through each folder and then archives the files in each folder by the last edited year. $Grade $StartYear = 2001; $EndYear = 2021; $Grade = @(Get-ChildItem $...
I'm trying to clean my excel sheet so that all lines match with each other when I put 3 different tables from 3 different data sets next to each other. The code I have gets the job done but it's really slow. I'm wondering if there is a much faster way for excel to delete. Example: I would like for the macro to delete R...
I built a basic authentication system for a node application and I have some security concerns. The username and password the user enters when they log in are stored as plaintext using express-sessions. Then whenever they make a request I call a function to make sure it matches the hashed password stored in the databas...
The following is my solution to the killer word problem from Codejam 2011: https://codingcompetitions.withgoogle.com/codejam/round/0000000000433198/0000000000432fe2. In summary, we're playing Hangman. Our opponent intelligently goes through a list of 26 letter in some order. There's a dictionary of valid words, and our...
This function merges two dictionaries, using the value from the later dictionary to resolve conflicts. I have 5 tests that the program passes successfully: const cases = [ [[{ a: 'uno', b: 'due' }, { c: 'tre' }], { a: 'uno', b: 'due', c: 'tre' }], [[{ a: 'uno', b: 'due' }, { a: 'uno' }], { a: 'uno', b: 'due' }], ...
Given the following example data: id username group unit department team status 1 user1 g1 u1 d1 t1 active 2 user2 g1 u1 d1 t2 active 3 user3 g1 u1 d1 t3 inactive 4 user4 g3 u6 d12 t30 active 5 user5 g25 u54 d70 t88 inactive And the table definition for the table used above: Create Table table_name(...
Link to go playground https://go.dev/play/p/ctQDpDW6pui This code has been based on suggestions and conversations in this thread here Architecture: A read method creates a channel shared with producer. Read method adds to the channel and producer reads from it. A producer and consumer share a channel. Producer adds da...
I am working on a sql query for the following scenario: Get all available offers for registered demand (offers from profiles should not be from profile which had registered demand). After that get all available offers from this initial profile which match any demand from any other profile. I ended up with this query:...
This is a follow-up to the question: C program for storing the time of the sunset and sunrise After receiving a lot of great help and critique I've updated my code. Questions Are there major issues with my code? How can I further improve my code? FOLLOW UP Compiler Warnings I mostly concentrated on fixing the compil...
I'm working on a script on Foobar that displays a list of playlists with some of these playlists that can be in a folder (that can be opened or closed). For example: As you can see there may be 2 folder levels: one on the root and one inside a folder. I have an array (this.data) of these playlists & folders with some ...
I have a graph represented with an Adjacency set similar to: struct Vertex { int x; bool operator==(const Vertex& b) { return x==b.x; } }; template<> struct std::hash<Vertex> { std::size_t operator()(Vertex const& v) const noexcept { return std::hash<int>()(v.x); } }; struct Edge ...
The code copies the second column from the right of all the docx files' tables from the folder where the py file is saved, and does some editing on the content in specific cases. The problem that it is painfully slow; I tested it with a folder with 38 files with about 22000 lines total (which is a kinda usual amount of...
For some context, this is inspired by my attempt to solve this SO question. I have a mutably borrowed slice representing a 2D array, and I want to split the borrow such that I can access all the rows or all the columns at the same time. Splitting into rows is easy, I just have to call split_at_mut repeatedly to obtain ...
I'm developing a Xenoblade Chronicles 3 save data editor in Python with PySide6. My experience in Python has, over the years, been terminal scripts or web applications, so GUI scripting is completely new to me. I feel like I'm over-complicating what I'm attempting to do and am looking for guidance. I apologize if I'm d...
In WooCommerce, by default interface, selecting product variations is possible through a dropdown. But, I am developing a site where I wanted buttons/swatches instead of the dropdown. I achieved that by assigning radio buttons with where I hide the radio button's visibility and use for styling it as a swatch butto...
I have slightly refactored the Delayed, concurrent event stack in Java. Now it looks like this: DelayedEventStack.java package com.github.coderodde.cconcurrent.eventstack; import java.util.Deque; import java.util.Objects; import java.util.concurrent.ConcurrentLinkedDeque; /** * This class implements an delayed event...
In order to provide a better output of sets with many consecutive elements (a similar class could be written for a list or tuple, but in this case I stay with a set), I wrote the following class, derived from a set. However, some inspiration has been found in the itertools and operator package documentation. I'm using ...
I am making a plugin for Firefox, this is (more or less) my first time working with JavaScript. Is this a reasonable design for working with both values and lists in a database? function set(key, value) { // Sets a key-value pair in the browser's local storage browser.storage.local.set({ [key]: value }); } fun...
I have an Excel sheet that connects to third party software which populates Sheet1 with data. It does this multiple times per second and overwrites previous data. I have written the macro below to copy and paste the data to a sheet (called Data) each time there is a change to Sheet1. The previous version of the macro l...
I build my code studying this question: "Divide total sum equally to higher sampled time periods when upsampling with pandas". I am wondering if can be improved the code and if it is right. It seems working properly, but always looking for room of improvement or if there is any flipside I am not aware in the process I ...
Following is a leetcode problem: Given an array nums of distinct integers, return all the possible permutations. You can return all the possible permutations. You can return the answer in any order. Following is the code written by me for the above problem. It gives the correct output: import java.util.*; public class...
I have the following code here It's a password generator that lets you choose a completely random password with a certain length of a custom password with different amounts of character types. I want feedback of the general readability, style, and security (as it's a password generator), and if you would do anything di...
Introduction So, I recently completed a chess game with a GUI in Python, using Pygame. Upon research, I learned that Pygame is built on SDL, and since I wanted to practice C++ more, I decided to code chess again in C++. I have 5 source files and 6 header files. Since this is a large project, feel free only to review t...
The following routine returns the file-names from the current working directory: public static List<string> GetRelativeFileNamesInTheCurrentDirectory(string[] extensions) { string curr = System.IO.Directory.GetCurrentDirectory(); string[] files = Directory.GetFiles(curr); List<string> ...
My attempt at Exercise 1-21 in the The C Programming Language book written by Brian Kernighan and Dennis Ritchie. Exercise Prompt Write a program entab that replaces strings of blanks by the minimum number of tabs and blanks to achieve the same spacing. sample.txt apple banana pear Expected Outp...
I've a simple push/pop implementation in my program: void Push(int* stack, int top, int item) { if (top == SIZE - 1) { printf("Overflow\n"); return; } else if (item == INT_MIN) { printf("Item size out of bounds\n"); return; } stack[++top] = item; } int Pop(int* stack, int top) { if (top == -1...
I am using the requests library to make requests to an API. However, I am not sure how to handle different status codes. I am particularly interested in handling status code 500, as that is part of my task. 1: Is a try/except block like I have an acceptable way of handling error codes? 2: How should I handle 500 status...
I am adding a database to my application that fulfils these requirements: There is a set of users and a set of commands. Each user can consent to any number of other users to have commands done on them. Consent is not bidirectional. Each user can consent to either all commands being done on them or just some (or 1). ...
I'm writing a simple online shop using spring boot, for learning purposes. Right now I have purchasing-service and a product-service. The purchasing-service makes requests to the product-service via REST APIs for querying for product information. All of this is working, but I'm unclear on if I'm using exceptions correc...
I just want feedback regarding C++ coding style and if in any way I can optimize my code (e.g. to use a different data structure). I'm only trying to use up to C++ 14 standard code. Any other improvements are greatly appreciated as well. file: graph.h #ifndef GRAPH_H #define GRAPH_H #include <iostream> #include <map> #...
I have this Java code which I want to use to monitor file changes into directory: import com.validation.database.entity.EntityImportRequestsTable; import com.validation.database.service.EntityImportRequestsService; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event....
Description Imagine a space like the arcade game Asteroids where everything wraps around right to left and bottom to top - effectively coordinates on a flat torus. The diagram shows an example of two intersecting rectangles. The red rectangle at bottom right is wrapping around so that portions off screen are shown on t...
There is a computation I'm doing with permutations (permutations of varying length of an entire interval [1,N] for some N) in python that I feel could be faster. from itertools import chain def permtrim(perm): L = len(perm) while L > 2 and perm[-1] == L: L = perm.pop() - 1 return perm def has_...
I'm pretty new to using React Js and I am wondering how people with proper React JS experience would consider this code. Are my function names correct, am I following best practices, also does it seem to be easily maintainable? Thanks! The dialogs sole purpose is to alert the user whether or not the email they entered ...
I have devised my own version for a Goldbach verification project which uses sets to compare already sieved primes. My implementation also uses generators to "sieve a segment" since storing base 10 numbers in such an extensive list is memory intensive. However, As in most cases, it is not as efficient as I would wish i...
I have a program with these two methods. One method to import a set of data from a CSV within the given time period and store them in a dictionary. Here the data in CSV file is stored in following format with meter Id, Timestamp in UTC and value. For each meter there's approximately 2000 values. "MeterId","Ts","Value" ...
I have a method that merges keys and indexes from an array into an object. I'm stuck with ways to compress this method, and I don't know what I can do to make it simpler. Goal get an array of objects with keys return an object with a unique key and the matching indexes Code (simplified) const items = [ { "key...
Usually in C++, the language rules automatically convert types as necessary. For example, I can pass a pointer-to-derived in place of a pointer-to-base, and the same with references. There are occasions where one needs to specify a type to which a value should be coerced, but less strongly than a cast. Some cases wher...
The idea here is to destroy the data in a directory tree by finding any files in it and overwriting their data with garbage before deleting them. The function returns minus the number of errors encountered, or zero if successful. Obliterate.c: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <dirent....
I am using keypress to get all the events of a input control. Once the user hits the enter button after I am then clone a div and update the ids. One project I am having is that I only want to do this one time for each control. Meaning if a user changes row 1 two times I dont want to do this logic. I have set this data...
So, I am trying to implement an annotation in Kotlin, and it works, but I definitely feel like I could do a lot better. Below is the code and some areas I think could be improved. The purpose of this validator is to be applied to a field/getter and fail if it's not of a certain type (please don't ask why I need to do t...
I followed the Beej's Guide to Network Programming. The program acts like a multi-user chat server. One connects and sends a message to the server, which is forwarded to all that are connected. There's a simple makefile below; also Valgrind output. Review Goals: I have specific questions: Is my code POSIX compliant? D...
#[derive(Default)] pub struct ResourceName { chars: [u8; 9], size: u8, } impl ResourceName { pub fn to_str(&self) -> &str { unsafe { std::str::from_utf8_unchecked(&self.chars[0..usize::from(self.size)]) } } fn generate(&mut self, rng: &mut UnityRNG) { const VOWELS: &[u8; 5] = b"AEI...
I found a suspicious code snipped in an existing project in which I am involved as a developer. The code sorts a dict by its keys, so that if iterated over the dict, the elements are returned in the sorted order. In order to have some stand-alone code I refactored out a function which does that job. However, as I was s...
The macro below loops through column E in Sheet2 and finds matches in column Z of Sheet1. If a match is found it copies the value on the same row contained in column AA. It works ok but hangs when it runs. There are usually a few thousand values in column E but less than 30 in column Z. I've run it on a few PCs with de...
Which of the two queries is theoretically better and why? I would like to understand why query 2 takes longer although there is no relevant information in the Execution Plan. I'm querying a Presto database. I am not the owner of the table. The table does not have any keys or indexes. The table has 7,5 million rows. The...
This is my first attempt at writing code from scratch. I'm visually impaired and would like to know if the code is well structured, commented and readable for a collaborator who might read it in the future It's also available on GitHub. # Blinding Slow Artsy Stuff # A simple Rock, Paper Scissors game # Just trying out ...
Background The reason why I'm doing this is because at my company, we get emails a lot from different locations that have relevant data we need for other processes. The problem is that this data is always in a CSV or excel file format, and downloading the file, then copying all of the data, then pasting it in the prope...
I am taking advantage of the recent layoffs to teach myself Kotlin. I am a career Java programmer, I've touched Kotlin before but not actively, and not for a few years. I wrote it all in one file mostly because I don't expect much to be reuseable, not looking for feedback on that too much. I am interested in feedback w...
I'm currently working through a tutorial. The project is a recipe website. One of the lessons to "save some lines of code" and use bidirectional setters for bidirectional relations of classes/objects. Namely Recipe <-> Notes. In the tutorial, the guy simply uses the Recipe.setNotes(Notes) setter to create that relation...
In my current solution, a user triggers my web API from a web application of mine first, then my web API calls a 3rd party web service, and the results/codes are displayed on the web application. In the current design (web application > web API > 3rd party web service), the user must remain in front of the screen and c...
I'm a newb. I learned some C in high school, and using that to learn C++. I really didn't understand the use of OO, but I had a major enlightenment while working on this simple piece of code. I have refactored it in a more OO style and simplified it using C++ idioms to where it looks as clean as I can make it. I'm hopi...
I am basically looking for a way to trim below code. It works just fine. This code takes a range from each tab of an excel spreadsheet and pastes it into a powerpoint file, then assigns a title to each slide after pasting. I feel the code is way too long and can be trimmed. I use excel 2016. Everywhere the comment 'rep...
I have a couple of libraries that use jthread, but also are published via vcpkg. The problem I have is that both github and vcpkg's AzureDevOps CI have a version of clang that does not have jthread implemented on MacOS. I was hoping that abeil would have a jthread, but that is not the case. To reduce the number files t...
I feel this should be possible more concisely, less code repetition, with a loop and a two-dimensional array or something. But not sure how exactly. Any best practice for review? // Activate shortcuts for editor menu items like Ctrl+S for "Save Item" etc. // Deactivate instead with optional "false" - to allow these for...
Background This is a function that is part of a library written in GAS. A function inside a library I've written is supposed to send out an email to another user or users with accompanying details (based on parameters) from the email account of whoever runs the function. Basically if I run the program from my google ac...
Basically below code is taking first 7 tabs from my current sheet and pasting them as values in a blank excel sheet with same tab names and saving them in a specific folder by filename I specified. Then doing same thing for next 7 tabs and so on. It does this 5 times in total then returns to original file and unhighlig...
I am coding a hybrid encryption library that utilises AES and RSA to encrypt text/images, The library is working fine however I am wondering if I can make any improvements to it. I have included try and except blocks into the library to catch errors however I feel like more improvements could be made to the code to mak...
This is the exercise, from C++ Primer 5th edition: 10.32: Rewrite the bookstore problem from § 1.6 (p. 24) using a vector to hold the transactions and various algorithms to do the processing. Use sort with your compareIsbn function from § 10.3.1 (p. 387) to arrange the transactions in order, and then use find and a...
I'm a newbie in programming, I chose Python. I'm learning on my own. Currently I'm preparing code for a portfolio on github. I will be grateful for any code review, especially in the subject of OOP: should I try to create classes? Does it make any sense with such a code? Is the code structure pythonic? I will be very g...
I am beginner to intermediate and wanted to write a little event code in c. It's one header file with 108 line pure code and it does what I was thinking it should be like for me. EventListener.h #ifndef EVENTLISTENER2_H #define EVENTLISTENER2_H #include <stdio.h> #include <stdlib.h> #include <pthread.h> struct Event...
I have the following code which works as expected i.e saves data to the db as I would like it to, however, there is a lot of code repetition and I am unable to find a way to shorten the code I have about 30 serializers (pasting 3 to shorten the code) class FirstOne(serializers.ModelSerializer): period = PeriodSeria...
I have following ViewController class with a tableView. final class ListViewController: UIViewController { let tableView: UITableView = { let tableView = UITableView(frame: .zero, style: .plain) tableView.translatesAutoresizingMaskIntoConstraints = false tableView.separatorStyle = .none...
This is my first time using svelte. I am also using tailwind and astro but that is irrelevant. The following component prepends >> to my text when it is being hovered upon and takes the >> out when it is not. Is this the typical way to use svelte? Am I doing something wrong? I feel I am. <script> let spanId = "se...
Any improvement suggestions are welcome, as I'm not the best at making games lol. I have it structured like how Java would be because in the future I want to make it run on java and in the browser. Graphics Class used to easily resize, draw, and crop images: class GUI { static resize() { PixelTanks.resiz...
The Github repository NM-Heston solves call option prices under the Heston 2-factor model using ADI splitting schemes. I am adapting the code to price options under the 3-factor Heston-Hull-White model, also using ADI splitting schemes. While doing this, I became curious if it is possible to get rid of the nested for l...
I receive some data from an api. I would like to define the raw responses schema and model it as a python dataclass, with the added benefit of using the dataclasses_avroschema package to programmaticly generate an avro schema. Further I would like to transform this raw response into a customizable second dataclass, als...
I build web application using Kotlin and Spring Boot, I use MockMvc to write integration test. I'm not satisfied how assertion looks like, here is typical assertion: @Test fun `Get profile by id`() { thereIsATeacher(lissaSkipper) mockMvc.get("/teacher/{id}", "52058608") ...
The following is my solution to the Pylons problem from Codejam 2019: https://codingcompetitions.withgoogle.com/codejam/round/0000000000051635/0000000000104e03. Our Battlestarcraft Algorithmica ship is being chased through space by persistent robots called Pylons! We have just teleported to a new galaxy to try to shak...