« first day (3002 days earlier)      last day (1008 days later) » 

12:03 AM
REFRESH! There are 7709 unanswered questions (89.3744 answered)
 
12:30 AM
I think codereview.stackexchange.com is not suitable for such question. — S.M. 14 secs ago
 
12:54 AM
I think codereview.stackexchange.com is more suitable for such question. — S.M. 15 secs ago
 
 
1 hour later…
1:58 AM
0
Q: Displaying a "map" with curses and python

Have a nice dayI started making a game in curses, but I feel like I am displaying the map inefficiently and ineffectively. Here's the code (only the relevant parts): import curses world_map = [ '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

 
2:23 AM
0
Q: Parallezing merge step and divide step in mergesort algorithm with OpenMP

New2MathWe wrote a code that parallelizes the divide phase of the mergesort algorithm. I.e. every recursive call is assigned to a thread but our teacher was disappointed because he said we should also parallelize the merge function. I have researched how one can do this and I found these (algorithm 3) le...

 
3:14 AM
0
Q: refactor multi if statements and checking for div existence in a better style

Connective-tissueI want to refactor this code to a better version without all this repetition, this code is working 100% the way it is right now but every refactoring effort is making it useless, any idea or can this be considered the maximum ? let div = document.querySelector('.results') if (results < 0) ...

0
Q: React promise data transfer issue

Gaurav AchhraI am trying to render a list of users But the list is not rendering nor giving a error can somebody check whats the issue here I am positive it must be because of not waiting for data in promise. I have tried looking for value the issue is in renderPagesComp to pageDataShower where I am rendering...

 
3:29 AM
Monking
 
0
Q: Shortest Path to Get All Keys - Algorithm in JavaScript

