instruction
stringlengths
71
95.1k
Story Original link written in korean Jordi, the architect of a construction company, received a request from a customer for an estimate for the construction of a raceway. According to the raceway design drawing provided, the raceway site is in the form of an N x N square grid, each grid being 1 x 1. In the design draw...
The whole project would be a bit much to post, but there were a couple of questions that came up while I worked on this project. This is a fully working space invader game I coded in C++ with SDL2. I am an experienced C# developer and first done this in C# using MonoGame and then "ported" it over to SDL2. Platform is W...
Bit of a basic question but I was creating a ancestor/family tree app thingy (haven't really worked out the details) and I wrote a small start-up program (seen below) which checks the AppData directory exists and the config file exist (consisting of the number of tree and their respective names). I was wondering if it'...
I recently started a project which has a database of rail cars for a train simulator. Im trying to set up a way to filter the data based upon 4 categories "Car Type", "Road Name", "Pack", and "Area of Origin". I was able to get the dropdown menus to work but they way I did it seems a bit cumbersome. Essentially I have ...
I made this little tool for something I was trying to accomplish at work. It works as intended but a personal goal of mine is to improve my code design so it's more simple, readable, and contributable. Here is the repo but a snippet of relevant code is at bottom of the question. The main thing I'm seeking help on is th...
Simple Machine Translator(SML) is a simulator that executes code written in hexadecimal. It supports features such as read, write, add, subtract and many more. My previous question concerning this minimal exercise link can be found here for those who wants to follow up. I made a lot of changes, restructured and move th...
Hello I have the following code, where I need to do many checks of calls from the database, My TypeEnum: export enum ProductTypes { equipament = 'equipament', component = 'component', } this is my use case class: export class AssignProductUseCase implements IUseCase<AssignProductDTO, Promise<Either<AppError,...
Introduction I'm working with Java 1.8. There is a lot of repetition in the MessageHandler class that I would like to remove but I'm having trouble implementing a fix. External Code I'm working with a message library that I should avoid changing. This library consists of these files: BaseMessage.java package external; ...
This is a follow-up question for A Summation Function For Arbitrary Nested Vector Implementation In C++ and A Summation Function For Various Type Arbitrary Nested Iterable Implementation in C++. Besides the summation result, I am trying to get the element count in arbitrary nested iterable things. For example, there ar...
I have a json string ProcessValue in which I need to extract a particular key (client_id) value and then I need to encode that value using HttpUtility.HtmlEncode and put it back in the same JSON string. ProcessValue is one of the header name which has a json value in it. Below is my code which does that but I am deseri...
Story Original Link written in korean Frodo, a backcountry explorer, came to explore an underground cave with n rooms during his expedition. All rooms are numbered 0 through n-1. There are many, the only entrances are connected with 0 rooms. Each room is connected to each other by passages that allow passage in both di...
This code is a improved version of implementation which asked for a review: Product of all but one number in a sequence. #include <stdio.h> #include <stdlib.h> //without division, with O(n) time, but extra space complexity as suggested //return new array on the heap int *derive_products(const int *nums, int count...
This class is being used to build some complex strings JSON and MySql. Note: I'm not using the JSon converter because is difficult to create the structures the at that I want them and MySQL require extra escape characters. At a later date, I may consider upgrading the class using Regular Expressions or CreateObject("Sy...
I have a list of integers, e.g. i=[1,7,3,1,5] which I first transform to a list of the respective binary representations of length L, e.g. b=["001","111","011","001","101"] with L=3. Now I want to compute at how many of the L positions in the binary representation there is a 1 as well as a zero 0. In my example the res...
Snake Snake first appeared in the 1970s. Since then it has become a video game classic that is pre-installed on many systems. The rules are simple: Food (often an apple) appears randomly on the grid. When the snake "eats" the food, the snake grows a little. The player loses if the snake hits the edge of the grid or th...
I'm writing a class that works with a list of objects of a specific type (which is defined as class attribute). The class can either append objects via the append method or receive them as an initialisation parameter. when appending, some validation code is run. In the __init__ method i need to perform the same validat...
I tried using recursion for this. Here is the code public static string ReverseWords(string str) { var splitArr = str.Split(" "); if(splitArr.Length == 1) return splitArr[0]; return splitArr[splitArr.Length - 1] + " " + ReverseWords(String.Join(" ", splitArr.Take(splitArr.Length - 1)); }
Just looking for reviews to improve my coding and my structure of C#. It feels I probably have some unnecessary code that is not needed, been following some YouTube videos to accomplish some tasks. Also, I am not sure if the actual structure is okay of my program. Would like to hear some opinions. I am working on a pro...
Task This code accomplishes the Time Difference of Arrival (TDoA) multilateration problem (see) using gradient descent (known otherwise as steepest descent). Goal I'm looking to: a) Improve speed: In practice, the algorithm will need to accomplish localizations 'on the fly'. Currently, it takes about a minute or so to ...
Here is my beginner code for dealing with a linked list. I appreciate any comments on structure, logic, formatting, and anything small or large. I have run the code using gcc and tested the small main function using Valgrind with no errors. ll.h #ifndef LL_H #define LL_H #include <assert.h> #include <stdbool.h> #inclu...
I'm doing a planning tool for users around the world. A feature is that something has to be ready at a user-specified time of day. I imagine this being a TimeSpan. For argument sake let's say 8 AM. The answer seems easy at first DateTimeOffset.Now.Today.AddDays(1).Add(TimeSpan.FromHours(8)) but that will not generate t...
From my experience in C# programming I think that DI is important. But it's not possible to do it same way in Rust. There are some DI frameworks but I've come with an idea on how it can be made and decided to implement it my way. My implementation uses only constructor injection, no container needed. I'm only learning ...
I've created a navigation spacer bar that has a hue background. To separate different aspects of content it was imported to Inkscape then exported as an SVG. It uses base64 image which I’m not sure is the optimal way to achieve including the image within SVG. The code is below. This is the result: <!-- ^^^...
I decided to create a rock, paper, scissors game in C#. I realised early on that standard if-else evaluation in rock-paper-scissors would take up a lot of code. So I decided to use more efficient choice comparison in my game as you will see below. Is this an efficient choice comparison? Or should I stick to 'if else'. ...
I have this piece of code in my program, where I assign 10000 as the size of the buffer. Now How can I check if the file that I am copying is less than 10000, for example 5000, than how to free the remaining 5000 back? Thank You. private void copyFile(File in, File out) { var buffer = new byte[10000]; t...
std::array < char, 27 > new_alphabet() { std::array < int, 26 > a; static std::random_device rd; static std::mt19937 mte(rd()); std::uniform_int_distribution < int > dist(0, 25); std::generate(a.begin(), a.end(), [ & ]() { return dist(mte); }); std::array < char, 27 > alpha = { "ABCDEFGHIJKLMN...
Solving this problem. Right now, my solution entails finding the largest sorted sublist, starting from the beginning, all the way to the end. However, I feel like the way I wrote the sorted_sublist function can definitely be improved. Besides that, I'm looking for any way to improve the way I write my code. My code: wi...
link here I'll include a solution in Python and C++ and you can review one. I'm mostly interested in reviewing the C++ code which is a thing I recently started learning; those who don't know C++ can review the Python code. Problem statement Implement atoi which converts a string to an integer. The function first disc...
I'm posting a solution for LeetCode's "String to Integer (atoi)". If you'd like to review, please do. Thank you! Problem Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from th...
Here's my attempt. I iterate through each vertex in the graph and do a DFS to see if I reach back on a vertex I already visited in this vertex's iteration. It seems to work but I am not satisfied with how I short-circuit my code when it found a cycle using if clauses, could not think of a better way to do that. public ...
I'm looking to simplify the below code for validating an onChange event. The allowedInput is a regex that is passed (optional) from all the form components. const validatedOnChange = (event: ChangeEvent<HTMLInputElement>): void => { if (isDisabled) { return; } if (allowedInput) {...
I am trying to solve below problem to improve my skill. I would appreciate it if someone improve my code in a better way. Given the mapping a = 1, b = 2, ... z = 26, and an encoded message, count the number of ways it can be decoded. For example, the message '111' would give 3, since it could be decoded as 'aaa', 'ka',...
I want to make my calculator code shorter. Here is my code: extern "C" { int printf(const char *format, ...); extern int scanf(const char *format, ...); double pow(double x, double y); } int main() { do { double num1; double a, b = 1; char ch1; float r; scanf...
My aim is to merge all workbooks having multiple sheets from any specified folder to one workbook of multiple sheets. The problem is I don’t want external links to be maintained, If I use "breaklink" it will break all links(external links) b/w sheets of all workbooks. what I exactly I need is, After merging all sheets ...
I am looking to alter one combobox between two DataSources depending on the button clicked. Here are the 2 lists: List<ComplaintModel> productNames = new List<ComplaintModel>(); List<ComplaintModel> specificProductNames = new List<ComplaintModel>(); This is the functions for both of the Data Sources: public Complaints...
Problem space: I have the concept of a Job that needs to be processed. Jobs need to be processed sequentially, as one may depend on another. It's possible for a Job to be paused, in which case the next Job should not be started - the Job should either be explicitly continued, or cancelled, in order to get the next one ...
I've seen in Java a class vector implemented, it's very useful because you can declare vectors without say the size of the vector explicitly, and it has a lot of functions operating with its elements. But it hasn't implemented mathematical operations: sum, subtract, inner and outer products and so on. So I've made and ...
This is a follow-up question for A recursive_count Function For Various Type Arbitrary Nested Iterable Implementation in C++. Thanks to G. Sliepen's answer. Based on the mentioned suggestion, the naming of the function for getting the element count in arbitrary nested iterables is updated into recursive_size. Here, I a...
I was wondering if you'd be able to review my basic Tax Calculator that incorporates OOP techniques. I'd greatly appreciate it if you didn't mention about my variable naming convention i.e. Hungarian notation, it is a requirement for my university course. Also, please ignore the fact it says about "Windows Forms Applic...
I've started working on a data annotation tool to do segmentation on images or from a video file. I decided to use Electron because I kind of like designing GUI with HTML/CSS and that it's very easy to set up. Basically, the application as a limited set of functionality for now : Select an input folder, video file or ...
Taken the following Exercise from Cracking the coding interview: Given a linked list which might contain a loop, implement an algorithm that returns the node at the beginning of the loop (if one exists). EXAMPLE Input: A -> B -> C -> D -> E -> C [the same C as earlier] Output: C My Solution here was to store each ...
I have built a small tkinter program that I want to have a few different themes it can change between. In order to dynamically change the colours/font for each widget I have subclassed tkinter, and I am just wondering if there is any smarter way of doing this? I am aware that ttk can do something similar, but then as I...
So, the concept of the code is simple. Take any file, read the binary character counts and construct a Huffman tree, and then output the bit code of each character (displayed as its 8-bit value). This is for a class where we're learning proper modern C++ practices. So no C-style casting, no manual allocations, and unsa...
I'm trying to write a TRANSACTION with node-postgres in an Express API. [The code below works as it's supposed to, mostly looking for what should be corrected/changed] This would be a POST request that creates a "transaction" and updates a record in a separate table. So basically a couple of queries at once. Below is t...
I am looking for help for two things: 1.how precise this approximation is (such as Big O or percent error) 2. How efficient the algorithm for time / space usage. I created an algorithm to estimate an integral. The algorithm creates squares and adds the estimate of the remain sum times the area together. Since this func...
I have some things (I'll call them Items) that can either be passed around directly or referred to by reference. For the items that are referred to, there is a storage from which the items can be obtained. My problem is that I want to keep the storage immutable, but I can't figure out how to do so elegantly. It seems t...
I've written a little bit of code to pull data out of my FitBit and store it in a GCP database for further analysis. The project is available here, but what I'd like to ask about specifically is the Flask app & code I'm using to serve up a web interface for the project: from datetime import date import os from flask ...
I am looking for help for two things. proof of correctness (the tests have passed, but I do not now how to prove it correct) Improvements on the Algorithm Efficiency. The algorithm goes through 2 arrays arrays through permutations. The ordering is set up based on the array index, NOT the number inside the index. Note...
So, here is the code: #pragma once #include <vector> #include <iostream> #include <queue> #include <functional> using node = int; using cost = int; using arc = std::pair<node, cost>; using AdjList = std::vector<std::vector<arc>>; // first is node, second is cost class Graph { private: AdjList adjList; std:...
I have the following code working fine: rowData is an object and I want to display download button only if the completePathName is not null and hence I did the following which is working fine. I am wondering if I can improve the following code in some manner or the conditional if that I have used is fine? buttonTemplat...
Here's a fairly simple task from CSES Problem Set - Permutations 1070 that reads: A permutation of integers 1,2, …, n is called beautiful if there are no adjacent elements whose difference is 1. Given n, construct a beautiful permutation if such a permutation exist The constraints are pretty tight: Time limit: 1.00 ...
I have a list of N integers, e.g. intList=[1,7,3,1,5] with N=5 and all integers have a binary representation of lenght l, e.g. binList=["001","111","011","001","101"] with l=3. Now I want to add random flips from 1->0 & 0->1. Each of the l positions should flip with a probabiliy mu. (mu varies over many magnitudes & N ...
Hello this is one of my learning purposes projects, a little bit modified version of a popular game called Hangman. I am a beginner so if you guys could point out some obvious mistakes/good practices/better solutions or implementations I will be grateful. Here is a preview hosted on github + repository And my code : H...
Hi everyone ! I am new to react and more of a backend developper (working with Django, Symfony, Code Igniter mostly). But I want to get better at frontend and React seems to have a great community so I thought it was a good place to start :) (not litteral start, I got basics in HTML, CSS and JS !) So I took the officia...
Here's my attempt, I believe the runtime is O(V*(ElogE + log E)) since the while loop runs V times and it takes ElogE + log E to do the priority queue operations inside the loop. class Edge implements Comparable<Edge> { T source; T destination; int weight; public Edge(T source, T destination, int weight) { ...
So this is the code to a calculator I made for a game. Essentially what the calculator does is, it calculates the cost of buying the next stat. So I wrote the code just for the Human race and the strength stat. From the way I see it, I will have to do for each race the same code 3 times for each stat. I was hoping ther...
I have an interface, implemented by a service, that I inject here and there in my codebase. I would like to give the opportunity to use either the normal method or its async equivalent. public interface IServiceDoStuff { void DoSomeHeavyWork(); Task DoSomeHeavyWorkAsync(); } In my implementation I just do...
LeetCode 125 requires receiving a string and checking if it is a valid palindrome. I have done this and am confident with an int and a single word, but this question requires the use a of a sentence with non-alphanumeric characters. The function must ignore non-alphanumeric characters and whitespaces. public bool isPal...
What follows is a Dockerfile for my Vim settings, so I could use it anywhere. While it is public, it is not intended for mass usage, and so the face that it creates the password in the build process isn't a problem. There is no COMMAND at the end because it is intended to be run with mount. The command I run it with do...
I wanted to practice more object-oriented programming and decided to write a console based Quiz Application. In one of my previous question, a reviewer left some links on SOLID design pattern, I went through it and tried as much as possible to follow it to the best of my ability. MAJOR CONCERNS I used boost library to...
For any input symmetric matrix with zero diagonals W, I have the following implementation in PyTorch. I was wondering if the following can be improved in terms of efficiency, P.S. Would current implementation break backpropagation? import torch W = torch.tensor([[0,1,0,0,0,0,0,0,0], [1,0,1,0,0,1,0,0,...
There is an source and target. example: source:[a,b,e,d,s,t,c,v,t] target:[a,e,v,g,r,b,c,v,t] target and source have same number of elements. how can I count elements in source ordered correctly according to target? so, target means that elements in source should be ordered in target's order. and count maximum number o...
I solved Project Euler #60: The primes 3, 7, 109, and 673, are quite remarkable. By taking any two primes and concatenating them in any order the result will always be prime. For example, taking 7 and 109, both 7109 and 1097 are prime. The sum of these four primes, 792, represents the lowest sum for a set of four prim...
I'm currently trying to improve my skills in Java. I have created a simple console-based bank system with four classes. A user interface, account holder, abstract bank account class which account holder extends, and finally a main to run the UI. Basically, I want to get some suggested improvements and ideas on how to i...
Currently, my game is a basic target shooting game. The targets rise to the top, if the target reaches the top an end screen is shown. If you shoot a target you get more score, and the speed in which the targets move increases. If you shoot the fake target, the end screen is shown If anyone could help me and clean up...
Problem You are given an HxW matrix. Each element is either 0 (passable space) or 1 (wall). Given that you can remove one wall, find the shortest path from [0,0] (start) to [width-1, height-1] (end). Test cases Inputs: int[][] case 1 = { {0, 1, 1, 0}, {0, 0, 0, 1}, {1, 1, 0, 0}, {1, 1, 1, 0...
My adjacency matrix looks like this, where non-zero weights denote edges. [0, 2, 0, 0, 3] [2, 0, 2, 4, 0] [0, 2, 0, 3, 0] [0, 4, 3, 0, 1] [3, 0, 0, 1, 0] Here's my attempt: //nested class, only showing the relevant parts of code class Edge implements Comparable<Edge> { int source; int destination; int weigh...
I wrote a SHA256 password cracker. I initially used lists to store the information in list1.txt and list2.txt but I would end up getting memory overloads. So I now use files. I noticed that when I made this transition, the programme speed reduced hugely. Is there a way to optimise the speed of this programming without ...
I was asked to create a method that would: Return a Change object or null if there was no possible change The "machine" has unlimited bills of: 2, 5 and 10 The Change object must return the most minimal amount of bills possible This was a question asked in codingame.com and wanted to investigate further on it: packag...
On recent interview I was asked to write program that print "Zero" and "One" to stdout from different threads, but in ordered manner: zero one zero one zero one ... Now I decided to write more generalized solution and this is my first attempt: #include <string> #include <vector> #include <mutex> #include <initializer_...
Question -You are given a primitive calculator that can perform the following three operations with the current number : multiply by 2, multiply by 3, or add 1 to . Your goal is given apositive integer , find the minimum number of operations needed to obtain the number starting from the number 1. ll n; cin>>n; vect...
I wrote a logger module in C, that is essentially a printf wrapper + some additional color coding: I'd like get feedback how I can improve performance and also use better coding style. Right now, I feel like a lot of the code is redundant/can be written in a better way. log.c #include <stdarg.h> #include <stdio.h> #in...
I have the following models: class Client(BaseModel): #other fields engineers = models.ManyToManyField(Engineer, null = True, blank = True, related_name='clients') class OrganizationMember(MPTTModel): designation = models.CharField(max_length = 100, blank = True) user = models.OneToOneField(User, on_de...
I have a project, for which I use Tokenauthentication with JWT Tokens. I am relatively new to Angular Development and rxjs in particular, so there are a lot of concepts I am likely not yet familiar with or can't apply properly. My Backend is Django 3, using the Django Rest Framework and rest_framework_simplejwt. What t...
So I've written a function which parses a fairly simple key-value pair syntax. Each pair can span across multiple lines, as long as the value does not have a colon in it. If it does, then any new line must be preceded by three spaces. For each pair, I create an object with the key, the value, and the offset at which th...
Here is a C program to print a heart star animation using a while loop written by myself. I've tested it on Ubuntu 18.04 (Bionic Beaver) and Ubuntu 20.04 (Focal Fossa). To animate it, I print a sequence of heart star patterns in different sizes. #include <stdio.h> #include <unistd.h> int main() { int i, j, h, k = ...
I've written bounded spigot algorithms(Spigot Algorithm) for e and pi. I would like to understand if there is anything I can do to make this more efficient. I've done things already like move the carry over check to the very end, precompute values etc. You run the functions and pass it the number of digits you want i.e...
I have a working string indexing method in Java and did convert in Kotlin. All methods shown below produce the same result but as I am really new to the Kotlin language I wanted to ask which of my two Kotlin implementations is semantically "more equal" to my Java code. Here is my Java code where "copiedList" is an Arra...
I'm trying to build a nav, but the way I currently have the data setup I'm having to map within a map with a map to get all of my data out - I have a feeling that this is a poor way of doing something and there may be a better solution? My code can also be found in a codesandbox here Both the data and jsx are up for de...
I have the following code in JS (using last ES2020), the current code check if the type is 'asporto' or 'takeaway' and adding to current date hours from a setup fo type 'takeaway' or 'asporto' and if another setup called limiteOreTakeaway/Asporto is !== '00:00:00' I have to check if the current time is greater than the...
I previously asked how can I simplify a validation process: How can I simplify this JQuery validation process? But in hindsight, what I really meant to ask was how can I turn that process into a reusable function. I'm going through some old code that I wrote, and I am trying to clean it up so there's not a lot of redun...
I have updated my previous code with the suggestions. I have also implemented concurrency to speed up the results. I'd be interested for comments on a more efficient use on concurrency / parallel processing / hyper-threading import concurrent.futures import hashlib import time def make_next_guess(guess): carry = ...
I created the following service for the purpose of sending in a file for parsing. I'm using the generics so that when I call parse() I can pass a custom type conforming to Codable. I'm not a huge fan of the repetition of do {} catch {} but I don't see any other way to avoid this. import Foundation enum JSONError: Erro...
The code I'm working on looks like this - All the way up to 50... (Not ideal) There can be anywhere from 1 to 100 anchor/div combinations, but more often than not in single digits so there's almost always a lot of redundant CSS rules. I was wondering if there was a better way to write the CSS / SCSS for this rather tha...
This question is a follow up to my previous question, link to the post can be found here. I really appreciate the reviewers especially @Edward's review. They highlighted great points which were considered whilst refactoring the codebase. OVERVIEW This project is a console-based quiz application. It can be constructed f...
I'm new to C and programming in general (some minimal prior exposure to JS and python). This is also my first time working with shell commands, scripts, and cron. This program works on my macOS and Lubuntu running on a VM (so long as you run as root). Using this program, you can set times throughout the day when your w...
I have a method that received a list of CoordinateBE : setExits(..) I want to update the existing coordinates list with a new coordinate only if there is no coordinate in the current list that has the same latitude and longitude. Example: List: [Coordinate: lat:23, long:24, Coordinate: lat:34, long:24] I am trying to a...
I'm a new self taught "programmer" that has been given the task at my job to parse through generated .txt test records and insert the data into a database. Usually when given a task like this I just hack together something that works, but I want to get better at creating smarter code. Basically, the program generates a...
I'm relatively new to programming and I was trying to work a project. I would like recommendations of how to annotate or comment my project and any improvement I could make to it, any suggestion is welcome, import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Text; import javax.xml.parsers.Docum...
I am solving a problem for Hackerrank where I have to count the number of palindromes in a given string. I have the following code which counts the number of palindromes accurately but times out for large strings. How do I make the code more time-efficient? def countPalindromes(s): num_palindrome = 0 for i...
This is a pretty simple working example using React-Redux to select a user from app.com/user/:userId and then fetch/display that user's info from a remote API Most of the examples/code I can find online use class-based components but since I already have part of a project written using a functional approach I'm looking...
This is a follow-up question for A recursive_count_if Function For Various Type Arbitrary Nested Iterable Implementation in C++. Thanks to Quuxplusone's answer and G. Sliepen's comments. Based on the mentioned std::vector<std::vector<std::string>> case, it indicates a problem about the process of unwrapping nested iter...
This code is a revised version of implementation which asked for a advice. Original question is here: Encode message by alphabets #include <stdio.h> #include <stdlib.h> #define MIN_ALPH 1 #define MAX_ALPH 26 unsigned int my_decode(unsigned int input) { unsigned int count = 0; unsigned int ddigit; int i; ...
I have written some code to solve the following interview question. Please advise how it can be improved. Thanks in advance. A unival tree (which stands for "universal value") is a tree where all nodes under it have the same value. Given the root to a binary tree, count the number of unival subtrees. For example, the f...
I have two lists of dictionaries where both have the same "id" key but otherwise different data. list1 = [{"id":1, "spam": 3, "eggs": 5}, {"id": 2, "spam": 5, "eggs": 7}] list2 = [{"id":1, "knights": 5, "coconuts": 2}, {"id": 2, "knights": 3, "cocounts": 8}] I know I can do a nested loop something like this (I know I ...
What I try to achieve I need to create a administration-panel for a website. Therefore, I need a possibility to protect the content of the panel via a password. The functionality doesn't have to be very advanced. I neither need a password-reset functionality nor the possibility to add more than one user. I also don't n...
Finally after a few months of searching and learning AJAX with pagination PHP and History.pushState() I created AJAX PHP pagination. Test page 1. Ajax(index.php) $(window).on('load', function () { // makes sure that whole site is loaded $('#status').fadeOut(); $('#preloader').delay(350).fadeOut('slow'); }); ...
I am writing a piece of code for some students and I came up with the following implementation of Floyd's algorithm for finding cycles in linked lists. I was wondering if there are ways I can improve what I have so far such that the result is more C++ idiomatic does not contain dumb mistakes associated with the generi...
quick question. I'm using Spring Boot and I created e.g. this class public interface ProductService { Page<Product> getPage(Pageable pageable); } @Service public class ProductServiceImpl implements ProductService { @Autowired private ProductRepository productRepository; @Override public Page<Pr...
Background In the field of optimal control, it is part of everyday business to solve ordinary differential equations numerically. A differential equation system or dynamic system describes e.g. the physical behavior of an object over time. Every single equation can often be associated with a special state (position, ve...