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.
General Q&A about programming, scripting, software design & architecture, process, tools, testing, and more.
Filters (None)
I loaded a binary into Ghidra for analysis. The decompiler says undefined8 main(void) { basic_ostream *pbVar1; char *pcVar2; [--snip--] pbVar1 = std::operator<<(pbVar1,"PXZ ");...
For example, given this function head, this is the hint that is generated: let updateCell workbook sheetIndex rowIndex columnIndex value = // XSSFWorkbook -> int -> int -> int -> stri...
I have the following code: use serde::{Deserialize, Serialize}; #[derive(Sereialize, Deserialize)] struct Container<const SIZE: usize> { contents: [String; SIZE] } But I'm getti...
I know that I can display a single string in the terminal window like print("example") (or similarly with a string in a variable), and I know how to open text files and write to them. I also know ...
I am writing a Python package where I have two classes in different files that (indirectly) depend on each other. If I wouldn't care about type-hints, there would be no problem, but unfortunately,...
I like using NATURAL JOIN in Snowflake, because I find it more elegant than explicit join clauses. However, it appears that the natural join behaves similar to an inner join, in that null values o...
Just getting into F#, finally figured out how to add .NET packages to projects, but the way I managed to get it to work doesn't make sense. Once the package is installed (either with nuget or paket...
Sometimes code needs to assign (or otherwise use) a value that depends on some condition. The naive approach is to use explicit branching, which in Python would look like: if some_condition(): ...
Context I have started working on an Angular upgrade for a medium-sized project (from v. 10 to v. 15) and this is a rather long activity that is interrupted by other changes that need to be perfor...
What factors should be considered when choosing web security measures for a site?
I wanna make a form in React native. A field in this form in (non-native) React would be like this: <div> <label htmlFor="lastName">Last Name:</label> <input type="text...
Hi, I'm trying to code an Enigma machine in Haskell which were used by the German in WWII to transmit coded messages. An Enigma Machine consists of 3 rotors which are substitution ciphers and a re...
There may be a better way to manage website's with JavaScript deployments. I added jest to my repo simply to execute tests when I make PRs as part of a GitHub action. This requires a package-lock.j...
Let's say we have an object, we store it in a union (into some other narrower type, but with memcpy(3), so it's allowed --I guess--), and then read it from the union via it's original type (so no a...
Salut, quelle solution de paiement e-commerce avec 0% de commission me proposerez vous ?
Suppose I have some code like: filename = "bad_dir" print(f"File not found: {filename}.") raise(FileNotFoundError) When the exception isn't caught, the stack trace is printed at the end of ...
Is it possible for a Python program to send itself in the background? For example, on Linux you can do nohup some_cmd & and any program will run in the background. Some programs also support s...
I do need to create an email template using components where the wrapped text left side (td - 50%) is overlapping with the image ( td - 50%) like Venn Diagrams... Not exactly but somehow... I came...
We have done a reverse proxy to forward blog.example.com to example.com/blog. As I think it gives great help in getting the “link juice” to the root domain. However, I am concerned about any possi...
In a media manager I have database tables for files, media and collections. When a user is browsing a collection I want there to be links to see the metadata for single file media like books, movi...
I tried using query selector but it does not work heres my HTML code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>JS + CSS Clock<...
Functions in C have external linkage by default. In other words, the storage class specifier extern is applied to functions by default, with the effect that they are visible to all translation unit...
I have to implement a JSON based REST web service for querying literature. Ordinary users should be able to query data and process it in their clients. The "main user" can adapt database entries vi...
My large, multi-module Maven project validation (Maven Enforcer plug-in) is playing tricks on me. moduleA> mvn validate correctly finds all modules runs enforcer on all of them displays co...
I am looking for a way to programmatically edit and save .dbc files that are meant for J1939 CAN communication. I have a few large files that need to be compared/edited. Being able to import, edit...
A well-known easter egg in Python displays some ideas about writing good Python code, credited to Tim Peters (one of the core developers). This question is about the last: Namespaces are one hon...
Suppose I have two variables that are called animal and age, and print them as a string in the console like so: animal = "giraffe" age = 25 print("A %s can live up to %d years" %(animal,age)) ...
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 ...
Context Using the lemmy API, I'm trying to get a list of sublemmies (lemmy communities) that a user is following. Reading the documentation, I using the /site endpoint, I should be able to get a ...
I'm trying to subclass pdb to have a debugger that, in case of a call to a decorated function, can "step in" the decorated function directly and skip the decorator content altogether. A well-behave...
I'm trying to make a UWP app in Visual studio, but the NuGet package files have been huge. They just don't fit on my SSD, but I do have an HDD I could theoretically use. After a bunch of tinkering...
I would like to use tf.timestamp() when it is available (eager mode and graph mode without XLA), and use 0. (or a better fallback if there is one) when it is not available (with XLA; @tf.function(j...
I'm trying to create an automatic text-to-link conversion feature in a TypeScript application. The desired workflow is: Copy a URL to the clipboard Select some text Paste the URL - this should...
Can anyone explain to me why my Haskell function gives rise to a type-definition error? Originally, I wrote the following function to subtract one from the first n elements in a list: dec_first :...
I'm experiencing an issue where my program appears to freeze when executing the post_comments_to_lemmy function. This function fetches comments from the GitHub API and posts them to a Lemmy instanc...
Are any of the popular Excel .NET projects have a functionality similar to Apache POI's DataValidationEvaluator class?
In git you can put your current changes aside for a moment with git stash. This is really neat but what often ends up happening is that you forget what was in there, and what was the state of the b...
The question is about libraries that extend the data type system to ensure physically realistic computations. Think std::chrono but for distance and mass and other things as well as for time. Inste...
When running various Python scripts, I often need to do this annoying dance: $ python script.py ... ModuleNotFoundError: No module named 'foo' $ pip install foo $ python script.py ... Module...
So I am in the process of creating a voxel sandbox survival game (minecraft clone) in javaFX. I am at a point where I need to come up with a way to load the chunks in my surrounding given a render ...
I want to pass a variable to TeamCity (on prem) to choose between deployment environments (there are 14 of 'em - don't ask) when running a TC deployment configuration build which uses a PowerShell ...
A page is very slow and laggy in Firefox. I am certain it's one of the many Javascripts slowing it down. Out of curiosity, I'd like to figure out which script is creating the heaviest load. Note t...
How should I deploy my Full Stack Angular Application (MEAN Stack) project on free hosting website? Github I have provided below the github link of the project for the better understanding. Prob...
Suppose you have a jinja template like this: I am going to {{ foo }} to get some {{ bar }}. I hope I can find: {% for i in baz %} - {{i}} {% endfor %} This template will require you to pass ...
In JSON Schema one can use the additionalProperties key to validate properties whose names are not know. You can still impose restrictions on their type. How to do this in an Ansible role argument...
Note: this is based on my question on SO and subsequent activity there I am trying to add resilience using Polly to HTTP calls that are performed using Refit library. I am using the Refit factory...
I have a very simple source file -- HelloWorld.java public class HelloWorld { public static void main(String[] args) { System.out.println("hello world"); } } I have th...
I have a query summarizing some transaction data that I'd like to summarize by day of week. For my use case, I need to return weekdays formatted according to ISO 8601, so Monday must be the first d...
What does it mean that we can use memcmp(3) on invalid values? ISO C allows comparing an invalid value through memcmp(3), because it doesn't read the value, but rather its representation, and "rea...