« first day (3304 days earlier)      last day (194 days later) » 

12:01 AM
REFRESH! There are 8076 unanswered questions (89.3080 answered)
 
 
1 hour later…
1:04 AM
I’m voting to close this question because it is asking to improve working code - ask on Code ReviewDaniel A. White 39 secs ago
 
 
1 hour later…
2:12 AM
If you're asking how to improve working code, then perhaps this is perhaps better posted on the Stack Exchange Code Review site, but before doing this, you will also want to read the Code-Review help site, especially its How to Ask link. — Hovercraft Full Of Eels 40 secs ago
 
 
3 hours later…
5:40 AM
First of all, I think the compiler feedback is the tightest feedback loop you'll find. The only problem is that you may not understand right away what it means when it warns you about something. Searching directly for the output of the compiler you don't understand will lead you to posts of people having done the same thing as you, and other people explaining the issue. Besides that, when it's about errors, SO is suitable, but SO questions should only be about a single issue at a time. If you want a review of your whole code, try [codereview](codereview.stackexchange.com). — BlackBeans just now
 
 
2 hours later…
 
1 hour later…
8:47 AM
It might be useful at this point to mention codereview.stackexchange.com as a place to get help on how to improve your code... — Potherca 58 secs ago
I think this question is a borderline mix of codereview and opinion-based, but also has a problem that doesn't compile yet, so it is kind of suitable for SO ... but in general, I think it would be mor suitable for codereview. — Finomnis 55 secs ago
 
0
Q: Cricket is a PC game which is similar to real cricket but has little different rules

Rohith ShettyCricket is a PC game which is similar to real cricket but has little different rules There will be N number of players , Y number of overs, here one over means each player will hit one ball each, let's say if you have 5 players, one over will have 5 balls. When a player hit a ball, that player w...

 
9:49 AM
0
Q: program that reads standard input, then writes its contents to standard output (`-a` option to add data to files)

MikeHow can I optimize the program? To make it more optimal? The program should be more optimal in terms of source code, compiled executable size, memory usage, speed, bugs etc. Please criticize the program from these points of view. The -a option adds text to the end of a file (if it exists). The pr...

 
 
2 hours later…
11:53 AM
0
Q: A reduce method which shape incoming data to anew simplified form aggregated common data in single objects

JakubI built a method using reduce of JS to aggregate together data from a DB in a better shape. What I'm wondering is, if that method can be simplified with a more modern approach or better written. Like using a different method instead of a reduce. The snippet of the method will be included at the e...

 
12:26 PM
Monking
 
12:43 PM
0
Q: Need to make my Tictactoe Game better (Java)

user258876I need some help with a school-project that i have! My code is very unnecessarily long, and i know that there is better ways to write it. So i have this code (generated code is not included & some things are in Swedish): import java.awt.Color; import javax.swing.JOptionPane; import javax.swin...

 
 
2 hours later…
3:12 PM
0
Q: Spawning a child process that is accessible in global scope through use of eval()

WoJoSo basically my question is what would be a better way to achieve my goal? The code below works fine but looks like it is extremely inefficient and could be achieved in a better way. The code essentially spawns several child processes with a dynamic name and because the eval() function is in the ...

 
3:36 PM
0
Q: Minesweeper implementation in C++

Andrei RostI have implemented minesweeper in C++. You can get a box by entering the coordinates of said box (eg: "0 0"); you can mark a box as a bomb by adding the prefix "mark" (eg: "mark 0 0"); you can unflag a box by adding the prefix "unmark" (eg: "unmark 0 0"). The game ends when all non-bomb boxes hav...

 
Monking
 
4:01 PM
0
Q: Async recursion that must ultimately return a promise

kidcoderI have an asynchronous function that must ultimately return a Promise (the first function). This function has many tasks but I've stripped them all down to just one for clarity. One such task is a recursive delete of documents from a remote database (the second function). // This function must re...

 
4:51 PM
0
Q: Improving unit tests and error handling with files in Rust (PNGme)

rdxdkrI want to become proficient in Rust and I've followed the PNGme exercise. I've completed it up until Chapter 4 included, where I've written a lot of tests myself for verifying that the command line arguments work as expected and the involved files are manipulated correctly. Unfortunately, the tes...

 
5:20 PM
possible answer invalidation by Mike on question by Mike: codereview.stackexchange.com/posts/276728/revisions
 
5:32 PM
Well done, you solved it! Note that python does have a min Heap module called heapq that you could use, but a heap won't change the O(nlogn) complexity or O(n) space requirements. The actual complexity is O(n^2) because of the way linsert works. So that's where you would need to focus your efforts if you want improved performance. For general tips from python experts, try posting your code on code review. — user3386109 22 secs ago
 
 
2 hours later…
7:23 PM
@Duga Doesn't affect either answer, should probably be an additional question with a bash and maybe test flag.
If it is a separate question, the OP needs to add the file.txt to show what the input is.
 
7:57 PM
It's correct if the works the way you expect. Stack Overflow is for questions about something that isn't working the way you expect. If you want someone to review your code that is already working correctly, post to Code Review instead. — Doug Stevenson 32 secs ago
 
 
4 hours later…
11:42 PM
Yeah, this would never pass muster if I was the code reviewer. That module should always be referred to as np.random. — Silvio Mayolo 6 secs ago
 

« first day (3304 days earlier)      last day (194 days later) »