« first day (2936 days earlier)      last day (33 days later) » 

12:02 AM
RELOAD! There are 7579 unanswered questions (89.4378% answered)
 
 
2 hours later…
2:19 AM
you already seem to have a working code, so maybe this is a question for code review — python_user 27 secs ago
 
3:06 AM
0
Q: How to create a two or more Color Custom QPushButton in PyQt5?

BalaHow to Create a Custom Button with two or More color text and as well as in With double or single underline(in a particular letter)? I tried my level best. But the Blank button (no text) only appears. import sys from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * c...

 
3:22 AM
possible answer invalidation by Peter Mortensen on question by uber: codereview.stackexchange.com/posts/260846/revisions
 
4:06 AM
Monking
 
4:21 AM
0
Q: Rust Simple Stats Program

amicharskiI am brand new to Rust and want to know if there are any convention violations in my code and ways how I can make it more readable: use std::io; fn main() { let mut vec: Vec<i32> = Vec::new(); loop { println!("Enter any number, 0 to terminate"); let mut num = String::new(...

 
This kind of question is better asked at Code ReviewJens 21 secs ago
 
4:43 AM
I’m voting to close this question because it belongs on Code ReviewJim Garrison 47 secs ago
 
5:11 AM
0
Q: C++ exception class for error reporting, compatible with C++98 through C++20 (ver 2)

Scott McPeakThis question contains revised code from the question What should a C++ error reporting exception class have to be portable across language versions?. I summarize what is different from that code at the end. In short, I have designed a C++ exception class suitable for use for error reporting and ...

 
5:36 AM
0
Q: Insert value element into multiple locations in a list

cgoatesCode insertAt :: a -> [Int] -> [a] -> [a] insertAt x indices xs = go 0 xs where go _ [] = [] go j (y:ys) | nextIndex `elem` indices = y : x : go (nextIndex + 1) ys | otherwise = y : go nextIndex ys where nextIndex = j + 1 Questions How can I make this code mo...

0
Q: Removing multiple return from method

user242417I need to validate based on some condition if if failed then I need to return from that block. Please find below code private String validate() { String test = validateName(); if (!test.isEmpty()) { return test; } test = validateAddress(); if (!test.isEmpty()) { ...

 
6:31 AM
Working code should go on the codereview site, afaik. — Chris G 46 secs ago
 
6:50 AM
0
Q: Robot OOP Class in Python part 2

Daro1234451Good morning guys! I've just got fixed the code, and here we are with the "final" version. How would I improve it? I wanted to create the board, and the players, but my skillset is severely limited. But im trying to improve everyday! from typing import List, Tuple from random import randint clas...

 
possible answer invalidation by Md Mizanur Rahman on question by Md Mizanur Rahman: codereview.stackexchange.com/posts/260285/revisions
 
7:08 AM
Did you run this in a memory debugger like Valgrind? In any case, I don't think make_unique() takes a size parameter, so the parameter is only used to init the created object. Just step through the code with a debugger to find out or study the docs at cppreference.com. BTW: I'd question your choice of using dynamica allocation like that when you could just build on vector. Consider submitting your code (once it works properly) at codereview.stackexchange.com. — Ulrich Eckhardt 51 secs ago
 
7:20 AM
Monking
 
 
2 hours later…
8:55 AM
0
Q: Generic converter for plain java objects

JoeJoe87577As part of my recent transition from c# to java i decided to write a small converter implementation to translate DTO objects to entities. I'm fully aware of already existing solutions, especially in spring boot, but decieded to create this class as part of my learning process to write projects in...

 
9:23 AM
This sounds like it might be on-topic on codereview.stackexchange.com. — Heinzi 40 secs ago
 
 
1 hour later…
10:35 AM
If the code works as is, and you want a review of all of your code, you may want to check the help center to see if your question can be made on topic for Code Review. — Heretic Monkey 46 secs ago
@JaromandaX: People who try that are often told they should be posting in the Code Review SE instead. This question is probably a dupe, but it's fine as a question. — j_random_hacker 9 secs ago
 
 
1 hour later…
11:52 AM
0
Q: CUDA broadcast function for scalar

Tyson HilmerI find myself often use warp reduction in CUDA, then needing to broadcast (share) the scalar result amongst all threads. My question is, what is the idiomatic way to do so with clean expressive code that is also efficient? I wrote this simple template to do so, please review and comment. Or if...

 
no @j_random_hacker, I respectfully disagree ... code that WORKS should be in code review ... code that does NOT should be here — Jaromanda X 17 secs ago
 
12:17 PM
0
Q: Check if any of the coordinates are within a certain distance using apply in Python pandas with two data frames

GabrieleI wrote this code that takes the vessel coordinates and checks them against every possible port coordinates. If the distance between the vessel and the port coordinates is within x meters (in this example, it has to be zero), then add that port and the distance_to_the_port to the data frame. Exam...

 
Need a moderator to check the comments and edits I made on this post.
I don't know clojure.
 
Your comments are looking ok. I just flagged the first comment from the OP
 
Thanks
 
12:41 PM
@pacmaninbw Please flag in the future
 
@Vogel612 Did you feel any side affects from the first jab?
@Peilonrayz Will do.
 
@pacmaninbw just very minor ones right now, but it will probably take a bit
the tiniest headache, but quite some brainfog, slight nausea
 
OK, should only be a couple of days. The second one is worse.
 
yea, I'm expecting that
 
I had muscle aches from both shots, may have run a slight fever from the second shot.
Was really tired for 3 days after the second shot.
 
12:52 PM
I slept for something like 4 hours, so I will be tired either way
 
Welcome to Stack Overflow. This question seems to be off-topic, please consider the guidelines "What topics can I ask about here?" There type of question are on-topic at codereview.stackexchange.combad_coder 9 secs ago
 
@Vogel612 Which shot did you get?
 
AstraZeneca
 
Ah, nice. I have no idea how that one fares. Here we have Pfizer, J&J, and Moderna. Moderna seems to have the worst side-effects of our shots.
 
Astra also seems to be ... a bit of a mess for the first shot
 
1:30 PM
Building IntelliJ plugins is such a pain in the rear
 
0
Q: I want to refactor my code that timed out in code wars

George SousaSo what I need to do is to return the prime numbers that are dividers of a some numbers in a list, so if I = [12, 15] # result = [[2, 12], [3, 27], [5, 15]] and this is the code that I used for that: def sum_for_list(lst): r = [] for num in lst: for i in range(2, abs(num)+1): ...

 
1:56 PM
This type of question is better on Code ReviewChris Schaller 59 secs ago
 
0
Q: Vue.js todo app

Razvan ZamfirI am working on a small to-do app with Vue (v 2.x.x). I list 5 todos from jsonplaceholder initially. I can add more todos, delete them or mark them as done. var app = new Vue({ el: "#toDoApp", data: { url: "https://jsonplaceholder.typicode.com/todos?&_limit=5", dataIsLoaded: false...

 
2:54 PM
If it works, then it's better suited for CR. A better way would be to use std::thread, std::mutex and std::condition_variable instead of that pthread C stuff. — rustyx 34 secs ago
 
3:08 PM
Monking
 
0
Q: Watch for file changes in Linux

Oriol VilasecaI have installed Geekworm x735 on my Raspberry Pi, it uses the script below with an infinite loop to determine if the power button has been pressed. I know there are some Linux utils that watch for file changes (inotifywait, watch, fswatch to name a few), I wonder if they are more efficient than ...

0
Q: Python algorithm to return all two-tuple permutations of numbers up to n

GAP2002I have a Python function like so: def get_values(n: int) -> list: """ :param n: the maximum absolute value :return: sorted list of all the positive and negative permutations up to size n """ if n < 0: return [] if n == 0: return [(0, 0)] out = set() ...

 
3:38 PM
Mzonking
 
0
Q: Single Producer - Multiple Consumers in C++11 using Linux Threads

Giorgos - Marios PatelisHey everyone I was redirected here from Stack Overflow for this question. I am completely new to thread synchronization using condition variables and pthreads in Linux. Here is the code I wrote and I will explain the main idea behind it : #include <pthread.h> #include <iostream> using namespace ...

0
Q: processing a new user

John BeasleyI just wanted to get some feedback on how this JavaScript/JQuery process looks and if there is anything I can do to improve. I am trying to get better at using classes and objects. This particular process is adding a new user. It grabs the form values, validates the fields, and then sends it to ...

 
3:57 PM
You know you have a serialization problem and you said you can solve it one way. But you're wondering if there are better ways. That's not a coding problem, it's an engineering problem that is suited to another SE site like codereview. — Jeff Holt 1 min ago
 
0
Q: Conditional Output Streaming in C++

Tom MannerI stumbled into an idea for creating a simple class that would entirely avoid streaming of any data unless some condition is met. The idea here is that a ConditionalOStream object can be constructed around an instance of a std::ostream * and, optionally, a bool indicating whether streaming shoul...

 
4:30 PM
0
Q: Android app class serialization with static Load / Save method

JimmyHuThis is a follow-up question for Android app class serialization. As forsvarir's updated answer mentioned "A static load that returns a new instance of a User might be closer, or a better solution would probably be to move the save/load logic out of the user class altogether into a class that kno...

0
Q: Python enhancement code

Sam.HI have created simple code in which it takes flat file (txt) and eliminate the noise and error and only return clean rows, i.e. return flat file with the data I am interested in. it works fine but since I am a beginner I am sure my code is not efficient. I would appreciate if you can guide me int...

 
possible answer invalidation by Chocolate on question by George Sousa: codereview.stackexchange.com/posts/260897/revisions
 
@Duga thats okay - formatting of parameter changed
 
If you are asking for people to improve your code, go check out Code Review. — Have a nice day 53 secs ago
possible answer invalidation by Chocolate on question by George Sousa: codereview.stackexchange.com/posts/260897/revisions
 
@Duga The Grand canyon called- it wants its echo back
4
 
Code reviewing questions are better suited over at Code ReviewTomerikoo 29 secs ago
 
4:56 PM
0
Q: data from file to struct and child struct linked list

dario3004I have this type of structure, where the purpose is to insert data from a CSV file. typedef struct utente { char username[20]; char email[30]; int b_year; char tradition[20]; float PriceRange; float average_vote; struct prenotation *p_prenotable; struct review *re...

 
5:13 PM
You might be better served on: codereview.stackexchange.comselbie 17 secs ago
 
6:12 PM
1
Q: Formula filler and calculator

BetraxaSo I made this script for my calculator, so that I can just write whatever formula I want and the calculator would just ask for the missing pieces to do the calculations. I made it so that it would be very easy to fill in, I just go to the end of the list, give it a name and the formula. That's i...

0
Q: Can anyone help make my code simpler thank you in advance

user242453Hello can anyone help me make my code simpler and also I wanna replace INT_MIN, INT_MAX with something else but idk what (without using the #include <bits/stdc++.h> header) In this program I am asked to design a 2 x 2 x 2 Rubik's cube that is filled with numbers instead of colors. The squares on ...

 
6:23 PM
You're saying that you have a problem with your code but you're not showing us that code. Also, if you have fully working code but not satisfied with the performance, you might consider posting on Code Review instead. — 41686d6564 14 secs ago
 
 
1 hour later…
7:49 PM
Welcome to Stack Overflow! If you want help improving working code, you should post this on CodeReview.SE. If you do decide to do so, please delete the question here. — NathanOliver 8 secs ago
 
0
Q: Emacs lisp advice to start ipython repl in the project root

George MauerWhen starting an ipython repl for my project at work, I pretty much always want it started in the project root, not adjacent to the file we're in. While I can always start the repl and then %cd /my/project/root that is a pain the 50th time I have to do it. So I figured I could do some digging and...

 
8:18 PM
0
Q: 2D Map Optimization via Beam Search in Python

Mark GreenThis is a problem based on the game "NGU Industries" in which the objective is to build a factory. Each tile can hold either a production building or a "beacon" which increases the production of buildings near to it in a given offset pattern. In other words, adding a beacon increases the producti...

 
9:09 PM
0
Q: OpenCL approximation of Pi using vectorized implementation

KoekjeYesterday I started following the hands-on OpenCL course. I now got to the point where we are requested to reimplement an approximation algorithm for Pi in OpenCL (in steps, up to a vectorized implementation). I have done so and wanted to get a review for it coupled with some questions I had. My ...

 
 
3 hours later…
11:48 PM
Core issue is that QDataStream &operator>>(QDataStream &stream, QPainterPath &path) basically iterates over all entries and does "ds >> type >> x >> y;" - it is a perfect example there OOP lead to a design which is very "data unfriendly": 3 different operators are called per entry with multiple checks included. The OGL implementation copies the whole data block-wise which is much more efficient. Maybe one could use readRawData to process data block-wise afterwards. However, this will mostlikely not pass code review as it defeats the built-in safeties of QDataStream. — Christian B. 6 secs ago
 

« first day (2936 days earlier)      last day (33 days later) »