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

77%
+5 −0
Common string handling pitfalls in C programming

Preface: This is a self-answered Q&A meant as a C string handling FAQ. It will ask several question at once which isn't ideal, but they are all closely related and I'd rather not fragment the p...

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

50%
+1 −1
How to grant privileges to a user on a database specifically (i.e. not globally) in PHPMyAdmin?

In PHPMyAdmin 5.1.1 I have created a user account and a database with the same name and granted all privileges to the user on that database. I have exported the database to a backup file, deleted ...

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

57%
+2 −1
Fixing vertical discrepancies with CSS

I have a "Our menu" webpage automatically created with Drupal 9 Views module which presents a miniature version of each menu dish webpage in that "Our menu" webpage (illustration image below). My ...

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

60%
+4 −2
Separate digits of a number in groups with different sizes

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

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

50%
+0 −0
How to to make a store tree view cart

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

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

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‭

87%
+12 −0
How do I support tab completion in a python CLI program?

I spend a lot of time writing CLI tools in Python, and I would like to support tab-completion in a style similar to Git. For example, subcommands should be tab-completable, options should expand ba...

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

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%
+2 −2
How to show XML in browser?

Is there possible way to run XML like as HTML? Suppose, I have following code. <?xml version="1.0" encoding="UTF-8"?> <breakfast_menu> <food> <name>Belgian Waffles&l...

2 answers  ·  posted 2y ago by Anonymous‭  ·  last activity 2y ago by desbest‭

90%
+17 −0
What is the purpose of `if __name__ == '__main__'`?

I often see the construct if __name__ == '__main__' in Python code. For example, the queens.py demo in the Python repository ends with these two lines: if __name__ == "__main__": main() Ho...

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

84%
+9 −0
Is it dangerous to use json.loads on untrusted data?

I manage a wsgi application that accepts JSON data via POST from potentially untrusted sources. Normally it is treated as a text blob and never parsed, but there is a value in the expected input th...

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

75%
+4 −0
What are the disadvantages of using SQL Server Replication - Transactional Replication type?

The context A reports related process is directly reading the production operational database once about two hours. This involves reading all the data from some 70 tables which takes a couple minu...

0 answers  ·  posted 2y ago by Alexei‭

53%
+5 −4
What's the difference between Inheritance and Polymorphism?

I'm using Java code as an example, but this can be answered if you don't know Java. class Bird{ public void sing(){ System.out.println("Testing"); } } class anClass ex...

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

71%
+3 −0
Is there any justification for having a single tempdb database to be used by all databases on a SQL Server intstances?

Despite the fact that I have programmed against SQL Server for quite a while I did not pay much attention to the tempdb database. This is especially true if application logic is mostly written usin...

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

80%
+6 −0
Are there any downsides related to using Maybe or Optional monads instead of nulls?

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

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

90%
+18 −0
What must a C compiler do when it finds an error?

What exactly must a C compiler do when it finds a compile-time error? The most obvious kind of errors are language syntax errors, but the C standard also speaks of constraints, which are rules tha...

1 answer  ·  posted 3y ago by Lundin‭  ·  edited 2y ago by ghost-in-the-zsh‭

80%
+6 −0
How kill a child process without read() hanging in the parent process?

There is an external program I'm calling from within my C/C++ program, by using fork() and execl(), and redirecting the stdio with dup2() to be able to read the output from the external program. I...

1 answer  ·  posted 2y ago by sktpin‭  ·  edited 2y ago by Lundin‭

71%
+3 −0
Retrieve user details from service in Angular

Angular 12; .NET Core 3.1 Following a code-maze tutorial, I have a working authentication (registration/login) service using .NET Core Identity. After login, I would like to add 'username' data ...

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

60%
+1 −0
How does PathData work?

What is pathData? I was thinking to convert SVG to XML. I found it. In the code, I had seen that android:pathData="M 64 2 C 98.2416544895 2 126 29.7583455105 126 64 C 126 98.2416544895 98.2416544...

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

57%
+2 −1
Hash sum mismatch (only for openjdk-11-jdk)

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

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

42%
+1 −2
&lrm; character jumbles text and this can be confusing when working with many articles

I often work bidirectional text in content management systems and often that text has parenthesis (()) or other textual wrappers flipping after an English text which is preceded in itself by some R...

0 answers  ·  posted 2y ago by deleted user

42%
+1 −2
Objection CLI - SVM Conception - Freezing prompt

Now I build a Python script to execute automaticaly a dynamic analysis on apk and I block because I use this library and call objection. When I run my script, the objection command creates an inst...

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