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
In C#, I have two lists and need to mark records in the first based on the second. Here's a sample: public class Vehicle { public string Make { get; set; } public string VIN { get; set;...
Is uint8_t guaranteed to be a character type if it exists? Will using a uint8_t* to examine bytes of an object cause violation of the strict aliasing rule? Is the following legal code: #include &l...
Consider an object for which a method is invoked. Beyond certain point the method no longer accesses this at all. No read/writes of non-static members. No invocation of non-static methods. Is it ...
No, such an operation is not safe. The documentation of std::unique_lock in the standard states that it's UB for the mutex do be destroyed while the lock still has a pointer to it. However, there ...
tl;dr: Allowing beginner-level "help me diagnose this" questions will generate large volumes of duplicates if the site ever scales. We need to think about how to structure things if we want them. ...
Historically, compiling programs could take a long time. Interpreted languages did not need to be compiled. So if developers wanted to change the program, if it was interpreted they could just twea...
I have developed an Atom package which calls SyncTeX (a utility for reverse lookup for LaTeX), and then opens in Atom the file specified in the SyncTeX response. I'm developing on Linux, but now a ...
As we have set up communities here on the Codidact network we've been appointing temporary moderators. Usually some people stand out from the proposal process and early activity. Ultimately, of c...
How do I delete contents of a specific field, if it matches a pattern, and there is nothing else in the field? I have a several GB tsv file, and I am interested in a specific field (72). If it cont...
As @Quasímodo has shown, the search pattern \(abc.*\)\@<!bird\|bird\(.*xyz\)\@! solves your problem. But, why does it work, and why does your original approach not work? What you want to achi...
Assume this trivial logic puzzle which I have made up: There are three boys, Fred, John and Max. No two of the boys have the same age. Max is older than John. Fred is not the oldest one. Quest...
Given the link where the code comes from (based on your other question), this is just a, let's say, "free-form/pseudo-code/documentation example". It's not a valid JavaScript code. It's more like...
Since accessing the memory allocated by malloc beyond the size given to the call is undefined behaviour (which means that the standard poses no restriction to the behaviour of a program that does t...
By "deeply clone", I assume you mean "also make copies of whatever nested structures the object might have". And for those, I guess libraries like Lodash are more reliable and appropriate if you wa...
There are a few reasons for wanting to move computation closer to data. One is performance, which you've mentioned. Another is security. Databases enforce their own security boundary, and data that...
Co I'm a database/desktop dev venturing into programming web apps using Angular and I've been informed 'functional reactive programming' is something I should be aware of. Some other site has a ge...
Currently, there is no consensus about whether to provide tooltips for the voting buttons (especially the downvote one). However, the community now includes quite a lot of questions that attracted ...
These two uses of if are different The if at the end of a list comprehension syntax: [num for num in hand if num != 11] is a filter; its purpose is to decide whether or not the resulting list ...
My actual motivation is to understand the semantics of the .gitignore file syntax in precise detail, for a program which is expected to emulate them as accurately as possible. However, while coming...
Git's interactive mode has a patch action. This is the shortcut for it: git add --patch <file> It will split the file into hunks and interactively ask which one's to add. It has a plethor...
Disclaimer: I am not a security expert nor a security professional. There is, of course, a relevant XKCD comic for this: The entropy numbers appear to be accurate based on this security.stackex...
RFC 3986 defines a suffix reference as follows (emphasis my own): 4.5. Suffix Reference The URI syntax is designed for unambiguous reference to resources and extensibility via the URI scheme. ...
Statements and expressions are two syntactic categories that are used by many programming languages. Since they are syntactic, they depend on the programming language's syntax. In a real sense, a s...
This isn't specific to git merge. The standard Git behaviour is that any content- or history-changing command operates on the current branch. For example, you cannot git commit to a branch other th...
Regarding undefined behavior/uninitialized variables of automatic storage duration First of all there's some misconceptions here. if (x == 0) is UB only because x was declared as a local variable...