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.

Activity for Iizukiā€­

Type On... Excerpt Status Date
Edit Post #290031 Initial revision about 1 year ago
Question Git add/stage only part of a file's changes
Say I've made a bunch of changes to a file and would like to split those changes into two or more commits. Normal `git add` however stages the whole file in one go. So how to add only some of the changes in a file?
(more)
about 1 year ago
Edit Post #289946 Post edited:
Grammar
about 1 year ago
Edit Post #289947 Post edited:
Grammar
about 1 year ago
Edit Post #289947 Initial revision about 1 year ago
Answer A: How to validate Ansible role dictionary argument's "additionalProperties"
Apparently there just isn't an equivalent of `additionalProperties` in Ansible. The way around this is to break the dictionary argument into a list of key/value pairs: ```yaml argumentspecs: main: options: dictionaryargument: description: A map from string to integers. ...
(more)
about 1 year ago
Edit Post #289946 Post edited:
Removed clutter
about 1 year ago
Edit Post #289946 Initial revision about 1 year ago
Question How to validate Ansible role dictionary argument's "additionalProperties"
In JSON Schema one can use the additionalProperties key to validate properties whose names are not know. You can still impose restrictions on their type. How to do this in an Ansible role argument spec? This doesn't work: ```yaml argumentspecs: main: options: dictionaryargument...
(more)
about 1 year ago
Edit Post #289944 Post edited:
yaml
about 1 year ago
Edit Post #289945 Post edited:
yaml
about 1 year ago
Edit Post #289945 Initial revision about 1 year ago
Answer A: How to use Ansible extract filter in map with an external dictionary
Turns out I wasn't far off. The `dictionary` mustn't be quoted. So the following works: ```yaml - name: Extraction test vars: dictionary: one: 1 two: 2 keylist: - one - two extracted: "{{ keylist | map('extract', dictionary) }}" ansible.builtin.de...
(more)
about 1 year ago
Edit Post #289944 Initial revision about 1 year ago
Question How to use Ansible extract filter in map with an external dictionary
Ansible's extract filter is supposedly made for use in map, but at the time of writing the documentation doesn't actually show how to use it together with the map filter. The following outputs VARIABLE IS NOT DEFINED!, so clearly it's missing something. I would like it to output [1, 2]. ```yaml...
(more)
about 1 year ago
Comment Post #289928 Good points. I wonder if there's any way to avoid the force pushing after using reset?
(more)
about 1 year ago
Comment Post #289928 Just a citation, added as a direct link. Feel free to adjust formatting.
(more)
about 1 year ago
Edit Post #289927 Post edited:
Added git references
about 1 year ago
Edit Post #289928 Initial revision about 1 year ago
Answer A: How to revert main branch to an earlier commit in git?
With `git reset`, but first, you may want to save the current state in another branch: ```bash $ git switch main $ git branch backup-of-main ``` Now the (perhaps messed up) state is safely stored in branch `backup-of-main`, and you can always just switch back to it and have another swing. T...
(more)
about 1 year ago
Edit Post #289927 Initial revision about 1 year ago
Question How to revert main branch to an earlier commit in git?
How to move the `main` branch back to an earlier commit in git?
(more)
about 1 year ago
Edit Post #289838 Post edited:
about 1 year ago
Edit Post #289839 Post edited:
about 1 year ago
Edit Post #289839 Initial revision about 1 year ago
Answer A: How to pass command line arguments when using cargo run?
Specify your arguments after `--`: ```bash cargo run --offline -- --my-argument 42 ``` `--offline` is just an example of cargo's own argument. They are passed before `--`. `--my-argument` and `42` will be passed to your program. Source: The Cargo Book
(more)
about 1 year ago
Edit Post #289838 Initial revision about 1 year ago
Question How to pass command line arguments when using cargo run?
When developing a rust program you build and run using `cargo run`. However you cannot just append arguments to that as they will be caught (and likely rejected) by cargo itself. So how to pass arguments through cargo run to the actual program under development?
(more)
about 1 year ago
Edit Post #289829 Post edited:
about 1 year ago
Comment Post #289829 Yes that's it. Probably one can delete any branch like this, but that's beyond this question.
(more)
about 1 year ago
Edit Post #289829 Post edited:
about 1 year ago
Edit Post #289830 Initial revision about 1 year ago
Answer A: How to delete a local branch in git?
The safe way: [[1]](https://git-scm.com/docs/git-branch#Documentation/git-branch.txt---delete) ```bash git branch --delete ``` It will fail if the branch isn't merged. If this is ok then you can delete it anyway like this: [[2]](https://git-scm.com/docs/git-branch#Documentation/git-branch.txt---...
(more)
about 1 year ago
Edit Post #289829 Initial revision about 1 year ago
Question How to delete a local branch in git?
How to delete a local git branch which hasn't been pushed to anywhere, and only exists locally?
(more)
about 1 year ago
Edit Post #289571 Post edited:
over 1 year ago
Edit Post #289572 Initial revision over 1 year ago
Answer A: Tidy Ansible assert module loop output
Use the `quiet` parameter: ```ansible - name: Assertions ansible.builtin.assert: that: - item quiet: true loop: "{{ loopitems }}" vars: loopitems: - true - true - false ``` This will produce the familiar one line outputs.
(more)
over 1 year ago
Edit Post #289571 Initial revision over 1 year ago
Question Tidy Ansible assert module loop output
Looping in Ansible usually produces a neat output of one line per iteration (per host): ```ansible ... ok: [Arch] => (item=something) ok: [Arch] => (item=somethingelse) ok: [Arch] => (item=yetanotherthing) ok: [Arch] => (item=thisbetterbethelastone) ok: [Arch] => (item=ohhnoitwasnt) ok: [Arch...
(more)
over 1 year ago
Comment Post #289491 How does git actually handle incomplete (local) repositories? Given that commits are changesets, just cloning a few of the most recent changes wouldn't result in anything sensible. So does it like create an archive of the history beyond the desired depth, and apply the most recent commits on that?
(more)
over 1 year ago