« first day (3613 days earlier)      last day (396 days later) » 

12:07 AM
REFRESH! There are 7362 unanswered questions (90.4113 answered)
 
 
4 hours later…
4:05 AM
I’m voting to close this question because it’s a code review question. See Code Review’s asking guide. — Ry- ♦ 10 secs ago
 
4:28 AM
I didn’t delete anything, and your question is not on topic for Stack Overflow. Code Review is a dedicated Stack Exchange site with question guidelines that will help you get the most out of code review. My bad for trying to give useful information in the comments on top of that. FWIW, the newline counting part is never going to be your bottleneck, so just write it in the most readable sensible way (which, again, CodeReview.SE will help you with). — Ry- ♦ 28 secs ago
 
5:06 AM
0
Q: Is there a more efficient and improved way to write this requests function?

kilgoretroutsmagazineIs there a more efficient way to write the following function? I feel like How I am looping through the urls and running requests.get() could be more efficient. I am using requests to pull data from txt files hosted online and then counting how many lines the files have. So there are urls like ht...

 
 
6 hours later…
11:34 AM
0
Q: Protecting functions from empty DataFrames

t3chb0tPandas likes to throw cryptic errors when you feed its functions with empty DataFrames saying nothing that would help you to identify the root cause. In order to avoid this I used to write conditions like this one all over the place: def normalize_null(data: pd.DataFrame) -> pd.DataFrame: """...

 
12:00 PM
0
Q: Extract column values from pubsub output using apache beam in python

Data writerI am trying to extract data from the PubSub subscription using Beam and finally, once the data is extracted I want to do some transformation. Currently, it's in bytes format. I have tried multiple ways to extract the data in JSON format using custom schema it fails with an error raise TypeError(T...

 
12:55 PM
If you're looking for suggested improvements to working code then you may want to try Code Review instead. — David 51 secs ago
 
 
1 hour later…
2:09 PM
0
Q: Python script for a Timeline widget for an audio player

Willem van HoutenI used to use the Tkinter scale widget for this, but it is limited in several ways. So I made a custom Timeline with the Canvas widget, which makes a more dynamically changeable Timeline. from tkinter import Canvas class CustomScale(Canvas): def __init__(self, master=None, *, command=None, t...

0
Q: Generate INSERTs from function parameters with jinja2

t3chb0tI'm writing unit-tests with pytest for sqlite database and reporting functions and I need to arrange them by inserting minimal dummy data into required columns. In order to avoid repeating the names of the columns I generate the query and the parameters from the function's signature and inject th...

 
2:40 PM
codereview.com would be a better place for this. — Haris just now
For what it’s worth, I don’t agree with the close reason, the question is clear enough if you’ve ever implemented any image processing functionality. But I do think that the implicit question is “what is the best way”, which is off-topic as opinion-based. You could post your current implementation on codereview.stackexchange.com to get opinions on how to improve it. — Cris Luengo 34 secs ago
 
3:35 PM
0
Q: Find Free Appointment Slots given Opening Times and Booked Appointment Times

Ata MohammadiAny ideas to make it better or more efficient? any edge cases that are not covered? Opening times: const openingTimes = [ { date: "2020-01-01", open: "08:00", close: "18:00", }, { date: "2020-01-02", open: "08:00", close: "18:00", }, { date: "2020-01-03", ...

 
4:04 PM
If you have code that works that you want feedback on, Code Review Stack Exchange is a better fit: codereview.stackexchange.com/help/on-topic, codereview.stackexchange.com/help/dont-askSolomon Ucko 38 secs ago
 
0
Q: How do I ask long clarifications on an answer?

eccentricOrangeSomeone has left a thoughtful answer my question: https://codereview.stackexchange.com/a/284170/257004. I have a bunch of clarifications, and for now I've left these as a set of long comments. Is this the appropriate way to do this, or should I have done something else (such as use chats or anoth...

 
4:26 PM
0
Q: Instance specific code generation

user1806687Disclaimer: I've asked this question before on Stack overflow and got a response that this place would be a better fit so I am copy pasting the question here. I've come up with two different approaches for implementing generic algorithms and data structures in C. And I need your help in deciding ...

 
Monking
 
I have posted the question there. Thanks. codereview.stackexchange.com/questions/284176/…user1806687 33 secs ago
 
 
2 hours later…
6:46 PM
You could do globals()["data5091016:2"], especially if you want an animated conversation at your next code review. First, why put dynamic data in globals? You don't know the names in advance so its not like you'll be typing them directly into your program. — tdelaney 23 secs ago
 
 
2 hours later…
9:12 PM
-1
Q: OpenCL crash what is wrong?

AlexTheoI am developing this project: https://github.com/alekstheod/tnnlib Currently looking into the opencl utilization to speed-up a back error propagation algorithm. I came to a point when creating an opencl buffer with any flag different from CL_MEM_USE_HOST_PTR the application will crash my gpu. Se...

 
10:04 PM
0
Q: Prime Number Program In Java

jimmy90As a Java developer, I'm examining my code before releasing it to consumers. But, throughout the code review, I discovered some implementation mistakes. My code is as follows: public class PrimeNumber { public static boolean isPrime(int num) { for (int i = 2; i < num / 2; i++) { ...

 
 
1 hour later…
11:07 PM
REFRESH! There are 7365 unanswered questions (90.4077 answered)
 
11:52 PM
Since your code is working and you are looking for improvements/enhancements, you should post it on Code Review. — Louys Patrice Bessette 49 secs ago
 

« first day (3613 days earlier)      last day (396 days later) »