« first day (3512 days earlier)      last day (801 days later) » 

00:07
REFRESH! There are 7579 unanswered questions (90.0793 answered)
 
4 hours later…
04:12
04:58
This answer is more fitting for the codereview.stackexchange.com site. While "just tidying up" the irrelevant part of code cannot be considered a valid answer on Stack Overflow — Your Common Sense just now
05:41
@TobySpeight nice placement of the glasses!
Monking
06:53
You may be interested in the Code Review StackExchange, which is focused on answering this sort of questions. StackOverflow is meant to find solutions to problem. — Lenormju 31 secs ago
07:05
0
Q: How to make this code more compactful and simpler to run? (Python)

doobiebobI fairly started coding no more than 2 weeks now; not even for long, and a thread inspired me to make a random back-to-forth game between a Hero and a Monster where it randomly choose a certain number to decrease the health of either character and go back and forth until once below 0, the survivo...

 
1 hour later…
08:32
it's matter of style. Some people prefer f1 because when var declaration v := T{} and pointer usage g(&v) are very far apart, one who does code review can see at the call site that you are passing a pointer — blackgreen 27 secs ago
08:47
I’m voting to close this question because I think this belongs to codereview.stackexchange.comAbdul Rauf 37 secs ago
Not sure if codereview is the right place or softwareengineering.stackexchange.comThomas Weller 24 secs ago
 
2 hours later…
10:25
0
Q: Container that orders the elements based on the frequency

Toby SpeightI was inspired by Find the K most-frequent values in a vector, and originally posted an early version of this in an answer. The aim is to have a container that maintains values ordered by their frequency, so we can easily obtain the most-frequent values at any time. I've just implemented enough t...

jsut go ahead and do it. If anyhow you will have a codereview, your coworkers will tell you if they like it or not. Imho, placing the trivial code where one would expect it together will all the definitions is the most clear, while trying to hide it is recipe for confusion. Btw "The code which is worth to write unit tests for" All code is worth to write tests for! — 463035818_is_not_a_number 42 secs ago
11:03
@SᴀᴍOnᴇᴌᴀ I like the oxymoron of wearing sunglasses and a head-lamp...
3
11:30
@Remy, the question needs work before it's suited to Code Review, as it's missing the crucial definitions of types such as Point. You should have pointed the asker at A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. we need a good description of the purpose of the code to give context, and question titles should simply say what the code does (the question is always, "How can I improve this?"). It's important that the code works correctly; include the unit tests if possible. — Toby Speight 17 secs ago
12:16
note, OP has posted to codereview and got answers there — Sam Mason 43 secs ago
12:29
0
Q: Reactive objects, like in vue

MarcI like the reactivity of vue and created a function that makes Object's reactive. Just like in vue 3 .reactive I wonder if my approach is ok or i have made a fundamental mistake: const item = { foo: "bar", bool: true, arr: ["hello", { world: "Its nice here", enabled: ...

13:22
Just got the "11 will save the day hat", narrowly getting in ahead of PeterJ to get the first one! :-)
If your code is working and looking for a review or improvement, then you should ask the question in Code Review Stack Exchange forum. — Praveen 54 secs ago
@AvdhutJoshi ... You're welcome. The OP should feel encouraged to reward the remote analysis the code review and the final fix. — Peter Seliger 8 secs ago
@AvdhutJoshi ... The OP might consider rewarding the remote analysis the code review and the final fix by voting on and/or accepting the above answer. — Peter Seliger 43 secs ago
13:44
0
Q: Designing a basic Binary Expression Tree structure

chptr-onePreface I need to generate some algebraic expressions for math testing in elementary school. The test should generate a list of expressions compiled according to certain rules and check the correctness of the solution. I have decided to represent the expression as a Binary expression tree. At thi...

13:56
if you have a solution, try code review SE. If there is a bug, post minimal reproducible exampledepperm 14 secs ago
Before you post at Code Review, make sure to read A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?". Be sure that the code works correctly; include your unit tests if possible. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. — Toby Speight 43 secs ago
14:59
0
Q: RFC-822 Header regex

asdf256I'm learning regex for the first time, and here's my attempt at trying to handle an RFC-822 header given as an example in the Python regex HOWTO, which looks like this: From: [email protected] User-Agent: Thunderbird 1.5.0.9 (X11/20061227) MIME-Version: 1.0 To: [email protected] Here's my shot...

Erin Yepis on December 15, 2022
The last year has been a time of re-evaluation and opportunity for technology professionals. The rise of remote work, the Great Resignation/Reshuffle, and “quiet quitting” all demonstrate how fast the workplace is changing, especially amidst recent economic uncertainty and layoffs in the tech sector. In October 2022, we surveyed 2,600+ tech professionals to learn more…
15:24
0
Q: Tree data structure implementation

