« first day (3066 days earlier)      last day (27 days later) » 

12:02 AM
REFRESH! There are 7834 unanswered questions (89.3040 answered)
your code looks good but working code is off-topic here. you should try codereview.stackexchange.comdiggusbickus 15 secs ago
 
12:17 AM
0
Q: Simple Vanilla JS Todo app

Bruce CrustI'm a Kotlin engineer looking to get into web dev. I thought it'd be fun to make a Todo app w/o help from the internet. Just looking for some critiques and feedback, as I'm new-ish to the language. Here's the JS, HTML, CSS. Looking for criticism on all of it. No mobile support btw. JS: class Colu...

 
12:42 AM
0
Q: My program runs a garden simulator. This current code works but I want to make a new simulate_day function for choice q, how can I go about doing this

bambamI tried to write the program so that it runs without error but I want to improve the program so that it follows the Single Responsibility Principle. I want to make a function for choice W to simulate the day. However, I have trouble when making the function at food = int(new_food) + food . It pro...

 
 
2 hours later…
2:55 AM
possible answer invalidation by bambam on question by bambam: codereview.stackexchange.com/posts/268364/revisions
 
 
2 hours later…
4:26 AM
Monking
 
5:13 AM
0
Q: Better Approach for the House Robbery Problem (LeetCode 198)?

Aryaman The problem states that you have to rob the maximum money stashed in the houses but you cannot rob two adjacent houses. array[i] denotes the money in the (i)th house. I got the following code submitted but Is there a more optimised aprroach. I saw a very small solution on the YouTube Channel 'Nee...

0
Q: Improving projecteuler code Problem #10

fabinfabinfabinSo, I just finished Problem 10 on project euler, but it took about 3 to 4 minutes for my output to come out, due to bad coding, I guess, any sugestions on how could I optimize my code? Thank you for you attention. Question The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all ...

 
 
2 hours later…
6:52 AM
0
Q: template function for conditional dereference

Sergey KolesnikI don't know why there's no such function in std (at least I didn't find one). I need a conditional template function to return a reference to an object of T. T might be passed as a pointer or a smart pointer or by reference: template <typename T> void do_foo(T &t) { auto &&res = dereference(t...

 
7:16 AM
0
Q: Arm Assembly Tokenize String (strtok()), Load Move, Add Efficiency

David C. RankinDabbling a bit more with arm assembly, I wrote a few functions to handle string splitting. The goal to was write a few reusable functions that could be combined to emulate (roughly) what C strtok() does. The approach was essentially to write strspn() and strcspn() approximations and then combine ...

 
 
4 hours later…
11:22 AM
Seems like this is more of a question for Code Review. — John Coleman 51 secs ago
 
11:47 AM
0
Q: Solving the Knapsack Problem With a Genetic Algorithm Simulation in Python

Jose Fernando Lopez FernandezI was watching Computerphile's video on using genetic algorithms to solve the Knapsack problem, and I decided to give it a whack. For anyone running the code, the result_data pandas Data Frame contains the most recent iteration's breakdown of the genomes that are "still alive". >>> result_data ...

0
Q: Time duration conversion with units

EdwardI recently was asked to upgrade some C++11 code to add a feature by which the user can set a time duration from the command line of the program. The requirement was to have a default time of 1500 ms but to allow it to be overridden by the command line parameters if the parameters are valid; inva...

 
Monking
 
 
2 hours later…
1:50 PM
0
Q: Function drop invalid values in dataframes but then it returns original dataframes with invalid values

userI created this simple function: def cleanup_data(*argv): for df in argv: df = df.dropna() return argv However, if I call cleanup_data(df1, df2), and later I do: df1.isnull().values.any() or df2.isnull().values.any() I get True. What is wrong with my code?

 
2:27 PM
I wonder how the addition of the --allow-multiple-definition option ever got through code review... — Ted Lyngmo 16 secs ago
 
2:39 PM
0
Q: The python code simulates an environment of a disease and calculates how many people get infected

R0BestThe python code simulates an environment of an X number of persons with an Y number of places they can go to, puts the persons randomly in the places and calculates how many persons get infected, die, recover, die. It mostly work with lists, if you can optimize it in any way, thanks in advance! i...

 
3:29 PM
0
Q: ProgressDialog Not Visiable

bigjeon33I use different Progress Dialogs in two activities. First, This is a box that works normally. ProgressDialog mpd; ... mpd = new ProgressDialog(MainActivity.this); ... LogInButton = (Button) findViewById(R.id.btn_login); LogInButton.setOnClickListener(new View.OnClickListener() { ...

 
3:53 PM
0
Q: Wrangling and reading several xlsx files from sftp server and concatenating them into a single dataframe

banana_99Please find below my code. Any recommendations/suggestions on how to improve it and make it more readable will be hugely appreciated. I've tried to comment it as much as possible so everyone can understand what my purpose was in every part of the code, but please feel free to ask me for more clar...

 
 
2 hours later…
6:11 PM
This question belongs on codereview.stackexchange.commatch 33 secs ago
 
6:46 PM
1
Q: Find ALL duplicate subtrees. using recursion

beatmaisterThis is just a practice exercise, I'm trying to understand dynamic programming as deeply as I can. I solved this using recursion, though I am not sure if it will always work. If anyone could tell me a case in which my solution does not work. And I would also appreciate knowing the time/space comp...

0
Q: Best format to store user informations

Elikill58I want to store user informations such as their names, lang ... I'm currently using Yaml format. This is an example: playername: Elikill58 lang: en_US better-click: 5 cheats: fly: 9083 speed: 13 I'm using the Yaml library from Bungeecord (i.e. net.md_5.bungee.config) that I include in my own...

 
7:24 PM
If the code works and you're looking for advice on improving it, Code Review is the appropriate place. But see codereview.meta.stackexchange.com/questions/5777/… first. — Barmar 39 secs ago
This question belongs on codereview.stackexchange.com — Will Da Silva 30 secs ago
 
8:24 PM
0
Q: making this nested for loop more pythonic

user79134I have a clunky (but working) piece of code as shown: plus_cords = [] for i in range(len(pluses)): plus_cords.append([ [pluses[i][0], pluses[i][1]] ]) for j in range(1, pluses[i][2] + 1): plus_cords[i].append([pluses[i][0] - j, pluses[i][1]]) plus_cords[i].append([pluses[i...

 
8:45 PM
@flakes. I'm pretty sure OP didn't get that far as is using SO as a code review service — Mad Physicist 56 secs ago
 
1
Q: UCI Chess Implementation - Rust

MitchMoving my chess engine over to a multi threaded implementation in order to properly handle time control. I'm using channels to send back whatever board state is found to be the best at each depth and having the main thread keep listening to that channel until the time is up. Right now the search ...

 
9:14 PM
0
Q: Gilded Rose with pure functions in C#

Ned RedmondGave myself the challenge of solving the Gilded Rose with pure functions in C#. All one-line lambdas, all static, all the time. The original kata assumed the code would mutate the given array-- I've opted not to, for better or for worse. Let me know what you think! Linking to the GitHub repo sinc...

 
9:45 PM
Yes this works, but no this is not "better readable for future code reviews" as my original approach in my opinion :( thanks for the effort though. — xtlc 32 secs ago
 
10:27 PM
0
Q: Unwinding in Python

YoavKleinMy scenario is as follows: I need to write a Python script that does a serie of steps. Specifically what it does is: Clone a git repo Change some tokens in this repo Create a remote repo in our Azure DevOps server. Push the local repo to the new repo Create 2 Pipelines for this repo Define branc...

 

« first day (3066 days earlier)      last day (27 days later) »