Newest Questions
77,675 questions
0
votes
1
answer
30
views
Staff Rostering Problem - Minimize max night-shift
I'm doing some mini projects for my club related to fundamental optimization and am having a bit of trouble with this issue.
There are N employees numbered 1, 2, ..., N who need to be scheduled for ...
0
votes
0
answers
17
views
ProducerConsumerSimulation.java: practicing concurrent programming in Java
Intro
This time, I was in the mood for concurrent programing (ProducerConsumerSimulation.java). To this end, I have ended up with the code below. My primary concerns are:
Class design is trash,
The ...
-3
votes
0
answers
20
views
Learning game dev from scratch. Created a Snake2d game [closed]
Please find the game Here. I don't want to copy-paste all the game files here, cause they are plenty. So if you are free and willing to review, go by the link and review it.
Thanks everyone in advance....
0
votes
0
answers
14
views
Generic UnitOfWork implementation (Dapper)
I'm creating a three layered Visual Studio template solution that I'll be using as a starting point for all ASP.NET projects.
The layers are Presentation, Application and Infrastructure. ...
2
votes
2
answers
191
views
Accuracy issues with float-based cosine approximation using Taylor series in Java
I'm working on a Java assignment where I must implement the cosine function using only basic arithmetic operations (addition, subtraction, multiplication, division) and no built-in math functions, ...
1
vote
0
answers
21
views
LibID: a Java library containing some iterative deepening algorithms for pathfinding on directed unweighted graphs
Intro
I have this GitHub repository containing some iterative deepening pathfinding algorithms.
Code
...
2
votes
0
answers
34
views
Follow up - Deep Learning Project for House Plant Identification on Kaggle
The code is based on feedback that I received from my previous question regarding this project.
I've developed the initial code for a deep learning project focused on identifying house plants within a ...
2
votes
1
answer
37
views
constexpr friendly vector with static storage and no allocation
My take 2 on constexpr friendly StaticVector.
If the value_type is trivial, it can be user in constexpr functions normally.
If the value_type is not trivial, it uses placement new / destroy and ...
3
votes
2
answers
41
views
Kaggle Notebook for Identifying House Plants
I'm working on a personal deep learning project on identifying house plants. I have developed the initial code in Kaggle Notebook. I'll later transform it into a Flask app.
I have just finished the ...
0
votes
0
answers
25
views
C++ Refactored ReportManager: Improved Ownership Semantics and Clean SRP Design
This is the first version I posted and got some ideas:
ReportManager design — ownership via move or unique_ptr, SRP concerns, and O(1) lookup strategy
I applied some changes, and here is the updated ...
0
votes
2
answers
67
views
Small library for metrics scraping in C++
I did an internship test project (source: https://github.com/SynI20N/VKInfo). Looking for some middle or senior devs to rate it and point out potential problems with my code.
Follow up: How would you ...
2
votes
0
answers
25
views
System for recursively initializing libraries CXX + CMake
I needed to set some global data (logging handler, base path, etc) across all libraries/targets (internally managed). A manual system of InitLib1 which calls all <...
1
vote
0
answers
24
views
blazor select (dropdown) with type ahead
Here is the working fiddle: https://blazorfiddle.com/s/d04xl2zi
I started a new project where they are using .net 8 blazor server interactivity. (I'm a bit new to blazor) they were interested in a ...
0
votes
0
answers
26
views
ML Project on Predictive Maintenance in Jupyter Notebook
I have developed a predictive maintenance machine learning project in a Jupyter Notebook. I plan to transform it into a Flask application later on.
My current code is functional and passes Ruff tests. ...
7
votes
2
answers
269
views
Iterative Deepening A* implementation of 15 Puzzle solver in Python
Introduction
I recently finished the course Mathematical Thinking in Computer Science on Coursera. The sixth module is optional and involves learning about transpositions, permutations, and applying ...
10
votes
6
answers
1k
views
Extract unique email addresses from a text file
I'm working on a Python script that reads a text file and extracts all the unique email addresses. The code works as intended, it produces the correct output, throws no errors, and I've tested it on ...
0
votes
0
answers
38
views
generate_complex_image Template Function Implementation for Image in C++
This is a follow-up question for Tests for the operators of image template class in C++, Image pixelwise operation function with multiple inputs in C++ and An Updated Multi-dimensional Image Data ...
7
votes
7
answers
1k
views
LinkedList data structure in C
Is my logic good? Are variable names fitting? Are there any memory leaks? Am I doing anything dangerous (this is C after all)?
Please feel free to criticize the code. I want to know if I'm writing C ...
6
votes
2
answers
84
views
Slack User Interaction Graph – Collaboration Topology
I’ve written a small Python module to generate mock Slack workspace data, build a user–user interaction graph, and surface complementary collaborators based on skill sets.
The key features are:
Data ...
0
votes
0
answers
31
views
Typescript robust Fetch wrapper with Retry and Error handling
I am building a TS wrapper around the fetch that adds automatic retries for certain errors. The error handling using a custom ApiError class and maps various error ...
7
votes
2
answers
852
views
Integer to string converter - gcc builtins only
This is version 2 of prior post - per : CRSE:tour and Guide.
Due to unintended generalization of prior question for brevity sake, here are requirements:
Code should be portable and run on ...
1
vote
1
answer
36
views
Predictive Maintenance ML Project in Jupyter Notebook
I am developing a predictive maintenance project using Machine Learning. I have completed the initial code in Jupyter Notebook. Later, I will convert it into a Flask app.
The code is working fine for ...
2
votes
1
answer
44
views
Flask App for Weather Prediction Using Machine Learning
I am building a personal machine learning project to predict the weather. I have already completed the code in Jupyter Notebook. Now, I am working on converting it into a Flask app.
I have just ...
4
votes
2
answers
1k
views
An improved sample C++/WinAPI malware program for Windows (includes the program that uninstalls it completely)
(See the GitHub repository for a Visual Studio (2022) solution/projects.)
Description
This malware does nothing more than install/uninstall ...
7
votes
1
answer
470
views
Integer to string via gcc converter
I've been playing with shared libraries and core functionalities with gcc/g++. Using only gcc builtins I've tried to make an integer to string converter.
...
1
vote
0
answers
14
views
GUI button clicks start runspaces that take care of heavy processing tasks
I'm currently updating a ping script I maintain at work, transitioning from WinForms to WPF. Because of this I've started learning about and incorporating runspaces to keep the GUI responsive during ...
1
vote
0
answers
30
views
IndexTupleIterator.java: an iterator that generates index tuples in lexicographic order, Take IV
(See the previous iteration here.)
This time, I have incorporated the answer from YawarRaza7349.
Now, my code looks like this:
...
5
votes
4
answers
606
views
Functions to check if a number is a multiple of another, get all the even numbers in a list, and all the odd numbers in a list
I wrote some basic math functions:
...
4
votes
3
answers
432
views
Functions to check if object matches type and reverse a string
In what case would anyone find these useful?
...
-5
votes
0
answers
80
views
Two issues in integer value to decimal-string conversions, wrong when optimized, benchmarking, [closed]
I'm still working on the project SE/CR: int128 handling in c-code, gcc / glibc / linux, however here have two specific questions.
The paramount project is the optimal ( stable, portable, universal, ...
4
votes
1
answer
126
views
Flask App: ML Project on Predicting Weather
I am working on a basic, personal ML project on predicting weather. First, I have finished working on Jupyter Notebook. And now, I am transforming it into create a Flask app.
I have just completed the ...
1
vote
1
answer
43
views
ML Project: Predictive Maintenance in Jupyter Notebook
I'm working on a predictive maintenance ML project and have developed the initial code in Jupyter Notebook. I'll later integrate it into a Flask app.
The code currently functions without any issue, ...
4
votes
0
answers
49
views
SHA1 Algorithm Implementation in Zig
I have implemented the SHA1 algorithm in Zig, as a learning exercise, to teach myself both Zig and the actual algorithm behind SHA1. Now the second part I think I understood well enough. The ...
3
votes
3
answers
186
views
IndexTupleIterator.java: an iterator that generates index tuples in lexicographic order, Take III
(See the next iteration here.)
(See the previous iteration here.)
This time, I have incorporated a nice answer from Simon Forsberg.
Now, my code looks like this:
...
4
votes
2
answers
77
views
Simple Word-Based Text Truncator
I created a Python 3.11 utility that truncates an input string to a fixed word count—splitting on any whitespace, collapsing runs, and dropping trailing stop-words—so you get clean, concise snippets ...
1
vote
1
answer
45
views
IndexTupleIterator.java: an iterator that generates index tuples in lexicographic order, Take II
(See the previous iteration here.)
(See the next iteration here.)
This time, I improved the iterator such that there is no chance of numeric overflow when computing the total number of iterations. To ...
2
votes
3
answers
97
views
Splitting input text into fixed-size overlapping word chunks
I’ve implemented a small utility function in Python 3.11 that takes an input string, splits it into word-based chunks of a given size, and allows a specified overlap between consecutive chunks. This ...
5
votes
3
answers
1k
views
Method using double for currency amounts
I'm wary of using amount as double. This API also has to maintain backward compatibility. Would appreciate for any comments on this method.
...
1
vote
0
answers
27
views
Spring AI 1.0.0 configuration setup with custom bean definitions
I've recently shifted from SpringAI M5 to 1.0.0 which is a major change and just wondering if there is a better way to organise SpringAI configurations. I'm using Azure OpenAI based connection along ...
4
votes
1
answer
61
views
IndexTupleIterator.java: an iterator that generates index tuples in lexicographic order
(See the next iteration here.)
Intro
This time, I have an Iterator<List<Integer>> implementation that generates list index tuples in lexicographic order....
9
votes
5
answers
2k
views
C method to determine whether a byte array is homogeneous
I engineered myself into a situation where I wanted to check whether a region of memory consists of identical bytes. I wanted to at least try to avoid the obvious solution of an O(n) loop, but also ...
4
votes
1
answer
176
views
ReportManager design — ownership via move or unique_ptr, SRP concerns, and O(1) lookup strategy
I’m practicing the Single-Responsibility principle with a small project.
A Report is composed of ...
5
votes
1
answer
406
views
SVG Timeline Diagram
I've designed this SVG timeline diagram, which shows each version of the Lua programming language and the dates when it was supported. While I'm pleased with the result, I was wondering if I could ...
2
votes
1
answer
106
views
ABC/XYZ business process analysis
I have written a code that deals with ABC/XYZ analysis. I want to use it in my application and would like to find out how the code can be improved, its readability and it will be better to implement ...
4
votes
2
answers
96
views
Ruby: Implement an 'add_thirty_days'-method
Task:
Implement a method, which receives an array of strings as argument. The strings are dates in the format "MM**DD**YYYY". For example: "11**03**2024".
Add 30 to each of the ...
6
votes
4
answers
2k
views
A sample malware program for Windows (includes the program that uninstalls it completely)
Intro
This time I was in the mood for the low level stuff. The entire repository is in GitHub. It includes the installer, the actual malware program, and the uninstaller that removes it completely ...
3
votes
0
answers
26
views
Mathematica Code Demonstration of Elliptic and q-Analogs of the Fibonomial Numbers
This code covers:
Standard Fibonacci numbers.
Fibonacci factorials.
Standard Fibonomial numbers.
q-analogs of integers.
q-Fibonacci numbers.
q-Fibonacci factorials.
q-Fibonomial numbers (both (...
6
votes
2
answers
409
views
(Codewars) Goldbach's Conjecture (by @rsalgado) in Ruby
Link to kata: linkRank: 6 kyuKata author: @rsalgado
I have been recently learning Ruby-lang and have been attempting to solve the following kata from Codewars involving Goldbach's Conjecture:
...
3
votes
1
answer
102
views
Custom Math Parser for trivia game
This parser is made for part of larger trivia game, and only allowed numbers are positive integers. So negative or decimal numbers should return -1 as sign of error.
I'm pretty new to programming and ...
4
votes
2
answers
115
views
Implementing a custom logger in .NET
One of my latest projects has been implementing a custom .NET logger, as a lot of our products use their own logging solution and we're trying to standardize, but that means accounting for a lot of ...