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)
42%
+1 −2
How to add to the value of one cell an amount that depends upon the range of a different cell?

A user of Web Applications asked how to: +1 when the value is >=5, +2 when the value is >=10, +3 when the value is >=15, +4 when the value is >=20, +5 when the value is >=25...

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

42%
+1 −2
How would I display the first line of all files matching a glob? [closed]

My use case is a collection of CSV files, each with header row. What I want to know is what subset(s) of them are "union compatible", although I also want matching column names before stacking thes...

1 answer  ·  posted 1d ago by lori‭  ·  edited 11h ago by Alexei‭

42%
+1 −2
What might happen if I ignore warning?

#include <iostream> using namespace std; int linearSearch(int array[], int n, int key){ for(int i=0;i<=n;i++){ if(array[i]==key){ return i; } } } int main() { int ...

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

42%
+1 −2
redirect to "main" code in Ruby using Ctrl

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

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

42%
+1 −2
How do I filter an array in C?

No, I'm not trying to get the full program written completely in C by you guys. I only need some way to implement the functionalities of each function I found confusing. In this challenge in Code ...

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

42%
+1 −2
Program freezing in `post_comments_to_lemmy` function due to potential infinite loop

I'm experiencing an issue where my program appears to freeze when executing the post_comments_to_lemmy function. This function fetches comments from the GitHub API and posts them to a Lemmy instanc...

1 answer  ·  posted 10mo ago by ShadowsRanger‭  ·  last activity 10mo ago by __blackjack__‭

42%
+1 −2
How to create an object, call one of it's methods and pass it as an argument as a oneliner?

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

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

42%
+1 −2
How to solve missing JAR files error from Ant

I keep getting this error: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.SSHExec was not found. This looks like one of Ant's optional components. Action: Check that the ap...

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

41%
+3 −5
Building a language model completely from scratch

What I would like to do I would like to try to build a language model 100% from scratch if possible, for a learning experience. That means no external libraries and no pre-curated datasets. It ...

1 answer  ·  posted 3mo ago by Julius H.‭  ·  last activity 3mo ago by matthewsnyder‭

40%
+0 −1
Is there a JavaScript command to remove all CSS pseudo-elements whatsoever in a document? [closed]

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

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

40%
+2 −4
Child process works only once after the parent's two calls to scanf

This program creates a child process and shares two integers (base and height) through the shared memory. The parent process asks four times to insert two integers and wait for the child process t...

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

40%
+0 −1
How to uncollapse the first and second tiers of a link tree in JavaScript?

I wish to display the first and second branches of a link tree with JavaScript. I want to show these branches in a single action, instead of clicking each vertical arrow (link) anew. HTML examp...

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

40%
+0 −1
How To Verify Old Password in PHP? [closed]

I have a page to change the user password in my website, this page can only be used if the user have a logged in! The change password page have 3 inputs: Old Password, New Password and Con...

0 answers  ·  posted 2y ago by rrenildopereiraa‭  ·  closed 2y ago by Alexei‭

40%
+0 −1
white screen issues but not in USB tethering mode

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

0 answers  ·  posted 1y ago by SmartestVEGA‭  ·  edited 1y ago by Ethan‭

40%
+0 −1
I don't want to setup DKIM, SPF and to do SMTP authentication ; an hosting-provider-email-box solves this but what if I want a domain-registrar-email-box instead?

