All Questions

Filter by
Sorted by
Tagged with
1 vote
0 answers
13 views

Display summary statistics about Discord messages

This is just a program that displays summary statistics about discord messages sent to a certain user using a Discord data package. The CSV of messages to a user is ...
CareeeBugger's user avatar
-2 votes
1 answer
23 views

fstab entry variable inside or outside function [closed]

So, I am working on a script that mounts smb shares. I have this function: ...
Andres's user avatar
  • 1
-1 votes
0 answers
22 views

template class for reference storage [closed]

I need to create a template class that is able to store a reference to any type. I was told here it was a bad idea because of under the hood reference collapsing that would make the whole thing ...
J.M's user avatar
  • 109
4 votes
2 answers
179 views

Plot number of concurrent jobs on time axel

Description: Calculate the number of concurrently running jobs for any given minute during a day. Each Job is scheduled to run X ...
David's user avatar
  • 271
0 votes
0 answers
20 views

Artisan command: SOLID and Tests

A bit of context: I am writing an artisan command that allows the users to Create questions and answers, show a list of all questions and answers, practice questions and answers, show the stats, and ...
friday-json's user avatar
-2 votes
0 answers
16 views

How is the quality of my Flutter API request app? [closed]

I am currently looking for a job as a junior Flutter engineer, and this was the test question I received. ...
Hog Rider's user avatar
2 votes
1 answer
65 views

Evaluating Extended Operating Hours Past Midnight Across Timezones in PHP

I am working on a project that involves tracking the operating hours of businesses across different timezones. Some of these businesses operate past midnight, and to accommodate this, operating hours ...
tony's user avatar
  • 349
-5 votes
0 answers
15 views

.NET runtime version issue [closed]

Am facing a runtime version issue after deployment. Can anyone please guide me to resolve this issue https://iportaldev.ifc.org/p2/SAT/ ...
Vimalkumar's user avatar
2 votes
1 answer
45 views

Flask web normalizer CSV app

I've created a Flask application that processes Excel files uploaded by users. The application reads specific data based on client-specific keywords and generates a CSV file which users can download. ...
Pointless's user avatar
3 votes
1 answer
44 views

Simple C++ event loop - static vs dynamic dispatch performance

I have two extremely simple toy implementations of an event loop, and would like to understand the performance differences between them. First impl - events with a virtual 'handle' method - dynamic ...
Jnuk's user avatar
  • 33
2 votes
0 answers
32 views

Simple Profiler in Rust

I am writing code for a simple 'Profiler', using a struct, a hashmap, Options, and some methods. I call the profiler at many places in my code with the functions names, and the hashmap gets fed, ...
user24615633's user avatar
1 vote
0 answers
40 views

Coding puzzle - Passing year books

Question: There are n students, numbered from 1 to n, each with their own yearbook. They would like to pass their yearbooks around and get them signed by other students. You're given a list of n ...
Hariharasudhan Gunasekaran's user avatar
4 votes
0 answers
42 views

Image Rotation with Shear Transformation in C++

This is a follow-up question for Image Rotation and Transpose Functions Implementation in C++ and An Updated Multi-dimensional Image Data Structure with Variadic Template Functions in C++. I am trying ...
JimmyHu's user avatar
  • 4,748
2 votes
2 answers
73 views

BlackJack in python

I began creating blackjack in python; however, I'm looking to simulate it, so I'm thinking I'm going to need to optimize it so that I don't just leave my computer running for three hours waiting for ...
Joseph Beegle's user avatar
3 votes
1 answer
143 views

Snail matrix in Java - version III (generalizing)

Once again, in the previous version, Alexander Ivanchenko helped me with his awesome answer. Now, I have improved the toString() and, also, generalized the class ...
coderodde's user avatar
  • 28.3k
4 votes
1 answer
299 views

Snail matrix in Java - version II

(This post is the continuation of Snail matrix in Java. Also, this post has an continuation.) As previously, a snail matrix is any square matrix \$M_n = \mathbb{N}^{n \times n}\$ with cell elements ...
coderodde's user avatar
  • 28.3k
-3 votes
1 answer
41 views

Why does clang say `warning: variable '<X>' set but not used`? [closed]

Background I'm trying clang -Wall on a codebase that I maintain, and the following functions are triggering warnings. Question Why does clang think these are unused?...
KJ7LNW's user avatar
  • 95
2 votes
2 answers
190 views

Tic-tac-toe OOP Minimax Algorithm

