« first day (4172 days earlier)      last day (128 days later) » 

00:10
0
Q: Checksum files in a directory with Python, memory-efficiently

viuserThis is the implementation of a function hash_dir_contents that walks through a directory and for every file calculates the hash of its content in a memory-efficient manner (without loading the whole files into memory - which very surprisingly isn't already implemented in the standard library?). ...

00:20
REFRESH! There are 5758 unanswered questions (92.5938 answered)
01:18
 
5 hours later…
06:31
0
Q: Roman Numerals Look and Say in rust (BIO 2020 Q1)

sbottingotaI was practicing question 1a of the British Informatics Olympiad 2020 past paper. The Roman look-and-say description of a string (of Is, Vs, Xs, Ls, Cs, Ds and Ms) is made by taking each block of adjacent identical letters and replacing it with the number of occurrences of that letter, given in ...

07:24
@chux-ReinstateMonica thanks for the code review! fixed the concerns raised. — Cherubim 49 secs ago
 
7 hours later…
14:19
Monking
14:39
Monking
 
4 hours later…
18:48
0
Q: Bare minimum implementation of dallas 1-wire DS2401 slave for ATtiny9

kitehmanI have completed my project and have it operating reliably on an Arduino nano. Arduino Sketch here The target device is an ATtiny9 C code here I used this project to make the jump from Arduino IDE to Microchip studio and C programming, any and all comments are very much appreciated. Specific ques...

0
Q: C++ CoRoutine First Try

Loki AstariLazy range generator. I know everybody's first example for co-routines. But want to get some feedback. The code #include <iostream> #include <coroutine> struct Handle { struct Promise; using CoRoutineHandle = std::coroutine_handle<Promise>; struct Promise { ...

19:32
0
Q: C++ CoRoutine Second Try building a range

Loki AstariSecond try. This time rather than get() and operator bool make the handle be a range operator. The only difference in the promise is: std::suspend_never initial_suspend() noexcept {return {};}. Here return std::suspend_never instead of std::std::suspend_always forcing the co-routine to run to ...

0
Q: I would like some feedback on the quality of my code for all matter of Task Synchronization for an embedded system with RTOS

Null_DreiAchtI wrote this code for a make-up assignment to pass one of my college class and graduate from my program in the field of electronic and embedded system. It's pretty much the realization of a solar tracking system for solar panel. However, I'm using cheap servo motors for this instead of more appro...

 
3 hours later…
22:40
that sounds like a candidate for Code Review, not SO. you say your code works, so there is no error as such. -- memory usage itself doesn't do what you claim. -- at least one of your loops would be trivially expressed with numpy, instead of looping (for pt in zip(*...) is the first one) -- findJumpArea reads the template on every call. -- if there's ever more than one instance of your template, you'll have to consider that. -- such issues being in your code means you should to work on it more. you don't need anyone to point the simplest ones out. — Christoph Rackwitz 1 min ago
your question looks like a candidate for Code Review, not SO. you say your code works, so there is no error as such. -- such issues being in your code means you should to work on it more. you don't need anyone to point the simplest ones out. -- you should use ChatGPT/Copilot for assistance with your code. if you use any of its output (code, text), make sure to understand what it wrote, and make sure it's actually making sense. many users just get it to generate code for them, and then they ask us people to explain it to them. if you use generative AI, you take responsibility. — Christoph Rackwitz 33 secs ago

« first day (4172 days earlier)      last day (128 days later) »