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
 
66%
+4 −1
Q&A Does Python have a "ternary operator" (conditional evaluation operator like "?:" in other languages)?

Sometimes code needs to assign (or otherwise use) a value that depends on some condition. The naive approach is to use explicit branching, which in Python would look like: if some_condition(): ...

2 answers  ·  posted 1y ago by Karl Knechtel‭  ·  last activity 1y ago by matthewsnyder‭

Question python syntax
66%
+2 −0
Q&A Why is the `Data.Int` type not a `Semigroup` in PureScript but `String` is?

Is this for purely technical reasons as there would have to be at least 2 Semigroup instances (for addition and multiplication), but type classes cannot be implemented multiple times for the same...

posted 1y ago by r~~‭

Answer
66%
+2 −0
Q&A In javascript is there really a good reason to never check for boolean true || false such as if(var){}else{}?

r~~'s answer is good, and I absolutely agree that the condition provided in the question is ridiculous and I've never seen anyone suggest it as a generic replacement for if(var). But I think the ac...

posted 1y ago by Derek Elkins‭

Answer
66%
+2 −0
Q&A Docker push fails with message "denied: requested access to the resource is denied"

Recently I had to push a new Docker image to our GitLab registry. I have the Maintainer role on that project. I had created a new token and used it to log in to Docker. However, when trying ...

2 answers  ·  posted 1y ago by FractionalRadix‭  ·  last activity 1y ago by Alexei‭

Question docker gitlab
66%
+2 −0
Q&A How do I trim a sorted list in Python?

The library module itertools provides a function called dropwhile(). The example they give is: dropwhile(lambda x: x<5, [1,4,6,3,8]) → 6 3 8 So, to get a list of numbers greater than 4, d...

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

Answer
66%
+4 −1
Q&A Subfolders for package-less module imports

Is there some sane way to allow Python to import from subfolders in projects that don't have a package? I have many Python programs that I implemented as Python files inside a directory, without a...

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

Question python-3
66%
+2 −0
Q&A Docker push fails with message "denied: requested access to the resource is denied"

There are many reasons why this error may occur. In my case, my new token had the read_registry scope but not the write_registry scope. I created a new token that had the read_registry and write_...

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

Answer
66%
+2 −0
Q&A How would I display the first line of all files matching a glob?

The first line of a file is head -1. But you probably also want the file name. So something like: for file in glob do first_line="$(head -1 "$file")" printf "%s: %s\n" "$file" "$first_l...

posted 1y ago by aghast‭

Answer
66%
+2 −0
Q&A Best practices for business versioning within Web APIs

Context Our team is developing a solution mainly composed of several microservices relying on ASP.NET Core. We have decided that the simplest and most cost-effective solution would be for service...

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

Question software-practices architecture api-versioning
66%
+2 −0
Q&A How do I share a type between a client and server, but make a specific field optional for one and required for the other?

The existing answer is fine, but you can achieve similar results in many ways using some of TypeScript's utility types. Required<T> While you cannot use (only) Partial to do this, TypeScrip...

posted 1y ago by Jacob Raihle‭  ·  edited 1y ago by Jacob Raihle‭

Answer
66%
+2 −0
Q&A Why does `distutils` seem to be missing or broken? Isn't it part of the standard library?

Understanding distutils and setuptools: the history The short version of "why does installing Setuptools fix the problem?" is that Setuptools provides its own distutils package, overriding anythin...

posted 1y ago by Karl Knechtel‭  ·  edited 1y ago by Karl Knechtel‭

Answer
66%
+2 −0
Q&A Can I conditionally include class members without using #ifdef?

There's nothing as elegant as if constexpr, unfortunately. However, it is possible to achieve the practical effects (member functions and data only present conditionally). Start by creating a clas...

posted 1y ago by Angew‭

Answer
66%
+2 −0
Q&A Can I conditionally include class members without using #ifdef?

#ifdef sections can, of course, be used to include or exclude chunks of code based on some criteria known at compile time. One big problem is that when the condition is evaluated to false, the chun...

1 answer  ·  posted 1y ago by Hyperlynx‭  ·  last activity 1y ago by Angew‭

