« first day (2825 days earlier)      last day (1194 days later) » 

12:00 AM
RELOAD! There are 7290 unanswered questions (89.6282% answered)
@LiveandLetLive It's mostly experience. I've been writing code and performing code reviews for a long time. — Elliott Frisch 9 secs ago
 
@Peilonrayz Let's just say I hate the timer on the question, any question can be a trick question that way.
 
@pacmaninbw Yeah I feel that.
 
 
4 hours later…
3:50 AM
i think this question is more suited to code reviewanky 23 secs ago
 
0
Q: ConvertAll Methods Implementation for Multidimensional Array in C#

JimmyHuI am trying to perform some conversions with multidimensional array in C# and I have checked the discussion ConvertAll and 2-dimensional arrays. I found that Array.ConvertAll still not support multidimensional array cases. Therefore, here's an experimental implementation for handling the process ...

 
beside if the code work. even it is fragile or low performance. this should belong to code review, hence the off-topic @BillKarwin mention. — T. Peter 15 secs ago
 
4:17 AM
0
Q: How to optimize this majority vote method

horcle_buzzI have the following code to do a majority vote for data in a dataframe: def vote(df, systems): test = df.drop_duplicates(subset=['begin', 'end', 'case', 'system']) n = int(len(systems)/2) data = [] for row in test.itertuples(): # get all matches fx = test...

 
 
1 hour later…
5:38 AM
This is a perfectly acceptable solution. You might also want to post your working code on our sister site Code Review for more detailed feedback. — Code-Apprentice 12 secs ago
This is off-topic for Stack Overflow. As this is working code, you should post to codereview.stackexchange.com in order to get advice on ways to improve it. — costaparas 26 secs ago
@Code-Apprentice I don't think this would be acceptable there, either. Read codereview.meta.stackexchange.com/questions/5777/…Barmar 22 secs ago
@T-Peter, seeing as I am looking for resources, do you believe codereview.stackexchange.com is an appropriate place for me to share this question? — Sam Hughes 25 secs ago
@Barmar I don't see anything in that post that indicates this is particular question is a bad fit for Code Review. The code given here works as intended (modulo indentation which I assume is an artifact of posting) and the user is asking for suggestions about how to improve their code with specific concerns. The exact wording and formatting of the question might need to be tweaked, but the heart of the question seems like a good fit for Code Review. — Code-Apprentice 45 secs ago
 
5:58 AM
@Code-Apprentice From codereview.stackexchange.com/help/dont-ask: It's OK to ask "Does this code follow common best practices?", but not "What is the best practice regarding X?"Barmar 10 secs ago
 
Monking
 
 
1 hour later…
7:14 AM
@T.Peter I don't think this belongs to codereview SE site either as one of conditions there is to have a working piece code and not concept. This question is opinion based and biased towards features of Rust and their lack in Go. Go and Rust have different sets of features and trying to make one look like the other will IMHO only produce non-idiomatic code that is hard to work with. — blami 24 secs ago
 
8:09 AM
I’m voting to close this question because you should ask it on codereview.stackexchange.com rather than here. — Peter O. 12 secs ago
 
8:50 AM
0
Q: Implementation of binary tree traversal

curiousBased on what i understood of Binary Tree, queue and recursion i implemented this Bread First Search algorithm as follow. Do you have any suggestions to improve (in term of readibility, good practice etc...) it ? # Definition for a binary tree node. class Node(object): def __init__(self, val=...

0
Q: Better way to do sentinel in C#

