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
print() normally adds text to STDOUT, it does not erase existing text. https://linux.codidact.com/posts/289869 describes various ways of doing the overwrite in shell scripts. How can you do this ...
If you're not importing it as a module but just including it through a <script> tag, you can't use the regular file. You'll need to use the UMD file instead. You can either include it from a ...
Context: I have a varchar column in a segment event table that contains version numbers. Most of these are formatted nicely as X.Y.Z (major.minor.patch) where X, Y, and Z are integers. However, the...
I am in need of downloading some files (from dynamic list of URLs) and archive them into a single zip file. Since these files can be arbitrarily sized (totaling hundreds of MB), I want to avoid dow...
You can use snippets for this. In the example below, when you type today and trigger completion (usually Ctrl+Space) you will see an option to insert the date by pressing Enter. Snippet code: "to...
Git can't do this natively, but you can use git in combination with another command, such as GNU xargs First of all, fetching many repos in parallel is likely not worth it. Git fetch is likely to ...
If I run ls() in R, it shows the variables (including functions) in my workspace. But there are other variables visible too, e.g. functions from packages like ls itself. And if I write a function...
One way to remove element from array is to replace element with zero. Below is a rough snippet I am sharing: int N = sc.nextInt(); int pos = sc.nextInt(); int A[] = new int[N]; if(pos == i) { ...
It means the program can give up early if checking the rest of a boolean expression is pointless. For example, naively to evaluate p and q you must check the value of both p and q, and then do the...
I've figured out that code --new-window /foo/bar/baz.txt will open baz.txt in a new window. But when I do this, it says "no folder opened" in the file explorer pane. That makes it hard to work with...
Unlike some other languages, all scoping in R is dynamic. When R evaluates an expression like print(b), it looks up the function print in the current "environment", and later will look up the v...
Based on what I know so far, there is no difference. Paket has been created more than 10 years ago to address (perceived?) shortcomings of NuGet. (Reading the .NET history made my head spin, and l...
Many older projects (i.e., older than 5 years) provide instructions to the Paket .NET dependency manager (e.g., Suave), so I started digging into it, got confused, then gave up for while because er...
My annotation processor "cannot be found" but everything ~looks okay. In Eclipse IDE, I created a new Maven project with the "quickstart-architype" resulting in a project with this structure: ___...
Does GnuTLS support CA Name Constraints (RFC 5280, 4.2.1.10), so you can limit the valid domains directly in the root CA? I'm not aware of any CAs that self-limit this way,[1] except for when the ...
In PHP why is using global like in the example below considered bad? $a = 1; class foo { public function bar() { global $a; // <-- Why is this considered bad? } } ...
SAML service provider (and other types as well) metadata XMLs are full of prefixes like md: and ds:. What do these mean? To illustrate my point, here's a sample metadata file from Wikipedia (CC-BY...
This question is inspired by If I have a char array containing strings with a null byte (\0) terminating each string, how would I add another string onto the end? on Stack Overflow. Suppose I have...
The library (inspired by stb libraries) attempts to provide some commonly used functions (reading a file into memory, determining the size of a file) that are missing from the C standard library po...
The obvious way would be to simply start with an empty list of lists, loop through the input, and for each item decide which sublist to put it in. It's not super dev-friendly to remember which lis...
ModuleNotFoundError means that in running your program, Python attempted to import some module xyz but it was not present on your system. It could be that you forgot to install the module (forgot ...
I resolved this by installing Microsoft's dotnet-sdk-8.0 instead of Ubuntu's dotnet-sdk-6.0. Here's a loose summary of Microsoft's instructions. Remove existing dotnet packages: sudo apt remo...
I'm evaluating JetBrains Rider 2023.3 on Linux and almost immediately ran into a compiler warning that I don't understand. Attempting to isolate it, I created a new solution containing a .NET 6 cla...
Sounds like you may also have a problem with your database structure. A query that fetches 800 records from a table with only those 800 records in it should not take a full second - it should be mi...
The Python ternary "operator" is if and else: x = 1 if some_condition else 0 In Python, this is called a "conditional expression" rather than an operator, and the documentation explains it: htt...