myTest532 myTest532I implemented a JavaScript solution for the problem below: We are given a 2-dimensional grid. "." is an empty cell, "#" is a wall, "@" is the starting point, ("a", "b", ...) are keys, and ("A", "B", ...) are locks. We start at the starting point, and one move consists of walking one space in one...

 
4:14 AM
If the code in the post would work than maybe it would be on-topic on Code Review... But since it fails (at least I don't see how it can successfully run) some edit may turn this into on-topic for SO. I.e. if you add error messages you are getting at run time someone may find good duplicate for it. — Alexei Levenkov 39 secs ago
 
4:46 AM
Monking
 
 
1 hour later…
6:17 AM
Well, this is not the place for a full code review (see Code Review), but I would for instance not have insertMatrix iterate through the list to find the end. Instead keep a reference to the tail node. I would not havegetMatrixByIndex return a formatted string, I would not let length walk through the list, but maintain a length attribute, ...etc. — trincot 48 secs ago
 
7:02 AM
0
Q: Google Foobar - "Distract the Trainers"

KSPQUESTION: You will set up simultaneous thumb wrestling matches. In each match, two trainers will pair off to thumb wrestle. The trainer with fewer bananas will bet all their bananas, and the other trainer will match the bet. The winner will receive all of the bet bananas. You don't pair off train...

 
7:57 AM
This is probably more suitable for codereview.stackexchange.com or users.rust-lang.org, if the code you've posted works but feels suboptimal. — Cerberus just now
 
8:54 AM
@kernel0707 I don't know if the std lib uses this approach. If you want to follow test patterns that are used in the std lib then you may have to drop the idea of mocks altogether as I don't think those are used much. Instead, at least in the net package a lot of functions are tested using "test hooks". To your other point about dev-introduced bugs, to avoid those you should write a test that can catch such an error and if that's not possible then you do code review before merging the pull request. — mkopriva 58 secs ago
 
 
2 hours later…
10:50 AM
1
Q: How to deal with muitple if statement

leaf_yakitoriorigin code: # add this class to make the code can be a reproducible example.In acutually environment all attribute could be True or False. class Capabilities: def __init__(self) -> None: self.canEditCompany = True self.canDeleteCompany = True self.canShareCompany = Tr...

 
possible answer invalidation by Emaborsa on question by Emaborsa: codereview.stackexchange.com/posts/264280/revisions
possible answer invalidation by Emaborsa on question by Emaborsa: codereview.stackexchange.com/posts/264280/revisions
Hi, it seems to me your question is [not in the scope of stack overflow but code review] ( codereview.stackexchange.com ), please ask your question there. — Superlokkus 50 secs ago
I’m voting to close this question because it belongs to another site in the Stack Exchange Network, in this case codereview.stackexchange — Superlokkus 56 secs ago
 
11:30 AM
I’m voting to close this question because it belongs to another site in the Stack Exchange Network, in this case codereview.stackexchange — Superlokkus 22 secs ago
 
11:41 AM
0
Q: Given a 2d matrix with chars find the target string

Neslihan BozerI am looking for a simpler implementation of the following question. Could it get better? I am expecting the new solution via DFS again. Thanks. OA: Given a 2d matrix with chars and a target string. Check if the matrix contains this target string by only going right or down each time from the beg...

 
possible answer invalidation by Emaborsa on question by Emaborsa: codereview.stackexchange.com/posts/264280/revisions
possible answer invalidation by Emaborsa on question by Emaborsa: codereview.stackexchange.com/posts/264280/revisions
 
12:16 PM
@user I absolutely love the Buzzatti egg <3
That story contains so much
 
12:28 PM
Please post this question at code review, f you want your code to be reviewed — PCM 23 secs ago
 
12:44 PM
@user Yes, I'm referring to the Laundry Files Books. I have the first 6 in paperback, I can't get the last 4 in the USA in paperback and I don't buy ebooks.
@SimonForsberg Charles Stross has written short stories, but the first story in each book is over 200 pages long. The book "The Atrocity Archives" was originally serialized in a British SF magazine.
@Duga Rolled back and commented.
 
@pacmaninbw Please double check your actions
 
@Vogel612 Here is a wikipedia entry on the serieis.
@Peilonrayz What did I do wrong?
 
1:00 PM
@pacmaninbw Your rolled back unfixed the AI.
 
@pacmaninbw A short story that is 200 pages long isn't exactly "short" xD
 
Rev5 is (the rev you picked) is where any AI stems from, which the OP fixed in a later rev
 
I'm looking for anything from 100 - 15 000 words
 
@SimonForsberg I don't think he's written anything that short, but at least one book is a collection of short stories.
Definitely short there are about 10 stories in the book.
 
@pacmaninbw collections of short stories are welcome, as long as each short story is in that range.
 
1:04 PM
@Peilonrayz I'll go back to revision 4 in that case, is that ok, it is 22 hours old and that is about when it was first answered.
 
@pacmaninbw It'd be better than rev 5. But I'm not sure why you think any action was needed. What answer has been invalidated?
 
How do I undo my edit
@SimonForsberg Checkout the book "Wireless" by Charles Stross
 
@pacmaninbw you'd need to perform a new rollback.
 
Done
Comment gone as well
 
Thanks. I should be getting a USB switch soon, so I should be able to reply easier to @Duga. Using a Steam controller to chat is a PITA
 
1:22 PM
0
Q: An efficient way for removing rows with zero elements iteratively while constructing the matrix

Jonathan1234Based on a previous post, Accelerating creation of matrices and finding ways for optimal scaling, we managed to accelerate the way that I construct a matrix in Rcpp (inputs for example are at the end of the post). The code used is the following: #include <RcppArmadillo.h> // [[Rcpp::depends(...

 
2:04 PM
Hi @vonc, Thanks for your answer and sorry for the late reply. We were discussing this approach in my team and we stuck at Pull Request. Where should we include Pull Request(Code Review) flow here? — sujayadkar 33 secs ago
 
2:46 PM
possible answer invalidation by rcgldr on question by rcgldr: codereview.stackexchange.com/posts/148025/revisions
 
3:03 PM
0
Q: How can I make my linked list of linked lists better?

Jozhuaclass AmountNode: def __init__(self, x, y, amount): self.x = x self.y = y self.amount = amount self.next = None def getValue(self): return self.amount def __repr__(self): return str(self.amount) class AmountsLinkedList: def __...

 
Happy Friday!
 
3:25 PM
Monking
 
0
Q: Find the path in 2D Matrix

Neslihan BozerIf there is a proceeding 0's from the top left right bottom in the matrix then it return true, else returns false. How could I improve this solution? Thanks. package TwoDArray; public class TwoDArray { //given 2d array, check if there is path from one point to another static int row = 5...

 
3:54 PM
0
Q: trmplate Matrix class with Static or dynamic size

J.MI started implementing the folowing Matrix class in order to get a better understanding of templates classes in general. For now, it lacks a lot of features, it does very basic things: addition multiplication (only matrix X matrix multiplication is available here) transpose conversion to a strin...

 
4:38 PM
This is a code review rather than a stackoverflow type question. — freeflow 31 secs ago
 
4:48 PM
Monking
 
@pacmaninbw Ah, I can't find the first as an eBook at my library, and I don't dare borrow paperbacks right now
 
 
2 hours later…
7:12 PM
@user Amazon has a kindle version it for $2.99 USD not sure what the current exchange rate is.
 
7:42 PM
0
Q: Maximum Profit in Job Scheduling - Performance Issue

myTest532 myTest532I implemented the Maximum Profit in Job Scheduling algorithm in JavaScript, but I'm having performance issue. The problem: We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i]. You're given the startTime, endTime and profit array...

0
Q: Identify what element got clicked on a form in JavaScript

Paul ParadiseI am trying to pass a ref to a function so that I know which html element was clicked. If I don't pass the 'this' (and remove the []'s from the html) it will always only hide the top TR. I need it to hide it's own TR. BUT, and this is a big BUT, I will not know what row has the "click me" text so...

0
Q: Bidirectional iterate over list in Python

AntyosI wrote a short function to iterate over a list starting at a given index, then flipping back and forth between left and right values. import itertools from typing import Generator def bidirectional_iterate(lst: list, index: int) -> Generator: for left, right in itertools.zip_longest(revers...

 
 
1 hour later…
8:59 PM
@pacmaninbw Thanks! I don't feel like buying a series of books right now, but I'll certainly try look at the previews
 
9:49 PM
0
Q: Send token from addressA to addressB through contract

Amnesia420Hello how can i send a token from the msg.sender to mycontract through a function inside my contract? i tried to do a transferFrom "IERC20(old_tokenAddress).transferFrom(msg.sender, address(this), query_oldBalance(msg.sender));" but i get: execution reverted: ERC20: transfer amount exceeds all...

 
10:09 PM
Welcome to Stack Overflow! This is not a code reviewing site. You will have better luck over at [codereview.stackexchange.com](codereview.stackexchange.com)‌​. — disinfor 13 secs ago
 

« first day (3002 days earlier)      last day (1008 days later) »