All Questions

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

beginner c# tic-tac-toe game

I made this tic-tac-toe game in c# after learning the language around a week ago. Can somebody tell me if this code is good or bad? ...
sminkle's user avatar
  • 11
0 votes
1 answer
15 views

Graph Neural Network (GNN) (2)

This is an implementation of a graph neural network. Edges are represented by an egde-list. ...
user366312's user avatar
0 votes
1 answer
16 views

Graph Neural Nwteork (GNN) (1)

This is an implementation of GNN. Edges are represented by an adjacency matrix. ...
user366312's user avatar
1 vote
1 answer
19 views

Neural network text classifier

I wrote a simple NN text classifier to help me quickly sort through the new daily submissions to the arXiv. It downloads the new submissions, processings their titles and abstracts, trains a NN on ...
Gabriel's user avatar
  • 585
1 vote
0 answers
11 views

Fluent VBA: Two (almost three) Years Later

Part 1 - A fluent unit testing framework in VBA: A fluent unit testing framework in VBA Part 2 - Fluent VBA: One Year Later: Fluent VBA: One Year Later Two (almost three) years have now passed since I ...
Brian Gonzalez's user avatar
1 vote
0 answers
25 views

Generic Dynamic Array Implementation

I wrote a dynamic array implementation in ISO C11 using void pointers. Everything I've implemented works--at least in all my tests--on a 64-bit machine. It has some vague type-checking and resizes ...
Zenais's user avatar
  • 11
2 votes
1 answer
37 views

Fast API endpoint handlers

I'm not so experienced at developing Fast API apps. As I program in different languages, I often get confused as how things are done in a python way. I have this piece of code, and I would like to ...
Alejo Villores's user avatar
3 votes
1 answer
231 views

imgaussfilt Template Function Implementation for Image in C++

This is a follow-up question for im2double and im2uint8 Functions Implementation for Image in C++, conv2 Template Function Implementation for Image in C++ and An Updated Multi-dimensional Image Data ...
JimmyHu's user avatar
  • 5,390
1 vote
1 answer
42 views

A search function that searches for a contact inside a vector

