« first day (3126 days earlier)      last day (894 days later) » 

12:00 AM
REFRESH! There are 7934 unanswered questions (89.2586 answered)
 
@Peilonrayz Can you review this?
 
@Fmbalbuena Not today (which doesn't really exist for me now...) or tomorrow. Possibly on Thursday. You'd have to remind me since I'm likely to forget by then.
 
@Peilonrayz ok tomorrow or Thursday. I remember.
 
@Fmbalbuena Sorry I think my () made things unclear. Thursday's the earliest I can do :)
 
@Peilonrayz ()?
 
 
5 hours later…
5:23 AM
Monking
@Fmbalbuena Welcome to Code Review. What prompted you to write this?
The programming language, that is.
 
 
1 hour later…
6:47 AM
Monking
 
 
1 hour later…
8:02 AM
0
Q: Fractions in C++

Random_Pythoneer59I started learning classes and operator overloading in C++. To test my skills I decided to make a Fraction class with all necessary operations. I would appreciate improvements and suggesstions on my implementation. Here is the code - #include <iostream> #include <string> #include <stdexcept> // t...

 
 
1 hour later…
9:24 AM
Thank you for sharing this. I believe that this is also known as A* (A star) algorithm. For a new user here, please take the tour and read How to Ask. BTW: If you want to get feedback on your code, check out codereview.stackexchange.com. Point is, your question is not a question and therefore kind-of off-topic here. — Ulrich Eckhardt 7 secs ago
 
9:45 AM
0
Q: A better way to extract string

ArjunHi I have below string from which I am extracting tariff name. const url = "https://any-api/supplier/tariffSelectionG_E5449168?t=randomChars" So from the above string I want text tariffSelectionG_E5449168 and I am using below code at the moment which is working fine. const supplyUrl = "https://an...

 
10:34 AM
Before I take it to code review, let me clarify: I'm not looking for a rewrite - I just need a quick explanation of what to change in order to convert this to OOP. I can then implement any guidance on my own. — Josh Ratliff 11 secs ago
 
11:04 AM
Feels like this could really use some tips on writing better code, you could try posting this (with the answer below implemented) to codereview.stackexchange.com, because it's a bit too much to point out here in the comments. But at the very least I'd advise to give fields 3 states with an enum { X,0,EMPTY } instead of working with raw strings — somethingsomething just now
 
11:40 AM
Monking
 
11:52 AM
Monking
 
12:51 PM
@Lady_96 I would agree this is probably for code review stack exchange. I don't see anything which appears wrong, but it could perhaps be more elegant — George 14 secs ago
 
1:38 PM
0
Q: Classes and Structures, how to use them properly in Swift?

Lady_96I'm not an experienced programmer, this is my first programming language to learn. And I've come to a problem using Classes and Structures. The documentation says: Classes can do that and that, Structures can do that... etc. But when it comes to actually using them how do i know how to do it prop...

 
 
1 hour later…
3:04 PM
Eira May on November 24, 2021
You’ve got questions, we’ve got Seasoned Advice on how to prepare the perfect Thanksgiving meal.
 
3:42 PM
I’m voting to close this question because it belongs to codereview.stackexchange.comZsolt Meszaros 51 secs ago
 
0
Q: Numerical integration in C++: Newton-Cotes formulas

GiogreI have tried my hand with implementing simple quadrature formulas in C++. Definite integral: $$\int_a^b f(x) dx$$ Domain of integration \$[a, b]\$ divided into \$n\$ intervals of equal length \$h = (b - a) / n\$. Midpoint of interval \$h_i = b_i - a_i\$ is $$x_i = a + h / 2 + (i - 1) h$$ with \$i...

 
4:03 PM
Monking
 
4:14 PM
0
Q: Find coherent datetime ranges in postgresql

FritzMy Data consists of rows containing a Length/Duration in Minutes, a Begin & EndTime. The precision is 1min (or larger). the table looks something like that: CREATE TABLE public."TimeSeries" ( "Id" uuid NOT NULL, "BeginTime" timestamptz NOT NULL, "EndTime" timestamptz NOT NULL DEFAULT ...

 
4:40 PM
This would be better suited for Code Review Stack Exchange. — Jeremy Caney 19 secs ago
 
4:53 PM
Monking
 
5:06 PM
@VictorEijkhout Not at all. I accidentally surfed in from Code Review as it appeared to the right, and didn't notice it switched to the main S.O. site. — JDługosz just now
This might be better suited on codereview.stackexchange.commatch 38 secs ago
 
5:58 PM
0
Q: Car service center console app, recommend design changes

DevjoshI am making an attempt to get the feel of SOLID programming experience. at the very basic, I started with one car service center console application. I started with Single Responsibility Principle and ended up with this SRP Implementation Branch. Now I was trying to discover the scenario related ...

 
@JDługosz Thanks for clarifying. And thanks for doing code reviews. It's a useful service. There is a lot of bad C++ code out there. — Victor Eijkhout 40 secs ago
 
6:38 PM
I suggest asking your question here codereview.stackexchange.comnima 35 secs ago
 
7:16 PM
0
Q: TicTacToe Objects calisthenics OOP

SharkiI'm learning Objects calisthenics and I was practicing with the typical Tic Tac Toe game, I was wondering if you could gimme feedback about my mistakes (Algorithmic problems, logic, and especially OOP following Objects calisthenics rules). Thanks in advance! Only One Level Of Indentation Per Met...

 
@CaptainObvious OOP Calisthenics, first time I heard about that.
 
7:42 PM
0
Q: Improving program to find smaller angle between minute and hour hands of clock

ConorSo in this code the angle between the minute and hour hands of an analog clock are found and calculated and the smaller angle between them returned. This code works perfectly and I am getting back the results I expect. We were told to do this and any testing if necessary. I got asked this in an i...

 
@Mast a couple years ago I saw a video of a speaker talking about it with respect to PHP - he introduces it ~3:50 adapted from a book about Java
 
@SᴀᴍOnᴇᴌᴀ I'll have a look, thanks. Is it worth looking into?
 
7:58 PM
I think so... the video may seem long and somewhat boring.... one could read related articles like this one
I often incorporate some of those in my reviews - e.g. avoiding else where possible
 
0
Q: Thinking about the efficiency of my chess program

Eduard KrutitskyI am currently working on a chess console app. However i feel like i got some inefficient code. For example: In order to find out whether an enemy is in check I start iteration over all pieces and all their possible moves. I am glad to get any advice regarding the structure syntax etc. on my proj...

 
 
3 hours later…
11:09 PM
0
Q: HackerRank - Climbing the Leaderboard: I don't understand why my code is exceeding the time limit

Mysterious ShadowI keep getting timed out. I think my general logic is right but how can my code be optimized more? I know there are solutions using the bisect module but I've seen very simple ones without using that. From what I can think of, maybe using while loops will speed things up? def climbingLeaderboard(...

 

« first day (3126 days earlier)      last day (894 days later) »