Question c++
66%
+2 −0
Q&A What happened, or is happening, to other parts of the standard library? Why are they going missing?

A handful of standard library modules either have been, or will soon be, removed from the Python standard library, as part of a general cleanup effort. These modules are seen as out of date and no ...

posted 12mo ago by Karl Knechtel‭

Answer
66%
+2 −0
Q&A How to make Box drive have the files prepared for access when I need it?

I have Box drive on Windows. I use it as a regular folder on the computer. I can store images there. When I store a small number of images (on the order of a couple hundreds) and I do not wait lon...

1 answer  ·  posted 12mo ago by Ivan Nepomnyashchikh‭  ·  last activity 29d ago by Mithical‭

Question python windows box-drive
66%
+2 −0
Q&A Run Spark code without Spark?

There's not always a Spark cluster on hand to test Spark code. Is there some simple program that you can install locally, which has the same behavior as Spark (can run normal Spark scripts) withou...

1 answer  ·  posted 12mo ago by matthewsnyder‭  ·  last activity 12mo ago by congusbongus‭

Question apache-spark
66%
+2 −0
Q&A What's the difference between include_directories and target_include_directories?

include_directories works on all targets in the current CMakeLists.txt file, whereas target_include_directories only adds them for the specified target. include_directories is fine to use for simp...

posted 12mo ago by congusbongus‭  ·  edited 12mo ago by congusbongus‭

Answer
66%
+2 −0
Q&A What's the difference between colorMode and uiMode?

Although they sound similar, they serve different purposes. You are correct in thinking that putting uiMode into your android:configChanges allows your app to handle light/dark mode changes. It al...

posted 12mo ago by zmzaps‭

Answer
66%
+2 −0
Q&A Managing a dependency for a C application

It depends on what you are distributing. There are two types of distributions: Binary (application is already compiled) Source (users download raw source code and compile themselves) Becaus...

posted 11mo ago by zmzaps‭  ·  edited 11mo ago by zmzaps‭

Answer
66%
+2 −0
Meta Should we merge the scope, on-topic and off-topic meta tags?

"Scope" is too broad in that it has other definitions that would cause confusion. For example, "scope" often refers to when a variable in a computer program is accessible to the code at a particul...

posted 1mo ago by Olin Lathrop‭

Answer
66%
+2 −0
Q&A What binds together the loss function, the optimizer and the model in PyTorch?

To have a successful "training session", these should cooperate. I.e. model generates an output from the input data, the loss function says, how bad or good is it, and then the optimizer tunes...

1 answer  ·  posted 9d ago by peterh‭  ·  last activity 7d ago by mr Tsjolder‭

Question python-3
66%
+2 −0
Q&A Convert Shaded Java class to its original

Casting the shaded class to its original is not possible, even though they are exactly similar. One will hit classCastExceptions while doing so The simplest and easiest way is to serialize the sha...

posted 11d ago by Abbas Gadhia‭  ·  edited 10d ago by Abbas Gadhia‭

Answer
66%
+2 −0
Q&A Why python regexps look expecting a begin match, but not an ending one?

It seems matching lines starting with "test", but not the ones ending with it (or containining it somewhere). Yes, re.match matches lines that start with the described pattern: If zero or m...

posted 11d ago by Karl Knechtel‭

Answer
66%
+2 −0
Q&A How to schedule cron jobs in multiple Azure Database for PostgreSQL databases?

The microservices I am working on use multiple PostgreSQL databases on the same instance. Some of them require some cron jobs. I have decided to use the pg_cron PostgreSQL extension, but when tryin...

1 answer  ·  posted 30d ago by Alexei‭  ·  edited 20d ago by Alexei‭

Question postgresql cronjob azure-database-postgresql pg-cron
66%
+2 −0
Q&A From local, how to create new GitHub repo to have GitHub Pages with actions?

gh repo create doesn't have a flag to set GitHub Pages with GitHub Actions. Is there a way to do so, or am I have to visit the setting page to set it manually?

0 answers  ·  posted 7d ago by Ooker‭

Question github