Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

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)
81%
+7 −0
How do I add functionality to the back button?

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...

1 answer  ·  posted 10mo ago by Ullallulloo‭  ·  edited 9mo ago by Ullallulloo‭

66%
+2 −0
Can I package a database other than SQLite with a Flutter app?

Flutter supports packaging a SQLite instance with a Flutter app using the Sqflite plugin. I do not like the speed of SQLite or the fact that it does not enforce column datatypes and want to use som...

0 answers  ·  posted 10mo ago by tarhalda‭  ·  edited 10mo ago by tarhalda‭

83%
+8 −0
What are disadvantages of static functions (ie functions with internal linkage) in C?

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...

3 answers  ·  posted 10mo ago by Lover of Structure‭  ·  last activity 10mo ago by Dirk Herrmann‭

57%
+2 −1
Can pandas be used as a database backend for persistent storage?

Question What is the current state of the art database app? How does it compare to SQL? Can pandas be used in place of either? If not, is there something that bridges the gap between SQL and pand...

2 answers  ·  posted 10mo ago by mcp‭  ·  last activity 10mo ago by matthewsnyder‭

63%
+5 −2
Prevent vscode from inserting new lines in the middle of my code on format.

I am cleaning up java code in vscode to make it more readable. When I format my document there are instances when vscode inserts new line character when I don't want it. Here I show 2 examples of w...

1 answer  ·  posted 10mo ago by Vanity Slug ❤️‭  ·  edited 10mo ago by Vanity Slug ❤️‭

77%
+5 −0
Programmatically import, edit and export DBC files

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...

1 answer  ·  posted 10mo ago by HinkyDinky‭  ·  last activity 9mo ago by HinkyDinky‭

77%
+5 −0
Lemmy API: how to get list of followed/subscribed communities.

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 ...

1 answer  ·  posted 10mo ago by elvis_depresley‭  ·  last activity 9mo ago by tgxn‭

71%
+3 −0
Problems with Google Apps Script API JavaScript "How to... Execute function"

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, ...

1 answer  ·  posted 10mo ago by Wicket‭  ·  last activity 10mo ago by Wicket‭

80%
+6 −0
How do I find disjoint sets in a dataset

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...

2 answers  ·  posted 10mo ago by andreas‭  ·  edited 10mo ago by matthewsnyder‭

77%
+5 −0
Possible drawbacks for having duplicate local sources of the project tracking the same Git remote

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...

2 answers  ·  posted 10mo ago by Alexei‭  ·  last activity 10mo ago by Andrew‭

50%
+0 −0
How to move Rancher Desktop virtual disk file to another location?

