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 have a dataset of car bookings like this: car_id user_id 1 1 2 1 1 2 3 3 1 2 3 3 In this dataset, two separate groups/sets of cars and users...
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...
I am in need of downloading some files (from dynamic list of URLs) and archive them into a single zip file. Since these files can be arbitrarily sized (totaling hundreds of MB), I want to avoid dow...
As far as I can tell, it is in part determined by the HTML spec's History API1, specifically the value of history.scrollRestoration. Quoting the HTML spec's scroll restoration mode paragraph: ...
According to this article: Since encryption is two-way, the data can be decrypted so it is readable again. Hashing, on the other hand, is one-way, meaning the plaintext is scrambled into a uniqu...
Amazon product URLs are often very long, but on experimentation it is revealed that the following pattern is sufficient: https://www.amazon.com/{dp|gp}/$ID ID is a 10-char string, which I'm gue...
I'm trying to write a bash function that can sanitize filenames to make them compatible with both Linux and Windows file systems. The function should perform the following operations: Replace in...
MWE import random import pandas as pd from itertools import product random.seed(12345) dies = [1, 2] cells = list(range(10)) currents = [100, 200, 300] dcc = list(product(dies, ce...
Consider the following arbitrarily-nested JSON as input to a jq filter: echo '[{"foo": [1, 2]}, {"bar": [{"baz": ["foo", "baz"]}]}]' | jq '.' My goal is to join leaf arrays into strings: [{"fo...
I'm trying to replace Flot.js with Chart.js. In my application, Flot.js is included as a normal JavaScript file, like so: <script language="javascript" type="text/javascript" src="jquery.flot-...
As this is the first question about Google Apps Script, here is a very brief description: it is a platform that helps people easily get programmatic access to Google apps data like Gmail messages, ...
This question is inspired by If I have a char array containing strings with a null byte (\0) terminating each string, how would I add another string onto the end? on Stack Overflow. Suppose I have...
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...
Among other things, a URL consists of a host and a path: I was wondering (and couldn't find anything) if there's a name for the combination of host and path. Is there a name for these: examp...
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 ...
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...
Ansible's extract filter is supposedly made for use in map, but at the time of writing the documentation doesn't actually show how to use it together with the map filter. The following outputs VAR...
Having some trouble with giraffe-template on Mac M1, so decided to set up a Giraffe project manually. Started following the Doing it manually section of the Giraffe README, but got stuck right away...
According to the standard (C17 draft, 7.22.3.2) The function calloc void *calloc(size_t nmemb, size_t size); "allocates space for an array of nmemb objects, each of whose size is size [and] i...
How do I add functionality to the back button in Android without reimplementing the back button entirely? Prior to last year, I would just call onBackPressed() and then simply override it: overri...
The proposed library would sit alongside cross-platform libraries in Xamarin apps for iOS and Android. However, it would include files with names like MyLibraryFile.android.cs MyLibraryFile.ios...
I regularly run into the problem that I have a Python function that I want to use in both, eager and graph execution mode. I therefore have to adjust the code so that it can handle both situations....
I have little to no idea what happens after a client obtains the server's certificate. It has to make sure that it (somehow) valid, but how?
We have a console application using the Azure WebJob SDK. The WebJob relies on a WCF service using SOAP, which it accesses through a DLL we wrote that wraps the auto-generated WCF types in somethin...
I'm currently writing an input and output handling library for the D language, and I'm not getting any kind of input language change messages when the language is being toggled with hotkeys, and on...
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...
Temporary notice: this is part of an ongoing project of transferring and splitting my canonical from Stack Overflow on common errors in Google Apps Script. As soon as the Q&As are finalized, ...
How to verify if a year is leap? Given a numeric value (such as 2023) or some object that represents a date (such as Date, Calendar, LocalDate, etc), how can I do it?
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 have a large and complex PostgreSQL SELECT query that I would like to make faster. EXPLAIN suggests it should run quickly, with the worst parts being scans of a few thousand rows. When run, it do...
In Godot 4.1.1 I moved some scenes and started getting parenting errors. I think I got that fixed, but I'm mentioning it in case it is important. I have an Area2d called House. house.gd has two c...
I am working with PHP and RedBean PHP ORM. I have a table user like so: id | username ---|--------- 1 | Alice 2 | Bob I want Alice and Bob to become friends. So I want to create M-M juncti...
Context Our team is developing a solution mainly composed of several microservices relying on ASP.NET Core. We have decided that the simplest and most cost-effective solution would be for service...
In a C implementation in <stdio.h> on Linux I saw something like: extern FILE *__stdinp; extern FILE *__stdoutp; extern FILE *__stderrp; And then: #define stdin __stdinp #define stdou...
So I googled some on how to make a case insensitive criteria query but could not find the solution very easily. So I basically have code that looks like this: ... query.criteria("fieldName").con...
Asked How to implement map using the fish (>=>, Kleisli composition) operator in F#? a couple of hours ago, and r~~'s answer blew my mind: let map f = id >=> switch f It is perfect ...
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'm completing the rustlings exercises as part of self-teaching Rust. While working on the third iterators exercise, I solved the exercise but don't quite understand why my solution works. Specifi...
How do I clone the repository with only part of the history? For example, let's say I want to download only the last 5 commits out of thousands.
I have a git repository with some submodules. When the submodule repos get new commits on the remote, how can I pull them all?
TL;DR: How to pass a interpolated double vector, such as a dvec2, from the vertex shader to the fragment shader? I have a vertex shader. In this the output variable out vec2 uv; is set. And i have...
I need to use azure.cognitiveservices.speech. However I am getting this error: Here is code on replit it produces the same error. https://replit.com/@mystickain420/Chatty main -- https://githu...
I'm looking at the behaviour of Chrome and my test framework and trying to understand what the correct behaviour should be before raising an issue/ticket on one or the other (or revisiting how my t...
I've my go app the is running a web API and working smoothly at my laptop. I read this and completed the IIS setup using a config file: <configuration> <system.webServer> ...
I have text (xml actually) files. Some files contain 'foo', some contain 'bar', some contain neither and some contain both. It's the both I'm interested in. How do I do an AND search on words in...
The exam checking for the backend is working perfectly well but the front end keeps saying an error occurred. Am like ok then tried the demo version replaced the javascript and everything i can rep...
How to use static functions in ColdFusion? How to import component? How to call a static function using both tag and script syntaxes? Adobe added support for static functions in ColdFusion...
What I would like to do I would like to try to build a language model 100% from scratch if possible, for a learning experience. That means no external libraries and no pre-curated datasets. It ...
I'd like to organize my Matlab packages into folders. However, if I try to lay out my code like this +MyPackage |---foo.m |---SubDir |---bar.m then I'm unable to reach bar. F...