Newest Questions

Filter by
Sorted by
Tagged with
2 votes
0 answers
52 views

I'm building a modal form in React. It collects a name, image URL, and weather selection. It works, but I’d like to improve: Code structure State handling Reusability Accessibility Here’s the code: <...
Barry G's user avatar
  • 21
5 votes
1 answer
129 views

We all have put in debugging statements, like println!("Here"), when we're trying to diagnose an issue. Often, especially at work, I forget to remove ...
Daniel Walker's user avatar
4 votes
1 answer
78 views

I like from the C++ unit test framework Catch2 its sections -- much more than the xUnit test fixtures. Therefore I wrote me some macros which mimic the Catch2 sections. This is the first macro heavy ...
tommsch's user avatar
  • 293
1 vote
0 answers
73 views

Background In an earlier post, I prototyped an M equivalent of tidyselect in R: in particular, its general syntax and selection helpers. In this post, I prototype ...
Greg's user avatar
  • 569
6 votes
2 answers
395 views

I am trying to write a simple tokenizer for a basic arithmetic calculator. Here's the code: ...
user2338150's user avatar
2 votes
1 answer
335 views

This is a follow-up question for Two dimensional gaussian image generator in C++, Three dimensional gaussian image generator in C++, General Two-dimensional Elliptical Gaussian Image Generator in C++ ...
JimmyHu's user avatar
  • 7,575
5 votes
1 answer
407 views

I have implemented an elementary positive integer class that supports addition, subtraction, and multiplication for an arbitrary number of digits using a singly linked list. ...
Kushagr Jaiswal's user avatar
2 votes
1 answer
140 views

Repo The complete program: GitHub repository How it works After you have cloned the above repository, change directory inside it and type make in order to compile ...
coderodde's user avatar
  • 32.2k
2 votes
1 answer
128 views

I need a function which finds the left and right neighbor-element within an integer-array, based upon a given index. If the given element is 0, then it shall return largest index as left neighbor. ...
michael.zech's user avatar
  • 5,044
11 votes
4 answers
1k views

I am reading "The Linux Programming Interface" by Michael Kerrisk. I'm studying about sockets, and I made a simple application using sockets on the unix domain. I want to know if I'm using ...
Super Tux's user avatar
  • 313
4 votes
1 answer
111 views

I am currently working on implementing lock-free stacks and queues. So far, they seem to function properly in test programs, but I am unsure if there are any underlying issues or areas for improvement(...
untitled's user avatar
  • 141
14 votes
5 answers
2k views

I wrote Cooley-Tukey's FFT algorithm in C. And I want to know how safe is this code? Is it just trash? How can I make it more memory safe? ...
RudraSama's user avatar
  • 181
7 votes
1 answer
240 views

I had semi-recently asked a question (well a couple closely related questions) on math.stackexchange. The simplest question is phrased as follows: You are allowed to make 3 permutations of length n. ...
Dair's user avatar
  • 6,220
5 votes
4 answers
901 views

This is my second post and my second “tough” question I came across while reading PPP3. I graduated a while ago and honestly forgot the equation... The question didn’t explicitly say I needed to find ...
nikx0918's user avatar
  • 121
1 vote
1 answer
110 views

I'm new to Flutter and BloC and it just seems quite different than what I've been using until now. In terms of state, I'm coming from the JS world of Vuex, Pinia and Redux and I've also worked a with ...
thefallen's user avatar
4 votes
5 answers
772 views

First the PasswordStore, which is pretty straight-forward. It stores title-password association, but it is important that a title can have multiple passwords. The <...
viuser's user avatar
  • 629
7 votes
1 answer
364 views

This is a follow-up question for Two dimensional gaussian image generator in C++ and Three dimensional gaussian image generator in C++. According to the statement in https://fabiandablander.com/...
JimmyHu's user avatar
  • 7,575
2 votes
0 answers
110 views

Following on from my previous question, I would like to know what could be improved here and whether it is now secure. I had to use Java 8 because the Blade lib was built with it, and I want to extend ...
Tobias Grothe's user avatar
11 votes
3 answers
1k views

I'm trying to implement the so-called golden-section optimization in C++. This is a simple algorithm to find an extremum of a univariate function \$f\$ within an interval \$[a,b]\$. The crux is to ...
darksun's user avatar
2 votes
1 answer
89 views

I'm new to Lua and thought a decent way of familiarizing myself with the language would be to implement some basic utility functionality around status codes. In particular I've reimplemented a subset ...
zziccardi's user avatar
4 votes
1 answer
143 views

First of all: I was looking for a simple image captcha solution for a website, but all I found were "Over-the-top" solutions for me. So I decided to write something to self. I mainly use two ...
Tobias Grothe's user avatar
6 votes
0 answers
184 views

For a side project, I needed a markdown parser and I decided to roll my own. It is a SAX-style parser, i.o.w. you can hook into parser events on consumer side and do whatever you want with the content....
Quanta's user avatar
  • 161
1 vote
1 answer
84 views

A runtime agnostic WebSocket server. Tested with node, deno, bun, ...
guest271314's user avatar
5 votes
2 answers
936 views

Here is the question I was trying to answer: [11] Write a program that plays the game “Rock, Paper, Scissors.” If you are not familiar with the game do some research (e.g., on the Web using Google). ...
nikx0918's user avatar
  • 121
8 votes
1 answer
614 views

Recently I am working on implementing a shared-memory based IPC message queue in C programming language on Linux system. A few design choices I've made include The queue will have only 1 producer, ...
Yukun Jiang's user avatar
4 votes
2 answers
200 views

I wrote the Validator class. In the project, the presented code is located at the path ".../validator/init.py". It is needed for testing code in different virtual Conda environments, in the ...
Sindik's user avatar
  • 143
3 votes
1 answer
153 views

I built this simple blinker in SystemVerilog and would very much like some help to make it better: control.sv ...
K_T's user avatar
  • 163
2 votes
1 answer
148 views

I have the following EF Core table: ...
Parsa99's user avatar
  • 267
6 votes
3 answers
148 views

When reading a pressure transducer, I'm currently using the following code to apply the "device under test data" from the calibration report. How can I determine which range segment of ...
Lenny Cunningham's user avatar
9 votes
5 answers
3k views

I made a casino game that runs in the console for my grade 10 final project, and I received a 93% as my grade. I'm looking for feedback in areas such as syntax, user experience and efficiency. I would ...
ineedaham's user avatar
4 votes
1 answer
110 views

In my Avalonia app using the MVVM Community Toolkit, I want to have a number of buttons in multiple user controls in my application to have as their content a ...
Eric Eggers's user avatar
9 votes
3 answers
1k views

This repository class is supposed to be used for saving information extracted from RAR, SFV archives or files that contain the hash sum in their filenames. The abstract parent class can be found here)....
viuser's user avatar
  • 629