On a shared hosting (CentOS-Bash) I have a website with a backend (PHP) - frontend CMS-agnostic contact form. I need to transfer emails sent via this contact form directly to an email address (I d...

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

40%
+0 −1
How do World Wide Web interactions happen in a general level? [closed]

I understand that any World Wide Web interaction works this way: Stage 1: Client (human or software) ⟶ User agent ⟶ HTTP/S web-server request (with an unresolved domain) Stage 2: ISP-initiated Rou...

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

web
40%
+0 −1
How to load two or more files in one AJAX call?

In my browser's JavaScript console I can add to the <body> element one file (index.html) with the following AJAX code: const whereToLoad = document.querySelector("body"); const ajax = new X...

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

40%
+0 −1
How to initialize variable assignment in a non-OOP interpreter?

I'm still in the process of making MarkFuncs and having given up from copy-pasting open-source interpreters, them using OOP too, I decided to make one without OOP and with scratch alongside with th...

1 answer  ·  posted 2y ago by General Sebast1an‭  ·  last activity 2y ago by Canina‭

40%
+0 −1
Determine which script is slowing the page down in Firefox [closed]

A page is very slow and laggy in Firefox. I am certain it's one of the many Javascripts slowing it down. Out of curiosity, I'd like to figure out which script is creating the heaviest load. Note t...

0 answers  ·  posted 7mo ago by matthewsnyder‭  ·  closed 7mo ago by Alexei‭

40%
+0 −1
Addressing W25Q64 flash IC [closed]

I am using a W25Q64 flash ic to store some stuff for an ESP-32 project. I used this library from Github as it seems intended for ESP. It seemed weird that the read function uses two 16-bit paramet...

0 answers  ·  posted 16d ago by HinkyDinky‭  ·  closed 15d ago by Lundin‭

40%
+0 −1
How do I concatenate two animated gifs together?

How do I concatenate two animated gifs together? The gifs are identical in dimensions and I would like to stitch them together so they play one after the other.

1 answer  ·  posted 10h ago by congusbongus‭  ·  last activity 10h ago by congusbongus‭

gif
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‭

40%
+2 −4
How do I properly format a String for parsing with a com.google.gson.JsonParser

I am trying to check a JSON array for a certain element. However, when I try to instantiate a JsonElement to search the list for: JsonElement builderElement = JsonParser.parseString( "{\"disc...

0 answers  ·  posted 2y ago by cuzzo‭  ·  edited 2y ago by Stephen C‭

40%
+2 −4
Problems with data structures and filestreams.

So I just started learning how to use file-streams in C & decided to attempt a question which is to do with library management in C, however I am currently encountering some problems and feel l...

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

40%
+0 −1
Migrating a MediaWiki website to Drupal

I consider to migrate a large MediaWiki website to Drupal 9. All the webpages include MediaWiki syntax, just one example is the link syntax: [[ARTICLE NAME|LINK_TEXT]] for internal links [URL ...

0 answers  ·  posted 3y ago by deleted user

40%
+2 −4
constructor in C

#include<stdio.h> struct Book { char title[20]; char author[20]; int pages; }; void init_Book_types(struct Book* aTitle,struct Book* aAuthor,struct Book* aPages){ aTitle->ti...

2 answers  ·  posted 3y ago by deleted user  ·  last activity 10mo ago by __blackjack__‭

40%
+2 −4
unable to create databases in Ruby

I had installed Ruby. rvm install 2.6.6 I had Ruby which version was 3.0.0. I had removed it. Then, installed 2.6.6. When I try bundle install I got no error. When I tried following command...

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

37%
+1 −3
theme always not changing [closed]

const body = document.body; const light = evt => { body.setAttribute('data-theme', 'light'); localStorage.setItem("theme", "light"); console.log("light"); } const dark = ...

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

37%
+1 −3
Why does this code that uses a pointer-to-pointer-to-int segfault?

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

1 answer  ·  posted 3y ago by M3dc0d‭  ·  last activity 3y ago by Lundin‭

37%
+1 −3
Are there textual-formats for documenting actions in Graphical Windows systems? [closed]

I've recently been involved with creating text documentation of steps for workflows in graphical windows systems (and web-pages). These are often somewhat wordy, for example: "Click on the 'Exit' ...

0 answers  ·  posted 3y ago by CodeFarmer‭  ·  closed 2y ago by Alexei‭

37%
+1 −3
What's the better way to deal with deprecated feature?

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

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

37%
+1 −3
Java cannot find class within same package

I've written a class object, QueueObject, but when I try to construct it inside of my main class, it says it cannot find the symbol on compilation. I've read lots of pages saying how misspellings o...

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

37%
+1 −3
Mocking methods with arguments

Let's say I have this class I want to mock class A { public void add(T arg) { B b = A.getB(); U val = somefunc(arg); V ret = b.add(val); } } I have a spy o...

3 answers  ·  posted 2y ago by klutt‭  ·  last activity 2y ago by klutt‭

37%
+1 −3
We app is terminated automatically at Windows server

I've my go app the is running a web API and working smoothly at my laptop. I read this and completed the IIS setup using a config file: <configuration> <system.webServer> ...

0 answers  ·  posted 1y ago by hyousef‭

37%
+1 −3
An HTML form in Hebrew is Right to Left in general but a select list inside it is Left to Right

My HTML form got dir="rtl" attribute and value and in desktop computer systems it appears Right to Left (RTL) but in my mobile device (OnePLus 6) with Android and DuckDuckGo browser, the form's HTM...

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

37%
+1 −3
Separation of password cookies from all other types of cookies

When I clear my Google Chrome browser history I can clear both "Cookies and other site data" AND "passwords and other sign-in data". Clearing just one of the two would require me to re-login t...

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

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~~‭

37%
+1 −3
Cannot write multipart message to byte array [closed]

I'm trying to write a MIME message to the console. ByteArrayOutputStream out = new ByteArrayOutputStream(); MimeMultipart replyMsg = mdnCreator.createMDNData(); replyMsg.writeTo(out); out.close...

0 answers  ·  posted 2y ago by artaxerxe‭  ·  closed 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‭

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‭

36%
+2 −5
What makes people able but unwilling to contribute to FOSS projects? [closed]

Suppose someone has the requisite knowledge and skillset to contribute to a FOSS project, they have the free time to do so and they are aware of the project. Yet, they decide not to contribute. Thi...

0 answers  ·  posted 2mo ago by matthewsnyder‭  ·  closed 2mo ago by Alexei‭

36%
+2 −5
What is the main difference between event delegation to other event handling patterns in JavaScript?

I define a software event as any state of a program to which we can probably respond. In JavaScript, how does event delegation differs from more simple and probably more common event handling patt...

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

36%
+2 −5
What problem does innerHTML solves?

I understand that innerHTML does all the following actions: It makes the element we work on (or even the entire DOM tree that we work on if that element is <body>) to be copy-pasted into a...

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

36%
+2 −5
What are the disadvantages of using static methods in Java?

I was using static method few moments ago. But I noticed that I was returning a variable using that static method. According to the article, Static is a keyword that identifies the class-related...

4 answers  ·  posted 2y ago by Anonymous‭  ·  last activity 2y ago by hkotsubo‭

35%
+4 −9
Find the name of the student with the top mark, display their name and mark

I have a CSV file like this: name,surname,score Moon,Walko,148 Jerald,Gryder,150 I need to find the highest score. My attempt: namespace test { class Program { string[...

2 answers  ·  posted 3y ago by InPut‭  ·  last activity 7mo ago by NetMage‭

33%
+1 −4
How to call a function from ruby-on-rails (HTML)?

Let I have a button <button type="button" onclick = "myfunction()" class="collapsible">Expand content</button> And, I have a JS function. function collapse() { var coll = docu...

1 answer  ·  posted 3y ago by deleted user  ·  last activity 3y ago by Kevin M. Mansour‭

33%
+0 −2
How to break line in XML?

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

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

33%
+0 −2
Why comma is expected for auto_increment?

query = "CREATE TABLE "+TABLE+" ("+COLUMN1+" INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, "+COLUMN2+" VARCHAR(255), " + COLUMN3+" VARCHAR(255), "+COLUMN4+" TEXT, "+ COLUMN5+" VARCHAR(255)...

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

33%
+0 −2
module not found error, I need this speech directory for this project to work. [closed]

--- Here is the error message. Traceback (most recent call last): File "c:\Users\19185\Documents\GitHub\Chatty\Chatty\one_.py", line 3, in import azure.cognitiveservices.speech as speechsdk Mo...

0 answers  ·  posted 4mo ago by KunningFox‭  ·  closed 4mo ago by Alexei‭

33%
+0 −2
How to distinguish between single and multiple file media?

In a media manager I have database tables for files, media and collections. When a user is browsing a collection I want there to be links to see the metadata for single file media like books, movi...

2 answers  ·  posted 1y ago by filosoful‭  ·  last activity 1y ago by r~~‭