« first day (3061 days earlier)      last day (942 days later) » 

12:03 AM
REFRESH! There are 7824 unanswered questions (89.3088 answered)
 
12:57 AM
0
Q: Utilize values in a parameters file for function inputs

wiggingIn my Python projects, I often define parameters in a TOML, YAML, or JSON file. Those parameters are loaded into a dictionary which is utilized by various functions in the project. See below for some examples. I'm curious on how others would approach this and if there are better ways to work with...

 
1:22 AM
0
Q: How to make a big function modular

oo92I have this massive function in Python: import pandas as pd import numpy as np from sklearn.base import clone from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import train_test_split def main(): df = pd.read_csv('data.csv') index = np.argmax(df['total_weigh...

 
2:05 AM
@Alexander, like I said, I'm just checking if that would be possible first and if so, how painful that would be. The code base is huge and the building time is taking forever already. To clarify, the explicit_type_interface is not implemented yet, today we check if there is any type inference during code review. And I really don't know what makes you think that basic file I/O is a challenge for me, honestly.. — Denis 27 secs ago
 
 
2 hours later…
3:49 AM
1
Q: Dynamic array implementation using C++

Youssef RefaatI implemented a basic dynamic array using C++. When deleting an element and shifting the others, the last element will be twice repeated (the original still exists after copying). I want to avoid memory leaking by deallocating the last element of the array. How could I delete an element not the w...

 
 
1 hour later…
5:12 AM
Monking
 
 
3 hours later…
8:19 AM
0
Q: Is it possible to convert this advanced custom attribute to a relationship query in Laravel?

Jimmie JohanssonSo I have this sporting event ticket system up and running. And now we are going to support multiple event tickets, like a ticket that is valid for all events this entire season. This ticket needs to "block" the same seat every event. Currently I am trying to figure out how to get the available s...

 
9:08 AM
0
Q: Encapsulation React state

EmaborsaI defined the following context provider: import { Context, createContext, FC, useContext, useEffect, useState } from "react"; import { element, list, browse } from "../Components/Controls/Controls"; export interface ControlsState { shownTab: "Durchsuchen" | "Element" | "Liste"; listActionTi...

 
9:33 AM
0
Q: Serving In Tennis

Aryaman Alice and Borys are playing tennis and it is unknown who served the first game. After each game , the serve changes to other player. If the server wins the game , then it is said that he holds the serve and if the receiver wins the game then it is said that <receiver's name> breaks the serve. If ...

 
9:46 AM
Monking
 
10:01 AM
And a fourth. I think this should go to codereview.se :D — Vilx- 30 secs ago
 
10:17 AM
@skiwi If it doesn't, I'd recommend following either CS50x or FreeCodeCamp.
 
I generally try to figure out what triggers the error, reproduce it in a local environment (not Kubernetes, not Docker, no containers at all), debug, write a regression test, fix the bug, get a code review, redeploy. That process isn't especially unique to Kubernetes; it's the same way I'd debug an error in a customer environment where I don't have direct access to the remote systems, or in a production environment where I don't want to risk breaking things further. — David Maze 59 secs ago
 
0
Q: Simple lightweight CSV reader in C++

SmurkerMy coding background is mostly from C and I've noticed that I tend to "use C++ as it was C" quite a lot. So this is a very small project I've written to improve my understanding of best practices in C++. I'm looking for a general review, with focus on: How well is it following standard C++ best ...

 
I suggest you consider codereview.stackexchange.com as you simply need a code review. — Gopal Mishra 52 secs ago
 
11:11 AM
0
Q: How to stop background task?

petrushI have the following method which can be run infinit amount of times or just once: async def start(self) -> None: assert self._is_active while not self._is_active.done(): self._run_once() if self._one_run: break else: await self._wait() And I...

 
11:29 AM
Dynamically finding the last node of a linked list is rarely wise. I would not accept a commit like this in a code review. If you need to append to the list on a regular, you either create a doubly linked list or you keep a reference to the last node. — Cheatah 45 secs ago
 
12:08 PM
probably better to ask this on codereview.stackexchange.comMikeT 38 secs ago
 
12:25 PM
0
Q: Method if condition logic

JeffersonThis logic checks accessGroup and if accessGroup is equal to "Admin" then it only checks if result.Admin or baccess is true but if accessGroup is anthing else it will need to check two other objects result.Admin == true || result.PowerUser. Is there any other way to do this if condition? if (acce...

 
1:15 PM
I’m voting to close this question because codereview — Koray Tugay 22 secs ago
 
1:56 PM
Looking for a better alternative might be better over at codereview.stackexchange.com. Be sure to first read the tour and the help center. I can tell you that without code and more information, neither SO nor CodeReview will be able to help you very well. — aynber 27 secs ago
 
2:11 PM
Philippe Beaudette on September 19, 2021
It’s time once again for the ritual that I know we’ve all come to love: the quarterly update on Community team projects. This quarter’s projects are constrained by a lack of available technical/engineering resources on our Public Platform team, so you’ll see that we are focusing on projects that don’t require assistance from them.
 
2:37 PM
Monking - will be here for ~ an hour
 
2:48 PM
To start with, the sleep_for call could be outside the if statements, leaving you with only one such call. Secondly, for working code (a hard requirement) that you want a review of should really be posted to the code review SE. — Some programmer dude 47 secs ago
 
Monking.
 
 
1 hour later…
4:02 PM
@DanielB. It is really up to you. You can delete it for sure. You can ask for code review on codereview.stackexchange.com if you want to get feedback on your chosen approach. — Peter Csala 19 secs ago
 
0
Q: C#: How can I save images to PDF file?

Mafia_DevIm working on a project that needs to generate PDF files with images in C#, //Add a image PdfGridCellTextAndStyleList lst = new PdfGridCellTextAndStyleList(); PdfGridCellTextAndStyle textAndStyle = new PdfGridCellTextAndStyle(); textAndStyle.Image...

 
Monking
 
 
1 hour later…
5:20 PM
0
Q: C++ It sometimes stops while running the code without showing any error message

Meilianto Luffenzthe terminal suddenly stop without showing any error sometimes, so it is a basic snake game, sometime it stops executing while i will have eaten 3 or sometimes after 8 or sometimes right before eating or while wandering around. I could not find the little error in my code. #include <iostream> #in...

0
Q: Are forward declarations bad for avoiding Circular dependencies in this project?

Edward KoulakidisWriting a chess project in C++ I ran into an issue with circular dependency between two of my classes. The abstract Piece class has a method test(Board),the Board class has a 2d array of Square and the Square class has a Piece*. So including board.h in Piece creates a circular dependency between ...

 
possible answer invalidation by tuskiomi on question by tuskiomi: codereview.stackexchange.com/posts/268136/revisions
possible answer invalidation by tuskiomi on question by tuskiomi: codereview.stackexchange.com/posts/268136/revisions
 
6:21 PM
FedEx has had two packages of mine at the delivery hub 20 miles from my house since Tuesday (so, a full week now) and a third package departed a city in Michigan that is not far from my house Thursday night. I hope everyone else is having a better September than me.
 
6:46 PM
@DerKommissar Ugh FedEx.. they made me pay online for import costs and then charged my credit card too.. I'm in the process of making them fix that
 
Yeah I’m just waiting on car and computer parts they’ve had ready to deliver for a week 🤦‍♂️
The local DC made our local news because they keep delivering things so late that food and medical products spoil in their warehouse
 
 
1 hour later…
8:04 PM
I know goto is not the best practice, but it is really easy to use. It is really easy to write. It is harder to prove correct, still harder to debug if it's not correct, and an absolute <expletive deleted> to maintain even when it is correct because someone who's not as smart/careful as you were will <expletive deleted> it up. I also find defending goto in code reviews soaks up more time than not using it in the first place because no one will believe you used it correctly and covered all your bases unless you can conclusively prove it, something you'll have to do over and over again. — user4581301 31 secs ago
 
 
2 hours later…
9:51 PM
Code Review would also be an appropriate place to request feedback on working code, you can ask about performance there (but be sure to read the site rules) — trentcl 33 secs ago
 
10:46 PM
 
11:12 PM
If the code is working then this is probably more suited for codereview than it is stackoverflow, otherwise, it's difficult to understand what the issue is you are asking about and what needs to be addressed. — Drew Reese 15 secs ago
 
11:44 PM
@RMunroe lol
 

« first day (3061 days earlier)      last day (942 days later) »