« first day (2762 days earlier)      last day (54 days later) » 

12:00 AM
RELOAD! There are 7130 unanswered questions (89.7284% answered)
See this more recent post on stackexchange: codereview.stackexchange.com/questions/232826/…referer 25 secs ago
12:25 AM
Also, please read about what's on-topic in the help center. If you want general code review, try our sister site Code Review. — Chris 47 secs ago
12:37 AM
Far too much code and too vague a question for SO. If you have working code which you want to have peer-reviewed for improvement, you should ask at Code Review instead, which was created specifically for that purpose. — Ken White 11 secs ago
1:19 AM
Q: How to make selenium in python faster

Matija MilicevicI'm making a bot for PlayStation 5. And restock is coming soon so I want to make my bot faster. The approximate duration is 4.90 seconds. Is there any way to make this faster? I found that I should write this in C or C ++ for better results. #startup chrome_options = Options() chrome_options.add...

2 hours later…
3:10 AM
I’m voting to close this question because code optimization is not the type of question that is within scope of SO. SO is geared toward answering focused questions, not "help me make my code faster", which is broad and lacks focus. At the very least this should be closed as Needs Focus. I suggest posting it to Code Review, which is more geared to helping with code need a performance improvement. — Trenton McKinney 53 secs ago
3:47 AM
Q: implement vectorization instead of nested Loops on dataframe

rfguyI have a dataset of the form below - timestamp,cell_id,crnti,enodeb_id,uplane_downlink.cqi_wideband_mean,uplane_downlink.distance_initial_km,uplane_downlink.non_gbr_dl_bytes,time_sec,timestamp_y,uplane_uplink.non_gbr_ul_bytes 1606208553171,1,1487,1002107,7,27,134,1606208553,1606208553256,146 1606...

1 hour later…
4:58 AM
5:52 AM
Q: Counting unival subtrees - Follow Up

Erdenebat UlziisaikhanThis code is a revised version of the implementation which asked for an advice on improvement. Original post here: Counting unival subtrees Credits to: [Deduplicator], [Reinderien], [Toby Speight], [chux]. The revised version was applied following changes: Merge insertRight(), insertLeft() funct...

1 hour later…
7:05 AM
possible answer invalidation by Martins Micheal on question by Martins Micheal: codereview.stackexchange.com/posts/252593/revisions
7:40 AM
possible answer invalidation by MendelG on question by yfr: codereview.stackexchange.com/posts/252595/revisions
7:56 AM
Q: Leetcode minimum path sum

bullseyeLink here I'll include a solution in Python and C++ and you can review one. I'm mostly interested in reviewing the C++ code which is a thing I recently started learning; those who don't know C++ can review the Python code. Both solutions share similar logic, so the review will apply to any. Prob...

8:21 AM
Q: Rust idiomatic option handling

richzillaIs there a neater way of handling the option response from req.cookie() in this code block (line 3 onwards)? Id like to avoid the nested if statements, and multiple returns if at all possible. req.cookie() returns an Option<Cookie> and the Cookie struct has a value function. If the cookie is pres...

yes, I've got a plenty of good tips but this question is off topic for this site. Would you mind asking it where this question belongs - on codereview.stackexchange.com? — Your Common Sense 32 secs ago
9:03 AM
@Duga Was pointed out in comment, not answer.
@Duga Formatting
Q: Table values alignment on checkbox click

joe 456I have a table. In the last two columns I have a Checkboxes named PASS and FAIL. When I click the checkbox in the last column(FAIL) I have written my code in such a way that a new column(TOTAL) comes up in between the table columns.So my problem is the values in my table gets displaced in order. ...

9:36 AM
I think this will help you to solve your problem codereview.stackexchange.com/questions/37028/…Tijo John 33 secs ago
Q: A snake game in HTML/CSS/JavaScript

ArianI made a snake game in HTML/CSS/JavaScript. I want to make my code better and shorter. Here is my codes: index.html: <!DOCTYPE html> <html> <head> <title>Snake Game</title> <link rel="stylesheet" href="index.css"> </head> <body> <p class="score" draggable="true"></p> <canvas...

Q: function for PDO queries and return result - tested - any tips?

sidocoI write a function(PHP and MySql) to get PDO connection, query and array of placeholders to execute query and return result I test this func and has good respond when result for SELECT has empty result or has error, do you see any problems or tips to say about this? do you has any tips about this...

