All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

Error Reporting in WPF app

I want to add an error reporting feature to my WPF app. I have the view for it created I just need to know when to call it. I am used to web development and this is my first WPF app. ''' ...
Henners2002's user avatar
0 votes
1 answer
17 views

Find all combinations of two companies grouped by the projects they are tendering for

I am working on the task to get all possible combinations (pairs) of ID's (companies) which participated in one bid and create a new data frame with ID_1, ID_2, matching parameter (tender ID). I have ...
Vasya_Ch's user avatar
0 votes
0 answers
21 views

A web component for rendering radial pie charts in HTML documents

Intro In the previous iteration, I was advised to produce a web component. See what I have: Code rodde-radial-pie-chart.js: ...
coderodde's user avatar
  • 27k
0 votes
0 answers
11 views

specify a policy for allowing access to a table through a foreign key

Consider the following two tables in a PostgreSQL database: ...
Nathan Osman's user avatar
1 vote
1 answer
123 views

Iterating the octree while keeping track of the positive neighboring nodes

Review context can be found here: 32x32x32 Units Octree With 15-Bit Voxels: Second Edition The above question and the self answer include information such as the definition of the ...
user16217248's user avatar
2 votes
1 answer
39 views

minitalk project using Rust | Communication between process using UNIX Signals

I am trying to build minitalk project from 42 school using Rust instead of C. This is a communication program between a client and a server. Both are process. To achieve this I am only allowed to use ...
byk's user avatar
  • 21
0 votes
1 answer
43 views

Verification job with multiple type of batch verifiers

I have a use case where a verification batch job (non-generic) verifies domains based on its input e.g domain_type, batch_pointer etc. The verification handles it based on the domain type which uses ...
user3239193's user avatar
-1 votes
0 answers
41 views

LeetCode: Remove Duplicate Letters [closed]

I'm trying to solve this question: https://leetcode.com/problems/remove-duplicate-letters/description/?envType=daily-question&envId=2023-09-26 which is Given a string s, remove duplicate letters ...
evirac's user avatar
  • 11
4 votes
4 answers
972 views

Yet another shared_ptr implementation for learning purposes

C++ shared_ptr implemented as a coding practice and learning purposes. It uses std::shared_ptr interface. Basic tests are included (using single header Catch 2) Some methods are omitted to keep the ...
Tomas Tintera's user avatar
1 vote
0 answers
30 views

Custom React Hook For Using Web Socket

I am aware that there are packages containing custom React hooks for web sockets, but since I am learning React I tried to create my own. My intention was to create a custom hook that connects to my ...
muell's user avatar
  • 111
1 vote
1 answer
88 views

Business logic verification template

I have a use case of template design pattern with generics as mentioned below. I have AbstractVerificationHandler that provides template for verification business ...
user3239193's user avatar
0 votes
0 answers
20 views

General setup for ASP.net REST webapi

I am currently building a REST webapi. Right now I am wondering if this design is in the right direction. Firstly, I am using entity framework. I like to call the items in the database DbItems. The ...
Bas Visscher's user avatar
3 votes
2 answers
139 views

Add offset to all filenames

From all the files in a directory, the method shiftFilenamesOffset is to increment the numeric part (int) of the alphanumeric filename by offset each time, and ...
Tobias321's user avatar
1 vote
0 answers
25 views

Rust rocket file upload endpoint

I'm currently learning rust and need a rocket file upload enpoint for a project. This is what i currently have: It needs to get the file, convert it and add a entry with the file name and timestamp to ...
ksjdfh's user avatar
  • 11
1 vote
1 answer
49 views

Performance of this BCrypt lossless compressor

The following code compresses a 60-byte BCrypt MCF into 40 bytes. Does anyone see room for performance or other optimizations? For example, I should replace Guava's ...
Oliver's user avatar
  • 73
0 votes
0 answers
30 views

How to read key value in JSON output without using index [closed]

Here is a sample JSON output myJSON: ...
Patrick Hennessey's user avatar
0 votes
0 answers
25 views

Testing the cost of boxing in System.Reactive Observables

I was curious whether boxing impacts performance in a long chain of IObservable<T> operators where T is a value type, and ...
Kevin Krumwiede's user avatar
2 votes
0 answers
35 views

Python tic-tac-toe using tkinter

I recently made this tic-tac-toe program using tkinter, but I am quite new to tkinter, so I would be grateful for tips on how to improve the program. (Note that the actual tic-tac-toe logic is being ...
sbottingota's user avatar
1 vote
1 answer
41 views

Recursively create a TreeView for file paths using C# and WPF

I'm building a program that allows the user to monitor files on their local system. To display the files, I created a TreeView using ...
Ramza's user avatar
  • 169
3 votes
1 answer
74 views

Expirable LRU cache

The requirements are: evict any expired items find the items with the lowest priority and evict the least recently used one Any feedback would be appreciated. ...
random_letter's user avatar
0 votes
1 answer
29 views

Mapping Entity Database Table to Model

I am not sure of the correct way to do this. I want to separate my Entity database model from the model I use throughout my application, as it will have fields in it that I may not want added to the ...
Scottish Smile's user avatar
5 votes
3 answers
414 views

Implementing a --assume-yes/--assume-no command line flag to affect a `input()` based `confirm()` function

I have a Python command line application that needs to ask the user for confirmation at some point. I want to add a --assume-yes/...
Lucas's user avatar
  • 151
2 votes
2 answers
95 views

Defining hardware components structure

I'm writing firmware for my Arduino project, and I'm struggling with a clean, scalable hardware mapping structure. Initially, I had the following namespace: ...
Dead1nside's user avatar
1 vote
0 answers
51 views

Find character at given index in a sorted sub strings

For a given string say dbac the possible substrings are [d,db,dba,dbac,b,ba,bac,a,ac] . Sort them and concatenate to a string: ...
technotigr's user avatar
3 votes
2 answers
572 views

Banking System in C++ [V2]

this is the second version of my BankingSystem in C++ for the first one go here: Banking System console app in C++ I did quite a lot of changes since the last version mainly spliting the User class ...
Guy's user avatar
  • 177
0 votes
0 answers
25 views

Executing a Method Twice Concurrently for the Same Object

Q1: considering the code below: Is there something wrong with this approach where the protocol object is shared between peers, and each peer runs the object's run method and keep it running? Q2: ...
ohxdMAGsDCiCJ's user avatar
-3 votes
0 answers
20 views

Minimize payment algorithm [closed]

I was solving the following task: There is a vector of people's ratings. You have to distribute money between people, observing the following conditions: • Payment is a multiple of 500. • Min payments ...
mascai's user avatar
  • 369
0 votes
2 answers
54 views

Optimize and Simplify Raycasting Code in Unity for Store Clerk Interaction?

I plan to use a raycast for interacting with all things in my games but Im afraid itll be too laggy how can I shorten this code up? ...
user22619516's user avatar
2 votes
1 answer
146 views

Rust implementation of fibers

I am still new to rust, so any comment about what is the rust way of doing things is welcome. this is a hand-rolled implementation of fibers or user-land context-switching. ...
Ralender's user avatar
-1 votes
0 answers
25 views

Counting unfair semaphore implementation in Java [closed]

I am implementing Java's Counting Semaphore's acquire() and release() methods and using it in a multi-producer-consumer problem. Semaphore class ...
vvs14's user avatar
  • 1
8 votes
9 answers
3k views

Can I lessen the use of boolean flag variables in this snippet?

Below snippet is part of a game application's logic and the Update function is called every frame (about 60 times a second). ...
Mukul Kumar's user avatar
0 votes
0 answers
8 views

Creating a matrix or matrices for positioning squares on screen

The following implements a mix of hard-code (manual pick and choose) and abstracted solution for creating and placing some squares on screen using different matrix patterns for positioning. Each ...
cpicanco's user avatar
  • 499
1 vote
1 answer
31 views

Calculating the sum of all k-sized sub-arrays in an array using sliding window algorithm

I need to calculate the sum of all k-sized sub-arrays in an array using sliding window algorithm. Is that a valid sliding window algorithm? If not, why? ...
Alekam's user avatar
  • 11
0 votes
0 answers
18 views

Converting a nested for-each to use LINQ and JOIN [closed]

I have some for-each loops I am trying to convert to use LINQ with probably a JOIN or maybe ...
LonelySemiColon's user avatar
2 votes
0 answers
11 views

Recording/Playback thread device in Object Pascal

I have developed an audio recording and playback base device in Free Pascal. This device is built on Free Pascal's TThread class and utilizes the low-level audio ...
cpicanco's user avatar
  • 499
-1 votes
0 answers
24 views

pure C++ Deep Learning Library with dynamic and lazy performed computational graph [closed]

I've started creating a deep learning framework in my spare time this year,you can find it here: https://github.com/xEricCardozo/deep-learning-library The code isn't fully documented yet, but it's ...
Eric Cardozo's user avatar
2 votes
1 answer
115 views

A very basic calculator in C#

I'm trying to learn C#, I made this calculator with my current knowledge. It works as I intended, but I'd appreciate some input on my code. ...
Adalwolf's user avatar
1 vote
3 answers
118 views

Count the number of triplets from an array with sums divisible by 'd'?

I got this question on my test and I did the only logical thing I could think of, which is run 3 nested loops and count each triplet. I obviously wouldn't pass test cases for large arrays... How can I ...
evirac's user avatar
  • 11
0 votes
0 answers
43 views

Keras Tuner Subclass for Time Series Cross-Validation

Custom Keras Tuner with Time Series Cross-Validation I have written my own subclass of the default Keras tuner Tune class. Objective: I needed a way to incorporate ...
Furkan Öztürk's user avatar
1 vote
0 answers
79 views

Modernized Javascript randomULID() Generator - Smaller and Optimized

I've finally finished these 2 scripts and would like to get some feedback. Seeking feedback on a modernized ULID (Universally Unique Lexicographically Sortable Identifier) generator in Javascript. ...
suchislife's user avatar
1 vote
0 answers
35 views

Implementing Simulated Annealing to the Travelling Salesman Problem ; plotting a graph of temperature(x axis) and cost on y axis ; animating using cv2

...
PuzzleheadedSoup-98's user avatar
0 votes
1 answer
119 views

Leetcode: 2327. Number of People Aware of a Secret

On day 1, one person discovers a secret. You are given an integer delay, which means that each person will share the secret with a new person every day, starting from delay days after discovering the ...
jason's user avatar
  • 1
2 votes
2 answers
133 views

Java Tic-Tac-Toe Game Implementation - Seeking Feedback and Best Practices

I have recently developed a Java program for a simple Tic-Tac-Toe game and would like to request a code review to improve its quality and learn from experienced developers. Below is the code for my ...
drunk mado's user avatar
3 votes
1 answer
100 views

Highly flexible tic-tac-toe terminal game in python

I have created a two-file tic-tac-toe game, with board.py containing most of the internal workings of the playing board. I intended to have ...
norway-yv's user avatar
  • 141
2 votes
0 answers
62 views

C++ Mock Library: Part 6

Parts C++ Mock Library: Part 1 C++ Mock Library: Part 2 C++ Mock Library: Part 3 C++ Mock Library: Part 4 C++ Mock Library: Part 5 C++ Mock Library: Part 6 Side Note: I will say the processes of ...
Martin York's user avatar
  • 93.9k
4 votes
4 answers
2k views

Banking System console app in C++

I built a banking system in C++ (still a lot of features to do but (I decided to post it here to see what can I change so I wont make those mistakes in the future). User header and c++ files Header <...
Guy's user avatar
  • 177
-1 votes
1 answer
50 views

Probability Library for .NET

I'm looking to create a library for dealing with probability in C#. My current system takes an ordered array of probabilities as an input then generates a random double. It then accumulates each ...
Henners2002's user avatar
0 votes
0 answers
49 views

A Java program interfacing with Gnuplot for generating triangle wave plots

Intro I have this repository. Given this command ...
coderodde's user avatar
  • 27k
1 vote
0 answers
43 views

C++ Mock Library: Part 5

Parts C++ Mock Library: Part 1 C++ Mock Library: Part 2 C++ Mock Library: Part 3 C++ Mock Library: Part 4 C++ Mock Library: Part 5 C++ Mock Library: Part 6 Overview So brief overview: Part3 was the ...
Martin York's user avatar
  • 93.9k
0 votes
0 answers
52 views

How can I further optimize this code regarding array operations? [closed]

In the following code I am performing XOR operation on two arrays result and DB, result is accessed after an offset called rotate1 in following. As you can see I am already doing AVX2 and loop ...
CryptoKitty's user avatar

15 30 50 per page
1
2 3 4 5
1547