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)
I'm working on an integration with a proprietary (black box) system. There is some TCP communication that occurs between two microservices. I've managed to sniff the traffic and it's being sent in...
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 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. ...
How to break line in XML? I was trying to follow the answer. But, It wasn't helpful for me. I had tried <br/> and <br />. None of them works. <?xml version="1.0" encoding="UTF-8"?&g...
It's a very old question came to my mind. Whenever I start building some applications for Android using Android Studio. In every update, lots of tools get deprecated. I know I can use deprecated "t...
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...
It's possible to use Angular 8 http.get to get a page from the frontend itself ? My local frontend url: https://192.168.0.177:4200/ I tried in a service: test(): Observable<string> { ret...
So I was looking around for some async solutions and I found one on github, https://github.com/electronicarts/ea-async I follow the setup instructions for maven. Only to realize it didn't work (I ...
To get a value from an assoc and provide a default value if the value does not exist, I am using the following definition: :: at-def ( key assoc default -- value ) key assoc ?at [ drop default ] w...
I have a list of 11-digit numbers stored in one single column in Excel, and I need to separate the digits according to this pattern: 2-2-1-3-3. Example: 00002451018 becomes 00 00 2 451 018. How c...
I've heard that in modern C++, smart pointers are preferred to raw pointers for ownership (the so-called RAII principle, as I understand it). This makes sense, and since then I've always used them...
Is it possible to add listeners via VBScript/ JS directly into a SRSS report? Goal: Track changes of input fields and key press inside the wrapper React based on the events Directly in the...
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(table=True) # don't want plot, ...
Why ContactsContract.CommonDataKinds.Event.START_DATE always returning contact number. The number is available in Google Contacts. Here what I am doing... Cursor c; if (contactID==""...
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...
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've created a function that calls scanf passing a void pointer as argument: void read(const char *format, void *p) { scanf(format, p); } And tested it with different types: int n; read...
In a dense DOM tree created by a content management system which I didn't create and don't know much about there might be pseudo elements hiding in various places. To ensure that, I want to run so...
The Caesar cipher is a substitution cipher in which the letters of an ordered alphabet are cyclically shifted by a given number. A detailed description can be found e.g. here. Let u be the index o...
Using Vim, I am trying to search for all instances of a specific string, except for those that fall somewhere in between two other specific strings. For example, I want to determine all instances ...
On branch-x, I do git merge branch-y Now there are some conflicts, and git status shows Changes to be committed: new file: a new file: b Unmerged paths: (use "git a...
MWE In the terminal run: mkdir mwe cd mwe mkdir dir touch f1.txt f2.pdf dir/f1.txt dir/f2.pdf git init . Create a .gitignore with: * # ignore all !dir/ # except this directory ...
Agner Fog has this C++ Vector Class Library, which is ... useful for improving code performance where speed is critical and where the compiler is unable to vectorize the code automatically in an...
I was playing around with mapped tuples and came across an interesting case where TypeScript cannot infer the types used: interface Foo<A, B> { (a: A, b: B): any } function test<...
I have this bootstrap code (grid) <div class="container p-3 center"> <div class="row"> <div class="bg-light border-bottom border-secondary border-top col-6 te...
We use Jenkins Pipeline to build and test some C++ software. The pipeline script runs the tests on 10 different nodes in a parallel way in order to save time. All of these nodes are real (not virtu...
I am trying to listen to the event in which the keyboard key containing the Hebrew final-letter ך is pressed. This key stands for both the English letter L and the Hebrew final letter ך. If my op...
I have noticed that lots of projects (both in real-world and within online courses) use Automapper to map domain models to view models, API models. The main advantage seems to be convenience by re...
query = "CREATE TABLE "+TABLE+" ("+COLUMN1+" INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, "+COLUMN2+" VARCHAR(255), " + COLUMN3+" VARCHAR(255), "+COLUMN4+" TEXT, "+ COLUMN5+" VARCHAR(255)...
What exactly is the Python Global Interpreter Lock (GIL)? As someone who is relatively new to Python, is this something I need to be aware of, or is this just some implementation detail of the inte...
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 am trying to create an app with two toolbars on top and a specific collapsing/expanding behaviour on scrolling. See the mockup to get a deeper understanding of what I'm trying to achieve: I fo...
What I'm trying to do, because it's to provide a visually exciting set of results for a simulation package, is given a time, show what a planet looks like from a given angle. I've got SPICE and I'...
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...
One of the legacy applications our team manages contained the following pattern (in the controller): // initialization private readonly IServiceScopeFactory _serviceScopeFactory; public FooCon...
If I am not mistaken any DOM "tree" node is actually a "branch", which would be an HTML element or perhaps a CSS pseudo-element, of course. If that's true what are the different node types and esp...
A watertight mesh is one which does not have holes, and for which each face has a designated inside and outside. Such a mesh can be "tetrahedralized", has a defined volume, and can be an operand in...
I have seen this construct quite a lot: int *p = (int*) malloc(n * sizeof(int)); Is this how it should be? What is the proper way to use malloc? I have also seen this: int *p = malloc(n * size...
I would like to delete a book from the collection by a particular title from my library if the user enters 2 as input for my switch statement. How can I do that with my current code? #include<...
I'm trying to connect to a db file in my project but having some troubles. I'm using JDK 14 with ojdbc11 however I am still getting this when trying to connect: java.lang.UnsupportedClassVersionEr...
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...
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) ...
I made carousel image slider by following tutorials. To slide images , I made the below function. const moveToSlide = (track, currentSlide, targetSlide) => { track.style.transform = 'translat...
Used to work with PhantomJS. Want to upgrade to Puppeteer. Started with some code: "use strict"; const puppeteer = require("puppeteer"); const capture = async () => { let browser; try {...
I am getting a white screen issue for my angular portal, only if I am not using "USB tethering". When I use home/office wifi, and mobile hotspot, I get a white screen when I use USB tethering fro...
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...
I have a .html file containing only the following data, and I keep that file on top of my website's directory. <link rel="stylesheet" href="./css/mobile_general_structure.css"></link> ...
I want use single layout xml file for two different activities in android. Is it possible? How can I do it?
Building a Nannou App from their template. I want a circle to slowly fade in color and randomly change color when hitting the boundary of the window. But there is something strange going on when ...