« first day (2858 days earlier)      last day (52 days later) » 

12:00 AM
RELOAD! There are 7346 unanswered questions (89.6062% answered)
12:25 AM
possible answer invalidation by Joji on question by Joji: codereview.stackexchange.com/posts/256060/revisions
12:51 AM
Q: How to Write a Contact List Program In C++ That Pulls Out the Corresponding Phone Number for an Entered Contact Name

CritAnnihilationI have written a program in C++ that takes in string values for contact names and contact phone numbers into vectors. What I need to do is have the program output the corresponding phone number for the contact name entered. (Note: The '3' is supposed to tell the program how many values are to be ...

2 hours later…
2:31 AM
Q: Embedded IoT: local data storage (Updated)

Vinay DivakarI have made most of the review changes based on feedback I have got from here. Now I am back here for a second review to further better my code. Before posting the changes, somethings I haven't changed are the following. I have left the print statements as-is for now. The reason for this is, at ...

2 hours later…
4:48 AM
2 hours later…
7:14 AM
I think this question is better suited for codereview.stackexchange.comKrishna Chaurasia just now
1 hour later…
8:16 AM
Q: Possible Combinations m out n, sorted and without repetition

Mohamad KhI wrote the following function to get all possible m-of-n combinations, sorted and without repetition. I am new to Go and I am wondering what are the possible enhancements I can make, in terms of performance and best practices. Input is: m and an array of strings Output is: an array all possible ...

Q: Exception handling while writing a method in stack class

kneeyutI have implemented a deque using an array, called 'ArrayDeque'. Then I used this ArrayDeque to implement a stack, 'myStack'. In the stack class, I am writing a method that can remove the top 'n' elements from the stack in constant time, called 'remove(int n)'. Following are the relevant code snip...

8:55 AM
If the code works and only needs refactoring, this is a question for codereview, not Stackoverflow. — Jeremy Thille 22 secs ago
Q: 2D array zeroing C++ style

sworI have a valid code in C-style int arr[10][10] = {0}; // all elements of array are 0 What is the optimal way to do the same for C++ style array? My idea is #include <array> std::array<std::array<int, 10>, 10> arr = {0}; // is it correct?

1 hour later…
10:19 AM
Q: REST: book a room

J.J. BeamIs my approach to book a room in a conference hall: PUT: api/v1/rooms/book/1 GET: api/v1/rooms/1 POST: api/v1/rooms fits REST architecture?

11:09 AM
Q: C++ Fast Fourier transform

Pel de PindaThis is a very simple FFT, I am wondering what I can do to make this faster and more memory efficient from the programming side (better data types, and maybe some tricks like unrolling loops or using the preprocessor if that is useful here), and not by using a more efficient mathematical algorith...

1 hour later…
12:36 PM
Greetings, Programs.
1:13 PM
Q: Divide a 3D matrix into multiple smaller 3D matrix

KamigakuI'm trying to build an extension method that will allow me to subdivide a huge array into much smaller ones. My current code is the following but it still takes about 2s to generate with an array of size 512x512x512 and the size of the sub cubes set to 32x32x32 public static T[][][][] Divide<T>(t...

1:38 PM
Q: Copy a block of data into existing cells, adding a new line

immobile2Wondering about efficiency here - I have a bit of code that does what I want; but it is terribly slow. I structured the code in a way that made sense to me logically, but I'm wondering if someone else could take a look at the code and find a shortcut or two that might make it faster. I'm guessing...

2:28 PM
Q: Multithreaded logger

BarnackI made a multithreaded logger years ago when I was still a total newbie. It "worked" (when it didn't deadlock). Now that I'm slightly less newbie I'd like to get some criticism on this new version. The logger spawns an internal thread on its own method "writer", which purpose is writing to consol...

Ryan Donovan on March 01, 2021
One of the tough decisions you and your team may face as you scale is deciding between keeping your current codebase and rebuilding on a new architecture.
2:52 PM
Q: Inversion of control vs instantiated helper objects

Andreas AndreouI was doing a TDD Kata (Greeter) and ended up with this code that I would like to get some feedback/review. Is there a good way to tell when it is okay to initialise an object inside a method body of a class and when it's better to pass it as a constructor dependency? For instance the kata was do...

3:05 PM
possible answer invalidation by Kamigaku on question by Kamigaku: codereview.stackexchange.com/posts/256569/revisions
3:17 PM
Q: .net core console app suggestions

raysefoI have a .net core console app that gets some data from an external API and inserts it into a SQL database table. It is working as expected but I wonder if you guys have any suggestions to make it more maintainable, testable, robust, and dynamic. By the way, I will add logging when getting data f...

@Duga thats ok
possible answer invalidation by Kamigaku on question by Kamigaku: codereview.stackexchange.com/posts/256569/revisions
there is a separate site for code reviews. I don't think you mean "optimize", more like simplify, deduplicate. — Marc Glisse 22 secs ago
This question does not suit the Stack Overflow Guideline. Maybe you can post it in Code Review. — GaryNLOL 24 secs ago
@Duga rolled back
Code review is the place to review working code. — drescherjm 35 secs ago
3:45 PM
possible answer invalidation by sebas. on question by sebas.: codereview.stackexchange.com/posts/256492/revisions
3:55 PM
@Duga rolled back
4:11 PM
@GaryNLOL when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". In the current form the code above would likely be closed as off-topic because it is missing context. — Sᴀᴍ Onᴇᴌᴀ 26 secs ago
4:31 PM
Q: How to beautify code?

Daugirdas PelanisI need help simplifying some ifs and else ifs. Is there a better solution to this? The code itself simply shows a couple of lines to the user, and depending on some conditions(whether a palisade is built, whether training grounds are built, and whether there is a stone wall) changes. Shortening t...

5:00 PM
Generally improving functional code is off topic on StackOverlow, you might want to try CodeReview (Another site in the network) — DBS 6 secs ago
@DBS when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". In the current form the code above would likely be closed as off-topic because it is missing context. — Sᴀᴍ Onᴇᴌᴀ just now
Ben Popper on March 01, 2021
Comparing summary statistics like the mean and median can help us understand how these variables are related, but we can learn even more by using visualizations.
5:30 PM
if the code works and you just are looking for optimization/review there is a code review SE site — depperm 16 secs ago
5:45 PM
Q: What do I do with this added stub in Xcode?

Kai QingSo despite my having about zero experience in Xcode, and iOS development, I was asked to try to update some config string in an Xcode project that was an app deployed to the iOS marketplace some time ago. In theory it all should just work, but of course it doesn't. When I build it complains about...

Q: Skyscraper Solver for NxN Size

Sandro4912I try to solve a kata on codewars which let you write a skyscraper solver for skyscrapers up to size 11x11. You can read about skyscrapers puzzles here: To understand the problem it is good idea to solve some skyscrapers. My code for this works perfectly fine for all my test cases but there is th...

6:10 PM
Q: Get location that are x km away using Latitude/Longitude

KSJaaySo I have a solution for this which uses a for loop and calculates distance between the main point and other points. I found the code for distance between two points online, changed it to my needs and wrote the rest of the code. While this code works pretty well, I'm just curious if there's a bet...

Q: How to increase time efficiency and performance of sudoku solver

p--hHow can I decrease the time complexity and increase efficiency, without writing a new algorithm. My solution solves the majority of sudoku puzzles in a fast time, but for some difficult ones it can take over a minute! I have added some of the difficult puzzles below the code. import numpy as np f...

6:28 PM
Ok finally found an answer that is several comments down in a related (but different) question: codereview.stackexchange.com/a/238729/75637: echo "Something & some_special! chars" | sed -E 's/[^a-z]+([a-z])/\U\1/gi;s/^([A-Z])/\l\1/' — majorBummer 59 secs ago
Q: What's the best way to make props reusable across many components in Vue.js 3?

Boussadjra BrahimIn option API (Vue 2 syntax which is still available in version 3) we could extract some repeated pieces inside many components and define them as mixin that could be reusable like : const colorable = { props: { bgColor: { type: String, default: "", },...

7:24 PM
Q: Extract values from a matrix database

rs028I have a very simple "database" (data.db) which is essentially a matrix like this: [,1] [,2] [,3] [,4] n01 "Avogadro number" "Na" "6.022140857e+23" "mol-1" n02 "Boltzmann constant" "kB" "1.38064852e-23" "J K-1" n03

7:49 PM
Q: Converting Integers to roman between 1 and 1000

kattyBelow is my code for the problem: ItoR = { 1: 'I', 4: 'IV', 5: 'V', 9: 'IX', 10: 'X', 40: 'XL', 50: 'L', 90: 'XC', 100: 'C', 400: 'CD', 500: 'D', 900: 'CM', 1000: 'M' } def convertItoR(number): number_str = str(number) number_len = len(number_str) rom_str = '' for i in range(nu...

1 hour later…
9:00 PM
@mfcallahan: I prefer having WaitAsync and Release in the same method, but the way you have it would work and it looks ok to me. If you want more code review, there's a site for that. — Stephen Cleary just now
9:11 PM
What is the test to do? Fail if there is a FIXME? How many FIXMEs do you currently have? None? More than that? Would you rather have a failing test or the FIXMEs? Would you want to fail the build if there are FIXMEs? Note also that tests printing stuff is IMHO an anti-pattern... tests pass or fail. You shouldn't need to manually inspect the output. Not sure what you want exactly, but honestly I'd settle for the tasks view in Eclipse, your CI server, code reviews, or SonarQube. — Robert just now
Questions asking for general improvements to working code are off topic here. Consider our sister site Code Review. — Charles Duffy 52 secs ago
9:28 PM
Q: Finding longest word in a sentence

kattyA problem from Coderbyte. Find the longest word in a sentence after removing the punctuations and if two or more words are of same length return the first word Below is my solution: def cleanWord(word): # To remove punctuations punctuations = ['!','.','\'','"',',','&'] new_word = '' for ...

Q: Class showing a format similar to var_dump v1.0.5

Francisco NúñezFirst of all I must thank for the help given in the previous post: Class showing a format similar to var_dump RC5 Version I have it deployed in a early versio v1.0.5: https://github.com/arcanisgk/BOH-Basic-Output-Handler As they should imagine; Thanks to your help, the main code has had serious c...

9:52 PM
Q: git-user - Working on a shared local repository with multiple users made easier

AlexVI have recently been in a situation where multiple developers worked on a shared local git repository under the same Linux user1. As one can imagine, it can easily become a bit annoying not to commit changes as someone else if you don't check the values of git config user.name and git config user...

10:11 PM
@FranciscoNúñez do you get a notification each time I update my answer?
Q: LeetCode: Sort The Matrix Diagonally C#

Giladhttps://leetcode.com/problems/sort-the-matrix-diagonally/ A matrix diagonal is a diagonal line of cells starting from some cell in either the topmost row or leftmost column and going in the bottom-right direction until reaching the matrix's end. For example, the matrix diagonal starting from ma...

Q: Performance issue in python- network creation based on the Euclidean distance with nested for loops is too slow

user710I want to create a network in which the links are formed based on a similarity metric defined as the Euclidean distance between the nodes. The distance is calculated using socio-demographic features of customers such as gender and age. The problem is the code takes 200 seconds to just create the ...

@SᴀᴍOnᴇᴌᴀ nope
@FranciscoNúñez okay... I thought I saw that once when an answer was updated but perhaps just when the OP left a comment
@SᴀᴍOnᴇᴌᴀ I usually receive notifications of comments or new answers, every time you add something leave me a comment to find out ... I also recommend that you migrate anything new that you add to the new question. since there is new and updated code up to version 1.0.6; as I am quite enthusiastic about this little project, it is very likely that version 1.1.0 will be here this week.
@SᴀᴍOnᴇᴌᴀ Did you follow the post?
10:25 PM
@FranciscoNúñez You can view the history of my answer to see the changes over time
@Peilonrayz No- my question is whether the OP of the question gets a notification whenever an answer OP edits his/her/its answer
darn English + Political correctness
@SᴀᴍOnᴇᴌᴀ I responded to the second message because, "I thought I saw [a notification] once when an answer was updated"
Asking for review of working code is off-topic on SO - consider asking on Code Reviewack 55 secs ago
It'd probably make sense for SE to auto-follow your own posts, by default
@Peilonrayz "It'd probably make sense for SE to..." - that sounds like a can of worms 😏
starting March off great with a double-ping!
Yeah I'm sure some people would complain
10:44 PM
If it really bothers you, you can add a ceck during code review to make sure that functions that return by reference are being assigned to references. — NathanOliver 1 min ago
11:19 PM
I’m voting to close this question because it is requesting a review of a working program - this would be more appropriate on Code Review. — Pika the Master of the Whales 29 secs ago
11:31 PM
Q: Assessing BigO/small o for forming a dynamic dictionary based on searched key and values pair

AhmFMI am trying to create a dictionary with a file containing text based on a matched pattern. Lines containing key_str should become keys and subsequent lines not matching key_str should become values and get associated with keys in the dictionary. so i have below code working: But I need help and g...

This is the loop count that matters here. How many times to apply that simple multiplication of all digits of a number will end in a single digit number. Have a look here. That is the same question, but using Python. — Louys Patrice Bessette just now
11:52 PM
Stack Overflow is generally for fixing problem code. To improve working code, follow the posting guidelines for Code Review. In your current post, you failed to include the timing figures and your rationale for expecting better. For your attempted repair, you cite an error that is missing from your post. — Prune 59 secs ago

« first day (2858 days earlier)      last day (52 days later) »