I am using Rancher Desktop as an alternative to Docker Desktop. After using docker for a while I have noticed that C:\Users\user\AppData\Local\Docker\wsl\data\ext4.vhdx has grown quite a bit (20GB+...

1 answer  ·  posted 10mo ago by Alexei‭  ·  last activity 10mo ago by Alexei‭

77%
+5 −0
How to configure Python pip to look for packages in a private index first?

When I run pip install foo, pip looks for foo in PyPi. I want it to look for it first in a private repo, let's say pypi.bar.com. Only if foo cannot be found in pypi.bar.com, should pip then look f...

1 answer  ·  posted 10mo ago by matthewsnyder‭  ·  last activity 10mo ago by tripleee‭

71%
+3 −0
Running mvn validate does not show rules passed message though it should

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...

0 answers  ·  posted 10mo ago by LAFK‭

75%
+4 −0
How to make Husky run git hook?

How to make Husky run git hook? I have a working git hook, prepare-commit-message, but the moment Husky was installed, the hook stopped working. Not finding much luck, I then tried to make it a "H...

1 answer  ·  posted 10mo ago by LAFK‭  ·  edited 10mo ago by Alexei‭

60%
+1 −0
What is lifting state up in Flutter?

What does lifting state up in Flutter mean, and how does it work?

1 answer  ·  posted 10mo ago by tarhalda‭  ·  last activity 10mo ago by tarhalda‭

71%
+3 −0
Clear selectManyMenu component if user unselects item in JSF 2

I am working with JSF 2.3 and have a selectManyMenu component that is marked as required but that I want to be cleared if the user unselects all items. Currently, the user can unselect all items, b...

1 answer  ·  posted 10mo ago by tarhalda‭  ·  edited 7mo ago by BalusC‭

77%
+5 −0
Using DBUS and GTK in one perl program

Perl is by far the language I have the most experience with, and I have (big) parts of the functionality I want in the new program in existing programs. So I'm looking for a way to do this in perl,...

1 answer  ·  posted 10mo ago by Grove‭  ·  last activity 10mo ago by deleted user

75%
+4 −0
How to use self referential N-M relationship to make 2 users friends using RedBean PHP ORM?

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...

0 answers  ·  posted 10mo ago by Vanity Slug ❤️‭

75%
+7 −1
Automatically install all packages needed

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...

3 answers  ·  posted 10mo ago by matthewsnyder‭  ·  last activity 8mo ago by meta user‭

75%
+4 −0
DocuSign eSignature API SDK: java.lang.NoClassDefFoundError errors.

I am trying to implement DocuSign's eSignature REST API by using Java SDK. I am following instructions here: https://developers.docusign.com/docs/esign-rest-api/sdks/java/setup-and-configuration/ ...

1 answer  ·  posted 10mo ago by Vanity Slug ❤️‭  ·  last activity 10mo ago by Vanity Slug ❤️‭

66%
+2 −0
How can I return XML from BeforeSendRequest and AfterReceiveReply to the calling method in a thread-safe way?

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...

1 answer  ·  posted 10mo ago by Celarix‭  ·  edited 10mo ago by Alexei‭

75%
+4 −0
Postgres command-line variable substitution error

According to the psql (version 14) man page, it's possible to set variables using the -v command-line parameter, then use the variable in a query, automatically quoted correctly, with :'variable_na...

1 answer  ·  posted 10mo ago by Andrew‭  ·  last activity 10mo ago by matthewsnyder‭

75%
+4 −0
How to prevent Visual Studio Code from opening an extra blank window?

When I run code . in a directory, Visual Studio Code opens two windows. The first is empty, the second shows directory I was in as expected. I checked ~/.config/VSCode/Workspaces and there is only...

2 answers  ·  posted 10mo ago by matthewsnyder‭  ·  last activity 10mo ago by matthewsnyder‭

50%
+1 −1
How to migrate after SQLalchemy schema changes?

When I set up my object mappings with SQLalchemy, everything works well enough. It even creates the tables for me if they don't exist. However, if I decide to add/remove columns (aka fields) from ...

0 answers  ·  posted 10mo ago by matthewsnyder‭  ·  edited 10mo ago by Alexei‭

84%
+9 −0
grep AND search for multiple words in files

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...

5 answers  ·  posted 11mo ago by mcalex‭  ·  last activity 10mo ago by tripleee‭

75%
+4 −0
When is it OK for duplication of information between message header and payload in a distributed software application?

A friend is involved in rewriting a distributed software application and while discussing the architecture, we noticed that in many cases the messages had duplication between headers and payload. ...

1 answer  ·  posted 11mo ago by Alexei‭  ·  last activity 11mo ago by Derek Elkins‭

66%
+2 −0
Generating nested repeating values with JSON Generator

Hi, I'm trying to use the JSON Generator to create data with nested repeating values. I want to create 100 objects with an ID, Name, and Code. The Id is incremented from 0 to 99, but the Code (pr...

1 answer  ·  posted 11mo ago by mcalex‭  ·  last activity 11mo ago by __blackjack__‭

70%
+5 −1
Queries to count points lying on arbitrary line

Suppose we have N points on XY plane, ie. (x, y) and x, y are integers and multiple queries where each query is of the form y = mx + c and m, c are integers. Is it possible to count number of poin...

2 answers  ·  posted 11mo ago by theabbie‭  ·  last activity 10mo ago by matthewsnyder‭

75%
+4 −0
Are there other reasons why useEffect might not be defined apart from not importing it?

I am creating a button that once clicked will change from off to on with react and i am also creating a responsive clock through useEffect. Yet the code still return that useEffect is undefined th...

2 answers  ·  posted 11mo ago by Brian‭  ·  last activity 11mo ago by jmathew‭

71%
+3 −0
How do I return ISO day of week in Redshift?

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...

1 answer  ·  posted 11mo ago by Sigma‭  ·  last activity 11mo ago by trichoplax‭

77%
+5 −0
Storing more bytes than a union member has, but less than the union size, with memcpy(3)

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...

2 answers  ·  posted 11mo ago by alx‭  ·  last activity 11mo ago by Lundin‭

77%
+5 −0
Library that is platform-specific via selective compilation?

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...

1 answer  ·  posted 11mo ago by plod‭  ·  last activity 11mo ago by Olin Lathrop‭

71%
+3 −0
Is it possible to get the current function in a trace function?

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...

1 answer  ·  posted 12mo ago by luser‭  ·  last activity 12mo ago by r~~‭

75%
+4 −0
Can Matlab packages have subdirectories?

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...

1 answer  ·  posted 12mo ago by zaen‭  ·  last activity 12mo ago by zaen‭

70%
+5 −1
Read all data from TCP stream in Rust

I'd like to write a TCP client in Rust that can receive the entire message sent by a server, but I have no information about the length of a message. I'm aware that TCP doesn't preserve message bo...

1 answer  ·  posted 12mo ago by Matthias Braun‭  ·  edited 12mo ago by Matthias Braun‭

66%
+2 −0
Remove entries by two-column ID everywhere, that meet a condition somewhere

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...

3 answers  ·  posted 1y ago by mcp‭  ·  edited 7mo ago by mcp‭

57%
+6 −4
Why can parentheses cause exceptions in Python when using for loops?

Using parentheses in Javascript is always needed when you want to create functions, if/else statements and for/while loops. But in Python it has a function that is called tuples. When using an if s...

1 answer  ·  posted 1y ago by Bennshinpoes‭  ·  edited 1y ago by trichoplax‭

50%
+0 −0
PHP code is not excluding the watched videos.

Can someone explain why this PHP code is not excluding the watched videos? The email_id parameter is used to specify the location of the watched videos array. The code should remove the watched_vi...

1 answer  ·  posted 1y ago by Collins ‭  ·  last activity 12mo ago by dagelf‭

60%
+1 −0
Ignore NPM Modules Digital Ocean App Platform

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...

1 answer  ·  posted 1y ago by fausty‭  ·  last activity 1y ago by fausty‭

71%
+3 −0
How do I get something similar to dictionary views, but for sequences?

The dictionary methods .keys(), .values(), and .items() all return view objects. Said objects reflect any changes to the underlying dictionary. This is often useful. Is there a way to get such a v...

1 answer  ·  posted 1y ago by ajv‭  ·  last activity 1y ago by r~~‭

77%
+5 −0
Can freed pointers undergo lvalue conversion?

char *p, *q; p = malloc(1); free(p); q = p; // lvalue conversion Is the last lvalue conversion (= p;) Undefined Behavior or not? We didn't take the address of the local p. C11::6.3.2.1...

2 answers  ·  posted 1y ago by alx‭  ·  last activity 1y ago by Dirk Herrmann‭

71%
+3 −0
Updating the database reverses previous changes

The Code using Microsoft.EntityFrameworkCore; public class BloggingContext : DbContext { public DbSet<Blog> Blogs { get; set; } public DbSet<Post> Posts { get; set; } ...

2 answers  ·  posted 1y ago by Moshi‭  ·  last activity 12mo ago by FoggyFinder‭

60%
+1 −0
How to use ReactNative SDK with flexible sync using a code first approach

I am working on a React Native app using Realm, Atlas Flexible Sync, and MongoDB, and I'm super confused about how subscriptions work. I'm coming from a .NET SQL background, so I'm completely new t...

0 answers  ·  posted 1y ago by Scriptastrophe‭  ·  last activity 1y ago by Mithical‭

61%
+6 −3
Why are commas not needed for modulo string formatting when printing?

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)) ...

