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 »

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.

Search

Advanced Search Options

To further refine your search, you can use additional qualifiers such as score:>0.5. For example, the search score:>=0.5 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 0.5 and were created less than a year ago.

Further help with searching is available in the help center.

Quick hints: tag:tagname, user:xxx, "exact phrase", post_type:xxx, created:<N{d,w,mo,y}, score:>=0.5

Filters
2.6k posts
 
71%
+3 −0
Q&A Program freezing in `post_comments_to_lemmy` function due to potential infinite loop

There is no infinite loop. If the dictionary is a string, it is simply skipped. If all dictionaries are strings, than all elements of the finite list are skipped, and the function returns without...

posted 1y ago by __blackjack__‭

Answer
71%
+3 −0
Q&A How to use function composition for applying a function to first elements of a list?

The quick fix is: map (subtract 1) . take n $ l When I put your function in my own Haskell compiler, I get: Possible cause: ‘take’ is applied to too many arguments Remember that in Haskell,...

posted 1y ago by FractionalRadix‭  ·  edited 1y ago by FractionalRadix‭

Answer
71%
+3 −0
Q&A How to solve the "Cannot call from this context" error?

Temporary notice: this is part of an ongoing project of transferring and splitting my canonical from Stack Overflow on common errors in Google Apps Script. As soon as the Q&As are finalized, ...

1 answer  ·  posted 1y ago by Oleg Valter‭  ·  last activity 1y ago by Oleg Valter‭

71%
+3 −0
Q&A How to resolve the mypy error "Returning Any from function declared to return 'Dict[str, Any]'" in Python?

I have a function that loads JSON data and is declared to return a dictionary with string keys and values of any type (Dict[str, Any]). However, mypy is raising an error stating that I am returning...

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

Question python mypy
71%
+3 −0
Q&A Problems with Google Apps Script API JavaScript "How to... Execute function"

As this is the first question about Google Apps Script, here is a very brief description: it is a platform that helps people easily get programmatic access to Google apps data like Gmail messages, ...

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

71%
+3 −0
Q&A What are disadvantages of static functions (ie functions with internal linkage) in C?

