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)
62%
+3 −1
cannot initialize a variable of type 'CFDictionaryRef'

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

1 answer  ·  posted 2y ago by foobar‭  ·  edited 2y ago by Alexei‭

70%
+5 −1
A keydown event succeeds for an English letter but not for an Hebrew one, sharing the same key

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

0 answers  ·  posted 2y ago by deleted user  ·  edited 2y ago by deleted user

85%
+10 −0
What does the "\s" shorthand match?

I've seen some regular expressions (regex) using \s when they want to match a space, but I noticed that it also matches line breaks. Example: the regex [a-z]\s[0-9] (lowercase ASCII letter, follow...

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

77%
+5 −0
C Language Standard Linking Specifications

What (if anything) does the C standard have to say about linking objects? My guess is that, because C only defines language->behavior rules, it completely ignores any potential intermediate form...

1 answer  ·  posted 2y ago by Josh Hyatt‭  ·  edited 2y ago by Josh Hyatt‭

60%
+4 −2
Question regarding an error message in my compiler to do with my code on linked list.

Can anyone help me, I'm currently learning pointers, this is the code I wrote to try and insert a node at the beginning of the list. However at the part where I included the comment of "error at th...

1 answer  ·  posted 2y ago by hamburgersarecool‭  ·  edited 2y ago by hamburgersarecool‭

75%
+4 −0
Appropriate HTTP status code for "user confirmation required"

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

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

28%
+0 −3
How to implement "Loss leader" marketing pattern in ecommerce websites? [closed]

Loss leader is a marketing pattern implemented in stores: A customer enters a store and while heading to some most desired expensive products far from entrance, that customer picks some products s...

0 answers  ·  posted 2y ago by deleted user  ·  closed 2y ago by Alexei‭

77%
+5 −0
How to manage CPU capabilities of Jenkins nodes?

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

1 answer  ·  posted 2y ago by anatolyg‭  ·  last activity 2y ago by bta‭

50%
+2 −2
Manipulate a web browser to hide a certain HTML element in a certain website by a single action

Before I publish a new webpage in my website (in the content management system itself), I zoom in from say 100% zooming to 500% zooming and then re-read it, as a nice way to check for typos. The p...

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

86%
+11 −0
What is malloc's standard-defined behavior with respect to the amount of memory it allocates?

I recently told a friend that malloc(n) allocates and returns a pointer to a block of at least N bytes of memory, as opposed to exactly N; that it is allowed to allocate 'extra' memory to meet e.g....

2 answers  ·  posted 2y ago by ajv‭  ·  last activity 2y ago by bta‭

66%
+2 −0
How to create fire and forget tasks Q&A in ASP.NET Core with dependency injection support?

One of the legacy applications our team manages contained the following pattern (in the controller): // initialization private readonly IServiceScopeFactory _serviceScopeFactory; public FooCon...

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

40%
+0 −1
How to mock LazyCache when performing unit testing?

