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)
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...
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?
Many languages discourage global variables. Why is this?
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...
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 ...
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...
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 ...
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...
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...
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: ...
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 ==== ...
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...
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 ...
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...
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...
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...
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...
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...
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...
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 ...
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...
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...
I ran some Python code and it crashed with ModuleNotFoundError. What is the general approach for dealing with these situations?
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? } } ...
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...
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...
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...
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...
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...
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...
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...
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 ...
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...
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...
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...
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...
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. ...
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...
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...
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 ...
How to log first n lines of a stack trace in Java?
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 ...
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 ...
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...
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 ...
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 "$(ProjectDir)." log -1 --pretty=format:%ad" ...
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...
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(): ...
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 ");...
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...