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)
#include<stdio.h> #include<stdlib.h> int main (void){ FILE *cfPtr; char name[15]; int ID; if ((cfPtr = fopen("draft.txt","w")) == NULL){ printf("File could n...
Hi How can I boot from usb key containing popos system without disabling secure boot in bios ? thanks
I've heard that in modern C++, smart pointers are preferred to raw pointers for ownership (the so-called RAII principle, as I understand it). This makes sense, and since then I've always used them...
Unable to boot from manjaro usb key it looks like it is due to secure boot how can I do it without disabling the secure boot
Consider this code: #include <stdio.h> int main(void) { static void *ptr; if(ptr == NULL) puts("It's NULL!"); } I wonder if this is guaranteed to print "It's NULL!" I know ...
I am making a game using JavaFX and the Fxyz library. I have chunks which are made of Point3D's, these points are then passed to a ScatterMesh and that is used to generate a TriangleMesh so I can m...
By means of content management system architecture, Is the implementation of decoupling architecture (backend and frontend separation), headless architecture and Representational State Transfer (R...
Hey, regarding a question on returning pointers as functions, why does my code produce this error & won't print out the sum = 6? #include<stdio.h> #include<stdlib.h> int *A...
I'm trying to write a MIME message to the console. ByteArrayOutputStream out = new ByteArrayOutputStream(); MimeMultipart replyMsg = mdnCreator.createMDNData(); replyMsg.writeTo(out); out.close...
I am building an MVC cart system. I have the MERCHANTS table and the PRODUCTS table. A merchant (store) can have one or more products, everything works fine but what I want is to display products b...
I have a parent div with two child divs. I want the parent div and the child divs to have a blue background color when it's hovered. But the child divs doesn't inherit the background color. It is o...
Having recently learned about protocols in Python, I now wonder if you can write a protocol for enumerations. That is, a protocol that says that you are supposed to pass an enum that has certain it...
In a website I didn't build, I want to put a value in an HTML input field element with JavaScript and to also use it as-putted. I can put it with the browser console this way: document.querySelec...
This program creates a child process and shares two integers (base and height) through the shared memory. The parent process asks four times to insert two integers and wait for the child process t...
Our team is finally focusing on writing more automatic testing and one of my ex-colleagues recommended to try out the Verify library. The tool does the following: runs the test and compares the...
I have this bootstrap code (grid) <div class="container p-3 center"> <div class="row"> <div class="bg-light border-bottom border-secondary border-top col-6 te...
Using Angular-IMask, I'm programatically updating the field that has IMask. So I'm getting the error: "Element value was changed outside of mask. Syncronize mask using mask.updateValue() to work p...
Agner Fog has this C++ Vector Class Library, which is ... useful for improving code performance where speed is critical and where the compiler is unable to vectorize the code automatically in an...
I am trying to combine MVVM in WPF using Microsoft.Toolkit.MVVM. Somethings are working as expected. The text boxes bind to fields and update in both directions. The button command executes and cha...
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" id="Capa_1" x="0px...
When I tried to emulate the app that I coded in the connected phone, it keeps closing due to crashes, is there any problem with my code? Also, I am trying to make a timer app with picture and pict...
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...
The answer for this question is that there is something wrong with the expression of the first guard of this function below: congratulations :: [(String, Int)] -> [String] congratulations [] =...
It would seem that the C standard library is a collection of diverse functions that pretty much just ended up in the standard by tradition or "accident", rather than through some careful plan or ra...
query = "CREATE TABLE "+TABLE+" ("+COLUMN1+" INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, "+COLUMN2+" VARCHAR(255), " + COLUMN3+" VARCHAR(255), "+COLUMN4+" TEXT, "+ COLUMN5+" VARCHAR(255)...
I've been trying to get Amazon SQS working with the v3 JS client. I've gotten to the point where I can successfully create a queue using the frontend, but the issue starts when I try and send/recei...
What exactly is the Python Global Interpreter Lock (GIL)? As someone who is relatively new to Python, is this something I need to be aware of, or is this just some implementation detail of the inte...
Is it undefined behaviour to cast an uninitialized variable to (void)? Example: int main() { int x; (void)x; return 0; }
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 ...
I have a JavaScript file in GitHub which I typically run by copy-pasting all its data into different user script managers (USMs) on different web browsers. I need to start executing that remote fi...
I am developing an application that targets Linux-based OS, and I need to store the user's configuration, metadata and other things in a persistent way (i.e. on the file system). I know that one c...
I need to apply backend behavior (PHP directives in my case) to an HTML <form>. The backend behavior I wish to apply to the form is in this pattern (behavior.php): <?php $name = $_POST...
So to preface I started a new JavaFX project in IntelliJ and all of this is from what was auto-generated out of the box. The modules I'm having trouble with are Edit to make this post more query...
Title says it all. I found "Step into external code" but not sure if it's the same feature.
I'd like to assert that some code can be optimized out, and is not present in the final binary object. #define CONSTANT 0 #if (!CONSTANT) [[landmine_A]] #endif static int foo(void); void...
MWE In the terminal run: mkdir mwe cd mwe mkdir dir touch f1.txt f2.pdf dir/f1.txt dir/f2.pdf git init . Create a .gitignore with: * # ignore all !dir/ # except this directory ...
If my struct column has the data type of struct<string, integer> then what should be the equivalent java object that should be inserted into that struct column? I'm trying the following code...
I am trying to re-build an unpacked apk, because it was unpacked the required libraries are already included, deleting the prepacked libraries would be feasible if it weren't for the fact that some...
Let's say I have a variant that can hold a bunch of different types of values (say I got them from parsing a JSON or similar). using Value = std::variant<std::monostate, int, double, std::strin...
It's not possible to send data to amazon prime and disney+hotstar. I was trying to send user to amazon prime when they click a (video) link (e.g. https://www.amazon.com/gp/video/detail/B01MSPI8JN/r...
I have a variable defined using const keyword. function Text() { const variable = "Hello!"; } console.log(variable); When I try to access this variable, I get: Uncaught ReferenceError...
One of the legacy applications my team has to maintain has almost always this pattern for dealing with data modification: try { // get the connection // begin transaction // optional...
So I was looking around for some async solutions and I found one on github, https://github.com/electronicarts/ea-async I follow the setup instructions for maven. Only to realize it didn't work (I ...
How can I upload images or files to strapi using graphQl. I'm using Cloudinary as the image provider. The strapi admin panel works fine, uploads the images to cloudinary. But, when using graphQl m...
I had found a better way to plot in Java. int n = Integer.parseInt(args[0]); // the function y = sin(4x) + sin(20x), sampled at n+1 points // between x = 0 and x = pi ...
I want to change the font-family of all elements in a document with JavaScript. I have tried this: document.querySelectorAll("body").forEach( (e)=>{ e.style.fontFamily = "arial"; }); ...
The following code pattern reflects this answer. This code contains a for...of loop: for (const child of e.childNodes) { // Do stuff; } Does a for...of loop must contain a variable without...
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...
I have a project Anonymised.Theme which contains XAML resource dictionaries for a theme. This is used by about a dozen applications which simply include it by merging <ResourceDictionary Source...
I am attempting to write a program to simulate Hunt The Wumpus in the K programming language. The game requires a grid that is created by the vertices of a Dodecahedron, which is cyclic and triangu...