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)
71%
+3 −0
How do I track down intermittent locks in a MySQL database?

Currently, we have a CRUD plus reporting application that talks to one MySQL database. Intermittently users will report locks when searching, currently, I can only get the approximate time of when ...

0 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Alexei‭

71%
+3 −0
Keras model evaluate returns triggered tf.function retracing warning

I am training the following model using Keras as shown: model = tf.keras.models.Sequential([tf.keras.layers.Conv2D(64, (3,3), activation='relu', input_shape=(256, 256, 3)), tf.keras.layers.MaxPooli...

0 answers  ·  posted 3y ago by Guilherme Costa‭

71%
+3 −0
How do I configure Jenkins to strip the leading “origin/” in git branch parameter?

I'm using Jenkins with a branch parameter to specify the branch to build from. Other stuff downstream needs the branch name to not have the leading "origin/" -- just "feature/blahblah" or "bugfix/1...

1 answer  ·  posted 3y ago by Monica Cellio‭  ·  last activity 3y ago by Monica Cellio‭

71%
+3 −0
How to pivot text?

In this Q a user asked for a simple way to represent this data: - PERSON 1 | PERSON 2 | YES - PERSON 1 | PERSON 3 | YES - PERSON 2 | PERSON 1 | YES - PERSON 2 | PERSON 3 | YES - PERSON 3 | PER...

2 answers  ·  posted 3y ago by pnuts‭  ·  edited 10mo ago by Wicket‭

71%
+3 −0
SID to login for access via a group

I have a query that returns the owner of jobs on an SQL instance, select s.name as JobName , s.owner_sid , ISNULL(L.name,'AccessViaGroup') as LoginName --Trying to figure out how to turn that ...

0 answers  ·  posted 3y ago by James Jenkins‭  ·  edited 3y ago by Alexei‭

71%
+3 −0
Do you need to use std::move to store a parameter passed by value?

If you have a class which needs to store a construction parameter internally, and you want to take advantage of move semantics, I understand that the parameter should be passed by value: class Foo...

1 answer  ·  posted 2y ago by deleted user  ·  last activity 2y ago by Dirk Herrmann‭

71%
+3 −0
How to inject environment configuration values when deploying an Angular application in Kubernetes or similar infrastructure?

Context I am currently migrating a Web application from on-prem infrastructure to K8s. The legacy infrastructure relies on defining some tokens in the configuration files and these are replaced d...

2 answers  ·  posted 1y ago by Alexei‭  ·  last activity 1y ago by Derek Elkins‭

71%
+3 −0
How do you insert a struct into a hive table column using HiveRunner?

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

1 answer  ·  posted 1y ago by Abbas Gadhia‭  ·  last activity 1y ago by Abbas Gadhia‭

71%
+3 −0
highlight.js 3rd party plugin error: Cannot read properties of undefined

Highlight.js version: 11.6.0 Node version: v18.12.0 npm version: 8.19.12 When I provide a plugin with the following code to highlightjs (full code is at github): /* Language: BQN Requires: A...

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

71%
+3 −0
Strict aliasing rules and function boundaries

Let's analyze this code, assuming an architecture where the alignment of int64_t is the same as that of double: void bar(double *f, int64_t *j) { *(int64_t *)f = *j; } void foo(void) ...

1 answer  ·  posted 1y ago by alx‭  ·  edited 1y ago by Lundin‭

71%
+3 −0
How to add vertical lines for visual separation in pandas plot

MWE import pandas as pd import numpy as np import matplotlib.pyplot as plt df = pd.DataFrame(np.random.rand(9, 4), columns=['a', 'b', 'c', 'd']) df.plot.bar() plt.show() Question Ho...

2 answers  ·  posted 2y ago by mcp‭  ·  last activity 2y ago by samcarter‭

71%
+3 −0
Why is boolean value f (false) defined as a parsing-word while t (true) is not in Factor?

I noticed when attempting to generate random booleans that t and f are not treated in the same way: t random ! Error f random ! returns a value In the factor 0.98 and 0.99 documentation, t is ...

1 answer  ·  posted 1y ago by Razetime‭  ·  edited 1y ago by Alexei‭

71%
+3 −0
Cast uninitialized variable to (void)

Is it undefined behaviour to cast an uninitialized variable to (void)? Example: int main() { int x; (void)x; return 0; }

4 answers  ·  posted 1y ago by Estela‭  ·  last activity 1y ago by Ethan‭

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~~‭

71%
+3 −0
How do I serialize a const generic length array with Serde?

I have the following code: use serde::{Deserialize, Serialize}; #[derive(Sereialize, Deserialize)] struct Container<const SIZE: usize> { contents: [String; SIZE] } But I'm getti...

0 answers  ·  posted 9mo ago by mousetail‭

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‭

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

71%
+3 −0
Python Parallel plotting and and input reading

Hello everyone, I am seeking help with understanding why multithreading does not work correctly in this example: import time import matplotlib.pyplot as plt import concurrent.futures voltage...

1 answer  ·  posted 1y ago by kek‭  ·  edited 1y ago by kek‭

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‭

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 1y ago by FoggyFinder‭

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‭

71%
+3 −0
How to solve the "Cannot call from this context" error?

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

1 answer  ·  posted 9mo ago by Oleg Valter‭  ·  last activity 9mo ago by Oleg Valter‭

71%
+3 −0
How can I output / display multiple values, with controlled spacing, without building a string?

I know that I can display a single string in the terminal window like print("example") (or similarly with a string in a variable), and I know how to open text files and write to them. I also know ...

1 answer  ·  posted 9mo ago by Karl Knechtel‭  ·  last activity 9mo ago by Karl Knechtel‭

71%
+3 −0
How to resolve the mypy error "Returning Any from function declared to return 'Dict[str, Any]'" in Python?

I have a function that loads JSON data and is declared to return a dictionary with string keys and values of any type (Dict[str, Any]). However, mypy is raising an error stating that I am returning...

1 answer  ·  posted 9mo ago by ShadowsRanger‭  ·  last activity 9mo ago by Moshi‭

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‭

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~~‭

71%
+3 −0
How to use docker hub with podman?

Unlike docker, Podman won't (understandably) use docker hub by default. You can use it explicitly like this: (just using a random example here, it's an OpenAPI linter) podman pull docker.io/dshanl...

1 answer  ·  posted 6mo ago by Iizuki‭  ·  last activity 6mo ago by Iizuki‭

71%
+3 −0
How to provide meaningful names for emails in Maildir?

I am writing some scripts that operate on emails in Maildir format. A lot of things are easy in this format, but the filenames are absolutely incomprehensible. For example, one script moves mails ...

1 answer  ·  posted 7mo ago by matthewsnyder‭  ·  edited 7mo ago by Alexei‭

71%
+3 −0
How to open VS code with a particular path expanded?

When you do: cd /some/path code . VS Code opens with that location shown in the "Explorer" sidebar. However, the state of the file tree and the currently open files will be the same as what wa...

0 answers  ·  posted 7mo ago by matthewsnyder‭  ·  edited 7mo ago by matthewsnyder‭

71%
+3 −0
How to convert Dos paths to Posix paths in Powershell

What is the best way to convert Dos paths to Posix paths in Powershell? eg given: C:\Program Files\PowerShell\Modules\ I want something like: /Program\ Files/PowerShell/Modules/ Is the only so...

1 answer  ·  posted 8mo ago by kjw‭  ·  last activity 7mo ago by H_H‭

71%
+3 −0
OpenGL: Pass a double vector from vertex shader to fragment shader

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

1 answer  ·  posted 8mo ago by H_H‭  ·  last activity 8mo ago by H_H‭

71%
+3 −0
Can you run Python code on text in VS Code?

In VS Code, is it possible to run Python code on the text being edited? I realize that I can save my text, create a .py file, switch to a terminal (including VS Code's own terminal) and run the .p...

0 answers  ·  posted 7mo ago by matthewsnyder‭

71%
+3 −0
How do I pass field names containing dashes in dbt source yml file?

Working with dbt version 2 I'm trying to set up source checks but I'm running into an issue where the column names I'm setting tests for have dashes (e.g. my_table.some-field-with-dash). I current...

1 answer  ·  posted 7mo ago by Sigma‭  ·  last activity 7mo ago by Sigma‭

71%
+3 −0
How to declaratively enable RabbitMQ feature flags in Kubernetes

We use Kubernetes on a cloud (GKE, to be precise). We use RabbitMQ for messaging and we need to upgrade it from 3.10 to 3.12 . FWIW RabbitMQ has been added to our system using a chart from Bitnami...

0 answers  ·  posted 6mo ago by FractionalRadix‭

71%
+3 −0
How should open source forks, with a mix of upstreamable and non-upstreamable commits, be maintained?

I have a few different projects that rely on open source technology that I wish to make modifications to (say, to add key features for business or personal use) that will vary between upstreamable ...

1 answer  ·  posted 8mo ago by eoin.oneill‭  ·  last activity 7mo ago by matthewsnyder‭

71%
+3 −0
How can a Python program send itself to the background?

Is it possible for a Python program to send itself in the background? For example, on Linux you can do nohup some_cmd & and any program will run in the background. Some programs also support s...

1 answer  ·  posted 8mo ago by matthewsnyder‭  ·  last activity 8mo ago by r~~‭

71%
+3 −0
Using an existing web server vs writing your own

When writing a dynamic web service, you broadly speaking have two paths: Use an existing web server (e.g. Apache, Nginx or Lighttpd) to handle the "raw" web requests and implement your own cod...

4 answers  ·  posted 6mo ago by Iizuki‭  ·  last activity 6mo ago by Basile Starynkevitch‭

71%
+3 −0
How to copy a PostgreSQL database to another machine.

I have to debug an error which seems to only happen with some set of data present in our PostgreSQL database. I'd like to copy said database to my local machine so I can perform tests without affe...

1 answer  ·  posted 3y ago by Estela‭  ·  edited 3y ago by Alexei‭

71%
+8 −2
Write to same file from multiple threads

I want to write a text file from multiple threads. The file structure is line-oriented. This means writing of lines should be atomic. I am using Qt 5.15.2. Is it enough to protect a shared QTextSt...

2 answers  ·  posted 3y ago by Silicomancer‭  ·  edited 8mo ago by Shree‭

71%
+3 −0
Why content delivery networks often require a www. redirect?

Why do Content Delivery Networks are often developed in such a way that they would require adding a Cname value such as www. before example.com? I ask this after switching from one CDN (Cloudflare...

2 answers  ·  posted 3y ago by deleted user  ·  last activity 3y ago by corporat‭

71%
+3 −0
How to easily support time frame grouping in queries?

I had a curiosity about how much the experienced users wait for their questions to be answered on Stack Overflow and had written a query for it: SELECT YEAR(q.CreationDate) * 100 + MONTH(q.Creatio...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 1mo ago by Michael‭

71%
+3 −0
Trying to create a POST request with Apache

I have tried many different ways to do this with apache but the server seems to not be receiving the data. Stacktraces are not being printed so I can only assume I have the request set up wrong for...

0 answers  ·  posted 3y ago by cuzzo‭  ·  edited 3y ago by Alexei‭

71%
+3 −0
PHP variables aren't expanded when inside HTML which is by itself inside PHP

I transfer emails from my Right To Left (RTL) contact form → to my local email box (powered by Roundcube). Emails reach my email box (inbox) just fine but I have a problem were PHP variables aren'...

1 answer  ·  posted 3y ago by deleted user  ·  last activity 3y ago by luap42‭

71%
+3 −0
How to tackle database migrations failure during application initialization on production systems?

Context My ASP.NET Core application got stuck in Production with a 5xx error. By inspecting the logs, I have noticed that a database error occurred during application initialization, namely a SQL ...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by misha130‭

71%
+3 −0
How to retain a service's data between components in Angular 8 ?

I would like to maintain a log that is available to several modules in my Angular 8 system. So I created the following service: @Injectable({ providedIn: 'root' }) export class LogService { ...

1 answer  ·  posted 3y ago by nelson777‭  ·  last activity 3y ago by nelson777‭

71%
+3 −0
What guarantees does Bash make about order of :- Parameter Expansion when it is not in POSIX mode?

I tried to check info bash but only got a copy of the man page. This is when I learned that I could apt install bash-doc to get the "full" Bash manual. After checking both the info pages and the m...

1 answer  ·  posted 3mo ago by aghast‭  ·  last activity 2mo ago by Quasímodo‭

71%
+3 −0
Is it possible to obtain the unlock code from an unlocked Android device via the Android API or the developer command line tools?

I have an Android 10 device where the OS is unlocked but the bootloader is not. I can't obtain the unlock code through the normal channels because of bureaucratic incompetence. Given that the devi...

0 answers  ·  posted 3mo ago by Kevin Krumwiede‭  ·  edited 3mo ago by Alexei‭

71%
+3 −0
PEP20 on namespaces: What exactly is it saying to do?

PEP20 aka the Zen of Python has a statement: Namespaces are one honking great idea -- let's do more of those! What exactly are we supposed to "do" according to this? Is it saying we should h...

0 answers  ·  posted 5mo ago by matthewsnyder‭  ·  edited 5mo ago by Karl Knechtel‭

71%
+3 −0
What is a reasonable minimum for making a FOSS project inviting to contributors?

A lot of people who maintain FOSS projects would like to get more contributions. What can the maintainer do to ensure that potential contributors are converted into actual contributors? There are...

2 answers  ·  posted 1mo ago by matthewsnyder‭  ·  last activity 1mo ago by Michael‭