9 votes
2 answers
861 views

I would like to ask for a code review of my shared_ptr<T> implementation for design, code style. Any nitpicks will extremely useful for me. The features ...
Quasar's user avatar
  • 639
3 votes
2 answers
249 views

Here is a third implementation, the second is in my question Place queens and rooks with the higher score (extension of the queen problem) and an initial one is in my answer for the question N queen ...
bruno's user avatar
  • 212
5 votes
4 answers
303 views

To compare ergonomics and performance of some languages for my hobby projects, I have written a simple lines of code counter in Swift, Go, Rust and Python. It scans a given directory tree for source ...
user avatar
3 votes
2 answers
171 views

rodde's Pacman clone I have this clone implementation of Pacman. It looks pretty much like the original, yet I had to impose some relaxations as I am not sufficiently masochistic to implement all the ...
coderodde's user avatar
  • 32.2k
11 votes
2 answers
1k views

I'm new to C and just finished K&R. This is a code that I've written to parse headers of a HTTP request. I want to know if my code: Is safe? (after all this is C) Does proper exit on failure? Are ...
Mehan Alavi's user avatar
2 votes
1 answer
160 views

I am developing a Blazor web app using C# .NET 9 in Visual Studio Code. I am using SQL Server 2017. This project is intended for internal company use. In the ...
DevQt's user avatar
  • 157
4 votes
1 answer
167 views

I am new to programming using the site openprocessing.org. The code given does the following on my iPad: Draw a red circle Wait until I finger tap near the red circle’s center Erase the red circle ...
Will.Octagon.Gibson's user avatar
2 votes
1 answer
109 views

This is order, orderitems and payment linked by foreign key. Controller: ...
yoda's user avatar
  • 277
2 votes
0 answers
56 views

I build project Case opening simulator in React JS + tailwind. I am looking for maybe another way to implement the structure of code and tell me if I've done something wrong, what I should do better ...
nwm's user avatar
  • 21
4 votes
1 answer
212 views

I have a telegram userbot, monitoring certain group topic and answering certain messages. I want it to be faster than human, now it's surprisingly not. But I need to speed up its reaction, any tips? <...
voipp's user avatar
  • 143
11 votes
4 answers
2k views

I tried to implement Builder pattern, a popular design pattern for constructing objects consisting of different components, in Rust. Here is my attempt: ...
kiner_shah's user avatar
3 votes
1 answer
71 views

I have implemented my own version of Ruby's Array uniq-method (Ruby docs - Class array) as a monkey patch on Array. Method-impl.: ...
michael.zech's user avatar
  • 5,044
3 votes
1 answer
186 views

I have a master page, where I need to render data from multiple models. I have made a prototype of that page to show only the required conditions. What is the best approach for controller to retrieve ...
nischalinn's user avatar
4 votes
1 answer
138 views

Also posted on Reddit. As a small personal exercise, I'm trying to implement a notion of higher-kinded types in Rust using type-level defunctionalisation based on the "Lightweight higher-kinded ...
nicoty's user avatar
  • 329
4 votes
2 answers
183 views

In this post, I present my most recent result, a stack-based virtual machine programmed in Java. Frankly, I am lazy to write the unit tests since I am pretty much burned out with it. The full ...
coderodde's user avatar
  • 32.2k
1 vote
0 answers
65 views

I want to validate my solution for a lock-free leaky bucket rate limiter. Given a queuing capacity and rate limit per second, it should queue requests till capacity is reached and it should allow only ...
Pritish Nayak's user avatar
4 votes
1 answer
195 views

This is a continuation of the question N queen problem-like (+rooks and a different goal) written by someone else, where I answered. EDIT I continued to work on the subject and a third implementation ...
bruno's user avatar
  • 212
5 votes
2 answers
470 views

For another project of mine, I decided that it would be handy to have a tree structure to dictate hierarchy between pieces of data, but I didn't want to unnecessarily keep that data alive if it would ...
BetterBuiltFool's user avatar

15 30 50 per page
1
3 4
5
6 7
1558