« first day (3677 days earlier)      last day (127 days later) » 

12:10 AM
REFRESH! There are 7305 unanswered questions (90.5125 answered)
1 hour later…
1:37 AM
This might be a good fit on code review, but before posting on Code Review please read A guide to Code Review for Stack Overflow users and How do I ask a good question?pacmaninbw just now
2:10 AM
@TheCompile-TimeComedian If you have working code it can be reviewed here: codereview.stackexchange.comMartin York 58 secs ago
1 hour later…
3:16 AM
Q: Covid Data Base Hash Map in C++

The Compile-Time ComedianI have these two function prototypes: void CovidDB::add_covid_data(std::string const COVID_FILE) void CovidDB::add_rehashed_data(std::string const COVID_FILE) both essentially do the same thing except that one re_hashes the data before logging it to a .log file. I've heard about function pointers...

2 hours later…
4:57 AM
Q: Prime sieve in Rust

manungsaUsing Sieve of Eratosthenes, I created a function that returns a vector of primes up to given limit. fn prime_until(limit: usize) -> Option<Vec<usize>> { if limit <= 1 { return None; } // limit + 1 because of zero based indexing let mut nums = vec![true; limit + 1]; n...

3 hours later…
8:22 AM
8:44 AM
"one generally expects the return value to be of interest, but that's not the case here" I don't think it's a valid point. #each also returns a value, but I rarely see it assigned at all. @Mooch feel free to use any of the working suggestions. The one with method is ok, the one with an extra each is confusing and would rather not pass a code review. I think it's worth getting yourself familiar with the inject approach, but it may be too soon if you're learning basics - make a note and come back to it when you're up for a challenge. Good luck on your Ruby journey! — Greg 31 secs ago
9:09 AM
Q: Issue with segment tree code (leetcode problem name:Range-Module)

Pankaj KumarI was trying to solidify my knowledge of segment tree with lazy propagation. I was trying to implement range-module problem on leetcode. I tried implementing it, but i am getting wrong answer on 20th TC. I tried many solution, but i cannot find what's wrong with my implemention. Could anyone plea...

9:35 AM
As mentioned on codereview, std::make_unique seems to do the job. So, which is your usage that std::make_unique doesn't solve? — Jarod42 28 secs ago
1 hour later…
10:57 AM
possible answer invalidation by cure on question by cure: codereview.stackexchange.com/posts/38601/revisions
possible answer invalidation by cure on question by cure: codereview.stackexchange.com/posts/38601/revisions
possible answer invalidation by cure on question by cure: codereview.stackexchange.com/posts/38601/revisions
11:15 AM
Q: Rate-limited thread scheduler in Java

mindoverflowBackground: I'm planning to call different endpoints of a website's API quickly, but the usage policy implies that I may only make five calls in a second. I can't rely on the calls taking 200 ms on average, so I wrote the following. The plan is to have any other threads that want to call an API s...

11:33 AM
@Duga We'll let that be.
11:50 AM
I’m voting to close this question because it belongs on codereview.stackexchange.comChristoph Rackwitz 41 secs ago
1 hour later…
1:06 PM
@ChristophRackwitz This question is not suited for Code Review, it does not contain full code. — Cris Luengo just now
I recommend to get dotMemory from JetBrains (use grace period if you can't buy it) and then profile the application, first for a few minutes and then for several hours to see how the GC behaves. dotMemory allows you to investigate the memory with more details that will help you to identify the problematic code. In addition with a careful code review of potentially resource intensive code will help you to further optimize your code. I'm pretty sure that this will help you to significantly improve the memory footprint of your application. I really hope you found my suggestion helpful. — BionicCode. 38 secs ago
1:32 PM
@Mast Cure is neither a 14 year old or a beginner these days.
1:48 PM
2:36 PM
Q: Add two values in brainfuck

Hazel へいぜるI'm currently learning brainfuck as a challenge for golfing, and I'd like a code review to make sure I'm understanding things properly. For starters, here's my snippet: [ The purpose of this program is to add two predetermined values together and print the result. For this program the valu...

2 hours later…
4:51 PM
I’m voting to close this question because it belongs to Code Review. — baduker 49 secs ago
5:33 PM
Q: what is the best optimal way to extract specific data from a large txt file and convert it into Json file

Ratul IslamSo I have this txt file of 13mb and I need only specific data such as roll, collage name, result etc. So I came up with this code but it takes ridiculously long to do so. i tried the code on smaller text and it works.. const fs = require('fs'); var location = '2nd.txt' var data fs.readFi...

5:44 PM
@chris Peer code review takes place prior to merging into the main branch. — alilland 48 secs ago
6:25 PM
@OskarGrosser The question has not been closed by the community so it might actually be on-topic here on StackOverflow. The question is currently off-topic on Code Review (it has been asked there due to your suggestion). If you send someone to Code Review please have them read A guide to Code Review for Stack Overflow users and How do I ask a good question? first. — pacmaninbw 40 secs ago
@baduker Keep in mind that the Code Review site is for code that is working as intended from a project that is already written. This question is hypothetical and would be closed very quickly on Code Review. — pacmaninbw 8 secs ago
2 hours later…
8:09 PM
Q: BigNumber/BigFraction implementation in Java

davidalayachewI have created a BigFraction alternative to BigInteger and BigDecimal. Name for this class is not quite hammered down yet. I recently finished a class that taught us about OOP and documentation. We learned about Preconditions and Postconditions, LSP, State Representation, and more. I built this p...

8:35 PM
Q: How to refactor function with string inputs to select a "mode" to avoid magic strings?

Jagerber48See code from this question about the advantages of Enums. def print_my_string(my_string: str, mode: Literal['l', 'u', 'c']): if mode == 'l': print(my_string.lower()) elif mode == 'u': print(my_string.upper()) elif mode == 'c': print(my_string.capitalize()) ...

9:32 PM
now I believe this is a prime candidate for codereview.stackexchange.com if the code is complete (minimal reproducible example) — Christoph Rackwitz 58 secs ago
@ChristophRackwitz The title "does not work correctly" implies it's not a candidate for code review. — Ted Lyngmo 16 secs ago
1 hour later…
11:01 PM
A recommendation though: If the program works but you think it could work better, ask at Code Review. I've linked to the Asking Questions help pages so you can read and tune your question appropriately. — user4581301 23 secs ago

« first day (3677 days earlier)      last day (127 days later) »