« first day (3338 days earlier)      last day (665 days later) » 

12:03 AM
REFRESH! There are 8099 unanswered questions (89.3106 answered)
 
 
1 hour later…
1:03 AM
This question might be more appropriate on code review, you could try posting it there. — Kraigolas 28 secs ago
A better site for improving working code might be Code Review. — President James K. Polk 40 secs ago
 
2:04 AM
0
Q: Optimization using a differential evolution technique, ideally with a million iterations

krisllenI'm working on an optimization code using differential evolution to solve. However, it is taking a long time to get the solution. See that I have a variable called number_of_iterations that must equal 1000000. When I consider this decision variable equal to a smaller value (eg number_of_iteration...

 
 
2 hours later…
4:31 AM
if you have working code and you want suggestions then you should rather ask on similar portal for CodeReviewfuras just now
 
 
2 hours later…
6:27 AM
@Mast and for those following along: they added a reply comment
@CrisLuengo Mostly I disagree; if we (perhaps generously) interpret it as a run-of-the-mill performance improvement question then it seems on-topic. — Reinderien 8 hours ago
arrg “mobile” (read: “tablet”)
 
7:07 AM
-1
Q: im attempting to make a very crude neural network, and im having trouble with OOP

Jackson Theringimport random import math jomama = 0 data = [] for i in range(0, 20): data.append(i) class guess(): def __init__(self): self.value = random.uniform(0, 1) self.sd = self.value def predicted(self, x): global jomama h = 10**(-11) A1 = w1.value...

 
@SᴀᴍOnᴇᴌᴀ They also answered the question.
 
@Mast Well, well, well
 
 
2 hours later…
9:33 AM
@buran thanks, that was my initial code, but I've changed it during code review to increase readability. I'm able to access the tags (attr names) with the snippet you suggested. But I couldn't get the values ( what _dg1 is assigned) within the same line without creating temporary list. — Ege Yıldırım 42 secs ago
If this is working code that you think could be improved, see Code Review. If not, please edit to clarify the problem. — jonrsharpe 22 secs ago
 
10:30 AM
0
Q: Best design for a generic reader

curiousI'm trying to implement a text reader, agnostic to the document nature/type (reading word, pdf, etc ...). Each reader has: common functionnality and attributes: for exemple we want to extract whole text of the file in input and store the text in a "fulltext" attribute. So i created a Document c...

0
Q: Python & Pandas - Help making code more concise and resuable please

NewbieI would really welcome any hints on making this code more concise please. In this example we have some experiment results. For each planned experiment We have predicted results based on 4 temperatures and we have 4 forecasted results, 1 for each of the temperture For each experiment when the actu...

 
11:18 AM
You still need to spell out these possibilities. Besides, if the code works and you only think of enhancing it, please consider posting at Code Review. — Wiktor Stribiżew 34 secs ago
 
11:46 AM
0
Q: how to add object from user input apart from using ArrayList

Sheng YaoAccording to the pseudocode i have done, one of the requirement is to read the user input and to store the data entered, will need data structure to store the object and utilize the array of object not using ArrayList. I am pretty lost with data structure and not to sure on how to implement data ...

 
11:56 AM
You're asking "code-review" questions on the wrong site. 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 just now
 
12:17 PM
if your code produces desired output, then CodeReview SE would be a better fit to get advice/suggestions on performance enhancements. but like Jmb said, also check you're using release mode, that makes a big difference — Jeremy Meadows 27 secs ago
 
12:36 PM
0
Q: Clean up multiple if/else statements by using an enum

