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

66%
+4 −1
Combine the first character of a cell with another cell

A Q on Stack Exchange from a very long time ago included: I have first names in one column and second names in another, I want to create a third column that contains the first character from the...

1 answer  ·  posted 3y ago by pnuts‭  ·  edited 10mo ago by ArtOfCode‭

50%
+2 −2
Conditionally format a pair of columns

A user of Web Applications asked "How should I fix the formula?" with reference to: =IF($K4<2,$K4) applied as a Conditional Formatting [CF] formula to J4:J8, where the desired (green fill) f...

1 answer  ·  posted 3y ago by pnuts‭  ·  edited 10mo ago by Wicket‭

60%
+1 −0
Automatic adjustment when copying of column reference within INDIRECT function

An as yet unanswered question on Web Applications, INDIRECT cell reference - Can't copy cell as reference cell pattern remains same, from @Daniel Klose is: I have an Overview Sheet where I want ...

1 answer  ·  posted 3y ago by pnuts‭  ·  edited 10mo ago by Wicket‭

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‭

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
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%
+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 ❤️‭

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

86%
+11 −0
When would one not want to return an interface?

Consider the following method as an example: List<int> Foo() { // ... } Are there any disadvantages of returning an interface instead of a concrete implementation in C#? IList<i...

3 answers  ·  posted 1y ago by Moshi‭  ·  last activity 10mo ago by matthewsnyder‭

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‭

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‭

60%
+1 −0
EF-core Find method doesn't include other entities

(Full code available for cloning here) I've run into some odd behavior of EF-core's Find method. It seems like the returned entity doesn't include the rest of the data. MWE Models using Micro...

1 answer  ·  posted 1y ago by Moshi‭  ·  last activity 10mo ago by Sylvester‭

77%
+5 −0
Is it worth using the Java Platform Module System in application code?

Is it worth using the Java Platform Module System introduced in Java 9 to structure application code? Given that the Java Platform Module System introduced in Java 9 doesn't manage dependency vers...

1 answer  ·  posted 3y ago by meriton‭  ·  edited 10mo ago by __blackjack__‭

77%
+5 −0
How should one match a specialized version of a variant?

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

1 answer  ·  posted 2y ago by Moshi‭  ·  last activity 11mo ago by Baum mit Augen‭

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‭

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‭

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‭

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

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‭

87%
+12 −0
What does the static keyword do in C?

What exactly does the static keyword do in C? I have seen it used in several diverse contexts: 1) As a variable outside a function: #include <stdio.h> static int x = 5; int main (void) ...

1 answer  ·  posted 2y ago by Lundin‭  ·  last activity 11mo ago by Lundin‭

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

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‭

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‭

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‭

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‭

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‭

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‭

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

72%
+6 −1
Best practices in setting up a development & production environments

I am developing a web app that is tied to a database. My codebase is stored on a private GitLab instance. I would like to set up a workflow that would look something like this: I have a developm...

1 answer  ·  posted 2y ago by Mu3‭  ·  last activity 1y ago by Mithical‭

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‭

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‭

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‭

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‭

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‭

83%
+8 −0
How to define an object with different subclasses in an if-statement?

Note: I asked this question on TopAnswers a couple weeks ago, but didn't get any response, so I figured I'd ask it here. I am currently learning C++. I have a parent class (Vehicle) and two subc...

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

66%
+2 −0
TeamCity build variables

I want to pass a variable to TeamCity (on prem) to choose between deployment environments (there are 14 of 'em - don't ask) when running a TC deployment configuration build which uses a PowerShell ...

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

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‭

22%
+0 −5
What factors should be considered when choosing web security measures for a site? [closed]

What factors should be considered when choosing web security measures for a site?

0 answers  ·  posted 1y ago by Andrew‭  ·  closed 1y ago by Mithical‭

75%
+4 −0
How to programmatically get current wallpaper file path?

I have written a screensaver program that, in part, uses the current wallpaper for some visual effects. However, finding the current wallpaper in different operating systems and environments is les...

1 answer  ·  posted 1y ago by ghost-in-the-zsh‭  ·  last activity 1y ago by ghost-in-the-zsh‭

22%
+0 −5
Solution E-Commerce de Paiement [closed]

Salut, quelle solution de paiement e-commerce avec 0% de commission me proposerez vous ?

0 answers  ·  posted 1y ago by Bicano‭  ·  closed 1y ago by Monica Cellio‭

60%
+1 −0
Relayout call does not work on button click in Factor

I am currently using this code to display a GUI counter: USING: accessors arrays fonts kernel math math.parser ui ui.gadgets ui.gadgets.buttons ui.gadgets.editors ui.gadgets.labels ui.gadgets.pa...

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

60%
+1 −0
How to find the existing default action for a UI gadget in factor

For a UI gadget like a $link in Factor, a click automatically opens the page that it points to. I want to know where this default behaviour is defined. In the factor documentation, there are many ...

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

37%
+1 −3
We app is terminated automatically at Windows server

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

0 answers  ·  posted 1y ago by hyousef‭

83%
+8 −0
Is partial allocation of an object Undefined Behavior?

Is it valid to partly allocate an object, as long as you only use the allocated part of it? #include <stdio.h> #include <stdlib.h> struct s { int i[100]; }; int main(void) {...

1 answer  ·  posted 1y ago by alx‭  ·  last activity 1y ago by Lundin‭

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‭