« first day (3180 days earlier)      last day (119 days later) » 

12:00 AM
REFRESH! There are 8015 unanswered questions (89.2256 answered)
REFRESH! There are 8015 unanswered questions (89.2256 answered)
 
12:25 AM
0
Q: BMI Calculator in CPP which selects between 1 from 5 categories using only if-else. Showing 2 categories at a time rather than one

Hammad Ahmad#include using namespace std; int main() { float Weight, Height, BMI, Feet, Inches; cout << "Input Weight (in kgs): "; cin >> Weight; /* Work in Progress cout << "Type Ft for Feet and Inches or M for meters: "; if (Choice == "Ft") { cout << "Enter your height in feet and meters: " <<...

 
 
1 hour later…
1:50 AM
possible answer invalidation by Tamal Banerjee on question by Tamal Banerjee: codereview.stackexchange.com/posts/273048/revisions
 
@Duga Rolled back, commented, definite AI (it invalidated my answer and another answer).
 
 
4 hours later…
6:15 AM
Monking
 
6:29 AM
0
Q: Memory leak a can't identify using Bitmap and Graphics classes

BlooddayI have some parallel for one inside another. the last parallel for have a normal for that should Create images by combining other images. the images are generated but the memory consumed by the process slowly increases. I'm using net core 6, and as you can see I have dispatched all the Bitmaps an...

 
6:55 AM
0
Q: Is this still Method still "readable"?

