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
This is not exactly what you're asking for, but you could use bat, which has source code syntax highlighting and just use the raw Markdown.
You can query for P580 (start time) qualifiers on P4033 (Mastodon address) statements like this: p:P4033 ?mastoStatement. ?mastoStatement pq:P580 ?joinedfediverse. Note the use of p: instead o...
This is my solution to the first task of the Advent of Code 2023. The task description is: On each line, the calibration value can be found by combining the first digit and the last digit (in t...
When printing Markdown text to the terminal, how can I get a bit more formatting so it looks nicer? I realize that this is a bit of a contradiction, since terminals generally use only one font. Bu...
Is it possible to somehow prohibit anonymously subclassing of a specific class? For instance, with a plain public parent class: public class Parent { } Extending this class should not be pos...
Yes, tools used by developers are on topic here From the top of the front page (emphasis mine): General Q&A about programming, scripting, software design & architecture, process, tools,...
Reminder: never use sudo to run Pip. This can never properly fix a problem and only introduces serious security risks. Installing third-party packages from PyPI can run arbitrary code at install ...
My (non-Windows) operating system came with Python, but that Python didn't include Pip. I followed instructions to install Pip for the included Python, using my system's package manager. But now w...
I am trying to join some video files and have an issue. I have boiled down the problem to the following minimal working example. I create a 2-second mp4 with a silent audio stream: $ ffmpeg -f l...
For completeness, I'll add some more obscure ways: If your goal is to simply move some changes from one branch to another, you can also use git rebase and git cherry-pick. These give you more cont...
A Fix An existing pattern needs to be cleared to allow the new rule to match on any 2 trailing spaces: syntax clear markdownLineBreak syntax match markdownLineBreak '\s\{2}$' conceal cchar=⏎ ...
I think the problem is in the language of the status. "Closed" is not final, but it does sound like it, and as a new user who is seeking an answer, it can be received as affronting. Can we introdu...
In short, I want to access a multidimensional array, starting with an entry, say a 4D array called "new_array". new_array[0,1,2,3] and getting as an output the sliced arrays new_array[:,1,2,3],n...
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...
How do I trim a sorted list in Python, so that I only keep the elements greater than a certain value? For example, if I have this list: l = [1, 3, 5, 6, 7, 8] How can I efficiently get a list of...
"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...
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...
At this point in my learning journey, I simply accepted that this function is called pure (both in Haskell and in PureScript), but it would have helped a lot if I had known the reasoning behind thi...
Using the write method The write method of a file offers a much more limited interface. It only accepts one argument - a string, for a file opened in text mode - and outputs just what it's given. ...
It seems like what you want to do can be achieved by using data.assign_coords(t=[0.123]) The error message is extremely confusing in this respect, but it seems like the new value for the coordi...
I have the following code: use serde::{Deserialize, Serialize}; #[derive(Sereialize, Deserialize)] struct Container<const SIZE: usize> { contents: [String; SIZE] } But I'm getti...
I know that 1 is sometimes called a pure function - although apparently a pure function must also not vary when the input is constant. By negation, the other kind are called impure functions, alth...
I know that I can display a single string in the terminal window like print("example") (or similarly with a string in a variable), and I know how to open text files and write to them. I also know ...
A compromise exists between automatically inferring package names (unreliable and potentially dangerous) and writing out an explicit separate requirements.txt file: script-running tools such as pip...
An alternative to grep is Awk, which makes this pretty easy. To find lines which contain both: find . -type f -exec awk '/foo/ && /bar/' {} + (Maybe add { print FILENAME ":" FNR ":" $0...