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

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
When does it not work to dereference the pointer for sizeof during malloc?

Background This is kind of a subquestion to How to properly use malloc? When allocating, there are basically two common ways of using the sizeof operator: int *p; p = malloc(n * sizeof *p); /...

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

50%
+0 −0
Migrating HTML strings to a more secure alternative

Our team will have to migrate an old application to use a new tech stack. One of the features involves the usage of HTML editors which serialized the content as HTML and I am able to see valid HTML...

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

62%
+3 −1
What is Backus–Naur form as applied in computer programming?

What is Backus–Naur form as applied in computer programming? From Wikipedia In computer science, Backus–Naur form (/ˌbækəs ˈnaʊər/) or Backus normal form (BNF) is a metasyntax notation for cont...

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

28%
+0 −3
How to plot in C++?

I was trying to plot using following lines in C++. #include "koolplot.h" int main() { plotdata x(-6.0, 6.0); plotdata y = sin(x) + x/5; plot(x, y); return 0; } When I was...

0 answers  ·  posted 2y ago by Anonymous‭

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‭

55%
+3 −2
Why does fopen return NULL?

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

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

70%
+5 −1
C naming convention, module trigrams?

For my company, I'm writing naming conventions for embedded code in C language. Function names must be named in lowerCamelCase() and start with a verb. Global variables are in Maj_started_lowe...

3 answers  ·  posted 1y ago by AdriZ‭  ·  last activity 1y ago by Dirk Herrmann‭

71%
+3 −0
Is `-isystem` a POSIX cc option?

Is -isystem/path/to/sys/includes a standard compiler option, or is it a compiler extension implemented by gcc, clang, and maybe other compilers? Can I rely on its availability? I couldn't find th...

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

70%
+5 −1
How allocated memory is calculated?

int arr[] = {10,123,14,14,15,16}; cout<<sizeof(arr)/sizeof(arr[0]); I was reading the article. When sizeof() is used with the data types such as int, float, char… etc it simply ret...

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

80%
+6 −0
How to parse a date with more than 3 decimal digits in the fractions of second?

I'm using SimpleDateFormat to parse a string containing a date/time, but the result has a different date, hour, minute, second and millisecond: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM...

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

66%
+2 −0
Why is my last input box not centering (class: powerwall-battery-input)?

I found a form I wanted to duplicate on a roof construction website. All my input boxes are centered except the last one that's a bit off and I cannot figure out why. Here is my code: HTML <...

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

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‭

23%
+1 −8
How to efficiently remove every occurrence of one string inside another

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

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

66%
+2 −0
What's the better way to store base64 in SQLite Database?

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

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

71%
+3 −0
How do I redact values when Save()ing a yaml structure with YamlDotNet?

I handle several projects that use yaml files for configuration, and load them with YamlDotNet. It is sometimes useful to log the effective configuration when the program starts, to aid future debu...

0 answers  ·  posted 2y ago by ajv‭  ·  edited 2y ago by Troy‭

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‭

75%
+4 −0
What are the disadvantages of using auto mapper libraries?

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

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

60%
+1 −0
Error: Cannot find module 'is-color-stop' in Tailwind CLI

While compiling the code for production in Tailwind CLI using: npx tailwindcss -m -o ./build/tailwind.css --purge "./**/*.html" I get: node:internal/modules/cjs/loader:941 const err = new ...

0 answers  ·  posted 2y ago by Kevin M. Mansour‭

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‭

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‭

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

60%
+1 −0
How to properly manage PGP signing key storage, access, and usage for dev and automation?

I work for an IoT company. We recently got secure boot to work for a customer-visible product. For secure boot to work, the images we generate must be signed. Obviously, we want customer-visible sy...

0 answers  ·  posted 2y ago by ghost-in-the-zsh‭  ·  edited 2y ago by ghost-in-the-zsh‭

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‭

66%
+2 −0
What are the drawbacks of using data snapshot testing?

Our team is finally focusing on writing more automatic testing and one of my ex-colleagues recommended to try out the Verify library. The tool does the following: runs the test and compares the...

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

66%
+2 −0
Rationale of using database-level transactions inside a store procedure when application layer already manages a transaction

