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)
60%
+1 −0
Adding dependency with cabal in gitlab-ci

I have a project I normally build with nix and cabal, however I also want to publish my documentation onto gitlab pages. It's impractical to run my nix on the gitlab CI, so I've just been using cab...

0 answers  ·  posted 23d ago by WheatWizard‭

50%
+0 −0
How to test if chrome dev tools are open in JavaScript?

Some web sites are able to detect that Developer Tools is open as output a message in a the console. How does JavaScript know that the Chrome DevTools are open? Could this be spoofed?

0 answers  ·  posted 29d ago by kreijstal‭  ·  edited 28d ago by Alexei‭

75%
+4 −0
Why is global evil?

Many languages discourage global variables. Why is this?

3 answers  ·  posted 1mo ago by matthewsnyder‭  ·  last activity 1mo ago by mavavilj‭

66%
+2 −0
Filter stashes by pathspec

The documentation for git stash list says list [<log-options>] List the stash entries that you currently have. Each stash entry is listed with its name (e.g. stash@{0} is the latest entry...

0 answers  ·  posted 1mo ago by Michael‭  ·  edited 1mo ago by Alexei‭

50%
+0 −0
Migrating from Az Co DB NoSQL to Az Co DB MongoDB, error?

With Azure Data Factory I tried migrating from Azure Cosmos DB NoSQL to Azure Cosmos DB MongoDB. The export went fine from the NoSQL but the import to the MongoDB did not work. I got no reasonable ...

1 answer  ·  posted 9d ago by propatience‭  ·  last activity 9d ago by propatience‭

60%
+1 −0
Convert Synapse SQL Server hex `sid` to Azure Entra group object ID.

Suppose I have an Azure Synapse Serverless SQL database. I can run the following to get the sid of added groups: select name, type_desc, authentication_type_desc, sid from sys.database_principal...

0 answers  ·  posted 23d ago by daviewales‭

41%
+3 −5
Building a language model completely from scratch

What I would like to do I would like to try to build a language model 100% from scratch if possible, for a learning experience. That means no external libraries and no pre-curated datasets. It ...

1 answer  ·  posted 3mo ago by Julius H.‭  ·  last activity 3mo ago by matthewsnyder‭

60%
+1 −0
MongoDB Java Morphia case insensitive criteria query?

So I googled some on how to make a case insensitive criteria query but could not find the solution very easily. So I basically have code that looks like this: ... query.criteria("fieldName").con...

1 answer  ·  posted 3mo ago by propatience‭  ·  edited 3mo ago by propatience‭

71%
+3 −0
What guarantees does Bash make about order of :- Parameter Expansion when it is not in POSIX mode?

I tried to check info bash but only got a copy of the man page. This is when I learned that I could apt install bash-doc to get the "full" Bash manual. After checking both the info pages and the m...

1 answer  ·  posted 3mo ago by aghast‭  ·  last activity 2mo ago by Quasímodo‭

71%
+3 −0
Why does RFC 3986 (URI generic syntax) declare the "host" component to be case-insensitive when the syntax rules show it to be case-sensitive?

First, a reminder to future self (the figure RFC 3986, Section 3. Syntax Components complemented with Section 3.2. Authority): The following are two example URIs and their component parts: ...

1 answer  ·  posted 1mo ago by toraritte‭  ·  edited 1mo ago by toraritte‭

71%
+3 −0
Privilege escalation from Python like from systemd

When you try to do a privileged systemd operation without the privilege, you get an escalation prompt: $ systemctl stop docker ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ==== ...

1 answer  ·  posted 25d ago by matthewsnyder‭  ·  last activity 25d ago by Karl Knechtel‭

50%
+0 −0
Does Socket.AcceptAsync throw SocketException for any transient reason?

I'm writing exception handling around a call to Socket.AcceptAsync in a loop. One of the exceptions it's documented to throw is SocketException, but the documentation is vague: An error occurred...

1 answer  ·  posted 4mo ago by Kevin Krumwiede‭  ·  last activity 4mo ago by Alexei‭

60%
+1 −0
What is the difference between `static let` and `static member` in F#?

Taking the example from this Stackoverflow question: type Vector2D(dx : float, dy : float) = static let zero = Vector2D(0.0, 0.0) static let onex = Vector2D(1.0, 0.0) static let ...

1 answer  ·  posted 4mo ago by toraritte‭  ·  last activity 4mo ago by toraritte‭

f#
22%
+0 −5
How to Select From Multiple images to display main product image? [closed]

Below are the links to code for my project. HTML CSS JavaScript I have created Magnifying Image which was successful now I am trying to add multiple images which can be display in main produc...

0 answers  ·  posted 3mo ago by abhishek27suvarna‭  ·  edited 1mo ago by CPlus‭

50%
+0 −0
Why is inter-VLAN communication not working in my bus topology network set-up in Cisco Packet Tracer?

I have created a simple bus topology connecting 2 switches and a router, with each switch connected to their respective end devices through ordinary star topology. The switch model used was 3560-24...

0 answers  ·  posted 3mo ago by Phoenix‭  ·  edited 3mo ago by Alexei‭

36%
+2 −5
What makes people able but unwilling to contribute to FOSS projects? [closed]

Suppose someone has the requisite knowledge and skillset to contribute to a FOSS project, they have the free time to do so and they are aware of the project. Yet, they decide not to contribute. Thi...

0 answers  ·  posted 1mo ago by matthewsnyder‭  ·  closed 1mo ago by Alexei‭

66%
+2 −0
How to surround jinja expression with curly brackets?

A jinja template expression starts and ends with double curly brackets, which the templating engine consumes. But what if you need a single pair of curly brackets left in the output? Something lik...

1 answer  ·  posted 3mo ago by Iizuki‭  ·  last activity 1mo ago by Alexei‭

66%
+2 −0
Integrating a standalone database 'engine' into an OLAP database

I'm trying to build a proper understanding of what an OLAP[1] datastore vs an OLAP data engine is. I tend to put too much value on keywords like "engine" vs "data store." If it has "engine," I thin...

0 answers  ·  posted 27d ago by erjcan‭  ·  edited 27d ago by Michael‭

66%
+2 −0
Images won't fit flex container on chrome

I browse deviantArt from time to time and I wanted to make images display bigger, because there is so much useless whitespace on that site. On first glance that would be simple - remove the set di...

1 answer  ·  posted 26d ago by martixy‭  ·  last activity 25d ago by martixy‭

77%
+5 −0
Can GitHub rewrite authorship of commits?

GitHub has a setting wherein they offer to "anonymize" your user email from, say, somebody@example.com to somebody@users.noreply.github.com. I presume this is to prevent you from getting spam from ...

1 answer  ·  posted 5mo ago by Michael‭  ·  edited 5mo ago by matthewsnyder‭

50%
+0 −0
How to hide files from the VS Code sidebar without pattern matching?

I want to clear my view of my file explorer sidebar in VS Code, and just see a few files I want to focus on. Is there an easy way to do this, using the mouse, and not file hiding using pattern mat...

1 answer  ·  posted 3mo ago by Julius H.‭  ·  edited 3mo ago by matthewsnyder‭

60%
+1 −0
ServletContext matched by more than 1 path

The javadoc for ServletContext.getContextPath() says that It is possible that a servlet container may match a context by more than one context path. I was trying to find any explanation how t...

0 answers  ·  posted 5d ago by morgwai‭

75%
+4 −0
How to troubleshoot ModuleNotFoundError?

I ran some Python code and it crashed with ModuleNotFoundError. What is the general approach for dealing with these situations?

2 answers  ·  posted 4mo ago by matthewsnyder‭  ·  last activity 4mo ago by Karl Knechtel‭

66%
+2 −0
PHP - Why using "global" considered bad?

In PHP why is using global like in the example below considered bad? $a = 1; class foo { public function bar() { global $a; // <-- Why is this considered bad? } } ...

1 answer  ·  posted 1mo ago by Vanity Slug ❤️‭  ·  last activity 1mo ago by matthewsnyder‭

83%
+8 −0
Git-ignoring files with special characters in their names, especially newlines

My actual motivation is to understand the semantics of the .gitignore file syntax in precise detail, for a program which is expected to emulate them as accurately as possible. However, while coming...

1 answer  ·  posted 6mo ago by Karl Knechtel‭  ·  last activity 6mo ago by Peter Taylor‭

66%
+2 −0
Understanding the Matrix protocol vs Matrix server and what can be implemented from scratch

Since Matrix messenger offers only a protocol,[1] as a software engineer I can choose to: Write my own client or use an existing client Write my own server with my own server logic or join an e...

1 answer  ·  posted 27d ago by erjcan‭  ·  last activity 27d ago by Michael‭

81%
+7 −0
What is the point of triggering CI/CD with an empty git commit?

I read posts (e.g., 1, 2, 3) that recommend triggering a CI build process by pushing an empty git commit. I don't understand how this is a good idea as the commit history will be peppered with mea...

3 answers  ·  posted 6mo ago by toraritte‭  ·  last activity 5mo ago by matthewsnyder‭

66%
+2 −0
How can I manage multiple consecutive strings in a buffer (and add more later)?

This question is inspired by If I have a char array containing strings with a null byte (\0) terminating each string, how would I add another string onto the end? on Stack Overflow. Suppose I have...

2 answers  ·  posted 1mo ago by Karl Knechtel‭  ·  last activity 5d ago by Lundin‭

80%
+6 −0
What is the meaning of "short circuit" operators?

When reading about various operators used by programming languages, the term "short circuit behavior" is often used. For example in this C code: int a = 0; a && b++ Someone explained t...

2 answers  ·  posted 7mo ago by Lundin‭  ·  last activity 7mo ago by matthewsnyder‭

80%
+6 −0
Can I access an array element from a pointer to an object contiguous with but outside the array?

C prohibits accessing an array out of bounds even if measures were taken to ensure that what should lie outside those bounds were known: struct MyStruct { int x[2]; int y, z; }; static...

1 answer  ·  posted 1mo ago by CPlus‭  ·  last activity 1mo ago by Lundin‭

71%
+3 −0
Using an existing web server vs writing your own

When writing a dynamic web service, you broadly speaking have two paths: Use an existing web server (e.g. Apache, Nginx or Lighttpd) to handle the "raw" web requests and implement your own cod...

4 answers  ·  posted 7mo ago by Iizuki‭  ·  last activity 6mo ago by Basile Starynkevitch‭

60%
+4 −2
How to speed up MySQL query?

I have a website about vacation villa rentals. Around 800 properties are listed. When i start a search, i get properties with my first query which filters type, style, area, no. of rooms, capacity ...

2 answers  ·  posted 5mo ago by erenlerhakan‭  ·  last activity 5mo ago by ArtOfCode‭

75%
+4 −0
How do I share a type between a client and server, but make a specific field optional for one and required for the other?

Let's say I have a client/server application with a data structure on the server side: type User = { name: string; superSecretGovernmentIdNumber: string; }; These fields are both non-nul...

1 answer  ·  posted 7mo ago by Emily‭  ·  edited 7mo ago by Emily‭

60%
+1 −0
How to start creating a Giraffe web project and how to serve it?

Having some trouble with giraffe-template on Mac M1, so decided to set up a Giraffe project manually. Started following the Doing it manually section of the Giraffe README, but got stuck right away...

1 answer  ·  posted 1mo ago by toraritte‭  ·  last activity 1mo ago by toraritte‭

60%
+1 −0
Maven JPA integration: processor not found

Personal Project: I am new to Maven and have spent a few weeks troubleshooting pom errors with chatGPT. Tutorials are hard to come by online, because annotation-processing in Java is more complica...

2 answers  ·  posted 1mo ago by tylerbakeman‭  ·  last activity 1mo ago by Zer0‭

66%
+2 −0
What is the purpose of having a wrapper class for JarFile in Spring-boot-loader?

My question relates to Spring-boot-loader v2.6.15. For the purposes of this question, I will refer to Spring's custom JarFile class as CustomJarFile to avoid confusion. Context I am reusing so...

1 answer  ·  posted 3mo ago by Miss Skooter‭  ·  last activity 3mo ago by Miss Skooter‭

50%
+0 −0
Eclipse Custom Errors for Annotation Processing

In Eclipse, is it possible to setup custom errors or markers in the editor, for annotation processing? For example, the standard squiggly lines with descriptions. This question is not important. ...

0 answers  ·  posted 26d ago by tylerbakeman‭

66%
+2 −0
How to write a function that only accepts a list of `Error string` `Results` in F# on the level of types?

For example, given a mergeErrors function where input is always a list of Error strings, let es = [ Error 1; Error 2; Error 3 ] let mergeErrors<'a> (errors: Result<'a,int> list) : R...

1 answer  ·  posted 3mo ago by toraritte‭  ·  last activity 3mo ago by Derek Elkins‭

f#
66%
+2 −0
VS Code: How to open a file and folder in a new window?

I've figured out that code --new-window /foo/bar/baz.txt will open baz.txt in a new window. But when I do this, it says "no folder opened" in the file explorer pane. That makes it hard to work with...

2 answers  ·  posted 7mo ago by matthewsnyder‭  ·  last activity 7mo ago by Moshi‭

75%
+4 −0
Wikidata: How do I ask for the start date of a property in SPARQL?

I have a SPARQL query to Wikidata that returns the names and handles and parties of politicians for whom a Mastodon address is stored at Wikidata. Filtered by nationality and with an output of the ...

0 answers  ·  posted 5mo ago by wasuko‭

60%
+1 −0
How to log first n lines of a stack trace in Java?

How to log first n lines of a stack trace in Java?

2 answers  ·  posted 2mo ago by propatience‭  ·  last activity 2mo ago by hkotsubo‭

75%
+4 −0
Is it possible to re-export types similar to JS?

I'm writing a library "MyLibrary". In there, I group code into sections that make sense. Let's say I have a folder "Reports" and a folder "Helpers". I would like to have my code separated while ...

1 answer  ·  posted 7mo ago by raphaelschmitz‭  ·  last activity 6mo ago by raphaelschmitz‭

c#
71%
+3 −0
How should open source forks, with a mix of upstreamable and non-upstreamable commits, be maintained?

I have a few different projects that rely on open source technology that I wish to make modifications to (say, to add key features for business or personal use) that will vary between upstreamable ...

1 answer  ·  posted 8mo ago by eoin.oneill‭  ·  last activity 7mo ago by matthewsnyder‭

80%
+6 −0
How to compare a git stash to the current working tree?

In git you can put your current changes aside for a moment with git stash. This is really neat but what often ends up happening is that you forget what was in there, and what was the state of the b...

1 answer  ·  posted 6mo ago by Iizuki‭  ·  edited 6mo ago by Iizuki‭

77%
+5 −0
Are there technical reasons to pick one struct coding style over the other?

C offers two different styles when it comes to structs (and union/enum too). Either declare them using a struct tag only ("struct tag style"): struct my_type { ... }; struct my_type x; Or ...

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

66%
+2 −0
Git command formatting characters in msbuild are interpreted incorrectly

I wish to add a property with the date of the current Git commit to the assembly info. From my .csproj: <Exec Command="git -C &quot;$(ProjectDir).&quot; log -1 --pretty=format:%ad" ...

1 answer  ·  posted 3mo ago by LyndonGingerich‭  ·  edited 3mo ago by Michael‭

60%
+1 −0
Can't use tf.timestamp() from within @tf.function with XLA / jit_compile=True

I would like to use tf.timestamp() when it is available (eager mode and graph mode without XLA), and use 0. (or a better fallback if there is one) when it is not available (with XLA; @tf.function(j...

0 answers  ·  posted 8mo ago by daniel_s‭

66%
+4 −1
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 5mo ago by Karl Knechtel‭  ·  last activity 5mo ago by matthewsnyder‭

60%
+1 −0
Ghidra decompiler: c_str() used in phantom string?

I loaded a binary into Ghidra for analysis. The decompiler says undefined8 main(void) { basic_ostream *pbVar1; char *pcVar2; [--snip--] pbVar1 = std::operator<<(pbVar1,"PXZ ");...

1 answer  ·  posted 6mo ago by nteodosio‭  ·  edited 5mo ago by Alexei‭

60%
+1 −0
Drop-down values in Excel cells are not specified in Data Validation rules and global search didn't find them in workbook, so where do they come from?

On top of values seemingly coming from nowhere in multiple columns, they also affect each other's behavior: In the GIF below, if the cells in the left column have no value selected, then there is n...

1 answer  ·  posted 6mo ago by toraritte‭  ·  edited 6mo ago by toraritte‭