I wrote a module that I intend to use in my next tic-tac-toe project. All it is is a class that stores the boardstate along with some methods/properties. The biggest thing is the minimax alg. As shown ...
flakpm's user avatar
  • 43
2 votes
1 answer
123 views

Dial up some obscure stats for the Chutes and Ladders game

Years ago, I wrote some code in Perl for the Chutes and Ladders game. I re-wrote the code here in Python. The code simulates one player in a game to see how many spins of the dial are needed to win ...
toolic's user avatar
  • 3,375
-3 votes
0 answers
48 views

Buckshot roulette, a turn based roulette game in Python [closed]

I have started this game to represent Buckshot roulette. I have been coding in python for maybe 2 months and don't know a whole too much about how to undergo this project. This is what I have so far, ...
Aw3sie's user avatar
  • 1
5 votes
2 answers
810 views

Snail matrix in Java

(This post has an continuation: Snail matrix in Java - version II.) Inspired by this post, I decided to solve that problem in Java. The idea is to decide on an \$n \in \mathbb{N}\$, create a square ...
coderodde's user avatar
  • 28.3k
0 votes
1 answer
55 views

Raw HTTP header parser

The code must produce the desired output Input ...
guest271314's user avatar
-1 votes
0 answers
34 views

Android app speed calculation from gps data using google play services

I have my java code that is working, but I am not quite sure how to know if my app works very well. I used some third party dependencies after adding them like this in the ...
Nadhir NACEF's user avatar
-10 votes
0 answers
42 views

C# Update() Overload(?) XXXXX: URGENT [closed]

https://hatebin.com/kyszaelfmr https://hatebin.com/lntnbnjgtn I know this looks atrocious( I have less than a day to finish the project), but currently the problem I'm facing is somewhat a Update() ...
PleaseSendHelp's user avatar
14 votes
4 answers
2k views

Create a snail matrix

Statement: Create a script that, given an integer \$n\$, create a square matrix of dimensions \$n \times n\$ with the numbers from \$1\$ to \$n^2\$, arranged in a snail pattern. Example: ...
Dorian Turba's user avatar
-2 votes
0 answers
28 views

Learn Java. SharedPreferences putStringSet [closed]

I'm studying java and exploring android Studio. I'm trying to save new string and add it to the list and then< i want this list to show me my saved strings after restarting the app. Unfortunately, ...
eeerele's user avatar
12 votes
2 answers
1k views

Header-only log-structured database

I'm seeking a code review for the ~2000 lines of code. Makefile and tests are available at https://github.com/torrentg/logdb. I would appreciate feedback on the following aspects: Overall code ...
Gerard Torrent's user avatar
6 votes
2 answers
80 views

Observer pattern written in C++

I just carefully studied the observer pattern. And I wrote a demo snippet to better undertand it. I am not so sure that if it's the right way to define ...
John's user avatar
  • 89
1 vote
0 answers
26 views

Collecting inputs from a list of file names or stdin if there is no input files

In my program, I want to either read from a file or stdin depending on the arguments. I did this function to collect input: ...
Fayeure's user avatar
  • 111
6 votes
4 answers
416 views

Optimal Solution for the Four Divisors Problem on LeetCode

I recently encountered the Four Divisors problem on LeetCode and managed to achieve a 100% beat rate with my solution. I'd like to share it with you all and gather feedback on its effectiveness and ...
BrunoBarreto's user avatar
2 votes
3 answers
80 views

Arithmetic practice script in a tkinter window

I wrote a script that gives the user a quick arithmetic quiz and results using a tkinter window. I am very new to programming, and this is also my first time using <...
flakpm's user avatar
  • 43
1 vote
1 answer
22 views

Filter filtered bike prices twice without repeating yourself

dbfiddle Goal Without repetition in the code, I want to filter BikeValuationList to only give the BikePriceId of the latest ...
J. Mini's user avatar
  • 127
5 votes
1 answer
358 views

Optimizing Perfect Hash Table Implementation in C for Improved Performance

I wrote code that implements perfect hash table, according to its description in the book "Introduction to Algorithms by Thomas H Cormen", but the code does not pass time tests in contest. I ...
AndrewStrizh's user avatar
7 votes
3 answers
946 views

Is this Python/Pygame that draws a maze well structured?

I'm not very confident about this piece of code I created, it basically takes a file like this: ## # ## ## # #B # # # ## ## ## A###### Then proceeds to ...
José Gomes's user avatar
1 vote
0 answers
76 views
+50

Json4 parser in Typescript - Optimized