10:09 AM
If you want to have a code review, post at Code Review, but be aware that code reviewed there is typically more complex. — Klaus D. 7 secs ago
I thought about codereview too, but OP wants to know about existing library/best practices, which is off topic for both sites, I'm afraid — Cid 55 secs ago
10:26 AM
Q: Design pattern for creating similar but different classes

armaraI have a main-class that takes a list of sources and returns two objects for each source; one with the required data and one analytics tool. The Analytics-class has different methods depending on what source it is, and the Data-class extracts data from different paths depending on the source. Imp...

11:15 AM
Yes, this is definitely opinion based (thus this question would be a better fit for codereview.stackexchange.com) — Matthew Watson 45 secs ago
Q: How can I speed up my VBA code?

vega69I want to ask for help on how to further accelerate this code. Operation of the code: It copies 1-1 worksheets from 3 different workbooks to 3 worksheets of the new workbook. Inserts, copies, and formats different columns. Then, by examining different criteria on a worksheet called "lista", type ...

2 hours later…
12:55 PM
Q: Java recursive function for a linked list

milesmoralesit should return true if theres no element that follow or if the following elements are greater than their predecessors. public boolean isSorted(){ if (this.next == null) return true; else return (this.value < this.next.value && this.next.isSorted()); } what do you guys think of...

1:20 PM
Q: Return correct path if windows or linux

ProtractorNewbieI have been trying to code something simple where I call a class with different functions to different paths, if I call etc: from lib.utils import GetAllPaths path = GetAllPaths() path.test() with following code: class GetAllPaths: """ Return file and paths directions """ if pl...

2:10 PM
Q: python: stacking images

Maître RenardMy python script produces many images filles, that should be grouped togeter, according to the names of these filles. For example, within the same workdir there are n images, that can be grouped in three groups based on the keyword of their name (A_,B_ and C_): A_1.png A_2.png A_3.png ... A_n.png...

Q: Timer app in vanilla js