3 answers  ·  posted 1y ago by Bennshinpoes‭  ·  edited 9mo ago by Karl Knechtel‭

66%
+2 −0
Does redirecting blog from sub domain to root domain hurts SEO of old blogs?

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...

0 answers  ·  posted 1y ago by ThomasM‭  ·  last activity 1y ago by Mithical‭

84%
+9 −0
memcmp(3) memory containing invalid values

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...

2 answers  ·  posted 1y ago by alx‭  ·  last activity 1y ago by Lundin‭

81%
+7 −0
How to verify if a year is leap in Java?

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?

1 answer  ·  posted 1y ago by hkotsubo‭  ·  last activity 1y ago by hkotsubo‭

71%
+3 −0
How to compress columns of dataframe by function

Problem How can I compress each column of a dataframe to the output of a function (i.e., mean), preserving columns? MWE import pandas as pd data = {"A": [1, 2, 3, 4], "B": [5, 6, 7, 8]} ...

2 answers  ·  posted 1y ago by mcp‭  ·  last activity 9mo ago by mr Tsjolder‭

71%
+3 −0
Adding elements to wrapper after calling wrap doesn't work

I'm trying to do some DOM manipulation in jQuery, but am having issues with creating wrapper elements. For some reason, prepending to the wrapper doesn't work after I call wrap. Code <html>...

1 answer  ·  posted 1y ago by Moshi‭  ·  last activity 1y ago by Mithical‭

60%
+1 −0
How to import a vocabulary's test file in factor.

For example: I have noticed that this does not work for any vocabulary's tests. What is the alternate way to USE: these test vocabularies? EDIT: The test word appears to run all tests alongside...

0 answers  ·  posted 1y ago by Razetime‭  ·  edited 1y ago by Razetime‭