Context This review-request is a follow-up to this question. After the initial implementation, which focused on spec-compliance mainly, I have made some revisions to improve the performance of the ...
Patrick Hollweck's user avatar
3 votes
1 answer
75 views

Multithread execution times are slow on Ubuntu and fast on Windows

I'm working on a project accelerating the execution of a Genetic Algorithm both on multiple cores and on a GPU. The algorithm is specifically suited for the solution of the Traveling Salesman Problem ...
Pietro Pianigiani's user avatar
5 votes
2 answers
195 views

Simple Java Command-line Checkers Game

I was working on a checkers game for a college project. After I did a sprint to finish it, I want to improve the movement logic. Right now, it is housed within the ...
ViceroyFaust's user avatar
0 votes
0 answers
13 views

Calendar Table in Power BI

I've been reusing calendar tables in various formats for a few years now. I'd like to know best practices and if there are ways to improve them. Any suggestions for style, code, etc. are all welcome. ...
aduguid's user avatar
  • 490
-2 votes
0 answers
30 views

C++ and RAII - pass reference in constructor just to be sure that GLFW is initialized [closed]

I'm beginning to work with GLFW and Vulkan and I'm abstracting it on some classes. I'm also trying to enforce the RAII pattern. I want to have a Window class, and during this Window creation I want to ...
Caio Vinícius's user avatar
-1 votes
0 answers
32 views

Best practice for function structure and return pattern in safety critical code in C [closed]

We are working on a product that we aspire to make safety critical grade and where my personal aim is to write as clear and easy to read code as possible. Sometimes I get a PR review that some code ...
Krzysztof Bracha's user avatar
2 votes
0 answers
65 views

Compute shader based Particle System

I'm experimenting with compute shaders and wrote the particle system. The emit shader now takes particle data from the constant buffer because I don't have randomizing functions implemented yet. That'...
Edziju's user avatar
  • 319
-4 votes
0 answers
26 views

Turning a table with months and days and adding the month with total number of days into a dict for each month [closed]

I am currently working on a Python function that needs to process a dataset represented as a list of tuples, where each tuple contains data about hotel occupancy by month. Specifically, each tuple ...
user282488's user avatar
-1 votes
0 answers
16 views

Concerns regarding Angular website scalability [closed]

I have a couple of concerns regarding code I wrote in the past on whether it is scalable and maintainable. While I am focused on maintaining scalable and maintainable code, I would appreciate any ...
Yousef's user avatar
  • 1
4 votes
1 answer
167 views

Executing method with time limit restrictions

I've created a method which allows to run tasks where results might not be fully computed but still are considered valid. ExecuteFor method can be used if you have ...
FlameHorizon's user avatar
-2 votes
1 answer
54 views

I wrote a O(log N) code for largest element in an array today but is this an already existing way to find max element in an array? [closed]

Largest element in an array's most optimal approach. The code I have written has passed all test cases in https://www.naukri.com/code360/problems/largest-element-in-the-array-largest-element-in-the-...
im3shn's user avatar
  • 1
0 votes
0 answers
34 views

Testing whether parenthesis are correct in a string in functional JS

This is a homework exercise and therefore has no further purpose. The writing to me feels clunky, and the typescript types on addParenthesisFactory are unreadable, ...
Tomer Kandel's user avatar
0 votes
0 answers
42 views

The Wacky World of ANSI Escape Sequences?

I just finished creating my first npm package (for learning, not competition) and published it. Now I want to ask some questions, for example: Is my method of writing code good (for later maintenance ...
Maysara Elshewehy's user avatar
-4 votes
0 answers
23 views

Request for Assistance with DFS, PMI, and Pairwise Constraints Implementation (Python) [closed]

I've been working on a Python implementation combining Depth-first Search (DFS depth = 2), Pointwise Mutual Information (PMI), and Pairwise Constraints (ML must link and CL cannot link). While I've ...
Zoge13's user avatar
  • 1
0 votes
0 answers
30 views

Construction Permit Web App

I have a Next.js + Node.js + TypeScript + Tailwind + tRPC project whose objective is to allow a construction manager to figure out what permits are required for his renovation based on if it's an ...
Jason's user avatar
  • 1
3 votes
1 answer
125 views

initializing a timezone database and getting all timezone names (before main())

I have written the below small program that tries to initialize a tzdb before the main() runs. So once the main function runs, it checks the two global variables (...
digito_evo's user avatar

15 30 50 per page
1
2 3 4 5
1552