« first day (2769 days earlier)      last day (1234 days later) » 

12:00 AM
RELOAD! There are 7152 unanswered questions (89.7117% answered)
 
0
Q: Either monad in C++11

MatzzI'm using C++11 with https://github.com/SmingHub/Sming. It has no support of std lib or exceptions. I wanted to use Either monad to return an error or result from my functions. I implemented it using class hierarchy. I'm not a native C++ dev so I would be glad for the code review. #pragma once t...

 
12:35 AM
0
Q: Sorting and Searching Algorithm

esker-luminousThe searching algorithm that I created is dependent upon the sorting algorithm (which many of you have seen in my previous question). I believe that the sorting algorithm can't be better (for beginner-level programmers like me) but I would like to know what you think about my descriptions for the...

 
 
2 hours later…
2:13 AM
0
Q: Draw-Your-Own-Cards One-file Memory Match Game

ChocolateI've made a memory match game, where the users can draw each card. When the program is ran, there would be a canvas that allows the user to draw in. When the user is done drawing, they can press ENTER, and another fresh canvas will appear. The user may repeat the process, drawing as many card des...

 
 
1 hour later…
3:26 AM
0
Q: timing out on one case, USACO 2018 US Open Contest, Silver Problem 3. Multiplayer Moo1

lier wuReferring to this question: http://usaco.org/index.php?page=viewproblem2&cpid=836 Hi! So I'm working on this problem, and my approach was to search ever possible ways, but it time out on one case: And here is my code: import java.io.*; import java.util.*; public class main { public static in...

 
 
2 hours later…
5:04 AM
Monking
 
If your code is working and you only want feedback then Code Review is probably a better fit for your question. — Slaw 42 secs ago
 
5:29 AM
0
Q: Rate Limiter implementation in Java

