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)
Assume I have this class Foo class Foo { private int x; void setX(int x) { this.x = x; } } And I have a Junit test like this: Bar bar; @BeforeEach void setu...
Our team is currently transferring all functionality (+ some changes) from small and very old project A (almost code freeze) to project B (actively developed). As part of the data migration, there ...
I have a PHP program that does a SELECT and then updates some of the values based on an algorithm. Rather than updating one row at a time UPDATE example_table SET COLUMN_A = 1 WHERE primary_k...
Every URL is a URI but not every URI is a URL is a saying I know from long ago, but what is an example for a URI which is not a URL (whatever the user agent would be - a web browser, a *nix utility...
For my purposes, it is secure enough to use passwords to execute MySQL commands on the command line, what I would like to do is disable the warning that says, mysql: [Warning] Using a password on ...
I was trying to show transition on activity changes. I had followed two method from SO. I lost those link so I can't add them here. My first method was I had used overridePendingTransition on onCr...
I am building an MVC cart system. I have the MERCHANTS table and the PRODUCTS table. A merchant (store) can have one or more products, everything works fine but what I want is to display products b...
I was installing Java yesterday. I had faced lot of problem. I had fixed most of them. But I had changed Hash that's what I think. I don't remember which command I had executed since I had executed...
I'm starting a small site with some online tools. Tried to include Google Adsense but I initially got rejected because the site was still on construction. Yet I've seen in the forums that they are...
I added the numbering. It's a virtual machine. Basically, it's one or more computers pretending to be one or more computers. Believe it or not, this is incredibly useful. Say you have som...
I'm used to working in Python, but my current project is in C#/.NET and uses log4net for logging. Out of the box, log4net uses an XML file for configuration. I dislike XML and want to use something...
Consider the following code: #include <stdio.h> int main() { int a = 5; int b; ++*(&b + 1); printf("%d\n", a); return 0; } The output is as expected: 6 ...
What's the better way to store base64 in SQLite Database? I was thinking to put base64 as TEXT since base64 has lots of chars. CREATE TABLE name (id INTEGER PRIMARY KEY AUTO_INCREMENT, image TEXT)...
I'm trying to write a MIME message to the console. ByteArrayOutputStream out = new ByteArrayOutputStream(); MimeMultipart replyMsg = mdnCreator.createMDNData(); replyMsg.writeTo(out); out.close...
Context Our product owner has realized that some entities are duplicated from time to time and that a merge is required. This should clean up existing duplicates and also allow special users to me...
I have a variable defined using const keyword. function Text() { const variable = "Hello!"; } console.log(variable); When I try to access this variable, I get: Uncaught ReferenceError...
In Android Studio, when I click on a variable. It redirects me to where the variable was declared. Even, when coder writes lot of code than, it becomes hard to find "main" object by scrolling. Rub...
I consider to create a multi page contact form in which there is one backend page but about 5 front-end pages (stage 1-5). Pages 1-4 are input pages and page 5 is for a submit button and a success ...
I get the concept of the heap sort algorithm and its like first you have a heap(ordered binary tree) then we have the Max heap which has the highest element value in the array at the top of the tre...
This is meant as a FAQ Q&A regarding variable-length arrays (VLA). The two bugs described below are surprisingly common. I'm trying to use the variable-length arrays feature of C99 (and newe...
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...
I am building an Android app to perform a DICOM C-Echo. (DICOM is a standard for storing and transferring medical images; the specification is at dicom.nema.org). My purpose is to learn more about ...
Making a Nannou App that draws a line to the screen. My model only contains the window itself and a vector of tuples describing the points and color. Similar to this example(under Drawing Lines) ...
Is uint8_t guaranteed to be a character type if it exists? Will using a uint8_t* to examine bytes of an object cause violation of the strict aliasing rule? Is the following legal code: #include &l...
tl;dr I'd like to learn a compact, cross-compiler way of selectively suppressing compiler warnings. Consider the case where you really mean to make an exact floating-point comparison using ==, o...
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...
Is it legal ISO C to declare a function as noreturn with a non-void return type (but of course not actually returning)? As far as I can read from the standard, it seems legal. Example: noreturn ...
It is possible to create a new formatter class by subclassing string.Formatter class and then to use it like myformatter.format("{foo:customformat}", foo=foo). It's not super-convenient though, and...
Background story: I'm on mac OS 11.6 and would like to access an identifier for the current space/desktop from the command line. I found a helpful article at https://ianyh.com/blog/identifying-spac...
I have decided to convert a legacy database-first ASP.NET Core project to code-first. However, I have noticed that the project used the same database as another bigger project and the Entity Framew...
I have recently stumbled across the Maybe (or Optional) modal usage in .NET Code: example code or this one example article Based on everything I read, there are multiple advantages on relyi...
The concept of field separator has some private cases in different operating system shells and their utilities (IFS on Bourne shell and derivates, RS on AWK and perhaps more) but I am having troubl...
During a presentation of a pipeline configuration, a colleague showed a SonarQube integration and one of its reports. A warning was caused by overrunning the max value for the code complexity thres...
Whenever I search in google why a specific language is interpreted language, I get differences between compiled languages and interpreted languages but nowhere the benefit for being interpreted rat...
What does ptr() mean in this code? #include<stdio.h> #include<stdlib.h> void PrintHello() { printf("Hello\n"); } int Add(int a, int b) { return a+b; } int main...
I have created two PHP modules, one is a contact form module and one is a a sticky "call now" module. I can access the contact form by example.com/contact_form.php but in contrast, example.com/cal...
I had build an application using following source code (following the steps). package com.decibal.level; import androidx.appcompat.app.AppCompatActivity; import android.media.MediaRecorder; ...
When discussing best or safest C programming practices with various C gurus on the Internet, the "MISRA-C guidelines for the use of C language in critical systems" often pops up as a source. This ...
I'm working on a system where the frontend will make a call to the backend to perform an action. Sometimes this action can cause other unintended consequences (like charging the customer), in thes...
I have a column that is a concatenation of 5 other columns plus a join to a different table. UPDATE db.a JOIN db.b ON fk_b = b.pk SET concat_field = CONCAT(field1,field2,field3,b.field,field4,fi...
Hello folks, can someone resolve this seg fault with me please, i can't find the error where it occur. Thank you. #include <stdlib.h> #include <stdio.h> int ft_ultimate_range(int *...
I have two strings and want to remove every occurrence of the second string inside the first one starting from the beginning of the first string and as if each occurrence was removed immediately. ...
I have decide to try out Julia. Is anyone aware of some good resources to get started with the language?
I wanted to print to browser console the number of li list items of a given ul list. This didn't work (console output was undefined): console.log(document.querySelectorAll(".example").length); ...
As a big fan of tacit/point-free programming in general, I'm looking at different tacit programming systems for inspiration (for a language I'm creating). What are the advantages and disadvantages ...
I have an ASP.NET Core 5 web application that provides functionality that involves file upload + rather large processing (memory consumption mainly). After each processing (with success or not) the...
I use the following backend (PHP) pattern to send email. I consider to start sending email by Ajax but I would still need to store my email address in some backend file (say, a PHP file) so it won...
#include<stdio.h> #include<stdlib.h> int main (void){ FILE *cfPtr; char name[15]; int ID; if ((cfPtr = fopen("draft.txt","w")) == NULL){ printf("File could n...
Using the below graph as an example: I am trying to determine all Persons which are_sons of Persons all born in the same country. Is there an elegant way to achieve this with Cypher?
I am trying to filter data in the DataGrid using the texboxes using the MVVM pattern. Just not sure how to do it. Would appreciate any guidance. My current code: Model public class Technical_Bes...