« first day (3089 days earlier)      last day (45 days later) » 

12:02 AM
REFRESH! There are 7880 unanswered questions (89.2751 answered)
 
 
2 hours later…
2:20 AM
Assuming this is a "working piece of code" and you are looking for "open-ended feedback" this may be a better candidate for Code ReviewHenry Ecker 27 secs ago
 
2:45 AM
1
Q: How can i make my python code shorter and more effective?

maxwell7How can I shorten my code for this? There are 6 variable sets of numbers, someone picks a number between 1-63, if their number is in a set, you add the first number of the list to the magic number variable. If it is not, you don't add anything, and move to the next set. I have used multiple while...

 
 
2 hours later…
4:51 AM
0
Q: Implementing a News Ticker

fynnwilliamI implemented a console version of a news ticker and I will be glad for a code review. It takes a text from the user and displays it for a given period. How may I get it better? #include <algorithm> #include <iostream> #include <cstdlib> #include <thread> #include <chrono> #include <string> int ...

 
5:06 AM
Monking
 
Monking
 
 
2 hours later…
7:21 AM
@PatrickRoberts I disagree because "This seems logically correct to me, but just feel weird." Sounds like a code review request to me. — Yury Tarabanko 53 secs ago
 
 
2 hours later…
9:23 AM
0
Q: Codeforces - problem: (A) Mike and palindrome

Ch3steRWhile on SO someone posted this question and I gave it a quick try. My solution passed all the testcases. Link to the problem: Problem: (A) Mike and palindrome Question: Mike has a string s consisting of only lowercase English letters. He wants to change exactly one character from the string so ...

 
9:52 AM
This kind of question is better asked at Code ReviewJens 1 min ago
 
10:13 AM
0
Q: Implementing histogram in python

Amirhosein RezaeeI was trying to implement my own version of matplotlib's hist function and I came up with this: import numpy as np import matplotlib.pyplot as plt import numba as nb from numba import prange import time N = 10_000_000 normal = np.random.standard_normal(N) @nb.jit(parallel=True) def histogram(a...

 
10:37 AM
0
Q: Builder Pattern in java code rewiev