uncommon_breedI have been working on implementing rate limiter in Java. Following is my approach. I have used 'sliding window with counters' technique to implement this rate limiter. What I do is instead of rate limiting per second I rate limit per minute. This allows me to create 60 buckets (one for each minu...

 
possible answer invalidation by parapuffer on question by parapuffer: codereview.stackexchange.com/posts/252897/revisions
I’m voting to close this question because it's requesting a code review of working code — sprinter just now
Best practice and optimisation questions belong on Code Review. — The Grand J 15 secs ago
 
6:43 AM
0
Q: Is my Android Room SQLite migration code written without flaw, as I wish to have 0 impact on my existing users?

Cheok Yan ChengCurrently, we plan to perform an intensive SQLite DB migration code in Android. We really want to avoid from having any bad impact (data corruption) on existing users. Can anyone help me to take a look, whether our code is flawless? Is there any room of improvement, to further enhance the robustn...

0
Q: Beginner Python User Login System

Anna SmithI started Python 3 days ago. This user login code is the first project I completed, not following along with a tutorial. The idea is that you can create a user and login with it. I am wondering if there are ways to make this code much more efficient or shorter. If it needs anything, I'd love to l...

 
 
1 hour later…
7:56 AM
If it's just feedback you're looking for then you should post your question at codereview.stackexchange. It's a great community with people willing to give you feedback. Good luck! :) — Emiel Zuurbier 21 secs ago
 
8:21 AM
0
Q: Pretty print directory structure in a JSON recursively

Vinay SharmaI am trying to pretty print the folder structure defined in a JSON. I do have a solution using recursion but I'm looking for feedback on how this solution can be improved or if there's any better approach. Problem Statement A deeply nested directory contains following information: Name Data (can...

 
 
2 hours later…
10:00 AM
possible answer invalidation by Marc on question by Anna Smith: codereview.stackexchange.com/posts/252918/revisions
 
10:33 AM
We will need to see the execution plans to explain in detail what's happening behind the scenes in your specific scenario. The symptoms suggest the trigger is touching uncommitted data, which might be avoided with query index tuning. — Dan Guzman 10 secs ago
 
11:29 AM
@EugenPechanec your comment could be a valid answer to this question. It's easier to link to an answer than a comment in a Code Review :) — Albert221 37 secs ago
 
0
Q: Record transaction log

Erdenebat UlziisaikhanI am trying to resolve following problem to improve my DS knowledge. Please advice which part of the code can be improved. You run an e-commerce website and want to record the last N order ids in a log. Implement a data structure to accomplish this, with the following API: record(order_id): adds...

 
12:01 PM
1
Q: Format potentially invalid XML

raznagulI'm working on an application that allows users edit/fix XML. A part of this is to format the XML for better readability. As the XML might be invalid, the existing methods I found for formatting (like XmlWriter or XDocument) don't work for me. There might be all sorts of problems with the XML, al...

0
Q: New Haskell developer looking for guidance

Martin MorterolThis problem is from https://adventofcode.com/2020/ of yesterday. I need to find the N entries of inputs that sum to 2020 and then multiply those N numbers together. inputs = [1721, 979, 366, 299, 675, 1456] I have 2 cases N = 2 and N = 3 I have done this with list comprehension N = 2 : main = p...

 
12:25 PM
0
Q: Plus Minus in C++

Priyanshu kumarQuestion : You're given an array containing integer values. You need to print the fraction of count of positive numbers, negative numbers and zeroes to the total numbers. Print the value of the fractions correct to 6 decimal places. Input Format First line contains N, which is the size of the arr...

0
Q: Python: Mortgage cal

Baldev00Can someone help on completing my program below. I've seen similar programs on code review but I want to go through the errors myself and learn, instead of just copying someone else's work. This program works as it should, but at the very bottom where I'm trying to calculate mortgage I can't ge...

 
1:14 PM
0
Q: Non-nested std::deque and std::list Generator Function for arithmetic_mean Function Testing in C++

JimmyHuThis is a follow-up question for A non-nested test_vectors_generator Function for arithmetic_mean Function Testing in C++ and An arithmetic_mean Function For Various Type Arbitrary Nested Iterable Implementation in C++. Besides std::vector test cases generated from test_vectors_generator template...

 
1:37 PM
@Vogel612 Yeah, I'm gonna take the sticker off (some sort of "marketing" thing), but it sounds good too.
I'm quite pleased
 
1
Q: How can I optimize the below code for picking random radio buttons under random courses

Lalit VermaThis function adds N courses to the calendar by randomly selecting slots under random courses# randomly picks a course, expands it, and checks whether we have any slots available for the selected course. If no slots available then picks another course or else I randomly select a slot via the ra...

 
2:36 PM
It's not safe from a code review - I would still fire you:) — Martin James 36 secs ago
 
2:49 PM
If you have working code that is too slow or you think could be improved, consider asking on codereview.stackexchange.com — kojiro 25 secs ago
This is better suited for codereview.stackexchange.com. — Rob 51 secs ago
 
3:14 PM
A working solution that requires refactoring is more suitable for Code Review. — El_Vanja 1 min ago
 
3:25 PM
possible answer invalidation by esker-luminous on question by esker-luminous: codereview.stackexchange.com/posts/252910/revisions
 
4:06 PM
0
Q: Enable if failing for class method for template template parameter

jignatiusI'm writing a thread-safe template wrapper class for containers. So one of the template parameters is a template template parameter for the STL container class. I want to SFINAE out a class method depending on whether the container is a vector or not. But I'm getting a compiler error. Here's my c...

 
Monking
@Duga rolled back by Dannnno
@Duga thats okay - code language specified by fence
 
4:30 PM
0
Q: Performant Sort function for big arrays

Helix112So this is my function in wich i want to sort an array. Children must be beneath their parent. And children of the same parent are sorted using orderPos value. I guess the complexity of this algorithm is quite high, is there a way to make it more performant for very long lists? (the language used...

 
Monking
 
@DerKommissar did you get it from a local place? I heard Guitar Center is going out of business...
 
@SᴀᴍOnᴇᴌᴀ I ordered it online from a place called zZounds, they do 45-day returns which is great.
 
@DerKommissar Congrats
 
4:46 PM
Mozonking
 
Greetings, Programs.
 
5:05 PM
@Donald.McLean Greetings, User.
@Mast @Duga is not going anywhere. As long as her code still builds and runs and stuff... In a way it can kinda break at any moment, but I hope it won't. And when it does, maybe I'll finally get around to rewriting her...
3
 
:-)
 
And yes, I'm around. Just not very active. I get notifications about Vue and Kotlin questions in another room and I drop by to comment, VTC or answer those every now and then
 
I have basically no clue about what has been discussed on meta the past... half a year or so though.
I might post some code for review some day... currently doing Advent of Code, naturally.
 
I think I'm still working on the 2017 one.
By backlog is getting crazy.
 
5:16 PM
I have considered doing the years that I have missed in just a random language at some point during the year. Like Lua, more Python, or Brainfuck... but I honestly don't think I'll ever get around to it.
 
0
Q: Please rate my A* Pathfinding Algorithm

PabluI have programmed a A* Pathfinding algorithm in the Console. I would now like to know if there are any things that I could do to improve the time it takes, to find a path. Right now it takes around 80ms. using System; using System.Collections.Generic; using System.Linq; using System.Text; using S...

1
Q: Tic Tac Toe Game using Python

pgrm_geekI'm brand-new (just joined today) to code review and I am super excited to share my tic tac toe game code with all of you! Please let me know what I could fix up in my program to make it more efficient. Thanks in advance! P.S. I'm also not sure how to add an actual board to this game (an actual b...

 
6:18 PM
Sounds like you have a client program that might acquire a lock and hold onto the lock while it runs other code, or maybe even if it freezes. I recommend doing a code review and make sure you structure your code to release the lock promptly, and do not allow any code between the GET_LOCK() and RELEASE_LOCK() that might freeze or run in unbounded time. — Bill Karwin 28 secs ago
 
6:33 PM
0
Q: access k8s cluster from outside

manel ben amaraI have an application (front: Angular, back: Spring) deployed in Kubernetes. I have 3 pods: front, back, database (Mongo). My pods are running correctly and the back pod is connected to Mongo pod successfully. I dockerized the Angular app using NGINX. Now when I access logs of three pods I don't ...

 
7:33 PM
@SimonForsberg I don't think you missed a lot of different things
some stuff that's been slowly burning a long time, but nothing major unless my memory messed me up
 
8:11 PM
0
Q: PyQt5 Iterate through a QListWidget

bot-coder05I ran into an obstacle a few weeks ago. Basically I wanted to check if an item is already in a QListWidget. And this is what i came up with items = [] for i in range(my_list.count()): items.append(my_list.item(i).text()) if (item you want to check) in items: print('Item already in list') el...

 
8:50 PM
Monking
 
9:50 PM
Re not closing the question, the issue (IMHO) is that this just isn't the right forum for the question. Stack Overflow is effectively for “this is is broken, how do I fix it” programming questions, whereas codereview.stackexchange.com is for those cases where “you have a working piece of code from your project and are looking for open-ended feedback...” Don't lose heart re the closing of the question. Just direct it to the right Stack Exchange site (probably factoring in the above comments, too). — Rob 31 secs ago
 
0
Q: Run-time + some additional issues with printing JUST the 10th Prime Number

esker-luminousI have written a program that takes in an input for which prime number it should find and return. What I mean by this is, if the user inputs the number '10', then the program will (and should) spit out the 10th prime number, which is '29' (not '10' because '10' is a composite number!!). My initia...

 
10:14 PM
0
Q: Running gcc c code does not work/ can't import python.h

UNKNOWNI'm running some c code on a raspberry pi. The gcc compiler is having trouble with this: #include "Python.h" It says: /home/pi/AIY-voice-kit-python/src/examples/voice/speack.c:4:10: fatal error: Python.h: No such file or directory #include "Python.h" ^~~~~~~~~~ compilation terminated...

 
 
1 hour later…
11:29 PM
0
Q: What does %s mean in a python strings?

pgrm_geekI'm not sure what %s means in Python strings. I came across this line of code somewhere a while ago: print("On your journey to %s, you drove at an average speed of %s miles per hour." % (where, speed)) and I just came across a question with the following line: print("The", count, "prime number is %s

 
11:54 PM
0
Q: Would you consider that a state machine? And how would you make it better?

SL7BotSo I tried implementing a state machine in C. This is for a Stratosphere Balloon and I wanted to use a state machine to make it better. This will be later implemented in ARM CMSIS. The state function dont really do anything yet. And the while(1) loops will be replaced by the sbRepeat transition c...

 

« first day (2769 days earlier)      last day (1234 days later) »