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 building a Flask application with user login functionality using Flask-WTF for form handling and Flask-Login for user authentication. However, I am unable to log in successfully. The page does ...
Pointer conversions and aliasing First of all, C historically allows all manner of crazy pointer conversions (whereas C++ is more restrictive) between compatible and non-compatible pointed-at type...
C23 6.7.3.6 contains this (informative) example demonstrating the use of typeof_unqual: const char* const animals[] = { "aardvark", "bluejay", "catte", }; typeof_unqual(animals) anima...
I did a quick test using LINQPad and it looks as though .Select() does not necessarily preserve capacity. For .Where() and .OfType() the capacity depends on the count, though it doesn't necessarily...
The C23 example as well as clang are correct. This is apparently a gcc bug in the latest 14.2 release, fixed in the "gcc (trunk)" unreleased version. The relevant part of the C23 standard here is ...
Going from fp32 to fp16 is done usually by essentially just rounding the weights. To this end, you should expect pretty close to a 2:1 reduction in size. (Of course, not everything is weights, but ...
I see on https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct/tree/main/onnx: File Name Size model.onnx 654 MB model_fp16.onnx 327 MB model_q4.onnx 200 MB m...
The explanation is that human languages are fundamentally confusing on this, but, because humans tend to be somewhat blind to complexities in systems that they've literally been the only thing they...
I'm trying to implement bases and overlays for some Kubernetes configurations that I have, but I'm running into an issue where labels and annotations are not being applied correctly to some specifi...
This works for me in both bash and zsh on Debian 12. I can't guarantee it will work the same on every platform and shell. EDITOR=echo git config --global --edit 2>/dev/null or, if you prefer...
(Brought over from SE.) The following code implements a simple interface to operate on mutable* Strings in C. It is composed of two files: one for the structure definition and the available oper...
I have two vps: First one is used for vpn/proxy. It runs 3x-ui that, simply saying, allows to create and manage vpn/proxy with UI. VPS' ip is connected to https://new-york.vpn.utils.example.co...
There are a few fields that play into this, but the gist of it is to set the Pod's restartPolicy to Never. This doesn't mean that the Job only tries once. Rather, instead of restarting the containe...
(Brought over from SE.) This is a Bash script that copies files stored inside disk images to a directory, using a defined structure provided via a JSON file. I've included the external programs ...
Note that, by declaring sh as the language, you have implicitly declared "a # introduces a comment", because that's what is implied by the sh syntax. But you say you don't want that interpretation...
This question was originally asked in SE. I have a program that draws lines using line drawing algorithms. I use gcc 5.2.1 on Xubuntu 15.10 to compile it. Executing it throws a "Segment violati...
I'm currently working with Apache Camel in a Quarkus application. I would like to configure the application to not discover any routes by default, and only include those defined in specific package...
I answered myself as it can be found here. Silly me! The root of the entire problem was the type used in both point.x and point.y: typedef unsigned int uint; typedef struct { uint x; ...
I have a program that reads a hexadecimal string representation from a configuration file, turns it into a GdkRGBA struct from Gdk, uses gtk_color_dialog_button_set_rgba () to set it as the default...
I ended up implementing it like this: #define RGB_HEX_STRING_LENGTH 8 gchar * gdkrgba_to_rgb_hex_string (const GdkRGBA *const from) { guchar red = roundf (from->red * 255.0f); guchar...
How to list all available helm charts in a helm repository, preferrably using the native helm CLI tool? This command lists the repos themselves, but I've yet to discover how to list their contents...
Since setState is asynchronously executed, how to dynamically do something after a useState variable has been set? Consider import { useState } from "react"; const [myVar, setMyVar] = useState("...
Helm keeps track of releases and their revisions by creating a kubernetes Secret each time a chart is installed, upgraded etc. These are of course useful in case you want to rollback, but they do p...
Normally gateways just do routing and maybe load balancing. That's one well-defined job that can be done well. You are adding a second job, which is to be a universal adapter. An adapter would be ...
Yes, it is cheating, but I gave up with my question as originally stated, and settled for an x,y "view" in any function that must play with a given .items length by adding: char (*pixy)[len] = (ch...