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
I'm writing a function which reads specified sections in a text file formatted a particular way, but I'm having a hard time figuring out how to locate the last line number. Here's an example of the...
The Java Language Specification (citing the Java SE 24 edition, released on 2025-02-07) addresses this here: A record declaration is implicitly final. It is permitted for the declaration of a re...
Although record classes in Java are implicitly final, it's valid to add the final modifier/keyword when declaring a record: final public record Person(String name, String location) {} Does fina...
Cite good Q&A elsewhere For example: I was saddened to realize that, as of me writing this, a question and/or answer from Software Development has never been submitted on Hacker News. The doma...
There are at least two reasons I can see that would motivate this decision (and similar decisions generally), but first it pays to read what the documentation says. Quoting the pages you reference...
If reading the standard strictly by the letter then you are correct. And therefore both CERT and MISRA are picky with these kind of conversions because they strive to cover all poorly-defined behav...
callPackage is a complex function (reasons include the Nix language being lazy, usage of fixed-point evaluation, overrides, etc.), and this complexity steals the spotlight from what this function a...
Let's pretend Java was a capability-safe language. Now let's consider the IDE scenario and imagine that we want to support Copilot-like AI plugins that use a 3rd-party service. To access these ser...
However, the last variant has the advantage (at least in my opinion) that the condition The IV of the encryption is required for decryption is eliminated. It isn't really. It's just generated ...
I'm trying to update a ListBox widget after dropping some files on it. This is the relevant part of my current code: fn on_file_drop(target: &DropTarget, value: &Value, ...
I don't really see what good elementsof would do since sizeof(arr)/sizeof(*arr) is pretty idiomatic C and problem-free given that you know what you are doing, as is the case with most C code. IMO ...
I'm not sure how much this helps or inspires you, but there's an XML schema for the US Code and for bills and amendments to change it. See xml.house.gov and the GitHub repository for United States ...
Should I use the data-* attributes for this or is there a more idiomatic way? For context, I'm trying to convert annotated legal PDF documents to HTML. Certain parts of these documents are cross...
We use Kubernetes on a cloud (GKE, to be precise). We use RabbitMQ for messaging and we need to upgrade it from 3.10 to 3.12 . FWIW RabbitMQ has been added to our system using a chart from Bitnami...
For another perspective, I use TortoiseGit (https://tortoisegit.org/) on Windows a fair bit: Checkout the branch. Open the log window (Git Show log). Right-click on the commit/branch...
More specifically: Is there a dedicated docs page listing "properties" that are idiosyncratic to F# .fsproj project files? Why am I asking? Started learning F# a couple of days ago, but just now ...
I would need to check, but I don't think PostgreSQL or most (any?) relational databases have a good way of expressing this "at most 8" constraint. It may be possible to express it in some way but p...
strcpy(3) can be safe. Some compilers, such as GCC and Clang, use a feature test macro, _FORTIFY_SOURCE, (see feature_test_macros(7) https://man7.org/linux/man-pages/man7/feature_test_macros.7.htm...
The reverse proxy is frankly a "best practice" architecture, not just for security but also for resource limiting of your hard-working application server. Often the reverse proxy will communicate ...
Add the following to /etc/containers/registries.conf: unqualified-search-registries = ["docker.io"] [[registry]] location = "docker.io" Now you can pull just like you would in docker: podm...
Unlike docker, Podman won't (understandably) use docker hub by default. You can use it explicitly like this: (just using a random example here, it's an OpenAPI linter) podman pull docker.io/dshanl...
When writing a dynamic web service, you broadly speaking have two paths: Use an existing web server (e.g. Apache, Nginx or Lighttpd) to handle the "raw" web requests and implement your own cod...
First, a reminder to future self (the figure RFC 3986, Section 3. Syntax Components complemented with Section 3.2. Authority): The following are two example URIs and their component parts: ...
Generallly (assuming no exploit is found) it's not possible to escalate the privileges of an already running process, except via code that itself has kernel level access (running in ring 0 - this i...
When you try to do a privileged systemd operation without the privilege, you get an escalation prompt: $ systemctl stop docker ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ==== ...