user272735This is an implementation of tree data structure using Ballerina's table collection and query expressions. The implementation allows bi-directional traversal. The two free traversing functions walk1() and walk2() demonstrate the usage. I'm especially looking a guidance how to make the implementat...

0
Q: c# collect the price of the products in the listview

daykoAfter selecting the content of the pizza in the 1st picture, I want to print the numbers in the price column in the listview in the 2nd picture, how can I do it? System.Collections.IList list = listView1.Items; for (int i = 0; i < list.Count; i++) { ...

16:12
If you're looking for help optimizing your code, there is a sub stack called Code Review . — Cameron Critchlow 56 secs ago
16:35
If you want to see if the script is correct, you should run it and see if it works. The other questions asking for a general code review are opinion-based and off-topic here. You might be able to ask about it on Code Review, though. — TylerH 39 secs ago
16:59
Monking
17:12
@KhushbooSingh full code review is outside scope of what can reasonably be accomplished on SO. I suggest confirming you have the StatisticsBrokerPlugin working using the ActiveMQ console, by sending a message and seeing the response show up in the ReplyTo queue. Once that works, adapt your code and you should be good! — Matt Pavlovich 39 secs ago
17:24
Welcome to Stack Overflow. Please take the tour and read about what is on topic in the help center. SO is for concrete programming questions, not open-ended code review. You might have better luck on Code Review, though please take their tour and read their on-topic and "how to ask" pages before posting to be sure. — Chris 9 secs ago
17:54
0
Q: Can I speed up an arbitray precision Taylor series ln() method, further?

StormCrowI have created an arbitrarily precise Decimal class. Using a Taylor series to calculate ln(x). While it works well, after researching math.stackexchange.com I am uncertain if I could speed it up further. To be fair I struggled a lot to understand the math on this. Any advise or critique is wel...

@TobySpeight Good job embracing the Summer-bash aspect
not that one couldn't wear sun-glasses in winter, but perhaps for more hours during the summer months
 
1 hour later…
19:17
Monking
 
1 hour later…
20:24
0
Q: What can you advise to make my code better? What should i do or read ? Thanks

Oleksandr BondarenkoThats my first application on Python. Please help me do my code better. I try make the simple console calculator. I don't know is I do it right and how do my code cleaner. main.py import conductor def main(): conductor.run() if __name__ == '__main__': main() conductor.py import dialog...

0
Q: Python: Is it good practise to use a blank class like a dictionary? Why would someone have done it?

79037662I am working on an old Python codebase. I am not in contact with anyone who had worked on the codebase previously, so I do not know why the previous developers did what they did. In the codebase, there is a "blank" class which is used like a dictionary. Here is a simplified example. # Defining a "...

20:46
"solved it but I want someone else to solve it so that I can learn more ways of thinking. Code ReviewJohnny Mopp 15 secs ago
0
Q: Got Same solutions with same graphs in 2D plots for negative and positive charge . But in 3D it shows different trajectory which is the expected one

Lunthang PeterI am trying to plot the path of a charged particle in planet's magnetic field. For positive and negative charge (β=charge/mass) different solutions/paths are expected. But,I got the same solution (values). In the plots of the variables with time in 2D it too show the same graphs. However, plots i...

Monking
21:29
@TobySpeight nice eye-patch!
0
Q: Clean up improperly formatted phone numbers

Josh FriedlanderThis is a problem from Exercism here, the goal is to clean up badly formatted phone numbers. The rules are: If the phone number is less than 10 digits assume that it is a bad number If the phone number is 10 digits assume that it is good If the phone number is 11 digits and the first number is 1,...

 
2 hours later…
23:19
0
Q: Make data set longer with two different pairs of columns

JamesI have a data set that is a bit too wide for the EDA plots I would like to make. The data can be found here: https://www.massey.ac.nz/~kgovinda/data/Bill_Colour.Rdata But looks something like this: | CommonName | r_ChromaticityFemaleLowerMandible | r_ChromaticityFemaleUpperMandible | r_Chromatici...

23:44
0
Q: Replacing private helper methods with global functions in Python?

Michael MorenoIn Python there is no real notion of private access. It's instead indicated by social convention with _ prepended in method names. class Handler: def _timestamp_to_datetime(self, timestamp: int): # <- "private" method return time.gmtime(timestamp) def handle(self, message): ...

23:57
I suggest looking at the help page of the Code Review Stack Exchange site and see if that's maybe a better place to post this. StackOverflow is for asking questions about code that is not working. But this code seemingly is working fine. — Random Davis 59 secs ago

« first day (3512 days earlier)      last day (801 days later) »