« first day (4129 days earlier)      last day (182 days later) » 

00:19
REFRESH! There are 6070 unanswered questions (92.2077 answered)
 
4 hours later…
 
3 hours later…
07:24
2
Q: Handling lock release in a goroutine with timeout

Ram DittakaviI have a scenario where I need to acquire lock on a resource inside a goroutine and release the lock (only once) after a timeout or when the goroutine is done with it's job. I came up with a way to achieve this but I'm not sure if it's best way. package main import ( "fmt" "runtime/debug"...

 
1 hour later…
08:52
Code Review is the place to have code reviewed. — Cow 33 secs ago
 
5 hours later…
14:04
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 37 secs ago
14:18
@CaptainObvious With the migration came two answers from users who have had CR accounts for 4-9+ years, but only one of them has a prior CR answer
P.S. Monking
14:53
Monking
15:11
Monking
0
Q: How can I optimize my custom hook logic for handling color mode switching in a React App

AndrianI'm using a custom hook to handle light/dark mode toggling in my React app, which leverages MUI's theming. The hook manages the mode state, stores it in localStorage, and provides a toggleColorMode function. Additionally, I have a context that allows components to access and modify the color mode...

@RMunroe LLOL
yawns long time no talk!
I am not in here as often as I used to be.
I do have tabs open on my browser though!
@ThomasWard How are you?
tired A F but i got drunk last night so that's hangover
also BUSY as hell which is why i don't check in on chat here as much in any channels
15:34
0
Q: Decorating an instance method with another instance method

georgwalker45So um...this is pretty clear, right? Trying to avoid the change in every subclass/introduce template method/name mangle to add feature kind of anti-pattern. @staticmethod def _track_output(state): def wrapper(f): def wrapped(self, *args, **kwargs): self...

15:56
0
Q: Evaluating WinAPI, PowerQuery, PowerShell, and FileSystemObject for File Retrieval Using VBA

TinManTraditionally, VBA developers rely on the FileSystemObject to retrieve files within a directory. I decided to test and compare different methods (Windows API, PowerQuery, PowerShell, and FileSystemObject) to determine which is the most efficient for large-scale file retrieval. Below are the resu...

1
Q: Check which sinks are connected in the pipe system using Python

SilahIt would be very helpful to me as a beginner if I could get feedback on my code, specifically about the efficiency of algorithm used and potential improvements in code quality. Code context: There is a pipe system represented by a 2D rectangular grid of cells. There are three different types of o...

16:51
fyi code reviews are off-topic here, as are general discussion/opinion questions. Also: all details should be here in your question, not as a link to an external site. Please read How to AskDavid Makogon 56 secs ago
17:03
0
Q: How to best propagate context cancellation and errors in data pipeline

Will BeasonI have code that concurrently reads data from a stream, processes elements, and writes the data to another stream. Each of these individual operations may fail, in which case I want processing to halt and all resources to be released. I also want the caller to have access to the specific error wh...

17:27
 
2 hours later…
19:29
(1) Maybe.... but.... why!? (2) Yes, use proper dependencies. This seems to be more of a hack to skirt around improperly memoized/unstable dependencies. Just go fix the sources. (3) Yes, perhaps, because of (2). This wouldn't be acceptable in any code review I participate in unless there are extreme extenuating circumstances that necessitate it, and then in that case it'd require good clear documentation as to why the oddness. — Drew Reese 44 secs ago
20:02
0
Q: C# Tap() extension methods

User1Tap extension methods: public static T Tap<T>(this T source, Action<T> action) { action(source); return source; } public static IEnumerable<T> Tap<T>(this IEnumerable<T> source, Action<T> action) { foreach (var item in source) { action(item); yield return item; ...


« first day (4129 days earlier)      last day (182 days later) »