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)
50%
+2 −2
Splitting a large HTML file into two or more HTML files without JavaScript

I am developing a modular HTML-PHP-CSS no-JavaScript (JavaScriptless) contact form and the HTML is becoming increasingly large, around 80 lines (and could easily grow to be significantly larger as ...

1 answer  ·  posted 3y ago by deleted user  ·  edited 3y ago by deleted user

50%
+1 −1
Nannou model requires a function pointer: How to return a function pointer

Trying to make a nannou app from the template but with a customizable model() function. The template has this main(): fn main() { nannou::app(model).update(update).run(); } The model t...

0 answers  ·  posted 2y ago by telefza‭  ·  edited 2y ago by Alexei‭

50%
+2 −2
Accessibility standard/s for multilined <input type="text"> fields

I have a simple HTML contact form and I wish to create a text area in it with <input type="text"> but without a <textarea> tag. The end product should be an <input type="text"> f...

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

50%
+3 −3
How to run a remote JavaScript file from GitHub?

I have a JavaScript file in GitHub which I typically run by copy-pasting all its data into different user script managers (USMs) on different web browsers. I need to start executing that remote fi...

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

50%
+2 −2
Print value from constructor

#include<iostream> using namespace std; class Book{ public: string title; string author; int pages; Book(string aTitle, string aAuthor, int aPages){ aTitle = title; ...

1 answer  ·  posted 3y ago by deleted user  ·  edited 3y ago by Alexei‭

50%
+1 −1
Input taking only first character of a string

I wrote a program named Kernel.c 2 months into my life in programming and created 4 functions at the time, and now there are 7 functions. Recently, I updated the program completely onto an online ...

1 answer  ·  posted 3y ago by General Sebast1an‭  ·  last activity 3y ago by elgonzo‭

50%
+0 −0
A standard about content types when creating a web shop with Drupal

I would assume the following content types would be standard when creating a web shop with Drupal but maybe I am wrong: Home page Article page Product page Service page Another page Are t...

0 answers  ·  posted 3y ago by deleted user

50%
+1 −1
How to temporarily disable a MySQL user?

Sometimes I will need to temporarily lock out other MySQL users when I am making large structure changes and want to make sure that nobody else is inputting or changing the data. The other use case...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Charlie Brumbaugh‭

50%
+1 −1
Count the number of occurrences in a text string

If I have some text in a cell, how can I find the number of times another piece of text appears in it? For example, suppose A1 contains Peter Piper picked a peck of pickled peppers.. pick occurs 2...

2 answers  ·  posted 3y ago by pnuts‭  ·  last activity 10mo ago by Dirk Herrmann‭

50%
+0 −0
How to calculate the Hamming weight of a binary string?

A presently unanswered question on Stack Overflow asks: Does there exist a popcount function in libreoffice calc? and clarifies that "I often use BASE(A1;2;8) to show a number in binary".

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

50%
+4 −4
Is concatenation a logical AND?

As a person with no significant background in mathematics and computer science I thought that concatenation and AND are logically identical if not very similar because both add something to somethi...

3 answers  ·  posted 3y ago by deleted user  ·  edited 3y ago by deleted user

50%
+0 −0
Is it possible to rebuild a STL file from gcode?

I have a couple of 3d example projects in gcode for my printer but the printer bed has a couple of bumps in the center (where things are printed by default) and in order to print the objects I woul...

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

50%
+2 −2
Having trouble adding include directories

I'm trying to set up a simple test project, to unit test a change I'm working on. The change is to a file inside some existing project. I've tried to set up the includes as the original has it, but...

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

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‭

50%
+0 −0
TRUE/FALSE flags for alternating colouring by group

For use in connection with conditional formatting with alternating coloured fills in OpenOffice Calc, several years ago a user of Super User was applying this Ruby script: f = File.readlines("sha...

0 answers  ·  posted 3y ago by pnuts‭  ·  last activity 3y ago by pnuts‭

50%
+0 −0
In a column, set populated cells to 1 and empty cells to 0

In an as yet unanswered Q from early this year a user of Stack Overflow asked: how to fill all non-empty cells of a column by 1 and the empty cells by 0. It's an xlsx file open with LibreOffice ...

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

50%
+0 −0
A Conditional Formatting formula rule expected to apply to all cells is only affecting some

A very recently asked Q on Web Applications has no answer yet (and, in my opinion, is so badly written may not receive an answer at all promptly). However it does seem (in my interpretation) to rai...

0 answers  ·  posted 3y ago by pnuts‭  ·  last activity 3y ago by pnuts‭

50%
+0 −0
Loss of precision when concatenating an exchange rate with a string

In response to a Q on Web Applications [WA] the asker self-answered with: =CONCATENATE("@ £/€ rate: ",text(J21,"0.00000")) The issue was that, with "in a cell J21 I have a set value 1.10000":. ...

0 answers  ·  posted 3y ago by pnuts‭  ·  last activity 3y ago by pnuts‭

50%
+0 −0
Copy a sparse matrix with removal of blanks

A user of Web Applications gave the following as an example: https://docs.google.com/spreadsheets/d/1nPTBFXaIgpruPgNoWFSBUL2yKaibjeNJNExhnHVr8LE/edit#gid=0 and asked: How do I read a long ro...

0 answers  ·  posted 3y ago by pnuts‭  ·  last activity 3y ago by pnuts‭

50%
+0 −0
Merge a pair of columns where in each row one is blank, without a formula

A Q on Stack Overflow asks how to merge two columns where each row has only one populated cell. The example was from (on the left) to (on the right): a|b a 0| ...

0 answers  ·  posted 3y ago by pnuts‭  ·  last activity 3y ago by pnuts‭

50%
+1 −1
Create encrypted zip archive with bsdtar [closed]

I'm trying to create an encrypted¹ zip archive using bsdtar. Here's where I got stuck: bsdtar -c --options='zip:encryption' --passphrase "secret" -f test.zip test This is the error I get: bs...

0 answers  ·  posted 3y ago by Matthias Braun‭  ·  closed 3y ago by Lundin‭

50%
+0 −0
Eclipse Custom Errors for Annotation Processing

In Eclipse, is it possible to setup custom errors or markers in the editor, for annotation processing? For example, the standard squiggly lines with descriptions. This question is not important. ...

0 answers  ·  posted 19d ago by tylerbakeman‭

50%
+0 −0
How to merge Django model query results?

I have to modify a legacy Django web application where there are 2 tables to store the same information using the same database structure, and the only difference is the names of the tables (and th...

1 answer  ·  posted 15d ago by toraritte‭  ·  last activity 15d ago by toraritte‭

50%
+0 −0
Why does `distutils` seem to be missing or broken? Isn't it part of the standard library?

Sometimes when I try to install a third-party library for Python, I get an error saying that either distutils, or some part of it like distutils.core or distutils.util, could not be found. It's sho...

1 answer  ·  posted 4d ago by Karl Knechtel‭  ·  last activity 4d ago by Karl Knechtel‭

50%
+0 −0
Migrating from Az Co DB NoSQL to Az Co DB MongoDB, error?

With Azure Data Factory I tried migrating from Azure Cosmos DB NoSQL to Azure Cosmos DB MongoDB. The export went fine from the NoSQL but the import to the MongoDB did not work. I got no reasonable ...

1 answer  ·  posted 3d ago by propatience‭  ·  last activity 3d ago by propatience‭

50%
+1 −1
Angular Testing fails with Service.method is not a function

I'm trying to write a spec test for a (correctly working) Angular component, but it errors when calling a service method with: TypeError: _this.myService.getSomeData is not a function The service...

0 answers  ·  posted 6mo ago by mcalex‭

50%
+1 −1
How to resolve a "ValueError: dimension 't' already exists as a scalar variable" arising when I am using xarray.Dataset.assign_coords()?

I have the following xarray Dataset: d: <xarray.Dataset> Dimensions: (x: 79, y: 63, t: 1) Coordinates: * x (x) float64 0.9412 1.882 2.824 3.765 ... 71.53 72.47 73.41 74.35 * ...

1 answer  ·  posted 9mo ago by Ivan Nepomnyashchikh‭  ·  last activity 9mo ago by mr Tsjolder‭

50%
+0 −0
Embedding other controller-action with Phalcon

I'm trying to revive an old project of mine. It was built with Phalcon PHP 2 or 3 (I don't even remember which version, but quite old). There I could include a call to the loop inside the controll...

0 answers  ·  posted 8mo ago by posthy‭  ·  edited 8mo ago by Alexei‭

50%
+1 −1
Running a bash command with a Key Combination in Gnome [closed]

Is there a way in Ubuntu to run a given bash command for a given Key combination in Gnome (42.9)? I run an Ubuntu in Hyper-V and after a while the normal Keyboard layout change doesn't work (maybe...

0 answers  ·  posted 6mo ago by Arpad Horvath‭  ·  closed 6mo ago by Alexei‭

50%
+0 −0
How do I get the min/max axis values in Chart.js?

I'd like to get the minimum and maximum values of the axes on a Chart.js 4.4.0 plot. When the plot is created, these values must be calculated somewhere. However, reading through the Chart.js doc...

1 answer  ·  posted 7mo ago by CavanWright‭  ·  last activity 7mo ago by Ullallulloo‭

50%
+1 −1
What software architecture are available for developing an application with multiple business domains that only share some common aspects?

NOTE The meaning of the word "program" below is (PROGRAM) A federal or state initiative that offers grants for non-profits so that they can provide service at low cost or free of charge. a...

2 answers  ·  posted 7mo ago by toraritte‭  ·  edited 7mo ago by toraritte‭

50%
+3 −3
Regex for simplifying Amazon product URLs

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

1 answer  ·  posted 7mo ago by matthewsnyder‭  ·  last activity 7mo ago by mr Tsjolder‭

50%
+1 −1
How do I properly render a quad in OpenGL using a GL_TRIANGLE_STRIP primitive?

I am currently working with LWJGL and the obstacle I face right now on my project is rendering textures to a cube, e.x a set of 8 vertices with position, color, and UV information. For now, I am st...

1 answer  ·  posted 7mo ago by cuzzo‭  ·  last activity 7mo ago by djm‭

50%
+0 −0
Adding two products into cart with help of a checkbox.

I've created a code snippet in "functions.php" that should add another product to your cart if you mark the checkbox, but somehow, only the original product is add (like the single product from the...

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

50%
+1 −1
Is there a text version of pickle?

Is there a Python serialization format that has capabilities similar to Pickle, but is text based? The problem I always have with pickle is that it's binary, so I can't manually view or edit the d...

0 answers  ·  posted 7mo ago by matthewsnyder‭

50%
+0 −0
What is a Crossfilter group?

From reading about the Crossfilter data manipulation library for JavaScript, I take it that "groups" are an important concept in its operation. However, the Crossfilter documentation does not ever...

0 answers  ·  posted 8mo ago by CavanWright‭

50%
+0 −0
Best practices to write functions for both execution modes in Tensorflow, eager and graph mode

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

1 answer  ·  posted 8mo ago by daniel_s‭  ·  edited 8mo ago by daniel_s‭

50%
+1 −1
What solutions available for a CMS-agnostic contact form?

By principle, I normally work with two different companies for establishing websites for myself: One for domain registration and domain-sole email address One for web application hosting My ...

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

50%
+0 −0
How to drop all stored procedures from a MySQL database

I need to drop all of the stored procedures from my MySQL database before I recreate them. How can I do so?

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Peter Mortensen‭

50%
+2 −2
What is REST and how different it is from HTTP? [closed]

Based on my understanding HTTP is something client and server speak in, I mean it is like a language for a server and client to communicate(not exactly a programming language). Then how to understa...

0 answers  ·  posted 3y ago by aditya98‭  ·  closed 3y ago by Alexei‭

50%
+2 −2
Mocking tempnam() with vfsstream

How do I mock tempnam() with vfsStream for code that uses it to create temporary files (for example, in a PHPUnit test)?

1 answer  ·  posted 3y ago by tyteen4a03‭  ·  last activity 3y ago by summea‭

50%
+0 −0
How to migrate NLog configuration from XML file(s) to application settings (JSON)?

I have just created an ASP.NET Core 6 application and added NLog support for logging: NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger() However, this API is almost deprecated as ...

1 answer  ·  posted 2y ago by Alexei‭  ·  last activity 2y ago by Alexei‭

50%
+0 −0
How to get rid of HTML tags and convert entities in SQL Server?

I have to migrate a bunch of text from an old application into a new one. Some of these texts contain HTML tags and entities (HTML editor was used) and now they do not want to support this in the n...

2 answers  ·  posted 2y ago by Alexei‭  ·  last activity 2y ago by gbjbaanb‭

50%
+0 −0
In angular-imask how do I get the IMask class?

Using Angular-IMask, I'm programatically updating the field that has IMask. So I'm getting the error: "Element value was changed outside of mask. Syncronize mask using mask.updateValue() to work p...

0 answers  ·  posted 2y ago by nelson777‭  ·  edited 2y ago by nelson777‭

50%
+0 −0
How to uncollapse an entire link tree with JavaScript?

This data tree is comprised of clickable buttons and I want to expose all branches, in a single action, instead of clicking each vertical arrow button anew. I have tried the following code which d...

1 answer  ·  posted 2y ago by deleted user  ·  edited 2y ago by Alexei‭

50%
+1 −1
Recursion without a procedure ("function") in JavaScript

Credit for User:Meriton for developing the following code (first published here): function replaceIn(e) { if (e.nodeType == Node.TEXT_NODE) { e.nodeValue = e.nodeValue.replaceAll("a", "");...

3 answers  ·  posted 2y ago by deleted user  ·  edited 2y ago by Alexei‭

50%
+0 −0
Using single xml file two activities in android

I want use single layout xml file for two different activities in android. Is it possible? How can I do it?

0 answers  ·  posted 2y ago by akshayshelke‭

50%
+1 −1
Why does a keydown event is listened only once?

The following code (credit for user:hkotsubo) moves the user to another page if Alt+Shift+E are pressed together. window.addEventListener('DOMContentLoaded', () => { let domain = window.loca...

0 answers  ·  posted 2y ago by deleted user

50%
+0 −0
MediaWiki JavaScript way to view the history of a page

I wish to view the revision-history-webpage of a webpage in MediaWiki without the conventional button to do so (I've disabled that button for aesthetic reasons). Please disable the MediaWiki View ...

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

50%
+2 −2
Slicing a dictionary using a string variable

I am working on adding uncertainty to some of my dynamics within a larger Monte Carlo simulation. As a way to perform multiple operations on each value, I decided to make and use a new function to ...

1 answer  ·  posted 9mo ago by megalomaniac‭  ·  edited 9mo ago by megalomaniac‭