One of the legacy applications my team has to maintain has almost always this pattern for dealing with data modification: try { // get the connection // begin transaction // optional...

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

85%
+10 −0
How to properly use malloc?

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

3 answers  ·  posted 2y ago by klutt‭  ·  last activity 9mo 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‭

77%
+5 −0
How to open a file and edit its content in groovy script

I have a Makefile in my Jenkins job's workspace, that I want to edit out certain parts from and then save it, before running next part of the script that uses this Makefile. The part that I want t...

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

77%
+5 −0
Validate All Object Properties with JSON Schema

I'm writing a JSON schema to validate asset files for a program. The JSON I need to parse is structured so: { "jobs": { "software-developer": { "job-description": "sw-dev.md:0", "pay": 800...

1 answer  ·  posted 3y ago by Josh Hyatt‭  ·  last activity 3y ago by elgonzo‭

80%
+6 −0
Are static pointers implicitly initialized to NULL?

Consider this code: #include <stdio.h> int main(void) { static void *ptr; if(ptr == NULL) puts("It's NULL!"); } I wonder if this is guaranteed to print "It's NULL!" I know ...

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

72%
+6 −1
How to unittest method that involves contacting remote servers?

Let's say I have this class: class myService { private boolean foo(T arg) { return arg == 42; } public Response bar(U arg) { if(foo(U.field)) { return Response.st...

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

60%
+1 −0
org.apache.http.NoHttpResponseException: nginx.apps.cloud.cloud.local:443 failed to respond

Getting the following error only when I call a post API through Nginx [0m[31m12:48:35,903 ERROR [io.acurio.hub.api.rest.impl.DesignsResource] (default task-16) Failed to invoke workflow: com.masha...

0 answers  ·  posted 1y ago by SmartestVEGA‭

81%
+7 −0
Is there any benefit to using new?

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

1 answer  ·  posted 1y ago by Moshi‭  ·  last activity 1y 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‭

80%
+6 −0
TypeScript is unable to infer the correct type for a mapped tuple

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

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

83%
+8 −0
Which functions in the C standard library must always be avoided?

It would seem that the C standard library is a collection of diverse functions that pretty much just ended up in the standard by tradition or "accident", rather than through some careful plan or ra...

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

71%
+3 −0
Why use an asterisk after a type?

#include<stdio.h> struct Node{ int data; struct Node* next; }; Here I used an asterisk after Node. What is it used for? What if I don't put any asterisk after Node (both Node...

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

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‭

28%
+0 −3
What is [{options}] in JavaScript?

I am trying to understand this code: const iframes = iFrameResize( [{options}], [css selector] || [iframe] ); The code can be found in this documentation. Is [{options}] an array of objects an...

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

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‭

75%
+7 −1
How to avoid "exception is never thrown" when commenting out a line while debugging

I have a code block like this: try { ... x.foo(); // This is the line that forces us to have the try block ... } catch (ArrayIndexOutOfBoundsException e) { logger.error(e.getM...

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

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

77%
+5 −0
Why can't a derived class add a const qualifier to a method?

Say we have an abstract class Foo declared as so: class Foo { public: virtual void test() = 0; }; Let's say that we make a derived concrete class FooDerived, and decide to mark it's ve...

2 answers  ·  posted 2y ago by Moshi‭  ·  last activity 2y ago by Dirk Herrmann‭

80%
+6 −0
array of arrays vs array of pointers to store array of string literals

Let's consider the following code: const char a[][4] = {"aa", "aaa"}; const char *b[] = {"bb", "bbb"}; const char *const c[] = {"cc", "ccc"}; For shared libraries, both b and c arrays require...

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

50%
+2 −2
Alternative to Google Adsense [closed]

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

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

50%
+2 −2
Print value from constructor

#include<iostream> using namespace std; class Book{ public: string title; string author; int pages; Book(string aTitle, string aAuthor, int aPages){ aTitle = title; ...

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

77%
+5 −0
What's the difference between =, == and === operators in JavaScript?

While learning JavaScript, I started to see =, == and === operators. What's the difference between them?

3 answers  ·  posted 2y ago by Kevin M. Mansour‭  ·  last activity 2y ago by hkotsubo‭