instruction
stringlengths
71
95.1k
A threading.Thread subclass intended for running an asyncio loop that has the ability to be stopped gracefully from another thread. I spent a lot of time doing trial and error until it finally worked, but probably it still needs a lot of refinement. Warning to asyncio noobs like me: asyncio is very thread-unsafe in gen...
Context I've started digging into Arduino and different type of sensors which is fun, but I'm worried that that my coding is too explicit. I've lots of experience for coding corporate programs, though it is not in C/C++. I don't consider myself a beginner, but I think something is wrong. Blocks I'd place my code in th...
The code below takes a string that potentially contains a true match for a delimiter. There can be multiple delimiters located anywhere in the string. We need to obtain the indices that are not a match and when the delimiter starts and ends. The following code achieves this. However, I am unsure if this is the most opt...
I'd like to have a review on my 2D-array container. Any criticism is welcome! I based this on std::array implementation. Hopefully I didn't do too many bad stuff here. #ifndef 2DARRAY #define 2DARRAY #include <iostream> #include <exception> #include <initializer_list> #include <cassert> #include <stdexcept> namespace...
Task Input - integer number (year) Print one number - the next year, in which all digits are pairwise different, and there are no digits 2 and 0. If there will never be such a year, print -1. My solution (correct) Could you please recommend time / space complexity optimizations? vector<char> toVec(int n) { vector<c...
This is a follow-up question for A recursive_transform Template Function Implementation with std::invocable concept in C++, A recursive_transform Template Function with Execution Policy, A recursive_transform Template Function Implementation with std::invocable Concept and Execution Policy in C++, std::array and std::v...
I need to smooth a noisy signal. I think that the moving average algorithm would be fine. However, I want the following conditions to be satisfied: The total integral (the sum of all values) before and after the moving average filtering is kept unchanged The number of points before and after the moving average filteri...
I've implemented the 3 variants of the modulo operation described on this Wikipedia page. The goal is to have fully defined behavior for all inputs. Code Implementation with truncated division (result has the same sign as the dividend) int32_t rem(int32_t x, int32_t y) { if (y == 0) exit(-1); if (y == -1) retur...
I want to load 2 files and show this data in 2 strings. I trying to do it like this and it works fine. But I think it is not the best solution... How to do more elegant solution? var saleNumber1 = "" var saleNumber2 = "" override func viewDidLoad() { super.viewDidLoad() sale1() sale2()...
I have a set of tables that I want to execute a LEFT JOIN on and bring back "excluded" rows. In addition, I would like the left table's ID included as part of the results set. Here's some sample data: Table1_ID 1 3 5 Table2_ID Table2_Val 1 a 2 b 3 c 4 d 5 c A simple left join would ...
For educational purposes, I have implemented the AES block cipher in python. I decided to follow the interface for block cipher modules as defined in PEP 272. The implementation consists of two python files, aes.py and block_cipher.py aes.py (~300 lines of code) # coding: utf-8 """ Advanced Encryption Standard. The ...
Cryptarithms Cryptarithms, or Verbal arithmetic, are substitution puzzles where letters represent unique digits: S E N D + M O R E ========= M O N E Y The goal is to find the digit-letter mapping which will translate the puzzle into a valid mathematical computation. My goal was to write a Python script which...
So I semi-wrote directory size checker by copying some parts from Stackoverflow. It works as follows: Select a directory you want to check the size of subdirectories inside. It goes scans all the directories inside the chosen directory. If there are also just files, that's not a problem the recursive function can deal...
I have a simple async/await function which gets data from a firebase endpoint. I would like to know if there is any room for improvement performance wise. async function getDataById(id) { const snapshot = await admin .firestore() .collection("collection") .where("id", "==", id) .get(); const documen...
Is this an efficient way to get the largest prime factor of a given number? Other solutions I found involved nested algorithms. function largestPrimeFactor(number) { const factors = [] for(let i = 2; i <= number; i++){ if(number % i === 0){ factors.push(i); number = number / i; i = 1; } ...
Inspired by this cppcon talk from Fedor Pikus about design patterns and some real-world need I implemented a library that allows the user to add a generic visitor pattern capabilities to class hierarchies based on vanilla C++ runtime polymorphism with virtual functions. There were 2 requirements I wanted to follow: Ge...
I want to create a script that displays the rating of movie directors for a user on IMDB. After some research, I realized that there is no free API for making such a list. The only option is to export a list of users rating for every movie, TV show etc. The initial list is in CSV, in the script. I make some calculatio...
Here is the problem: Verilog code and testbench for detecting the range of the input given number. If input number is between 12 to 49 then output is '1' else '0'. Range should be easily programmable. I'm using EDA playground, cadence xcelium 20.09 simulator and EP wave is also present. Is it the appropriate code for t...
The Goal Basically, what I'm looking for is the ability to click a region below an image to trigger a click() event which will scroll the window to the following image. The Question Is there a better way to do this? I've achieved the result I want, but with a whole ton of <divs>? I know there are some plugins out ther...
If I want to "push" an array into my object inside of a property, I must first assure that this property exists - it works the same way for arrays too. However, what is the smoothest way of doing this? Currently, I am first assigning the property it's first initial value so it gets made: then, since the property exists...
This is from a high performance server that needs to block anyone who is doing more than limit requests per seconds seconds. You call check and if it returns true you process the request, otherwise you block it. It maintains a circular queue, initialized to 0, of the last times the event was triggered. I use time() bec...
C++ is not aware of the console and it's behaviour / features / options, only its std::cout stream. To do more than stream we need to be platform aware. Aim To conveniently write console applications which use "clear screen" and "cursor position" in a way that works correctly across *nix and Windows (MacOS is extra, bu...
I'm using this Game Messenger as an instant messaging tool in my game. Just wondering peoples on thoughts on it. Thank you! enum class eGameMessageType { AddItemGUI = 0, RemoveItemGUI, UpdateSelectionBoxGUI, UpdateItemQuantityGUI, DestroyCubeSetPosition, DestroyCubeReset, SelectedCubeSe...
I am trying to authenticate / authorise users with graphql, nexus, passport, prisma, graphql-shield and fastify for REST with JWT To answer possible questions: I am using passport because it handles the callbacks for me in a nice way, I could create something fully tied to my mutations and remove everything REST relate...
I am new to Python. Currently developing an application, whose purpose is to accept a directory path from user and create a file(sha_generated_file.txt) with SHA256 of each file name inside the passed directory subfolders except those mentioned in ignored list. Sample entry in sha_generated_file.txt is SHA256(out_confi...
This is my first project using the tkinter library. It's a basic calculator that supports the four basic arithmetic operations. It also supports inputting digits and symbols via the keyboard. I'm looking for any sort of feedback. Are my comments sufficient for understanding the algorithm? Are there redundant comments o...
The code below selects all items that are locked. How can I optimise it? ShopItemData doesn't contain a field for locked/unlocked. _allItems is a ShopItemData[] _codaCommonShopItems, _codaRareShopItems, and _codaEpicShopItems are CodaShopItem[]s. public class CodaShopItem : MonoBehaviour { private Button _i...
I wrote a script to list imports of Python projects. It can print a JSON-ish dict of imported modules (keys) and members (values) as well as only the module names. It can also optionally exclude certain imports and those from the standard library. #! /usr/bin/env python3 # lsimports.py - List python project imports # ...
Can you please review my Minesweeper implementation in Java? package com.game; public class Tile { private boolean hasMine = false; private boolean revealed = false; private int mineCount = 0; public boolean hasMine() { return hasMine; } public void setHasMine(boolean hasMine)...
I wrote a small middleware for redirecting between WWW URLs. The most important thing that I want to change is to make it super fast. Here's what it is doing: If the host is localhost or mywebsite.com without any subdomains and without www, it will redirect to www.localhost or www.mywebsite.com. If the host starts with...
In order to reduce the boilerplate code, I decided to write a lightweight database helper, based on the Table Data Gateway pattern (or at least the way I understand it) with the aim of using it for a simple CRUD application. Writing INSERT and UPDATE queries is always a nuisance, repeating all those ranks of column na...
I'm new to programming. I have a question regarding the usage of c++11 random header to generate random numbers. I tried to learn it, but was unsuccessful. Recently, I've tried the following approach and it worked. Any advice on how to improve it. Is there a good source to learn more about this? Here's the code: #inclu...
I trained a DQN agent using tensorflow and OpenAI gym Atari environment called PongNoFrameskip-v4, but this code should be compatible with any gym environment that returns the state as an RGB frame. This has been originally the work described in those papers: Playing Atari with Deep Reinforcement Learning Human level ...
I have implemented a code to solve following problem. I would like to improve the code efficiency. Pardon if I just printed out the result. Code has O(N) time and constant space complexity. Given a singly linked list and an integer k, remove the kth last element from the list. k is guaranteed to be smaller than the...
I'm trying to implement a Templated Double Linked List, following Stroustrup's book "Principles and Practice using C++", Chapter 20.4. Instead of raw pointers, I want to use unique pointers. The code is organized as follows: header Node.h where the struct Node is implemented: a unique_pointer is used for the next nod...
I've made an application that calculates all the prime numbers between two given numbers and prints then into a .txt document... anything I can improve? use std::io; use std::fs::{OpenOptions}; use std::io::{Write, BufWriter}; fn main() { loop{ let mut format = 1; let mut input = String:...
I created a simple note-taking application, which enables a user to create notes, update them, and delete them. I used local storage for saving the notes. Would Appreciate some feedback on how to improve it. This is the index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewp...
I found myself in need of a lock that allows my server to barge the write lock that might be acquired by my users. It would never interrupt them, but it would jump the line so the next time the write lock is available, my server gets it instead. It's quite simple, but I'm wondering if there's something I might have mis...
I wrote C++20 implementation of a simple matrix class and its usage in Strassen's \$O(n^{lg_2{7}})\$ matrix multiplication algorithm. Live demo: https://wandbox.org/permlink/JaSC8fQccFbcl1QY (For n = 64, normal \$O(n^3)\$ matmul runs in 0ms and Strassen \$O(n^{2.81})\$ matmul runs in 33ms, hahaha) Matrix is a numerical...
I'm building a simple chatApp. The UI has just 3 interaction areas: input, submit and previous messages button. But I'm not interested in reviewing the app architecture as much as the javascript ideas and general understanding/errors. I've commented the code, and would like to see if you can point out any bad practice....
I made this code in python using Open Notify API, there is something that I could improve? Im new to coding and I'm almost 4 hours understanding and coding this program that let you interact by some inputs and it can give you information about how many people are in space now, where is the ISS now and when it will go t...
Apologies in advance for my english... We have a list of categories and a list of doctors, you need to output as follows: category1 item1 item2 item3 category2 item1 item2 item3 Here is what I was able to write: function renderChatList() { let xhttp = new XMLHttpRequest(); let categoriesArr = []; ...
I have a NodeJS/Typescript project. In server.js, I want to set my environment variables from a .env file. To achieve this, I am using the dotenv npm package. However, rather than leaving everything hanging in server.ts, I want to encapsulate this code. The solution I've come up is as follows. The goal is for my projec...
I have a static list of Strings (website urls), I am trying to connect to them and get responses, in syncRequests method, I am using HttpClient in synchronous manner, in asyncRequests method, I am using HttpClient in asynchronous manner. I am seeing some time differences between syncRequests and asyncRequests time, but...
I want to create two classes that accept values and perform operations on them. However, one of them is accepting numerical values - RollingStatisticsNumbers; and the other objects - RollingStatisticsObjects, with a specified weight. So they both implement Statistical interface that specifies calculation methods, but t...
I have a function with multiple if else statements that I'm trying to simplify in Django Is there a pattern or maybe a better modeling approach that I could use here? The idea behind is to have a thumbs up, thumbs down behavior for each blog post views.py @login_required def blog_post_vote(request, slug): post = ge...
In call of Duty warzone, there is a Duos mode (Teams of two). As the game progresses and people are eliminated some teams might have just one player left and some still with two. The game tells you the number of players left and the number of teams. For example, 5 players left, 3 teams left. In this case we can know th...
I wanted a menu that is always a hamburger, regardless of screen size. Plus it has to be activated by click, not hover. Any comments / review will be appreciated. Pls let me know if this is not worded properly / off topic etc. Please see Codepen <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name=...
I'm new to programming and python,this one of my biggest codes in python yet... I just wanted to know if you can simplify it further... English is not my first language, so corrections in the language are also welcomed! Thank You In advance! x = int(input('Enter an integer who\'s root value you need: ')) e = int(input...
So I got kind of a weird format returned from the api I'm calling it's the following: [ [ 1609065000000, "22739.71000000", "22795.73000000", "22700.39000000", "22779.08000000", "38.81782800", 1609065899999, "883167.94526884", 2261, "18....
The longest example program in my PicoBlaze Simulator in JavaScript is this decimal-to-binary converter: ;This is an example program that uses ;UART, the interface that PicoBlaze uses ;for connecting to terminals (a DOS-like ;user interface, with a keyboard and a ;screen capable of displaying text). ;It loads base-10 i...
This question came from a real use case. I had a data frame with different columns each one containing data from a data source and I wanted to design a hypothesis test to prove or not if the data had the same mean. So I had to compute the Kolmogorov-Smirnov test for each couple of columns. Now the problem can be genera...
Looking for input on how to clean up my code. I am writing a file converter that can read different but related file types (relatable like a wav and mp3 encode audio or how a jpg and tiff encode image data) and convert them to a desired file type. I got it to a decent stopping point where I can handle one file type to ...
I'm using the Hilbert transform function from the FFTW source. Because I am going to use it in my DAQ with data streaming mode. The function is working fine but the calculation speed is slow which will cause the FIFO overflow. I've heard that move the fftw_plan() outside from the hilbert() for reuse the plan might be u...
I'm currently creating a text based game where the user navigates through the game via buttons and i'm trying to improve on my code because i'm pretty sure it could be alot better, the following is some code which i wrote to give the user some options (via html buttons) and then check what their selection is in order t...
I have implemented my own version of algorithm to multiply two matrices together and I need someone who know what they are doing to see if there is anything that can be done in a more optimal way. I am also keen on understanding how I can make it robust such that it doesn't crash when non-rectangular matrices are passe...
I've wrote a FixedArray to fit seamlessly (function-wise) with the default C++ containers, including working with algorithms/etc. It is a dynamically allocated, but fixed size array. Code #pragma once #include <cstddef> #include <initializer_list> #include <algorithm> #include <limits> #include <concepts> #include <i...
I built a shop system for a Python text RPG I'm making. It repeats itself more than I would like. I was thinking I could use dictionaries to make it better but I'm not sure how. Anyways, how is it? There are 5 shop levels, each having different things to buy. So based on the shop level I set what you can buy, as well a...
This is my implementation of the Pig Latin recommended exercise in The Rust Programming Language book. I am using the unicode segmentation crate to split the string into words while also keeping the delimiters. Any pointers on making this code more idiomatic or run more optimal? use unicode_segmentation::UnicodeSegment...
Background I've written an algorithm to solve the three-dimensional Time Difference of Arrival (TDoA) multi-lateration problem. That is, given the coordinates of n nodes, the velocity v of some signal, and the time of signal arrival at each node, we want to determine the coordinates of the signal source. In my case, th...
This is not a question related to a bug.I've just created a very tiny node.js/express API for education purposes. I've created a very little API and what i would like is to have your point of view about the design and projet architecture and what you would recommand be as advice in term of what i can improve in this co...
I am using Django Rest Framework and below is the code of one of the API Endpoints. The code creates generates the PUBLIC and SECRET Values based on Stellar SDK. def create(self, request): try: if 'app_id' not in request.data: response = {'status': 'FAIL', 'data': 'App ID field not f...
I've implemented the first experiment from the Reward Design via Online Gradient Ascent paper. I don't have any specific concerns, but it's my first time using multiprocessing or doing reinforcement learning, and I want to add this work to my portfolio. So I want to know if there is anything wrong with this code or if ...
Over the holidays I played around with coroutines and their use as two-in-one getter and setter methods: #! /usr/bin/env python3 # coroproperty.py - Coroutine-based two-in-one properties. # # Copyright (C) 2020 Richard Neumann <mail at richard dash neumann period de> # # This program is free software: you can redist...
I solved the following Kata on Codewars: https://www.codewars.com/kata/58905bfa1decb981da00009e/train/cpp It was a lot of fun to solve it. Here everything you need to know so no need to use the link. Synopsis A multi-floor building has a Lift in it. People are queued on different floors waiting for the Lift. Some peop...
I tried following the official solution of LC975 (https://leetcode.com/problems/odd-even-jump/), using a monotonic stack - i.e., I reimplemented their solution (Approach 1) from python in C++. TLDR Problem statement: Given an array of ints A, "good index" is an index from which the last element of A can be reached, thr...
My website has multiple pages that use the Google Maps api. Each page uses a different part of the api (e.g. autocomplete, displaying markers etc). However, every page needs to call the initMap() function for the api to be initialized. The logic that calls initMap() is controlled by google and it cannot take parameters...
Challenge posted 5 Dec 2020 to comp.lang.c This program is essentially the same as my Version 8 posted to that thread, but with some further cosmetic improvements. This program reads from stdin (or a named file) and writes its result to stdout, removing C comments from the text. It has to see through any sequences of B...
I am trying to find an optimal way to get the min and max limits from a list of lists provided a multiplier. I've tried two methods and I'm wondering if there is a more optimal solution that scales better in terms of performance when executed multiple times. import timeit def get_lower_upper_limits(inps): ranges, ...
I've created a Christmas tree using only HTML and CSS. It's pretty sure that the code can be written in a more efficient way. Also, the lights are turning on and off at the same time, is there a way to make them work independently? body { background-color: #9fd8ee; } .tree { display: flex; flex-direction: colu...
I am using a code similar to the following example to create a table with tkinter using Python 3: Each cell is individually created as a ttk.Label and displayed using .grid(row, column) Some of my values get updated while the program is running with tk.StringVar().set() Each value is unique and has it's own variable...
I am pretty sure my code does not follow PEP 8 and would definitely want someone to point out my errors specifically. I am open any form of criticism or suggestions. import chess import chess.engine import time import stockfish engine = chess.engine.SimpleEngine.popen_uci("stockfish") board = chess.Board() def pact()...
The previous day, I helped someone build a really simple console "Lucky Number" game. It's really simple, the user has to choose a number, the program will also choose one, and if there's a match between the two, the user wins. To made the game a bit more visual, the numbers are initially blue and displayed in a nice w...
I am recently learning OOP concepts and thought that implementing a simple workflow simulating a vending machine would help me put what I've learnt into practice. I am open to criticisms and feedback, and am mainly trying to get some comments regarding: Best practices for OOP File structure Data encapsulation Unit tes...
In this method, I was tasked to take in a list of TemplateMap and attach dynamic parameters and in a certain case, add further templates to the returned list. This functionality exists within a report rendering service and at this stage, I am constructing the templates to send into the rendering function. ParameterName...
I am attempting to write a Python code to simulate many particles in a confined box. These particles behave in such a way that they move in the box in straight lines with a slight angular noise (small changes in the direction of the particle path). They should interact by acknowledging the other particle and 'shuffle/s...
This is my project(beta) after studying for 3 weeks. It took me more or less 30 hours of writing and researching. I would appreciate a review based on my beginner level. I'm very proud of it, it was hard work for me. Learned... Files management, control if for while loops, integers and strings, lists dictionaries and t...
A part of my day job is load-testing of our infrastructure. I wanted a tool to quickly write a load scenario for some application (DB, HTTP, ...). I have tried to write something in Haskell (a fairly new language for me). Would someone help me improve by reviewing the code? This is the main module: module Load.Core ...
I would very much appreciate it if someone could review the php script below for any security risks. I have a live website using shared hosting. There's a page that accepts text submissions from users. The message is sent to a phpmyadmin database table; nothing is printed immediately to HTML. The messages are stored in...
I'm currently learning C# in hopes of making games on my own using Unity. I'm using the Udemy class by Denis Panjuta and followed 8 sections before making my first app by myself. The 8 sections include Datatypes and Variables, Functions and Methods, Making decisions, Loops, OOP, Arrays and List, and Debugging. I know h...
I had a task to create a simple hangman game using O.O.P. with Javascript. It had to render the puzzle and remaining guesses to the DOM but didn't require any C.S.S. This is what I created. This is my index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=...
I want to find the largest element in a sorted array, where the differences between the consecutive elements of the array are increasing, that is smaller than x. For example: [1, 3, 10, 17, 50, 1000] is a valid input , because the consecutive differences (2,7,7,33,950) are in increasing order. [1, 3, 4, 10, 18] is no...
I've recently started working on my own game engine and I have been thinking about creating my own model format. Since text usually takes a long time to load and process I decided to make a binary file. After a little work, I already had the basic concept: The concept The header: The header of the file contains the ma...
I’m learning python and have built a very simple program that just renames files. It makes all letters lowercase and replaces spaces and %20-instances with underscores and then copies them into a ‘Finished’ folder. I’m looking for better methods and approaches of writing and structuring my code. Can anybody find any ob...
Overview A "from scratch" generic quicksort implemented in C, which allows predicate (returning bool, like C++ rather than int like C), and any type via void*. Using memcpy for the swap() implementation was the general solution. But this was about twice as slow as declared types for small types (int, float, double etc)...
I'm trying to implement a function (a template-helper function) which provides a simple merge-like functionality for both arrays and objects. The two functions are basically looks identical: const mergeArrays = (first, ...rest) => rest.reduce((acc, curr) => ([ ...acc, ...curr]), first); const mergeObjects = (first, ...
This code works, and I'm pretty sure it's mathematically/algorithmically correct: model = tf.keras.applications.MobileNet(include_top=False,input_shape=INPUT_SHAPE) model.trainable = False model = tf.keras.Sequential([ model, tf.keras.layers.Flatten(), tf.keras.layers.Dense( 1, "sigmoid" ), ]) ...
This is a (more or less) continuation of a previous post I made: Generic implementation of a hashtable with double-linked list. I got lots of valuable feedback, so I decided to rewrite the entire module from scratch to improve readability, performance and also to add new features. Specifications: The hashmap implement...
System76 sells laptops that come preloaded with their Ubuntu spinoff Pop_OS. The laptop keyboards have backlights that can change color and brightness, but so far I haven't found any way to keep the setting when I restart the machine; it goes back to bright white. Here's someone else struggling with the same problem so...
Just finished my canvas game that is more or less replica of the old school arcade game "Space Invaders". The code below chooses two random enemies every second (approximately) from the enemies array to shoot projectiles. If there are two or more enemies left in the array I want two random enemies to shoot every second...
I am trying to create an optimized 16-bit division algorithm for the AVR ATMEGA1284. The goal is to reduce the number of clock cycles as much as possible. AVR INSTRUCTION SET MANUAL: https://ww1.microchip.com/downloads/en/devicedoc/atmel-0856-avr-instruction-set-manual.pdf AVR200: Multiply and Divide Routines: https:/...
This is the first project I am attempting in Python, and my first time on Stack Exchange, so please be kind. The game uses a text file with lots of words. I was wondering how to improve the game by having different difficulty levels. E.g. easy for 1-4 letters, medium for 5-8 letters, hard for 9+ letters in the word. Al...
The idea of a prime sieve is fascinating - but it has to be segmented to increase the locality of the code if you want it to be fast. Walish's segmented_sieve.cpp (see below)showed me that it works - fast. It took me some time to understand how the segments are managed. Once my version was working, it was 5% faster tha...
The program takes 2 decimals as input and an operator (+, -, *, /, ^) so far. Any suggestions to make this code cleaner or shorter? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Calculator { class Program { static void Main...
This is a follow-up question for A recursive_transform Template Function Implementation with std::invocable concept in C++, A recursive_transform Template Function Implementation with std::invocable Concept and Execution Policy in C++, A recursive_transform for std::vector with various return type and A recursive_invok...
The question is: To select 2 numbers out of n positive integer inputs (order matters), where the number that is placed anywhere before the second must be greater than the second by a given number m. Count the total number of selections. An example answer would be, given the inputs 5 1 3 2 4 and m is 0, the total number...
My goal was to have a single page display bulk amounts of media without the need to load new pages. I also wanted it to be able to load fast, so the generator uses a JavaScript array to display one item at a time. The user can move through the array backwards and forwards with the use of two buttons. Images, video and ...
I try to use unittest for conference class, but I am not sure that I have considered all condition or more complex tests should be added? conference.py from datetime import timedelta, datetime class Conference: def __init__(self): self.inputs ='input.txt' self.outputs = 'output.txt' self....
I just finished a small assignment and I would like to get some feedback about the implementation here. Basically, it was all about distributing items ("talks" in this case) throughout the day based on the time constraints (their duration). For instance, a given place have different "tracks" each of which has a morning...
Today I am working on refactoring and documenting some ancient Delphi code. In that language, which is derived from Pascal, there are three forms of comments: (* This is the original Pascal style comment, which is never used in my files *) { this is TurboPascal-style comment which I want to remove } // This is a Delph...