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)
22%
+0 −5
How should I deploy my Full Stack Angular Application (MEAN Stack) project on free hosting website? [closed]

How should I deploy my Full Stack Angular Application (MEAN Stack) project on free hosting website? Github I have provided below the github link of the project for the better understanding. Prob...

0 answers  ·  posted 1y ago by mrsilenttradeguy‭  ·  closed 1y ago by Alexei‭

86%
+11 −0
When would one not want to return an interface?

Consider the following method as an example: List<int> Foo() { // ... } Are there any disadvantages of returning an interface instead of a concrete implementation in C#? IList<i...

3 answers  ·  posted 1y ago by Moshi‭  ·  last activity 10mo ago by matthewsnyder‭

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

71%
+3 −0
Adding elements to wrapper after calling wrap doesn't work

I'm trying to do some DOM manipulation in jQuery, but am having issues with creating wrapper elements. For some reason, prepending to the wrapper doesn't work after I call wrap. Code <html>...

1 answer  ·  posted 1y ago by Moshi‭  ·  last activity 1y ago by Mithical‭

60%
+1 −0
Ignore NPM Modules Digital Ocean App Platform

There may be a better way to manage website's with JavaScript deployments. I added jest to my repo simply to execute tests when I make PRs as part of a GitHub action. This requires a package-lock.j...

1 answer  ·  posted 1y ago by fausty‭  ·  last activity 1y ago by fausty‭

57%
+6 −4
Why can parentheses cause exceptions in Python when using for loops?

Using parentheses in Javascript is always needed when you want to create functions, if/else statements and for/while loops. But in Python it has a function that is called tuples. When using an if s...

1 answer  ·  posted 1y ago by Bennshinpoes‭  ·  edited 1y ago by trichoplax‭

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‭

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‭

22%
+0 −5
What factors should be considered when choosing web security measures for a site? [closed]

What factors should be considered when choosing web security measures for a site?

0 answers  ·  posted 1y ago by Andrew‭  ·  closed 1y ago by Mithical‭

33%
+0 −2
App crashes/ implementing picture in picture mode to timer

When I tried to emulate the app that I coded in the connected phone, it keeps closing due to crashes, is there any problem with my code? Also, I am trying to make a timer app with picture and pict...

0 answers  ·  posted 1y ago by dkdkjoi‭  ·  edited 1y ago by Alexei‭

50%
+0 −0
How to uncollapse an entire link tree with JavaScript?

This data tree is comprised of clickable buttons and I want to expose all branches, in a single action, instead of clicking each vertical arrow button anew. I have tried the following code which d...

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

71%
+3 −0
Detecting if a user has stopped interacting with a web view for a certain time

I am interested in finding out all the aspects I need to cover in order to correctly assess if a user has stopped interacting with a web page. So far, I found the following: Idle Detection API -...

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

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‭

50%
+2 −2
What does this function definition mean in Haskell?

What does this function definition mean in Haskell? fn x [] = [] fn x (True:ys) = x : fn x ys fn x _ = []

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

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

75%
+4 −0
What are the types of DOM nodes?

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

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

66%
+2 −0
Using Lua's `os.rename` to rename a file from a hard drive to a new location on a USB flash drive

I'm using the os.rename function in a lua script. It works perfectly fine for renaming files on my hard drive, e.g. os.rename("test.txt","/Users/username/Desktop/test2.txt") will rename the fil...

1 answer  ·  posted 1y ago by samcarter‭  ·  last activity 1y ago by Peter Taylor‭

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‭

80%
+6 −0
Continuously read from piped input using Vim

In Vim, it's possible to tell it to read from stdin instead of a file, by using vim -. This is so that you can pipe the output of one command into Vim, to view/edit it there. The problem I'm facin...

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

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‭

55%
+3 −2
How to proportionally convert a number in the range of -1 and 1 to a number in the range of 0 and 319

I have float noise values, between -1 and 1, for every x,y coordinate in a 2D area and I am trying to convert that to a whole number between 0 and 319 which represents a vertical z coordinate to re...

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

81%
+7 −0
Qt Button changes drastically when setting its `border-radius`.

In a Qt application I have nothing more than a window with a button as its direct child. I set its background color and all is fine: Window::Window(QWidget *parent) : QWidget(parent) { but...

1 answer  ·  posted 1y ago by Quasímodo‭  ·  last activity 1y ago by r~~‭

71%
+3 −0
Updating the database reverses previous changes

The Code using Microsoft.EntityFrameworkCore; public class BloggingContext : DbContext { public DbSet<Blog> Blogs { get; set; } public DbSet<Post> Posts { get; set; } ...

2 answers  ·  posted 1y ago by Moshi‭  ·  last activity 12mo ago by FoggyFinder‭

22%
+0 −5
Ignore code paths

I try to ignore paths in the Codeql code scanning file. But every scan it seems that scanning doesn't ignore these files, do you have any tips?

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

71%
+3 −0
Why is boolean value f (false) defined as a parsing-word while t (true) is not in Factor?

I noticed when attempting to generate random booleans that t and f are not treated in the same way: t random ! Error f random ! returns a value In the factor 0.98 and 0.99 documentation, t is ...

1 answer  ·  posted 1y ago by Razetime‭  ·  edited 1y ago by Alexei‭

81%
+7 −0
Console scripts in virtual environment do not output to terminal in git bash

I have console scripts in my virtual environment in \env\Scripts, installed with packages (e.g. black, pytest, coverage). If I try to execute these in Git Bash, the output is not returned to the te...

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

72%
+6 −1
Best practices in setting up a development & production environments

I am developing a web app that is tied to a database. My codebase is stored on a private GitLab instance. I would like to set up a workflow that would look something like this: I have a developm...

1 answer  ·  posted 2y ago by Mu3‭  ·  last activity 1y ago by Mithical‭

66%
+2 −0
How to create a quotation containing the given token in a syntax word in Factor programming language

I am trying to define a syntax word as follows: USING: kernel syntax parser fry prettyprint ; IN: syn-try SYNTAX: syn scan-word '[ _ ] . ; Given a word, I want to create a quotation conta...

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

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‭

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

71%
+3 −0
How to compress columns of dataframe by function

Problem How can I compress each column of a dataframe to the output of a function (i.e., mean), preserving columns? MWE import pandas as pd data = {"A": [1, 2, 3, 4], "B": [5, 6, 7, 8]} ...

2 answers  ·  posted 1y ago by mcp‭  ·  last activity 9mo ago by mr Tsjolder‭

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‭

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‭

60%
+1 −0
Relayout call does not work on button click in Factor

I am currently using this code to display a GUI counter: USING: accessors arrays fonts kernel math math.parser ui ui.gadgets ui.gadgets.buttons ui.gadgets.editors ui.gadgets.labels ui.gadgets.pa...

0 answers  ·  posted 1y ago by Razetime‭  ·  edited 1y ago by Razetime‭

60%
+1 −0
Where is the "Just My Code" debug option in Visual Studio Mac?

Title says it all. I found "Step into external code" but not sure if it's the same feature.

0 answers  ·  posted 1y ago by user34567‭

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‭

75%
+4 −0
Is it possible to write protocols for enumerations in Python?

Having recently learned about protocols in Python, I now wonder if you can write a protocol for enumerations. That is, a protocol that says that you are supposed to pass an enum that has certain it...

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

75%
+4 −0
How to programmatically get current wallpaper file path?

I have written a screensaver program that, in part, uses the current wallpaper for some visual effects. However, finding the current wallpaper in different operating systems and environments is les...

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

66%
+2 −0
Can UWPNuGetPackages be moved to another drive?

I'm trying to make a UWP app in Visual studio, but the NuGet package files have been huge. They just don't fit on my SSD, but I do have an HDD I could theoretically use. After a bunch of tinkering...

1 answer  ·  posted 1y ago by Ullallulloo‭  ·  last activity 1y ago by Ullallulloo‭

22%
+0 −5
Replit particles push instead of being background [closed]

I am working on a replit https://AppropriateMessyRoutes.ozabramo.repl.co and I am trying to implement https://github.com/VincentGarreau/particles.js as a background but I keeps on pushing every...

1 answer  ·  posted 1y ago by ObviousPlays‭  ·  closed 1y ago by Alexei‭

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

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‭

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‭

75%
+4 −0
How to align my content to the left?

This revolves around images. I'm trying to write an HTML page of COVID-19 safety procedures, and here's what I've written so far: <!DOCTYPE html> <html> <head> <title&...

2 answers  ·  posted 2y ago by General Sebast1an‭  ·  last activity 7mo ago by Peter Taylor‭

66%
+2 −0
Why is IntelliJ not finding these modules?

So to preface I started a new JavaFX project in IntelliJ and all of this is from what was auto-generated out of the box. The modules I'm having trouble with are Edit to make this post more query...

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

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‭

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‭

60%
+1 −0
VBScript Listener in SSRS

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

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