FlacoDevI would like to have an external opinion on how bad the code i implemented is. This is the context. I was working on a evolution on a legacy class, and i found this. private void setFieldsToNull(List<Sting> fieldNames, Pojo pojo) { if (fieldNames.contains("attribute1")) { pojo.setAttribute1...

 
1:27 PM
0
Q: Rust - Code optimization implementing cosine similarity

Shodai ThoxI've been trying to create a piece of code which consists of looping through each element of a list of questions, preprocess it, and then calculate the Cosine similarity with the rest of the elements (questions) not including the same element. At the end of each iteration of the main_question, th...

 
1:46 PM
possible answer invalidation by Jack on question by Jack: codereview.stackexchange.com/posts/277558/revisions
possible answer invalidation by Jack on question by Jack: codereview.stackexchange.com/posts/277558/revisions
 
@Duga Rolled back and commented.
 
3:21 PM
Monking
 
Monking
 
0
Q: Deterministically hash dictionary

actual_pandaI need to compute a deterministic hash for a JSON-serializable dictionary. This answer almost does the job, but there are a few problems. If dict1 == dict2 then I expect hash_dict(dict1) == hash_dict(dict2). However, in Python integers and floats with the same value are equal, but don't have the...

 
0
Q: javascript code already working for a tictactoe game, trying to make it shorter

SteinMy code is already doing what I want, so it's functional, now my concern is, if there is a way to make it easier to read or even better and shorter my code, it's supposed to check if 3 'X' or 'O' are continuous in 3 cells in a row, column or diagonal, code for the string 'O' is the same as 'X' on...

 
4:25 PM
0
Q: NPM package responsible for packaging functions (e.g. lambdas)

ericI'm looking for people to review my initial code for the so called "Function Packager" that will come in handy when creating AWS Lambdas for example and when you want to handle the deployment by yourself (for example via terraform). PR: https://github.com/doteric/funpack/pull/1 Code inside public...

 
4:51 PM
1
Q: I created a Git Push Bash script. Any ideas for improvement?

Logan AlldredgeI created this bash script to make it easy to publish your files to a GitHub repository. #!/bin/bash echo "Welcome to the GitHub File Publishing Tool (GHFP for short)" read -p "Continue? " yn case $yn in [Yy]* ) echo "Continuing the program...";; [Nn]* ) echo "Stopping the program"; exit;; ...

 
5:40 PM
Your question could be on topic for codereview.stackexchange.com and is unlikely to survive here on SO. — PM 77-1 29 secs ago
 
0
Q: bash script to setup of a digitaloceans webserver (apache2, nginx, PHP7.4, fastcgy, SSL)

Roadrunner85The following bash script is thought to be run on a freshly installed digitaloceans ubuntu 20.04 droplet by root in its home dir. Purpose is to setup a ready to use webserver with SSL (certbot), PHP 7.4 support (fastcgi), an Apache2 fileserver and nginx as reverse proxy. DNS is managed by Cloudfl...

 
5:57 PM
"I don't want it to write anything into the runsettings files as this still poses a risk that someone might commit the runsettings files with the secrets in." — this should be caught during code reviews. If you are not doing code reviews for this, you should be. Local settings should be committed to version control. Use pipeline variables to replace those settings in Azure DevOps with secrets. That's how it is done. — Greg Burghardt 6 secs ago
 
6:33 PM
0
Q: Suggestion for Java code performance/design improvement

Sricharan AnandI am working on a age old java code that does some splitting of IBM MQ Messages. The code compiles using jre 1.8. I am looking to improve the speed of the application and maybe refactor it with a better design pattern if possible. Looking for inputs regarding this. Also it runs on a linux server ...

 
@CaptainObvious Was my answer too harsh? I hate the code.
 
6:52 PM
@pacmaninbw on the whole I don't sense it being too harsh... the harshest statement might likely be this:
> The comments that do exist are not helpful, meaningful:
 
@SᴀᴍOnᴇᴌᴀ Yeah, I removed from the first paragraph If I were interviewing you to be a C programmer I would not hire you based on this code.
@SᴀᴍOnᴇᴌᴀ Based on the OP's comments if this is better than the JavaScript version I really don't want to see the JavaScript version.
 
7:24 PM
@pacmaninbw When in doubt, stick to the code. Whether people should get hired based on code provided is irrelevant for the site since lots of non-technical factors are involved.
 
^^ yes - I also noticed that the was not added to the post
 
feel free to code review or edit — mattsmith5 16 secs ago
feel free to code review or edit — mattsmith5 52 secs ago
feel free to code review or comment — mattsmith5 21 secs ago
 
7:42 PM
May 20, 2020 at 23:23, by Peilonrayz
What a flood
maybe that user was testing out "the key"
 
7:58 PM
I put an answer below, feel free to code review or edit — mattsmith5 44 secs ago
 
 
2 hours later…
10:20 PM
This kind of thing is not focussed or objective enough for Stack Overflow, but there is another site you can ask on: codereview.stackexchange.comDavid Grayson 33 secs ago
 
10:41 PM
 
11:14 PM
0
Q: Saving 6 images [exact bit by bit files!] from a webpage and making a collage out of them to download with description

jvjvHello I have a code here below and I would like to know how to make it get the exact original images, because when I do look at the 6 images put together and downloaded, it is not the same pixels, as if the images scooped off the webpage have been saved as jpeg and distorted haha ever so slightly...

 

« first day (3338 days earlier)      last day (665 days later) »