A few of my services rely on LazyCache and they use it by injecting IAppCache. For unit testing, I would like to mock this. I have found MockCachingService, but it does not do any caching (as spec...

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

84%
+14 −1
What's the correct way to merge a branch and its dependent branch back to master?

In git I branched feature-A from master. To reduce eventual merge conflicts later, I branched feature-B, which heavily overlaps and depends on A, from feature-A. A build of the feature-B branch s...

2 answers  ·  posted 2y ago by Monica Cellio‭  ·  edited 2y ago by hkotsubo‭

80%
+6 −0
Can I set a memory limit for the .NET Core garbage collector to collect objects more aggressively?

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

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

77%
+5 −0
How to deeply clone an array in Angular / TypeScript?

I have an array that I need to clone in Angular / Typescript. That is, any change done on an element from the cloned array should not affect the content of the initial array. How can I achieve thi...

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

77%
+5 −0
Using nested paths vs. flat ones for API resources

This is based on a code review discussion that I had with a colleague about the way I have designed the resources paths for an ASP.NET Core controller that is currently consumed only internally (by...

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

62%
+3 −1
java.lang.UnsupportedClassVersionError: when trying to connect to JDBC with JDK 14 in Eclipse

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

1 answer  ·  posted 2y ago by cuzzo‭  ·  edited 2y ago by Alexei‭

81%
+7 −0
Conditionally ignore files in git

I'm using git for LaTeX projects and am in a little dilemma about how to best ignore files. if I add *.pdf to my .gitignore file, I keep forgetting to force add included graphics if I don...

3 answers  ·  posted 2y ago by samcarter‭  ·  last activity 2y ago by Peter Taylor‭

50%
+1 −1
Tracking what users are searching in a content management system

I have a website with a search box. Running search queries in that search box creates frontend/dynamic search result webpages in which search results based on a search query can appear. Let's ass...

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

77%
+5 −0
How to dynamically change panel of ItemsControl?

Let's say I have some collection of data. My goal is to provide different kind of view of ItemsControl depending on user`s preference. For simplicity, we can assume that user can select only betwe...

1 answer  ·  posted 2y ago by FoggyFinder‭  ·  edited 2y ago by FoggyFinder‭

71%
+3 −0
Transferring files from a legacy project to an existing one as varbinary

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

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

84%
+9 −0
Behavior of Pointer Arithmetic on the Stack

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

4 answers  ·  posted 2y ago by Josh Hyatt‭  ·  last activity 2y ago by Alexei‭

37%
+1 −3
Regarding the heap sort algorithm.

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

1 answer  ·  posted 2y ago by hamburgersarecool‭  ·  edited 2y ago by Alexei‭

50%
+1 −1
iframe tag is vertically scrollable although I would expect it to vertically stretch 100%

I have an iframe tag to which I didn't set height so it has a default height which is 150px (at least in Google Chrome). As a consequence, the iframe appears partially in such a way that constant ...

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

57%
+2 −1
width="100%" for an iframe, breaks responsiveness CSS directives

In a MediaWiki website I embed a PHP file containing a contact form via <iframe> with the following attribute pattern: width="100%" frameBorder="0" My problem I need the iframe to stre...

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

75%
+4 −0
How to clear the contents of a file?

How to clear the contents of a file using C?

1 answer  ·  posted 2y ago by dumplings‭  ·  edited 2y ago by hkotsubo‭

28%
+0 −3
Data structure implementation with Linked lists.

Could someone explain this part of the coding for data structures & linked list? I actually got this code from a textbook but no matter how I read the textbook, I still don't get the concept &a...

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

25%
+0 −4
Ajax pattern to send email with a backend file to store an email address

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

0 answers  ·  posted 2y ago by deleted user  ·  edited 2y ago by deleted user

55%
+3 −2
Uncaught TypeError: Failed to construct 'FormData' [closed]

I am trying to submit a form with Ajax from a well-configured shared hosting environment. Emails don't arrive to my email client although I have already sent emails without Ajax from this environm...

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

77%
+5 −0
Handling high frequency requests with cancellations in an ASP.NET Core application

Issue I have recently discussed with a friend a performance issue he and his colleagues have encountered in an ASP.NET Core 5 application (a checkout app, microservices architecture). The problem...

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

71%
+3 −0
Disable import of Android SDK/Support Libraries

I am trying to re-build an unpacked apk, because it was unpacked the required libraries are already included, deleting the prepacked libraries would be feasible if it weren't for the fact that some...

0 answers  ·  posted 2y ago by Aidan‭

37%
+1 −3
How can I delete a book from the collection by a particular title from my library file?

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

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

77%
+5 −0
Dealing with GETs with long query strings in ASP.NET Core

One of the recent business requirements is to be able to search through a list of entities using a bunch of filters. Most of these filters allow multiple values and the user might theoretically pro...

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

37%
+1 −3
How to submit form data with Ajax?

I need to apply backend behavior (PHP directives in my case) to an HTML <form>. The backend behavior I wish to apply to the form is in this pattern (behavior.php): <?php $name = $_POST...

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

50%
+2 −2
How can you modify your server code to make it accept any port numbers instead of just one which is the one you predefined?

Is there any way where I can modify the original server code so that it accepts any port number instead of the predefined one (i.e., port number 8989)? Port number will be entered in the command li...

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

25%
+0 −4
What does the greater than 0 indicate in the case of this statement 'if (compare(A[j], A[j+1]) > 0)' ? Thank you.

Question: There is a list of integers in an array (3,2,1,5,6,4), sort this list in both ASCENDING & DESCENDING order. Create a sort function. #include<stdio.h> #include<stdlib.h> ...

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

66%
+4 −1
Invalid memory access when trying to dereference a pointer obtained through a function call

Hey, regarding a question on returning pointers as functions, why does my code produce this error & won't print out the sum = 6? #include<stdio.h> #include<stdlib.h> int *A...

1 answer  ·  posted 2y ago by dumplings‭  ·  last activity 2y ago by celtschk‭

71%
+3 −0
Hash sign as a path component in a user script's @match command prevents the script from running

I try to exactly match a login page in a website, for a user script manager (USM) script, which I run with Tampermonkey. This pattern didn't work: // @match https://example.com/#/login ...

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

80%
+6 −0
Why is this symlink() call returning successfully while apparently failing to create the sym-link?

Summary I'm building an internal system (hardware simulator, using Rust) to help test some Python-based services that talk to hardware. (The services talk to hardware via TTYs.) To trick the Pytho...

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

50%
+1 −1
How to fire the change event for an input field?

I have added some input to an input field element this way: const inputFiled = document.querySelector("#example"); inputField.value = "X"; I want to fire a change event for that field right af...

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

28%
+0 −3
Why would a form value inserted with value property won't be effective? [closed]

In a website I didn't build, I want to put a value in an HTML input field element with JavaScript and to also use it as-putted. I can put it with the browser console this way: document.querySelec...

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

71%
+3 −0
document.open() and the DOM tree of the loaded (closed) browser window on which it works

If I execute in browser console: document.write("Hello"); A new DOM document with the text Hello appears in the same browser window. From MDN documentation: Note: Because document.write() w...

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

25%
+0 −4
What is the difference between a decoupled, Headless and RESTful content management system?

By means of content management system architecture, Is the implementation of decoupling architecture (backend and frontend separation), headless architecture and Representational State Transfer (R...

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

71%
+3 −0
Docutils rst2pseudoxml.py reported error: No role entry for "meth"

docutils's rst2pseudoxml.py is reporting this error: Unknown interpreted text role "meth". even though the build command: sphinx-build -b html -d build/doctrees source build/html runs fine and pro...

1 answer  ·  posted 2y ago by CodeFarmer‭  ·  last activity 2y ago by J-hen‭

66%
+2 −0
Understanding createTreeWalker method in the context of replacing strings (or parts of them)

I want to ensure I understand the following code; credit to user:m3g4p0p on Sitepoint, for this code: const walker = document.createTreeWalker( document.body, NodeFilter.SHOW_TEXT ) let...

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

62%
+3 −1
Python looping 300 000 rows

Based on my last question comes new one. How to loop over 300 000 rows and edit each row string one by one? I have a list of 11-digit numbers stored in one single column in Excel, and I need to s...

1 answer  ·  posted 2y ago by sfrow‭  ·  last activity 2y ago by NoahTheDuke‭

66%
+2 −0
How do I remove the column options menu from an embedded Look?

I have a Looker table look displayed to users using SSO embedding in an iframe. When displayed to users, the users can access the column options menu via a cog-wheel dropdown. In Admin > Platfo...

0 answers  ·  posted 2y ago by Sigma‭

75%
+4 −0
Add single element for multiple keys to map

I have a map and a new item to add to the map and a list of keys I want to attach the new item to: => m1 {:a 1 :b 2} => itm 3 => ks [:c :d :e] => m2 {:a 1 :b 2 :c 3 :d 3 :e 3} ...

2 answers  ·  posted 2y ago by NoahTheDuke‭  ·  edited 2y ago by Alexei‭

66%
+4 −1
Dye all label asterisks Red with vanilla JavaScript

I want to dye all label asterisks Red with vanilla JavaScript. CSS isn't good for this because it would dye both asterisks and colons (:) instead just the asterisks: .labelWithColonAndAsterisk:af...

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

57%
+2 −1
Change font-family with JavaScript

I want to change the font-family of all elements in a document with JavaScript. I have tried this: document.querySelectorAll("body").forEach( (e)=>{ e.style.fontFamily = "arial"; }); ...

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