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.
Search
The sole purpose of the do { } while(0) is to write macros that accommodates to all manner of diverse coding styles. It is quite common not to use braces after if statements, so this is a common co...
Summary (TL;DR) Using strcpy directly on non-sanitized user input is bad, otherwise it's fine. strncpy is a dangerous function that should be avoided. Its presence in your source is a muc...
In git I branched feature-A from master. To reduce eventual merge conflicts later, I branched feature-B, which heavily overlaps and depends on A, from feature-A. A build of the feature-B branch s...
This is meant as a FAQ Q&A regarding variable-length arrays (VLA). The two bugs described below are surprisingly common. I'm trying to use the variable-length arrays feature of C99 (and newe...
I am working on a website which unfortunately uses a mix of linked and inline CSS and Javascript (and, even more unfortunately, I can't do a lot about the use of inline CSS and Javascript), and am ...
Some variables make sense to bundle together. For example, if you have a graphics method to draw an image, you will need to pass in an X and Y coordinate for where to draw the image. Those are two...
what ways can I get a string's length in D? There are many different ways, and that will depend on the content of the strings, their types, and how you define the terms "character" and "length...
Does Inteheritance actually meant return and Polymorphism meant to print out values? This doesn't make the slightest sense... Probably you should forget all you've heard - don't "watch tutoria...
1st issue As others have said, echo "$array" only prints the first element of the array; I suggest printf '%s\n' "${array[@]}" to print each element on a line. 2nd issue More importantly, th...
In addition to what Moshi already told you: Among web designers, W3Schools has a somewhat tainted reputation, because it often makes things simpler than they really are. In my experience, this lac...
To start off, here is the complete HTML of a simple example table: <html lang="en-US"> <head> <title>Title</title> <style> table { width: 20em; ...
"Brainfuck" is the name of a programming language; using the full name of the language is perfectly fine. We don't need to bowlderize proper names. As for your other example - foul language in cod...
I am interested in knowing how the recent Codidactyl game and its code were created and obfuscated. See the non-announcement. From other posts, it appears that luap42 and Monica Cellio may have wo...
Method 1: <span> (or other HTML tag) It appears that Markdown isn't detected within HTML tags, so you can wrap the URL-like in a span or other tag and it won't turn into a link. <span>...
I have a post where I mention a script named dead.sh Ok... now I have two posts like that. But that is not a website. It is a filename, and not one reachable through an URL. How can I inhibit aut...
I just started to see greetings in posts like: "Hello", "Thank you", "Morning" and other types of greetings. Should this greetings be removed from posts or we just keep them? Sometimes I think th...
Caveat When making a decision of such lasting impact, you should conduct your own evaluation according to the criteria that matter to you. This post does not attempt to replace such an evaluation,...
First of all, I realize that this is mostly a library you've implemented while learning programming, for the sake of learning, which is great. So I would rather not put a "wet blanket" over your at...
The warnings just say that you can't pass a string literal with type char[] to a function taking a struct Book* parameter. The function should be declared as: void init_Book_types (const char* tit...
For debugging running programs I often use whatever is integrated with the IDE I am using. QtDeveloper right now, but also used Eclipse, Netbeans and others. Most of them just use gdb under the hoo...
First of all, I've added a print in your code to show the dates: if days % 7 == 0 and current_day == 1: print(f'{current_year}-{current_month:>02}-{current_day:>02}') sundays += 1 ...
The current two top questions at https://software.codidact.com/ ( https://software.codidact.com/q/279699 and https://software.codidact.com/q/278674) are marked as coming from luap42: However, wh...
The Problem I have a path optimization problem that in some ways reminds me of the Traveling Salesman Problem, but differs in some key respects. I have a group of items that need to be used by a m...
It is true that MISRA-C has a heavy focus on embedded system, though it has become somewhat more generic over time. The MISRA guidelines have been changed and improved several times over the years ...
I agree. Something that might be more useful is to allow the text boxes to be resizeable by the user. In most places, there's a small tab on the lower-right corner of a text box that allows the use...