silverI am using null as a sentinel/trip value to break out of foreach: private VacantSummaryPage SelectPropertyFromDb(string sql) { VacantProperty vacantProperty = null; var vacantProperties = GetProperties(); foreach (DataRow row in SqlServer.ExecuteQuery(sql).Rows) { vacantPr...

0
Q: Searching for an idiomatic Rust implementation of Minimum Edit Distance (LeetCode #72)

SuhasI am solving LeetCode Dynamic Programming challenges (this one is #72, at https://leetcode.com/problems/edit-distance). Here below, I've implemented a Rust solution for the minimum edit distance between two strings problem use std::collections::HashMap; use std::cmp::min; impl Solution { pub...

 
9:12 AM
i think it's better to ask, codereview.stackexchange.comsahasrara62 17 secs ago
 
9:51 AM
0
Q: Does the disciplined badge make sense on CR?

Sᴀᴍ OnᴇᴌᴀI see this post has one deleted answer that has some good advice and received three upvotes. I don’t see much reason for the OP of the answer to delete it other than to earn the disciplined badge. This leaves the question as “unanswered”. I searched CR meta for insights but didn’t find much. Then...

 
10:05 AM
0
Q: Why my workers work distribution count does not total the number of produced items in this System.Threading.Channel sample?

VeverkeFollowing this post, I have been playing with System.Threading.Channel to get confident enough and use it in my production code, replacing the Threads/Monitor.Pulse/Wait based approach I am currently using (described in the referred post). Basically I created a sample with a bounded channel where...

0
Q: Add intermediate classes or use a more generic method instead of changing the signature of child methods?

Nicola PradaI have 6 classes: A, B, C, D, E, F. All are derived from the same abstract base class Base. Everyone of them has a do_something method that will be triggered by a mediator object. The problem is that they expect different parameters for the method: Classes E and F don't need any parameter at all....

 
10:30 AM
0
Q: I want some to convert my C language code to Bash/Shell Script

Pakistani UnderdogsProducer-consumer problem is a common paradigm for cooperating processes. A producer process produces information that is consumed by a consumer process. One solution to the producer-consumer problem uses shared memory. To allow producer and consumer processes to run concurrently, there must be a...

 
10:55 AM
0
Q: Avoding CT and other sins?

snoramI'm a SQL learner. In answering the question* For the region with the largest sales total_amt_usd, how many total orders were placed? for the following schema: (I am unsure of the dialect is but I think it is Postgres) I came up with the following solution and I wonder if am committing any bad p...

 
11:20 AM
0
Q: Last Digit porblem on SPOJ. Getting WA but the code looks fine

NewUserI am solving this problem on Spoj https://www.spoj.com/problems/LASTDIG/ there are given n test cases and then two numbers a and b and the output has to be the last digit of a^b Also the source code must be <=700bytes. This is why I tried to omit some spaces. #include <iostream> #include <cmath> ...

 
SO is not really a code review page. In general i'd move things out and give them names. E.g the "c-pred?" and "g-pred?" and also the deciding part. Makes it easier to test and to try out in the repl. — cfrick 42 secs ago
 
12:23 PM
Yes there could be, but it depends on the logic of the code. Some of the suggestions may help, but its hard to speculate any further in this general case. My best guess would be to restructure some of the logic, or the classes you use to make the flow simpler and avoid the over-nesting. Also, I'm not sure if this question qualifies as on-topic on SO. It might be better-suited for codereview.stackexchange.com? — costaparas 52 secs ago
 
12:57 PM
If the code works try posting on Code Review. — Johnny Mopp 55 secs ago
 
1:11 PM
Greetings, Programs.
 
Ha ha. Most of these (especially SR) I have put in the code review comments. I'll add "equals should be deterministic" (< one of my code review comments and iterated here in comment as well). That started the "debate". — granadaCoder 20 secs ago
 
 
2 hours later…
3:08 PM
The question in it's current editions belongs to codereview.stackexchange.com since there are no errors — Alex Blex 6 secs ago
 
3:28 PM
0
Q: Household Outgoings Calculator (OOP)

George Austin BradleyI would really appreciate feedback on my OOP Household Outgoings calculator. My objective is to develop in OOP. Have I used good OOP techniques? How can I improve on it? And anything else you might add. Thank you very much advance for anyone who spends their time reviewing it. I've learned so muc...

 
possible answer invalidation by horcle_buzz on question by horcle_buzz: codereview.stackexchange.com/posts/255270/revisions
 
@Duga Rolled back.
 
3:53 PM
1
Q: Generating multiplication questions and answers for a quiz style app

UnknownErrorSee this link for previous post on this subject Generating mathematical questions and answers I have an Android quiz app that I am building to learn kotlin / android app development. Here is an object I have which acts as one of many question builders. Since my last post I have: broken down the ...

 
If your code is working, but you want open-ended advice on improving and streamlining it, your question would be a much better fit for Code Review than Stack Overflow. — CrazyChucky 47 secs ago
 
4:18 PM
0
Q: 3D torus in Lua

YvesgereYI'm a total beginoob in Lua. The aim is to display a 3D Torus in dots (see Figure1), or at least compute the positions, privileging clarity over performance. Pseudocode link. Don't hesitate to be picky, I'd like to learn proper Lua idioms. For instance, I was pleased to find operator overloading,...

 
4:43 PM
0
Q: Design for tool rental solution in Java

geewalkI have designed a tool rental application in Java and wanted others to provide criticisms of the design and implementation. Specifically, the implementation of the service layer. https://github.com/geewalk/gw0221 package com.gwalk.demo.service; import com.gwalk.demo.domain.*; public class Chec...

 
Prashanth Chandrasekar on January 27, 2021
We’re excited to share our latest results and our plans for the future.
 
5:08 PM
0
Q: saving class including a 'container' with pickle

grrfieldI am writing a program that has a 'base' class called 'Group'. The class will have only one instance. Aside from some properties and methods, it needs to keep track of a variable amount of group_companies. After working with the program (that may involve adding or deleting group_companies), I wan...

 
The local utility company is shutting off the electricity for 6 to 8 hours starting in 45 minutes. So I'll talk to all of you tomorrow.
 
@pacmaninbw okay - have a good day despite not being online .... Do you have some rocks?
 
On a different note, you're mutating the things you're sorting? I'd be concerned about that if I saw that in a code review. — jcalz 19 secs ago
 
5:24 PM
 
5:58 PM
0
Q: Concurrency in MongoDB

Shanka SomasiriI have a stock document. { "_id": "601022171517ee00d48ce6ad", "caseQuantity": 4, "unitQuantity": 395, "totalQuantity": 2000, "currentQuantity": 1995, "isClaimActive": "true", "claim": 32, "status": "Active", "purchaseInventoryId":"601022151517ee00d48ce6ac", "

0
Q: Understanding the `new bool()` constructor

razivo(I'm unsure if this is the correct exchange, please tell me) I've been trying to understand the following code: bool* bools = new bool(p) bools[4] My current understanding is the following: Line 1: allocate memory for p bools. put the address of the first bool in bools. Line 2: add four(bool...

0
Q: Is there any way to condense my code so it does not take up so many lines?

kyle6348I'm writing my program in python and have it working properly, but it's over 500 lines of code. I think there is a way I can condense my code, but I'm not sure how I should do it Here's an example of some of my code: def click(): if clicked1.get() == "app1": os.startfile(r"C:\Users\re...

 
@pacmaninbw Nice of them to give a proper warning, most power outages aren't planned.
 
6:35 PM
Please repeat on topic and how to ask from the intro tour. “Does my code make sense?” is not a Stack Overflow issue. What problem do you have when you run the code? The Python interpreter is your ultimate authority for functionality. You seem to be asking for a premature (off-topic) code review (wrong site). — Prune 42 secs ago
 
6:45 PM
@CaptainObvious I know y'all wanted more posts to review in the CV queue but I left a comment and the OP deleted it
3
 
Monking
 
7:08 PM
Try asking CR-style Clojure questions here codereview.stackexchange.com/questions/tagged/clojureAaron Bell 5 secs ago
 
@SᴀᴍOnᴇᴌᴀ snort
 
7:44 PM
You can post shuch question on codereview.stackexchange.comOlivier Rogier 16 secs ago
 
8:17 PM
Welcome. The question is somewhat subjective, and code review questions are off-topic here. Personally, I think what you have there is fine. — isherwood 23 secs ago
This question should potentially be migrated to CodeReview. — max 29 secs ago
 
8:57 PM
@KKH It seems you misunderstood what is refactoring: the art to factorize as in mathematics to reduce the code size and avoid code repeatitions as well as thus solve errors and wierd behaviors from bad & anti patterns, as well as spagetti, unclean and badly written code, faulty algorithms & wrong names, all being fuzzy - which is not the case with your code which seems to be rather clean, neat and concise. If it does not compile or not do what it is excpected, specify that in details, please. Else you should post the question on code review. — Olivier Rogier 24 secs ago
@KKH "Code review Stack Exchange is a question and answer site for peer programmer code reviews. It only takes a minute to sign up." — Olivier Rogier 8 secs ago
@KKH "Code review is the most commonly used procedure for validating the design and implementation of features." - "Code review Stack Exchange is a question and answer site for peer programmer code reviews. It only takes a minute to sign up." => Code review is not related to solve problems but to check the quality of the code like when you inspect a house during and after its construction not to solve problems but to find them, thus if you find some, so you need solve them and can ask here. — Olivier Rogier 38 secs ago
@KKH Here is an example of question: Factory Method and Log writer class. Your question as it was written and exposed is more similar to that one. Therefore, you can more hope to get an answer there than here. — Olivier Rogier 50 secs ago
 
9:45 PM
0
Q: Solve binomial coefficient without lookup

Mr. PolywhirlI want to solve for n in the expression (binomial coefficient): let y = (Math.pow(n, 2) + n) / 2; I know the y value, but I want to compute n. Here is what I have so far, but I would want to know if there was a way to compute the value rather than look it up. In this example, I have to lookup t...

 
10:36 PM
0
Q: This code loops through a GlobalEmployeesList, eliminates duplicate email and phone records for the selected employee, and populates listboxes

Joshua WhiteI have a DataGridView which displays an employee list. I use the employee ID to filter my global employee list and display information about the selected employee in various listboxes. This is my first coding project, and I'm pleased that it's working well, but I do feel like I'm repeating myse...

 
11:01 PM
@AaronBell you learn something new every day - hadn't seen codereview.stackexchange.com before. I'll keep it in mind next time. — DaGaMs 36 secs ago
 
0
Q: Babbage Problem - squares ending in digits 269696

carolo//the strategy of take the rest of division by 1e06 is //to take the a number how 6 last digits are 269696 while (((square=current*current) % 1000000 != 269696) && (square<INT_MAX)) { current++; } This is part of the "C" example on rosettacode.org. The comments, and not only them...

 
11:15 PM
just starring random things to let you know I was here
4
 

« first day (2825 days earlier)      last day (1194 days later) »