Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Posts by aura-lsprog-86‭

17 posts
66%
+2 −0
Q&A Iterating over pixels in QImage (Qt): which method adapts better for any image size?

I asked this in SE years ago. I'm aware of two methods in order to access all the pixels in a QImage called img. Method 1 for (int y = 0; y < img.height(); y++) { QRgb *line = (QRgb *)...

0 answers  ·  posted 4d ago by aura-lsprog-86‭  ·  edited 4d ago by aura-lsprog-86‭

66%
+2 −0
Code Reviews A simple implementation of a mutable String in C

(Brought over from SE.) The following code implements a simple interface to operate on mutable* Strings in C. It is composed of two files: one for the structure definition and the available oper...

3 answers  ·  posted 7d ago by aura-lsprog-86‭  ·  last activity 6d ago by Olin Lathrop‭

Question c string
66%
+2 −0
Code Reviews Serial copying from disk images to folder in Bash

(Brought over from SE.) This is a Bash script that copies files stored inside disk images to a directory, using a defined structure provided via a JSON file. I've included the external programs ...

2 answers  ·  posted 6d ago by aura-lsprog-86‭  ·  edited 5d ago by aura-lsprog-86‭

66%
+2 −0
Q&A Line-drawing algorithm prints nonsensical intermediate Y values. Where is the problem?

This question was originally asked in SE. I have a program that draws lines using line drawing algorithms. I use gcc 5.2.1 on Xubuntu 15.10 to compile it. Executing it throws a "Segment violati...

1 answer  ·  posted 6d ago by aura-lsprog-86‭  ·  last activity 6d ago by aura-lsprog-86‭

66%
+2 −0
Q&A Line-drawing algorithm prints nonsensical intermediate Y values. Where is the problem?

I answered myself as it can be found here. Silly me! The root of the entire problem was the type used in both point.x and point.y: typedef unsigned int uint; typedef struct { uint x; ...

posted 6d ago by aura-lsprog-86‭  ·  edited 6d ago by aura-lsprog-86‭

Answer
60%
+1 −0
Q&A Scanner fails when executing Java with admin rights (sudo) in Eclipse in Linux

(Brought over from SE.) The problem I have followed this procedure in order to run Java applications as root when needed from Eclipse (as I use Xubuntu, for instance, when using jnetpcap to cap...

1 answer  ·  posted 7d ago by aura-lsprog-86‭  ·  edited 7d ago by aura-lsprog-86‭

60%
+1 −0
Q&A Scanner fails when executing Java with admin rights (sudo) in Eclipse in Linux

I've finally managed to get it working without using a wrapper for java. It has to do with filesystem capabilities in Linux. To let java list and select network interfaces, as well as analyse and ...

posted 7d ago by aura-lsprog-86‭

Answer
60%
+1 −0
Code Reviews A simple implementation of a mutable String in C

(User JS1 answered as follows; source.) Unsafe loop This loop in string_find() is unsafe since it could read past the end of your buffer: while (str->data[pos] != c) ++pos; You shoul...

posted 7d ago by aura-lsprog-86‭  ·  edited 7d ago by aura-lsprog-86‭

Answer
60%
+1 −0
Q&A How can I set a private class instance variable to the File object used by an unmarshaller?

(Brought over from SE) The problem I'm coding a Java Swing application dealing with XML files, so I'm using JAXB in order to marshal classes into documents and unmarshal the other way around. ...

1 answer  ·  posted 8d ago by aura-lsprog-86‭  ·  last activity 8d ago by aura-lsprog-86‭

60%
+1 −0
Q&A Why is a for loop getting stuck when using a uint64_t counter, whereas a while loop isn't?

I asked this question a while ago over SE. When I use a for loop with a uint64_t as a counter, it gets stuck forever, even though the condition seems to be well defined. Offending MCVE #includ...

3 answers  ·  posted 6d ago by aura-lsprog-86‭  ·  last activity 3d ago by Lundin‭

Question c integer loops
50%
+0 −0
Code Reviews Serial copying from disk images to folder in Bash

The following answer was given by SE user Edward. The original source can be found here. The other answer gave some really good advice; this is intended as a complementary answer with still more...

posted 6d ago by aura-lsprog-86‭

Answer
50%
+0 −0
Q&A How to correctly model the delay timer for a CHIP8 emulator written in C?

I received this answer in SE. Sadly, the user who wrote the answer is no longer in the site. Don't use threads and synchronization primitives (semaphores, shared memory, etc) for this. In fact, ...

posted 4d ago by aura-lsprog-86‭

Answer
50%
+0 −0
Q&A How to correctly model the delay timer for a CHIP8 emulator written in C?

I asked this question in SE a while back. TL;DR I need to emulate a timer in C that allows concurrent writes and reads, whilst preserving constant decrements at 60 Hz (not exactly, but approxima...

1 answer  ·  posted 4d ago by aura-lsprog-86‭  ·  last activity 4d ago by aura-lsprog-86‭

50%
+0 −0
Q&A Why is a for loop getting stuck when using a uint64_t counter, whereas a while loop isn't?

SE user DU Jiaen provided the following answer, edited by Martin Zabel and found here. The expression i >= 0 is always true if i is of an unsigned integer type. The alternative and simple way...

posted 6d ago by aura-lsprog-86‭

Answer
50%
+0 −0
Q&A Why is a for loop getting stuck when using a uint64_t counter, whereas a while loop isn't?

SE user M Oehm provided with the following answer, as it can be found here. The condition i >= 0 is always true if i is an unsigned type. Decrementing an unsigned zero will not produce a nega...

posted 6d ago by aura-lsprog-86‭

Answer
50%
+0 −0
Code Reviews Serial copying from disk images to folder in Bash

The following answer was given by SE user Oh My Goodness. The original source can be found here. Instead of cat "$x" | command or echo "$x" | command, use command <$x (vs cat) or command ...

posted 6d ago by aura-lsprog-86‭  ·  edited 6d ago by aura-lsprog-86‭

Answer
50%
+0 −0
Q&A How can I set a private class instance variable to the File object used by an unmarshaller?

I've found a way to set the private field without exposing it or giving it a setter: Reflection. Using external event listeners, I can get ahold of the File object. Then, inside the beforeUnmarsha...

posted 8d ago by aura-lsprog-86‭  ·  edited 8d ago by aura-lsprog-86‭

Answer