There are some reasons why a function would intentionally not be declared static. (In the following I use the term 'module', but in contrast to others, I use it not to describe a file or translati...

posted 1y ago by Dirk Herrmann‭  ·  edited 1y ago by Dirk Herrmann‭

Answer
71%
+3 −0
Q&A 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 2y ago by Razetime‭  ·  edited 2y ago by Alexei‭

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

The answer is indicated on the page for f. Specifically, "[t]he f object is the singleton false value, the only object that is not true." In contrast, t is defined simply as SINGLETON: t where SING...

posted 2y ago by Derek Elkins‭

Answer
71%
+3 −0
Meta Renaming GNU/Linux tag to gnu

I don't think GNU can be used as a stand-alone tag. Apart from the OS, GNU is also a tool collection of various programs, many used for programming, making is a very ambiguous tag which can't stan...

posted 2y ago by Lundin‭

Answer
71%
+3 −0
Q&A Assert that some code is not present in the final binary, at compile or link time.

I'd like to assert that some code can be optimized out, and is not present in the final binary object. #define CONSTANT 0 #if (!CONSTANT) [[landmine_A]] #endif static int foo(void); void...

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

71%
+3 −0
Meta Asking and answering FAQ style questions

Yes it is fine and probably encouraged even. I have written several self-answered Q&A here and they were mostly well-received. They aren't all that easy to write though, especially getting the ...

posted 2y ago by Lundin‭

Answer
71%
+3 −0
Q&A Is there any benefit to using new?

Well, you still need (placement) new for the implementation of the smart pointers themselves. You would also use it (or malloc) to implement custom allocators, for example: https://www.boost.org/d...

posted 2y ago by Dirk Herrmann‭

Answer
71%
+3 −0
Q&A Can UWPNuGetPackages be moved to another drive?

Apparently this is controlled by the registry value Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\NuGet\Repository\UWPNugetPackages. I changed it from C:\Program Files (x86)\Microsoft SDKs\UWPNu...

posted 2y ago by Ullallulloo‭

Answer
71%
+3 −0
Q&A Cast uninitialized variable to (void)

Is it undefined behaviour to cast an uninitialized variable to (void)? Example: int main() { int x; (void)x; return 0; }

4 answers  ·  posted 2y ago by Estela‭  ·  last activity 2y ago by Ethan‭

Question c casting
71%
+3 −0
Q&A How to plot table from pandas dataframe

If you want a table for including in a latex document, then DataFrame.to_latex should be the best way. import pandas as pd import numpy as np df = pd.DataFrame(np.random.rand(9, 4), columns=['a'...

posted 2y ago by Goyo‭  ·  edited 2y ago by __blackjack__‭

Answer
71%
+3 −0
Q&A How to add vertical lines for visual separation in pandas plot

One possibility with axvline: import pandas as pd import numpy as np import matplotlib.pyplot as plt df = pd.DataFrame(np.random.rand(9, 4), columns=['a', 'b', 'c', 'd']) df.plot.bar() plt....

posted 2y ago by samcarter‭  ·  edited 2y ago by samcarter‭

Answer
71%
+3 −0
Q&A How to add vertical lines for visual separation in pandas plot

MWE import pandas as pd import numpy as np import matplotlib.pyplot as plt df = pd.DataFrame(np.random.rand(9, 4), columns=['a', 'b', 'c', 'd']) df.plot.bar() plt.show() Question Ho...

2 answers  ·  posted 2y ago by mcp‭  ·  last activity 2y ago by samcarter‭

71%
+3 −0
Q&A Do you need to use std::move to store a parameter passed by value?

Update: Distinguished between the general case and cases (as with std::string) where it is known that there are no side effects. In the general case, the substitution of the call to a copy constru...

posted 2y ago by Dirk Herrmann‭  ·  edited 2y ago by Dirk Herrmann‭

Answer
71%
+3 −0
Q&A Do you need to use std::move to store a parameter passed by value?

If you have a class which needs to store a construction parameter internally, and you want to take advantage of move semantics, I understand that the parameter should be passed by value: class Foo...

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

Question c++ reference
71%
+3 −0
Q&A Cast uninitialized variable to (void)

It is undefined according to my reading of the standard (I am referring to the latest public draft). int x; (void)x; In the second line, (void)x is a full expression, but x by itself is alread...

posted 2y ago by Dirk Herrmann‭  ·  edited 2y ago by Dirk Herrmann‭

Answer
71%
+3 −0
Q&A How to correctly daemonize a Rocket-based app?

Summary I'm refactoring a Rust-based service/daemon to move away from gRPC and use a Rocket-based API instead. I'm also using the daemonize crate to turn the foreground process into a background p...

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

Question rust rocket daemon
71%
+3 −0
Q&A C naming convention, module trigrams?

Starting with the goals: A naming convention typically aims at supporting several, partly contradictory goals, among which are the following: Compliance with the limitations of the language stan...

posted 2y ago by Dirk Herrmann‭  ·  edited 2y ago by Dirk Herrmann‭

Answer
71%
+3 −0
Q&A What allows a string slice (&str) to outlive its scope?

There are two things going on here. One which technically explains what's going on fully, and another potential misconception you have. For the former, &T implements the Copy trait regardless ...

posted 2y ago by Derek Elkins‭

Answer
71%
+3 −0
Code Reviews Health checks with caching in ASP.NET Core

Context I noticed that an application was flooding the database with simple SELECTs. The investigation revealed some bugs in the health check which theoretically implemented caching (to avoid quer...

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

71%
+3 −0
Q&A Python Parallel plotting and and input reading

Hello everyone, I am seeking help with understanding why multithreading does not work correctly in this example: import time import matplotlib.pyplot as plt import concurrent.futures voltage...

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