fluffyHello I created app which counts days, hours, minutes and seconds until some event I learned a lot while creating it and as always I would love some feedback from you guys to improve my cody by learning from mistakes, maybe implement better solution (especially I am not very proud of the way my s...

Q: Swift : Export DepthMap data to coordinates+RGB

Ričards SaulevičsI am currently working on figuring out how to export the TrueDepth camera Depth data from the sample code found here. I want to convert the DepthMap data matrix to list of real world XYZ coordinates and to RGB values, that i could write to a .txt file. Currently i stumbled upon a sample code on t...

2:35 PM
Q: OOP implementation of Rock Paper Scissors game logic in Java

Zoran JankovWhat is your opinion on my solution for Rock Paper Scissors game logic in Java? Round outcome enum class public enum Winer { DRAW, PLAYER, COMPUTER; } Played moves enum class public enum PlayedMove { ROCK, PAPER, SCISSORS; } Game logic class public class GameLogic { ...

Q: A .py utility file for neural network learing rate policies

spiridon_the_sun_rotatorI've created a .py utility file, which specifies the learning rate policy for the neural network in PyTorch. The program in prior reads a json and creates a dict, called here is cfg. So far, I have implemented 3 kinds of learning policies - steps, exp, cos, and for each of them I've created a sep...

@CaptainObvious I'm always on the lookout for good questions about Swift. Unfortunately, that isn't one (code not owned and not working).
2:52 PM
I think this question does not belong here. You should consider posting it in codereview.stackexchange.comAndres Gardiol 16 secs ago
Q: Fast Native Memory Manipulation in VBA

Cristian BuseI've been quite annoyed lately by the fact that the CopyMemory API (RtlMoveMemory on Windows and MemMove on Mac) is running much slower than it used to, on certain computers. For example on one of my machines (x64 Windows and x32 Office) the CopyMemory API is running about 600 times slower than a...

3:19 PM
If you want Code Review then post your question on the Code Review site. StackOverFlow is for helping with errors you are having with your code. — Squashman 55 secs ago
Q: Matplot lib : scalling of the axes on bar plot

Maître RenardI am using following script to plot cluster populations using two lists contained x and y data # calculate clusters using encore method cluster = encore.cluster(u, select="all", superposition=False, method=encore.DBSCAN(eps=1)) # make list of population of each cluster; cluster_sizes= [len(c) fo...

3:40 PM
possible answer invalidation by sidoco on question by sidoco: codereview.stackexchange.com/posts/252643/revisions
@Duga Rolled back
@SᴀᴍOnᴇᴌᴀ Not really, I find myself on SE every now and then. I'd be a fool to not use Stack Overflow ;) I respond to notifications and sometimes poke around after. I guess "break" isn't the optimum word, but I don't think "I am relegating the importance of SE to me for a while" is amazing either. Uggh I think this is why I'm a programmer and not a linguist, far simpler :)
@Peilonrayz Nice to see you again.
@Peilonrayz Unless you write compilers, then you need to be a linguist as well.
4:06 PM
This is a job for code review. This is way to much work to ask the compiler to figure out. The code that does the reallocation might not even be in the same translation unit as this code and if it is then there is no way for the compiler to even have a chance. — NathanOliver 37 secs ago
4:22 PM
Gergely Orosz on November 25, 2020
Based on reviewing hundreds of resumes per year and researching a book, here are the seven pieces of advice for engineers on writing a resume that represents you as fairly as possible.
4:39 PM
Why is that a question for codereview.stackexchange.com ? — CyborgBeta 15 secs ago
I voted to close this as too broad for SO ( well, okay that close reason doesn't exist anymore - I chose Needs more focus). You could post on Code Review but please read the help center pages like How do I ask a good question? first. Make sure the question isn't too opinion based and you describe what the code does as much as possible. — Sᴀᴍ Onᴇᴌᴀ 50 secs ago
@Peilonrayz okay- kool beans
4:57 PM
@pacmaninbw Thanks. Nice to see you and everyone still around :)
@pacmaninbw Uggh, I see you're just proving my point even more ;)
@CaptainObvious hmm... can we add the code from the OPs comment to the post? It has 4 VTC currently... so the answer might be "invalid" anyway...
public class Element { private int value; private Element next;} the class also includes the isSorted function — milesmorales 40 mins ago
Q: Iterative uniform recombination of integer lists in python with numba

HighwayJohnI have a list of N integers and I iteratively take two integers at random, which are not at the same position in the list and uniformly recombine their binary representation, e.g. in intList = [1,4,1,5] (N=4) the number on the second and third position is chosen, aka 4 & 1, and their binary repre...

5:16 PM
@SᴀᴍOnᴇᴌᴀ I'm going to do it... no matter what Duga says ;)
possible answer invalidation by Sᴀᴍ Onᴇᴌᴀ on question by milesmorales: codereview.stackexchange.com/posts/252650/revisions
1 hour later…
6:23 PM
If you carefully read their question requirements and tweak the question to match, you may have a case for Code Review. Yes, I linked to how to ask pages on purpose — user4581301 12 secs ago
@user4581301 I didn't know of the existence of Code Review, that looks helpful! I will take a look at it and see if I can get some help there, too! Thanks :) — StevenCellist 23 secs ago
Ordered an acoustic guitar, should hopefully be here today
@DerKommissar nice - have you been playing for long?
Not yet lol
Never played, want to learn electric bass, a few friends said start with acoustic because you can get the fundamentals easier
There's no time like the present
COVID has me trying all sorts of new hobbies
Bought a couple nail-guns too
Gonna build some stuff
Not sure what yet
Also been trolling a coworker this week
"Can you look at this code?" "Not enough use of unsafe. 0/10"
6:40 PM
7:35 PM
This type of question is better suited at Code ReviewFZs 19 secs ago
Q: Where to check if Malloc succeeded and where to free memory

RedYoelI have a function that Gets a string and prints it as a message. Then, read the text from stdin, saves it in a pointer and sends it back: char *getString(char *queryText){ char buffer[BUFFERSIZE]; char *temp; printf("%s", queryText); fgets(buffer, BUFFERSIZE, stdin); //clears \n at the end of t...

8:00 PM
Q: best practice to divide uint16_t to get double

Amelse EtomerI have two integer values and would like to obtain their quotient which should be a fractional number, in this example 37/2=18.5. I usually do this: uint16_t dividend=37; uint16_t divisor=2; auto quotient=dividend/double(divisor); In python3 there are division / and truncation division // which...

8:15 PM
possible answer invalidation by RedYoel on question by RedYoel: codereview.stackexchange.com/posts/252669/revisions
8:45 PM
@Duga Rolled back.
@CaptainObvious MRC
@Mast I could go either way on this one. Interpretation A is that "we shouldn't answer things that are off-topic", this was off-topic due to missing context; an answer was added; the OP attempted to improve the question; and the answer stayed on-topic through this edit because it added (rather than subtracted) more original code.
Interpretation B is that the answer is fragile, and has indeed been invalidated by more context being added. I do not think this is the case.
@Reinderien Isn't the second part of the answer dedicated to this? The comment on the answer seems to confirm this.
Q: Using linear programming on lifeguard (USACO 2018 January Contest, Silver Problem 1)

lier wuI'm trying to solve http://www.usaco.org/index.php?page=viewproblem2&cpid=786, however, I only passed 8 out of 10 cases: https://i.stack.imgur.com/KGqhN.png But I think I cover all the cases, so, can someone help me? import java.io.*; import java.util.*; public main { public static ArrayList<...

Q: Set operations on a tree / Hierarchical set class

Hlib BabiiInitially, I posted this question on StackOverflow. I wanted to know if there's an existing library that implements the concept I have in mind, which is the following. I want to define a hierarchy/tree, e.g.: Commit / | \ Feature Fix Refactoring ...

Q: Is it okay to add someone else's linked code to the question?

Anton GolovSome questions link to the code they want reviewed, which is against site policy. Should one edit the code into the question in these cases? The problem I see is that all content on Stack Exchange is cc-wiki, which may not correspond to the wishes of the author. This is probably fine when the ...

If the code is already in the comments, it's already under the right license so if you're sure you can add it with the correct formatting feel free to add it to the question. In Python, I'd probably be hesitant.
@Mast I think I'm really out-of-sync here. I can't find a comment from you on an answer. And now I see that there is a more recent edit where there actually definitely is answer invalidation because the numbered list of questions that the OP had has been removed.
8:54 PM
@Reinderien Yes, I'm quite non-amused by the latest edit.
Somewhat of a mess. Ideally the expanded code would be kept with the original list of questions.
possible answer invalidation by RedYoel on question by RedYoel: codereview.stackexchange.com/posts/252669/revisions
@Duga O RLY?
@Reinderien Would you like to attempt and fix that by hand?
8:56 PM
Sure; I can try. Bear with me
Sure. But now I won't get in your way with another comment and rollback :-)
You have 27k rep, it's hardly 'proposing' an edit now.
Phew. Thanks.
possible answer invalidation by Reinderien on question by RedYoel: codereview.stackexchange.com/posts/252669/revisions
lol. why not.
@Mast The question and answer now seem reasonable, and I purged my comments, though there's a small handful of others that can still be dropped methinks
all of them actually :-|
9:32 PM
@Reinderien I think the last code block at the bottom still has a piece that's "new" code instead of "old" code.
right. one moment.
getString only, hopefully
possible answer invalidation by Reinderien on question by RedYoel: codereview.stackexchange.com/posts/252669/revisions
Looks better. Still a bit odd, but I'll leave it be for now. If Snowbody has a problem with it, they know how to contact us.
sounds reasonable
1 hour later…
10:54 PM
Q: Tic Tac Toe game in Python - Beginner

MenaKI'm a beginner to python and as part of my course I'm instructed to create a simple tic tac toe game. I'd be very appreciative and interested of any insight, criticism, instructions, best practices or code readability and tips. Are my comments descriptive enough? repetitive? useful? Any inputs an...

11:20 PM
If you'd like a free code review, I suggest renaming your variables. Change installments to either numInstallments or installmentsCount. Then change inst to installments. That way, a plural noun represents the contents of your collection. Finally, when most people see the variable i in a loop, they think it's an integer counter. Consider changing your foreach to foreach (var installment in installments). Then, of course, you need to initialize the contents of your array as @DStanley has pointed out. — Flydog57 14 secs ago
11:44 PM
Q: Bash/zsh function that cd to the root of git tree

FelixoidI'd like to get a review for the function, that cd into the git tree root, or does nothing if we are outside of the repository # cd to the root of the current git directory # If $PWD is submodule, will cd to the root of the top ancestor # It requires to stay in the current directory, if the root ...

Q: What's wrong with my midpoint?

namarkI was extremity annoyed by the lengthy, edge-case-galore explanation of integer mindpoint here, so I made my own simple 2's complement version. I present it for your judgement, since senpai at libstdc++ didn't notice me T_T The general idea is to carry out a + (b-a)/2 in a wider singed integer th...


« first day (2762 days earlier)      last day (54 days later) »