UlrichGiorgioJaegerI need to write an implementation to a given unit test, that cannot be changed. /** * This is the car factory test. For all the tests to succeed, the implementations and the classes you * think might be required, would have to be written. * * Existing tests cannot be modified unless you notic...

 
 
2 hours later…
12:19 PM
I think this question is offtopic for Stack Overflow. May be the site codereview.stackexchange.com is better for it. — Reporter 43 secs ago
 
12:41 PM
0
Q: Indexing base class attribute overrides: cls -> value

qpmmI want to be able to create a hierarchy of classes and efficiently lookup them by common class attribute value. So far I've come up with this solution: class IndexedAttr: def __init__(self): self.cls = None self.name = None def find_cls(self, value): cls_by_value ...

0
Q: How to rewrite my code with streams - could it be even done?

vvistonI produced this nested loops solution with label for breaking the iteration over two nested collections. Is there (and I hope there is) some more elegant solution that this? (e.g. streams, avoiding the label etc.?) This algorithm should only check the first unitLine from the first unit and if the...

 
1:06 PM
0
Q: Need feedback on react hooks implementation

saq7I've gone through the docs in a fair bit of detail and understand that a setState function can be passed a function if the previous state is needed. Here I am trying to, based on the state of a variable, set the state of another variable. This seems logically correct to me, but just feel weird. L...

 
1:55 PM
I think you'd better post the question to codereview.stackexchange.com as you really asking to check your particular code, not to answer some general question. — Leonid Mednikov 47 secs ago
Yes, it works. But I think we should question OPs rational as it feels like an XY question. This snippet will fail my code review — DeepSpace just now
 
2:10 PM
I was told this by senior dev at my team in code review to refactor my code to work like this not to reset to page 1. In previous projects I have done it always worked like that reset to page 1 after filter and sort but this time they want like this. I found a solution posted below but maybe its not the best way. — Aniki 1 min ago
 
0
Q: Showcase difference multiprocessing and threading in Python

Bruno VermeulenThis week I dived into the issue of speeding up my program by either threading or multiprocessing. I did not understand well the difference between the two, but that became quite clear when I got the results. Below program is processing 12 csv files that has a Pandas DataFrame as output. It compa...

 
2:27 PM
Ryan Donovan on October 18, 2021
Code quality affects the mental state of a programmer, communication within their team, or the incentives attached to their work is likely to be reflected in their code. Improve your code and you can improve your organizational health and competence as a whole.
 
2:45 PM
0
Q: Please verify Jump searching algorithm

Ravi JainPlease verify jump searching algorithm that I have written and let me know if any bugs are present. I have tested it from my end, but still would like to get it verified for any missing corner scenarios. class JumpSearch { public static void main(String[] args) { int[] input = new int...

 
2:57 PM
How was the wedding?
@SᴀᴍOnᴇᴌᴀ How was the drive? ^^
 
@pacmaninbw the wedding will happen this coming Saturday
looks like the Alisal fire is 80% contained
the 101 has been open since Friday
 
@SᴀᴍOnᴇᴌᴀ All good!
 
@pacmaninbw how are things in your neck of the woods?
 
I live in Torrance, which is part of LA County. 30% chance of rain this morning, 61 degrees right now. Weather wise every thing is fine and no fires.
@SᴀᴍOnᴇᴌᴀ I used to be able to wear shorts sleeves at 61 degrees, now I could use a sweater.
 
3:21 PM
Saturday's high here was 69ºF and tomorrow might be 67ºF but that may be the warmest we will see until next spring - Wednesday will likely begin a long stretch of rain and highs in the low 50s
 
3:52 PM
Monking
 
@Mast I have something similar in my auto-comments
 
4:27 PM
am I the only one who can't access review queue items, or did the API break?
 
4:51 PM
VM84:2 Uncaught ReferenceError: StackExchange is not defined
    at <anonymous>:2:3
    at <anonymous>:940:3
(anonymous) @ VM84:2
(anonymous) @ VM84:940
 
Welcome to StackOverflow. Please consider this is not a code reviewing service (for which you could consider codereview.stackexchange.com, but I suggest you to take your time to read some questions and answer to see how it works and also learn somethings from there). Besides that, some small suggestions. First of all, files generated by pyuic should never, ever be edited, and instead only used as imports; see the official guidelines about using Designer to learn how to properly use them. — musicamante 58 secs ago
 
@SᴀᴍOnᴇᴌᴀ As in historic actions? review/close/{id}. I can't, might be a 'new and improved' moderator only view ;) TypeError: StackExchange.moderator is undefined
 
🤔
@Peilonrayz happens on historic or current items... and on SO where I'm not a mod and under 10k...
I also see this error in my console Uncaught TypeError: Cannot read property 'innerText' of null on review-v2-transpiled.en.js?v=ab7c4ba7e204:1
I also can't see items on mobile, not connected to wifi
 
I seem to be getting the same error too; TypeError: document.getElementById(...) is null @ review-v2-transpiled.en.js:1:28108.
I think the different error messages are because different browsers... :/
@SᴀᴍOnᴇᴌᴀ Do you want me to post on MSE?
I can't seem to see anything already
 
5:08 PM
@Peilonrayz I can do it
though on my windows machine (which I remote desktop to over VPN) I can access items 🤔
 
Blame caching?
Ctrl-f5 and the page works now
 
@Peilonrayz no such luck on my mac
 
Ah D: I'd say give it a little while
 
@Peilonrayz okay - maybe I'll release my code changes and see after that :)
 
5:27 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 6 secs ago
 
Glorfindel logged it
0
Q: Completed review item not visible because of JavaScript error

GlorfindelThis question has been reviewed in the First Questions review queue, according to the timeline. However, the review item is not visible, probably because of a JavaScript error:

 
6:27 PM
Might be a better fit for Code Review. — Fred Larson 22 secs ago
Because this code is described with_"Both solutions compile and run as they should. "_, you should post it hereryyker 11 secs ago
 
6:50 PM
possible answer invalidation by Amirhosein Rezaee on question by Amirhosein Rezaee: codereview.stackexchange.com/posts/269093/revisions
 
0
Q: Left Shift/ Right Shift an array in C

VishnuI am trying to implement a Left shift/ Right Shift on arrays. I was able to accomplish this using double loops. Can the efficiency be improved? This is the working code for LeftShift/RightShift which is using 2 nested loops. #include <iostream> #include <stdlib.h> #include <stdio.h> struct Arra...

 
@Duga thats okay
 
7:05 PM
Stack Overflow isn't really the right place to get feedback on running code. This is a site for more specific programming question. If you want feedback on code, a site like Code Review would be more appropriate. If it works and you understand it, I'm not sure what more you want exactly. — MrFlick 27 secs ago
 
7:29 PM
If the code is working and you want advice on how to improve it, that is usually best asked on Code Review. — Jonathan Leffler 26 secs ago
 
8:00 PM
If it works you should post on Code Review instead. But there's probably too little context here anyway. What if neither of the first two if conditions are met - what will sendBack be then? — 500 - Internal Server Error 49 secs ago
 
8:32 PM
@SᴀᴍOnᴇᴌᴀ @Peilonrayz Seems like there are multiple JS bugs at the moment, they might be related. Team is on it.
 
It appears to be working for me now on my mac — Sam Onela 3 mins ago
 
It's being discussed all over the place. MSE, TL, Blue Room, etc.
So I doubt it will last till the end of the US day.
If it hasn't been fixed already, as seems to be the case per your comment.
Multiple team members on it.
 
9:11 PM
 
0
Q: A predicated version of std::for_each

einpoklumFor reasons, I want to implement a predicated version of std::for_each. I know that, in C++20, this is made somewhat redundant or less useful, as we can use std::ranges:views::filter; and that a more robust implementation than the one I present below might use conditional iterators (like Boost ha...

 
 
1 hour later…
10:23 PM
For code that works but for which you seek specific improvements, see Code Review , but note that they have a specific format in which you must ask your question ("clean it up" is not specific enough) codereview.stackexchange.com/help/how-to-askmsanford 48 secs ago
 
 
1 hour later…
11:24 PM
0
Q: Levenshtein distance using dynamic programming in Python 3

Bilesh GangulyI had to implement a function for getting the Levenshtein distance of two strings for a problem. It linked to the Wikipedia Article for Levenshtein distance and mentioned I can use the dynamic problem solution. Following is my implementation. def levenshtein_distance(s, t): m, n = len(s) + 1,...

 

« first day (3089 days earlier)      last day (45 days later) »