a aI needed a mathod which would print a sqaure with 4 values in each corner, my current "prototype" looks like this: void Renderer::drawNode(sf::RenderWindow &window, const Node &node) { float nodesHor = static_cast<float>(node.location.width); float nodesVert = static_cast<float>...

 
7:45 AM
possible answer invalidation by AngularDebutant on question by AngularDebutant: codereview.stackexchange.com/posts/272972/revisions
 
 
1 hour later…
9:04 AM
0
Q: What is a proper way to make my Singleton thread safe

YvesI'm working with C++11 and I'm trying to implement a singleton which works at multi-threading project. template <typename T> class Singleton { public: Singleton(const Singleton&&) = delete; Singleton(Singleton&&) = delete; Singleton& operator=(const Singleton&) = delet...

 
9:34 AM
What topics can I ask about here?. We're not here to do the research for you. If you have working code and want other opinions on that working code then codereview.stackexchange.com might be an option (but check their Help section first) — Andreas 37 secs ago
 
10:34 AM
@jamesdlin, the question needs work before it's suited to Code Review. You should have pointed the asker at A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. we need a good description of the purpose of the code to give context, and question titles should simply say what the code does (the question is always, "How can I improve this?"). It's important that the code works correctly; include the unit tests if possible. — Toby Speight 29 secs ago
 
10:48 AM
0
Q: Implementing my own Pair class in Java

Da MikeI want to implement my own Pair template class which will be used as the key in a HashMap or possibly other collections. What I have done so far is this: import java.util.Objects; public class Pair<T1, T2> { public T1 first; public T2 second; public Pair(T1 first, T2 second) { ...

 
Since it seems you have working code and are looking for general improvements, this appears to more appropriate for CodeReview – be sure to check their question guide first, though. — MisterMiyagi 19 secs ago
I’m voting to close this question because it belongs to code review StackExchange site — Ye Lin Aung 54 secs ago
Hi. I think It's better to post your question in codereview.stackexchange.com/Mr Alihoseiny 34 secs ago
 
11:14 AM
0
Q: Creating a custom SQL-query for relative timeframes in Google BigQuery

Moritz LoritzI created an overview for client data in Google Data Studio. This is how such a report with dummy data would look like: The user can select a timeframe in the global scope of the report which causes the KPI's shown above to be calculated as follows: Revenue - Revenue for the timeframe selected ...

 
11:40 AM
0
Q: SMTP emailing library

Richard NeumannSome time ago, I implemented an emailing library to simplify sending emails for several web applications and daemons. As usual, I am interested in improving my code. """Library for e-mailing.""" from __future__ import annotations from configparser import ConfigParser, SectionProxy from email.cha...

 
 
1 hour later…
12:41 PM
0
Q: Optimizing python for -if loop

lr_optimI have a for loop that contains multiple if -conditions. The speed of this function is not critical for my application at the moment but I'd like to learn and have a few tips how to optimize my code to make it run faster. In my loop, I get first 5 A's, 5 B's and first 2 C's of each type C_1 and C...

 
1:03 PM
@Duga Seems like linking to meta causes users to post on meta.
 
I'm getting really tired of anonymous users in the review edit queue.
 
@pacmaninbw What's happened now?
More nonsense edits?
 
Yes.
 
possible answer invalidation by Toby Speight on question by mmx: codereview.stackexchange.com/posts/273002/revisions
 
1:16 PM
@Duga ```
 
0
Q: Optimizing python for -if loop

lr_optimI have a for loop that contains multiple if -conditions. The speed of this function is not critical for my application at the moment but I'd like to learn and have a few tips how to optimize my code to make it run faster. In my loop, I get first 5 A's, 5 B's and first 2 C's of each type C_1 and C...

 
1:49 PM
0
Q: A doubly-linked list supporting full reversals in O(1) time (Java): Part I/II: the list

coderoddeI have this Java data structure implementing only the very basic methods of the java.util.Deque and java.util.List interfaces. Under the hood, it's an ordinary doubly-linked list such as java.util.LinkedList, with the minor twist: there is a boolean value reverted indicating the direction, if re...

 
2:03 PM
If the code works and you need a review, you should try Code Review because your question is off-topic here. — baduker 12 secs ago
I’m voting to close this question because it belongs to Code Review. — baduker 34 secs ago
No, code is not ready for review until it's functionally complete. — Toby Speight 46 secs ago
 
2:18 PM
If you have a specific error/behavior that you need you need help diagnosing and fixing, please update your post to spell out what the problem is. If not, StackOverflow is not the right place to post. Please use codereview.stackexchange.com to solicit code reviews instead — Mathias R. Jessen just now
 
2:41 PM
0
Q: Nop class which can get optimized away

tommschI designed a class for debug builds which does not incur any overhead in release mode. A usecase is for example: I have a function and I want to count how often it is called. For this I could write the following function void f() { #ifndef NDEBUG static int i = 0; ++i; ...

 
OHAI @Zeta @Gemtastic long time no see :D
 
3:16 PM
Guest Post on January 17, 2022
An essential part of requirements analysis is understanding which quality characteristics are the most important so that designers can address them appropriately.
 
3:57 PM
That would belong on the Code Review SO (if you post over there, you can link the question here). — AKX 13 secs ago
 
0
Q: PowerShell to query SQL database with a string from a filename

RudixxI am trying to write a PowerShell script that will check a folder for any files and then for every file it will grab part of the filename and check it against the SQL database. If it found a match, it will rename the file and move it to another location. If it did not find a match, then it will m...

 
4:10 PM
very cool wasnt even aware of this section: codereview.stackexchange.com/questions/273085/…rnd om 13 secs ago
 
4:25 PM
0
Q: Implementation of a Parser for Analysis Description Language

ParthS007I have created a script for parsing ADL and the code looks like below. Example ADL file I am looking for suggestions to divide the code in multiple methods and make it more readable. Thanks block_names = ("object", "region", "info", "table ") keywords = ("define", "select", "reject", "take", "using"

0
Q: this code lists all inherited class attributes of an object (instance variables and instance methods)

rnd omworking through "Learning Python: Powerful Object-Oriented Programming' chapter 28 has you create a class that will list all instance attributes of an object. then the book offers some ideas, such as listing all attributes up the inheritance tree, so here is my attempt: """Assorted class utilitie...

 
4:35 PM
@Vogel612 The 2nd monitor is always pinned in my FF ;)
Monking all
 
4:46 PM
@pacmaninbw Me too.
 
I am greatly confused today. Running a Java Spring Boot service with -Dlog4j.configurationFile=... works in our Kubernetes cluster, but not locally.
 
wat
 
My point exactly.
Using -Dlogging.config=... works, but not -Dlog4j.configurationFile=...
 
that's a bit like me spending around three hours to find out why spotbugs doesn't generate a specific result I was expecting from a canary change
could it be that the classpath of the cluster deployment is different?
 
three hours? Pffft.... I've spent one and a half days on this
I'll look into it again tomorrow. How do I see the classpath exactly?
 
4:56 PM
~shrugs the classpath can be extended by MANIFEST files
soo ... anyone's guess, unfortunately.
 
5:17 PM
0
Q: Rock, Paper Scissors game using Python

rohitThis is a simple rock, paper scissors game I attempted as part of the Automate the Boring Stuff with Python course on Udemy. The scope of the game is for the user to enter a valid input, the system then returns the result and the current score. If the user wishes to quit the game he/she enters 'q...

 
Monking
 
FYI, I think technically the question is off topic for MRC because it isn't a complete function, but the OP needs a lot of help.
I up voted the question and one of the other answers, I did not up vote the OP's answer.
 
5:56 PM
I've voted on a couple of those answers now.
 
@TobySpeight I was just about to say thank you Santa, but thank you Toby.
 
6:25 PM
Speaking of answers.... anyone want to check this one out? codereview.stackexchange.com/a/265519/31562 I'm not sure why I have a -1 on it.
If I deserve it, please someone tell me why
 
It seems to me this question is more suited to be asked in the Code Review Forum. Code Review is a question and answer site for peer programmer code reviews. Please read the relevant guidance related to how to properly ask questions on this site before posting your question. — itprorh66 23 secs ago
 
@Duga we're not a.... eh, nevermind.
 
It seems to me this question is more suited to be asked in the Code Review Forum. Code Review is a question and answer site for peer programmer code reviews. Please read the relevant guidance related to how to properly ask questions on this site before posting your question. — itprorh66 49 secs ago
 
7:22 PM
Could be better suited to code review. — user438383 11 secs ago
codereview can be posted here: codereview.stackexchange.comcaramba 17 secs ago
 
7:52 PM
0
Q: React native I have multiple useEffect, listeners or handlers of service but in the same component

Roger Espinozaplease help me with this question please i have multiple useEffect and handler of services like subscriptions, listener of network state, listener of state of redux, and other things the component have more of 400 lines, but in same component, the component is located in the home of app, but retu...

 
 
1 hour later…
9:10 PM
0
Q: Count the frequency of n-grams in a random Wikipedia corpus

CaridorcThis code counts the frequency of n-grams in a random Wikipedia corpus, as of now, it downloads everything, than performs all the counting. In your opinion is there a way to perform downloading and counting simultaneously while keeping the code reasonably simple to improve the performance? import...

0
Q: Genetic algorithm for 8 Queens puzzle

thomasI've finally got a working genetic algorithm to solve the "8 Queens" puzzle, however I'm aiming to get the run time of this program down to under 30 seconds consistently, and I really don't know how to optimize my code to do this. Is this likely to be an issue with how my fitness score is calcula...

 
9:36 PM
0
Q: Haskell proof checker for FOL with equality

user695931Is this a correct implementation in Haskell of a proof checker for first order logic with equality? I am most interested in if it is correct, and if the functions can be made clearer. I would like it to be useful for elucidating the definitions given in textbooks. {- Hilbert style first order mat...

 
10:33 PM
Try codereview.stackexchange.com for improvements to working code, after reading their posting guidelines. — chepner 56 secs ago
 
10:54 PM
0
Q: Decrease the number of lines of code needed to create a list and verify one value

Brondby IFWhat can I do to reduce the number of steps until I get to the final code result? Is it possible or is this the way with the least number of lines of code? import requests headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4...

0
Q: Comparing 2 CSV files by ID and printing the output as CSV

Nancy GomezI want to compare two CSV files in Python. They both have the same columns, first column is the key variable (ID). One of the CSVs has more rows than the other. My goal is to print the differences in columns as CSV. For example: df1 ID;Apple;Pear 1;C;2 2;B;3 3;C;5 4;A;6 5;E;7 df2 ID;Apple;Pear ...

 

« first day (3180 days earlier)      last day (119 days later) »