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
Unlike many newer languages, SQL has a large number of keywords and relies on the reader's ability to distinguish keywords versus identifiers in order to mentally parse the syntax. The direct answ...
I have a PHP script which I want to call a Bash script which then in turn calls another PHP script. This may be completely unnecessary, but nonetheless. PHP script 1: // Borrowed from https://sta...
Broaden the scope (slightly) I noticed https://software.codidact.com/posts/292660 was closed due to being off-topic. That's fine on a site the size of Stack Overflow, where there are too many ques...
While compiling my scala project I'm getting following error. org.scala-lang.modules:scala-parser-combinators_2.13:2.4.0 requires scala version: 2.13.13 org.scalatest:scalatest_2.13:3.2.19 requ...
Where can I see the number of views for a specific question/answer? It motivates if i know more people are seeing the Question or Answer
I'm having trouble with an ffmpeg script that's supposed to convert videos to a specific resolution and frame rate, but the output video has unexpected dimensions and frame rate. Here's my script a...
To clarify why what you show can't work, it's because you are mixing build-time and run-time constructs. All the #xxx commands are to the C pre-processor. They are used to modify the source code ...
I handle this with: Create a new branch with same commits Delete commits from main branch In the situation shown, if you do git checkout -b new_branch it will create a new branch with the sa...
I'm currently working on a Java application using Jakarta Persistence with EclipseLink and PostgreSQL. While setting up the application to test the database layer, the persistence configuration is ...
I'm trying to write a Elastic Search query using the C# NEST client, but right now I'm stuck on an issue with a conditional query. The query takes in two optional values, meaning they are both all...
A pitfall in C++ that I didn't see mentioned in the other answer is that it might give unexpected results with libraries using expression templates. What are expression templates? In a nutshell, ...
I'm trying to work with a Go project that I'm taking over from another developer. The go.mod file says I need at least version 1.13, and I have 1.22.3 installed according to go version. However, wh...
I'm trying to containerize a SvelteKit application that uses the @sveltejs/adapter-node. The Build and Deploy section from the documentation recommends to build the application, and then run the a...
Original problem: https://stackoverflow.com/questions/37538/how-do-i-determine-the-size-of-my-array-in-c/57537491#57537491 Arrays in C are problematic. They are transformed into pointers too easi...
For the record, this write-up is not better than any of the resources listed in the question; writing it simply helped me better understand callPackage. Level 0. Poor, but short callPackage f att...
I'm trying to implement pytest for one of my Python Flask projects. The application is instanciated like this in appname.py def create_app(): app = Flask(__name__) app.config.from_pyfil...
I have a simple Spring Boot 3.x reactive application that exposes a RESTful API. The application uses Jdbi in the persistence layer, and the configuration for Jdbi is straightforward: @EnableTrans...
I have an "tensorflow.python.framework.ops.Graph" object loaded from a .pb file. def load_pb(path_to_pb): with tf.compat.v1.gfile.GFile(path_to_pb, "rb") as f: graph_def = tf.compat....
Usually a random IV is used for encryption with AES in CBC mode, so that key/IV pairs are not reused, which would be a vulnerability. During decryption, the IV of the encryption is required. If de...
general improvements Move everything that is directly related for the submission inside the if ... 'POST' condition. if ($_SERVER['REQUEST_METHOD'] == 'POST') { $to = '[email protected]'; ...
tl;dr: Use current_section.as_mut().unwrap() instead of just current_section.unwrap(). Ownership is a core language-supported concept in Rust and this means what might be a single method in most l...
Setup I have a database table with field of JSONB type. I access said database using Hibernate. In hibernate I have entity mapped on said table. Entity contains field marked with @JdbcTypeCode(...
I want to make multiple comparisons at once, of the same type, in a Python program. For example, to check whether all of a certain group of strings are in a longer test string; or whether a specifi...
If you want a best practice, I'm pretty sure the best practice is to do the straightforward and "naive" thing. From the perspective of OOP, your complaints are misguided. The unit of coherence isn'...
You're right about the recalculation, as you can see from some easy experimentation by rigging two (dynamic) properties and logging what each one gives you. public long TimeStamp1 { get; } = DateT...