I have this function to search for a specific contact inside a contact management program. I want to know the following: Is returning the contact object as a pointer(...
HusenPatel's user avatar
-1 votes
0 answers
38 views

Javascript Signals implementation

I've created my own implementation of signals in typescript, inspired by the proposed tc39 specification (https://github.com/tc39/proposal-signals) in the BOM. I think it would be great if I could use ...
enzoaicardi's user avatar
-4 votes
0 answers
47 views

Tetris C++ Troubles with memory leaks | code provided [closed]

Memory Loss in My Tetris Game 😓 Hey everyone, I'm pretty new to C++ and this is my first post on Code Review, so I really appreciate any help all of you can provide. I've been working on a Tetris ...
Llama Luminary's user avatar
-1 votes
0 answers
26 views

Seeking feedback for "Design Meeting Scheduler" [closed]

Repository Link: https://github.com/lbihani9/low-level-design/tree/master/MeetingScheduler Problem Statement: The goal is to design a meeting scheduler that allows users to schedule, cancel, and view ...
lokesh bihani's user avatar
2 votes
1 answer
67 views

Speed up searching for the lowest element that is not in the array

I try to solve this question: B. Informatics in MAC at Codeforces To solve it, I think I need to calculate the prefix and suffix array of MEX. I made observation that making only 1 subsegment will ...
Szyszka947's user avatar
0 votes
0 answers
28 views

Presence of UB and memory usage of a std::array initialization: version with temporary array on heap

I proposed several techniques to answer to https://stackoverflow.com/q/78672409/21691539. A classical way to answer would be to use std::index_sequence-based ...
Oersted's user avatar
  • 337
2 votes
0 answers
40 views

Shrinkable Swing toolbar

I was tasked with implementing a toolbar that can be shrinked beyond what's necessary to display its buttons' texts. As a last resort, the buttons should hide their texts and only display their icons ...
Sergey's user avatar
  • 581
0 votes
1 answer
37 views

Feature-subset-selection using autoencoder

The following listing performs feature-subset-selection (not feature extraction) using an autoencoder. My aim is to select the best features from the 1000+ available features in the given dataset. I ...
user366312's user avatar
0 votes
0 answers
26 views

Unity 2D Platformer that saves your past positions and replays them as a "Ghost"

I have been trying to get better at C# and Unity. As my first programming language and game engine, there are still a lot of things I do not yet understand. I know the basics of both, but I don't know ...
MrV's user avatar
  • 1
3 votes
0 answers
27 views

First `.bat` script to update a `git` branch

update-branch.bat is my first batch script. Its current behavior is update-branch updates the current branch ...
joseville's user avatar
  • 486
1 vote
1 answer
65 views

Simple Stack and Deque implementation

I implemented a single-linked and double-linked lists (like stack and deque). I would like to receive your feedback on improving the code or maybe some comments. I'm learning C++ for the third month. ...
vansergh's user avatar
6 votes
2 answers
1k views

GUI Interface for a command line program in C# Windows Forms

I am brand new to C# and this is my first time making a GUI. The program is pretty simple, since I don't have too much knowledge of GHDL. All it does is take the file paths, and generate relevant ...
blipblap's user avatar
5 votes
2 answers
886 views

Optimized data structure mapping finite set of integers to values in C++

I'm looking for a mapping data structure, but knowing that the possible values of my keys are small numbers, I would like to trade memory for better performances (for both random access and value ...
Delgan's user avatar
  • 611
3 votes
1 answer
85 views

Simple CLI Hangman Game in C#

I'm a beginner at C#, and this is a console application that I wrote as I'm attempting to recreate simple games such as Hangman, TicTacToe, etc. I'm wondering if there's any logic in my code that's ...
MrTungsten's user avatar
4 votes
1 answer
56 views

Implementing Intersections data structure that is able to hold a container of multiple types that maintains order in C++

I am trying to implement a way to store intersections of rays with arbitrary objects. So far I thought I could make the object derived from an interface and put that as the type in the Intersection ...
Zcahfuz's user avatar
  • 41
3 votes
2 answers
490 views

Left zero-padded string in C++

For a very specific usecase, I need a special version of a string, which is not only zero-terminated, but also begins with '\0'. So, the string should look like this in memory: ...
a3843722's user avatar
5 votes
2 answers
360 views

Cost sharing application in Python

I am very new to Python (yes, I know it's been around a long time). This is my first working just-for-fun project to see if I could do something in Python. I know the UI layout is rather ugly and ...
Zack E's user avatar
  • 593
7 votes
2 answers
325 views

Lexically-scoped Lisp interpreter

Introduction Here's an interpreter, written in Common Lisp, for a simple Lisp dialect that has some semi-“advanced” features, namely lexical scope with closures, ...
texdr.aft's user avatar
  • 258
-1 votes
0 answers
65 views

Pythonic ways to break up long string (xpath) [closed]

Consider the following f-string which generates an xpath. ...
Marcel Wilson's user avatar
1 vote
1 answer
40 views

Send a QNetworkRequest with a parameter

I want to send multiple QNetworkRequests in Python 3.12 that each downloads one image from a server, using a single callback function. To be able to distinguish ...
Neph's user avatar
  • 113
-4 votes
0 answers
54 views

Is this block of code readable? [closed]

I'm making a game in C for school and just wanted to make sure this chunk of code is readable. I wanted to put it in a function, but since buffer is a char array and can't be returned from a function, ...
CS_Student's user avatar
2 votes
0 answers
25 views

A recursive_replace_copy_if Template Function with Unwrap Level Implementation in C++

This is a follow-up question for A recursive_replace_copy_if Template Function Implementation in C++. I am trying to implement recursive_replace_copy_if template ...
JimmyHu's user avatar
  • 5,390
9 votes
1 answer
848 views

Typical password generator in Python

Password generators are extremely popular on CodeReview with beginners to both coding in general and Python in particular, for a number of reasons: They're (seemingly) easy to implement They offer an ...
-4 votes
0 answers
26 views

TypeScript : Type '(number | undefined)[]' is not assignable to type 'number'.typescript(2322) [closed]

Please, i need help for my typescript code, erreur message : Type '(number | undefined)[]' is not assignable to type 'number'.typescript(2322) ...
EloNK's user avatar
  • 1
5 votes
2 answers
79 views

TypeScript Number Set

I originally premiered this code to the internet in this StackOverflow post, and per a recommendation through one of the comments, I am reposting it here. I am making a floating-point number set ...
Wasabi Thumbs's user avatar
6 votes
2 answers
623 views

Histogram manipulation

I want to optimize the code to run faster, so I started with parallelizing the for loops, but the code still not very fast. I do get variable frames per second, ...
Ja_cpp's user avatar
  • 403
1 vote
1 answer
54 views

Is there a way to refactor this code? Can I create an helper from it?

I need all the below code to be able to persist in the URL (query string) some variables I'm using in a Svelte 5 / Svelte Kit project page. I also need to assign URL query params to variables on page ...
Fred Hors's user avatar
  • 193
6 votes
3 answers
1k views

Implementation of Euler-Maruyama numerical solver

I am trying to write a python implementation of Euler-Maruyama and Milstein schemes for numerically solving stochastic differential equations. The pseudo-code for the algorithms is in the Wikipedia ...
Quasar's user avatar
  • 397
2 votes
2 answers
41 views

Sending Firebase Cloud Messaging Notifications via FCM HTTP v1 API with PHP

This is my first time using FCM, and I had a lot of trouble finding up to date examples on how to send notifications using Firebase Cloud Messaging Notifications via FCM HTTP v1 API with PHP. I'd ...
tony's user avatar
  • 383
4 votes
3 answers
84 views

Reversing string in PHP

I got this task to evaluate my knowledges in PHP. I was asked to avoid using functions like strrev() or array_reverse(). ...
user avatar
-1 votes
0 answers
32 views

Jumptable for functions taking different struct types as params [closed]

I am working on a production code which defines several jumptables for functions dealing with nanopb message structures (https://jpa.kapsi.fi/nanopb/). To make my demo code more readable I was trying ...
Looser User's user avatar
3 votes
0 answers
44 views

Goal tracking app in React

I've developed a goal tracking app in React. I'm curious whether writing filter functions without using useState is appropriate or not. Any feedback to optimize the ...
dev01295's user avatar
3 votes
1 answer
56 views

SPI prototype in Verilog: areas for code improvement

I'm working on an SPI in Verilog. I will post what I came up with here. This is an educational project compiled according to the general principle from Wikipedia. There is only one mode - exchange ...
ayr's user avatar
  • 133
3 votes
3 answers
272 views

Eliminating "implicit conversion changes signedness" warning using _Generic

I'm using enum in C to have constants for values that can be bitwise-or'd together, e.g.: ...
Paul J. Lucas's user avatar
-6 votes
1 answer
75 views

I am new/weak in Python and am wanting to utilize the help of Chat GPT to do some of the initial heavy lifting. What are your thought/concerns? [closed]

I used to have a strong background in BASIC, Fortran, Visual Basic, and studied some C, C#, Visual C#, C++, Etc. But am weak in Java and Python. I would like to explore Python and other light ...
David Fetherston's user avatar
3 votes
2 answers
89 views

SEO Page Analysis Tool built in Python and Django

Objective: Develop an SEO analysis tool, for a website built in Django, that allows users to input a URL and receive an SEO report containing information about the page's optimization strengths and ...
user3605767's user avatar
-2 votes
0 answers
41 views

Feedback on Express App: Code Quality and Improvements

I've been working on an Express application and would appreciate some feedback on its code quality and any potential improvements. The application utilizes MongoDB and includes various middleware such ...
EMILO's user avatar
  • 97
0 votes
1 answer
60 views

Replace iterrow loops in pandas matrices with something else to shorten the running time

This post is modified from this one: https://codereview.stackexchange.com/posts/292885/edit (Alternatives to iterrow loops in python pandas dataframes). I have a piece of code to calculate price ...
Laura's user avatar
  • 61
1 vote
0 answers
24 views

Java multithreading with Spring JPA

I have to improve a process that is currently sequential, and i wanna make it multi-thread. This process uses Spring JPA, with spring boot 2 and java 17. I would like to have a feedback on the ...
Fabio Piunti's user avatar
5 votes
2 answers
435 views

Generate filesystem usage report using Awk

I would like to request a review of an Awk program I have written. This script meets an immediate business need and, ideally, serves as a coding style example for new hires (who may not yet be ...
Thure Dührsen's user avatar
5 votes
2 answers
631 views

Alternatives to iterrow loops in python pandas dataframes

I have a piece of code to calculate price sensitivity based on the product and its rating. Below is the original data set with product type, reported year, customer’s rating, price per unit, and ...
Laura's user avatar
  • 61
2 votes
0 answers
19 views

C++ Mongo Interface : Version-2 Implementation of ScramSha Authentication

Refactored part of the original code: c++ Mongo Interface Implementation of ScramSha-256 for Mongo server to be used with the Authenticate class. Example of Usage: ...
Loki Astari's user avatar
  • 95.4k

15 30 50 per page
1
2 3 4 5
1557