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.3k posts
 
50%
+0 −0
Q&A Check if a file exists in Node.js

You can use existsSync: import { existsSync } from 'node:fs'; if (existsSync('/path/to/file')) { console.log('Found'); } else { console.log('Not found'); } If you want to avoid block...

posted 1h ago by philipp.classen‭  ·  edited 40m ago by philipp.classen‭

Answer
50%
+0 −0
Q&A Check if a file exists in Node.js

How to check in Node.js if a file exists?

1 answer  ·  posted 1h ago by philipp.classen‭  ·  last activity 40m ago by philipp.classen‭

Question javascript node.js
60%
+1 −0
Q&A Add an IDistributedCache to EntityFramework

Is there a standard way to add an IDistributedCached in front of a database using EntityFramework? Something that handles checking the cache for reads, updating the cache on writes, and uses distri...

0 answers  ·  posted 1d ago by rcmosher‭

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

As mentioned in another answer, when you have code such as if (someVar), you're subject to truthiness. To be more precise, this code will run under the rules of Boolean coercion. In JavaScript, wh...

posted 1d ago by hkotsubo‭  ·  edited 1d ago by hkotsubo‭

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 1d ago by Derek Elkins‭

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

if(typeof(var) !== 'undefined' || typeof(var) !== null || var !== ''){}else{} is a wild thing to write for anything other than a variable that takes either undefined, null, or a string as possib...

posted 2d ago by r~~‭

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

I am fairly certain this isn't a duplicate so please bear with me. I check for boolean true||false using if() as a matter of course in my programming. I've programmed extensively in PHP, some in C...

3 answers  ·  posted 2d ago by MER‭  ·  last activity 1d ago by hkotsubo‭

40%
+0 −1
Meta How can we grow this community?

This is long, I apologize, but I hope someone finds my treatise valuable.[1] StackExchange, while a great improvement is not the end all be all of QA... (and not just because they recently announc...

posted 3d ago by MER‭  ·  edited 3d ago by Michael‭

Answer
60%
+1 −0
Q&A TypeScript won't recognize cross-module type extensions

I'm trying to write a Node module that extends the functionality of another module (a peer dependency which I do not control) using a register function exposed by the other module. This adds additi...

0 answers  ·  posted 4d ago by Andrew Ray‭

60%
+1 −0
Q&A Testing an opaque type's internals

I'd propose (and have generally used, back when I worked on C projects) a fourth option that I don't think gets too far out of line. If I understand the situation correctly, that you want to test ...

posted 5d ago by John C‭

Answer
60%
+1 −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 5d ago by FractionalRadix‭  ·  edited 5d ago by FractionalRadix‭

Answer
60%
+1 −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 ...

1 answer  ·  posted 5d ago by FractionalRadix‭  ·  last activity 5d ago by FractionalRadix‭

Question docker gitlab
60%
+1 −0
Q&A Can you run Python code on text in VS Code?

If your Python Interpreter is choosen inside of Vscode, you can normally find it on the bottom right of your screen. This is the same Interpreter that the Terminal inside VSCode is using. When yo...

posted 5d ago by SirGamsay‭  ·  edited 5d ago by Alexei‭

Answer
71%
+3 −0
Q&A Testing an opaque type's internals

"Black box testing" makes sense when dealing with opaque types so that's the first thing you should be doing and probably the most meaningful test too, so that's where you should put most of yo...

posted 5d ago by Lundin‭

Answer
75%
+4 −0
Q&A Testing an opaque type's internals

First: What is an opaque pointer in C? Now when it comes to testing such a type, I know of 3 ways: Include the source file (the one containing the definition of the type and the functions tha...

2 answers  ·  posted 5d ago by Melkor-1‭  ·  last activity 5d ago by John C‭

71%
+3 −0
Q&A How to sort the output of meta / slash commands in `psql`?

It's been a while, but the answer is "yes and no," I believe. No: The describe-schema command doesn't (last I heard) allow any modification. Yes: The describe-schema command also doesn't do any...

posted 6d ago by John C‭  ·  edited 6d ago by toraritte‭

Answer
71%
+3 −0
Meta RSS feeds for tags

There are RSS feeds for tags already, linked at the bottom of the tag page. (Yeah, I missed it too; I'll see if we can make that more obvious.) For example, here's the RSS feed for the feature-re...

posted 6d ago by Monica Cellio‭

Answer
71%
+3 −0
Q&A How to sort the output of meta / slash commands in `psql`?

For example, how to sort the output below by the values in "Column" in the psql shell itself? my_db=> \d auth_user Table "public.auth_user" Column ...

1 answer  ·  posted 6d ago by toraritte‭  ·  edited 20h ago by MER‭

50%
+1 −1
Q&A How do I concatenate two animated gifs together?

You can use imagemagick. Suppose you have the files a.gif and b.gif and want to play a and then b. Then use the command: convert a.gif b.gif out.gif And your results will be written to out.gif....

posted 9d ago by congusbongus‭

Answer
33%
+0 −2
Q&A How do I concatenate two animated gifs together? [closed]

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 9d ago by congusbongus‭  ·  closed 8d ago by Alexei‭

Question gif
60%
+1 −0
Q&A PEP20 on namespaces: What exactly is it saying to do?

To start with, it's worth noting that the Zen of Python is more about development of Python, rather than development with Python. That may mean that some bits of its wisdom are more applicable to q...

posted 9d ago by BlckKnght‭

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 9d ago by aghast‭

Answer
71%
+3 −0
Meta RSS feeds for tags

How can i get a per-tag RSS feed? I only see the general feed at the main pages and i don't want to subscribe to tags via email.

1 answer  ·  posted 9d ago by JohnRando‭  ·  last activity 6d ago by Monica Cellio‭

Question feature-request
42%
+1 −2
Q&A 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 9d ago by lori‭  ·  edited 9d ago by Alexei‭

Question bash
60%
+1 −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 9d ago by Jacob Raihle‭  ·  edited 9d ago by Jacob Raihle‭

Answer