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 toraritteā
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #293007 |
Post edited: |
— | 26 days ago |
Edit | Post #293007 | Initial revision | — | 26 days ago |
Question | — |
What can cause an HTML form submission result in a new pop-up window? These are the methods I know of: + Set the form's `target` attribute to `blank`. + Add `submit` event listeners (e.g., this SO thread). In the proprietary web app that I have to work with, every form submission pops up a new browser window. Some of these are easily preventable by replacing the... (more) |
— | 26 days ago |
Edit | Post #292242 |
Post edited: |
— | 4 months ago |
Edit | Post #292242 |
Post edited: |
— | 4 months ago |
Edit | Post #292243 |
Post edited: |
— | 4 months ago |
Edit | Post #292243 | Initial revision | — | 4 months ago |
Answer | — |
A: What does Nixpkgs' `callPackage` do? For the record, this write-up is not better than any of the resources listed in the question; writing it simply helped me better understand `callPackage`. Level 0. Poor, but short `callPackage f attrset` will + call function `f` with inputs automatically supplied from `attrset` and Nixpkgs ... (more) |
— | 4 months ago |
Edit | Post #292242 | Initial revision | — | 4 months ago |
Question | — |
What does Nixpkgs' `callPackage` do? `callPackage` is a complex function (reasons include the Nix language being lazy, usage of fixed-point evaluation, overrides, etc.), and this complexity steals the spotlight from what this function actually does and why is it so useful. There are a plethora of online resources about this topic (s... (more) |
— | 4 months ago |
Comment | Post #292162 |
Solid advice, thank you! (more) |
— | 5 months ago |
Comment | Post #292163 |
I did not now about this - thank you! You also (inadvertently?) made a good point that perhaps HTML is not the right format - and I wonder why I didn't think of XML ... or others (OWL, MicroData, RDFa, etc.), for that matter. (Just remembered DocBook, too, and they provide default XSLT transformation... (more) |
— | 5 months ago |
Edit | Post #292162 | Initial revision | — | 5 months ago |
Question | — |
How to establish a relationship between HTML elements (tags)? (i.e., how can one element refer to another one) Should I use the `data-` attributes for this or is there a more idiomatic way? For context, I'm trying to convert annotated legal PDF documents to HTML. Certain parts of these documents are crossed out when a new amendment is added, timestamped, and a "sticky note" directs readers to the secti... (more) |
— | 5 months ago |
Edit | Post #291624 | Initial revision | — | 7 months ago |
Question | — |
What does "parameterised type in the positive / negative position" mean in the context of invariant functors? From PureScript's `Data.Functor.Invariant` documentation (emphasis mine): > A type of functor that can be used to adapt the type of a wrapped function where the parameterised type occurs in both the positive and negative position, for example, `F (a -> a)`. What do the terms "positive" and "neg... (more) |
— | 7 months ago |
Edit | Post #291614 | Initial revision | — | 7 months ago |
Question | — |
Where does the name of the `pure` function in the `Applicative` type class come from? 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 this name. Both the Haskell reference and the PureScript docs use the word "lift", > Haskell Lift a... (more) |
— | 7 months ago |
Comment | Post #291555 |
Thank you! I totally missed `Additive` and `Multiplicative`. Some parts of my question still bother me though, but hopefully I'll be able to ask it in a more coherent manner as I gain better understanding of this topic over time. (more) |
— | 7 months ago |
Edit | Post #291553 | Initial revision | — | 7 months ago |
Question | — |
Why is the `Data.Int` type not a `Semigroup` in PureScript but `String` is? ``` > "lo" <> "fa" "lofa" > 1 <> 2 Error found: in module $PSCI at :1:1 - 1:7 (line 1, column 1 - line 1, column 7) No type class instance was found for Data.Semigroup.Semigroup Int ``` Is this for purely technical reasons as there would have to... (more) |
— | 7 months ago |
Edit | Post #291459 |
Post edited: Hope you don't mind me adding this to your answer. I thought there would be no point in opening another one. Thanks again! |
— | 7 months ago |
Suggested Edit | Post #291459 |
Suggested edit: Hope you don't mind me adding this to your answer. I thought there would be no point in opening another one. Thanks again! (more) |
helpful | 7 months ago |
Comment | Post #291459 |
Exactly what I needed. Thanks:) (more) |
— | 7 months ago |
Edit | Post #291455 | Initial revision | — | 7 months ago |
Question | — |
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? ``` mydb=> \d authuser Table "public.authuser" Column | Type | Collation | Nullable | Default +-----... (more) |
— | 7 months ago |
Edit | Post #291325 |
Post edited: |
— | 8 months ago |
Edit | Post #291325 |
Post edited: |
— | 8 months ago |
Edit | Post #291325 | Initial revision | — | 8 months ago |
Answer | — |
A: What determines where the focus goes back to when clicking on a browser's back button? Short answer The HTML specification only addresses scroll position restoration behavior, so the main factors that influences where focus will land when navigating the browser history are: user agent implementations JavaScript accessibility attributes browser extensions At the moment, ... (more) |
— | 8 months ago |
Edit | Post #291296 |
Post edited: |
— | 8 months ago |
Edit | Post #291298 | Initial revision | — | 8 months ago |
Answer | — |
A: How to merge Django model query results? Just found the How Can I Combine Two or More QuerySets in a Django View? article by James W. that perfectly answers my question (and just learned that a "Django model query" is called a `QuerySet`). To sum up: Do the `QuerySet`s belong to the same model? 1. YES: use to `|` union operator. ... (more) |
— | 8 months ago |
Edit | Post #291297 | Initial revision | — | 8 months ago |
Question | — |
How to merge Django model query results? I have to modify a legacy Django web application where there are 2 tables to store the same information using the same database structure, and the only difference is the names of the tables (and the corresponding Django models): + `ProgramAAssignments` model for `programaassignments` table + `Pro... (more) |
— | 8 months ago |
Edit | Post #291296 |
Post edited: |
— | 8 months ago |
Edit | Post #291296 |
Post edited: |
— | 8 months ago |
Edit | Post #291296 |
Post edited: |
— | 8 months ago |
Edit | Post #291296 |
Post edited: |
— | 8 months ago |
Edit | Post #291296 |
Post edited: |
— | 8 months ago |
Edit | Post #291296 | Initial revision | — | 8 months ago |
Question | — |
What determines where the focus goes back to when clicking on a browser's back button? As far as I can tell, it is in part determined by the HTML spec's History API1, specifically the value of `history.scrollRestoration`. Quoting the HTML spec's scroll restoration mode paragraph: > + `"auto"` > The user agent is responsible for restoring the scroll position upon navigation. > ... (more) |
— | 8 months ago |
Comment | Post #291228 |
Well, it surely wasn't obvious to me right away, but once it clicked, I was surprised how I could've missed such an easy step. Thanks again and have a great day! (more) |
— | 9 months ago |
Edit | Post #291229 |
Post edited: |
— | 9 months ago |
Edit | Post #291228 |
Post edited: |
— | 9 months ago |
Comment | Post #291228 |
Thank you for the clarification! I made an edit suggestion lining up the terms - it took me unnecessarily long to understand it as I have no experience in theorem proving, so "explain it to me like I'm 5" is how I roll for now.. Is my assumption correct that you picked `h = switch f` intuitively? (more) |
— | 9 months ago |
Suggested Edit | Post #291228 |
Suggested edit: (more) |
helpful | 9 months ago |
Comment | Post #291232 |
Thank you again! (more) |
— | 9 months ago |
Edit | Post #291229 |
Post edited: |
— | 9 months ago |
Comment | Post #291228 |
Wow, the simplicity of this blew my mind. Did you come up with this on the spot or is this a well known formula in other (pure) functional programming languages?
I'm also trying to make sense how `id` can be the first argument to `>=>`, so here's another question if you are interested: [Why does `le... (more) |
— | 9 months ago |