- Sep 2024
-
-
Fields and nested forms are filling in order of their definition. But sometimes you want to change this order, for example, if you have a nested forms in ancestors which depends on data in children forms. For such cases you can use :depends_on option, which accepts fields and nested forms names as Symbol or Array of symbols. They will be filled (and initialized) before dependent.
-
- Jun 2024
-
-
military power and Technology progress have been tightly linked historically and with extraordinarily rapid technological 00:34:11 progress will come military revolutions
for - progress trap - AI and even more powerful weapons of destruction
progress trap - AI and even more powerful weapons of destruction - The podcaster's excitement seems to overshadow any concern of the tragic unintended consequences of weapons even more powerful than nuclear warheads. - With human base emotions still stuck in the past and our species continued reliance on violence to solve problems, more powerful weapons is not the solution, - indeed, they only make the problem worse - Here is where Ronald Wright's quote is so apt: - We humans are running modern software on 50,000 year old hardware systems - Our cultural evolution, of which AI is a part of, is happening so quickly, that - it is racing ahead of our biological evolution - We aren't able to adapt fast enough for the rapid cultural changes that AI is going to create, and it may very well destroy us
-
- May 2024
-
-
nines nine is thought to be largely produced by labs in China
for - new synthetic opiod - nitazene produced by Chinese labs
to - The Conversation - Nitazenes are a powerful class of street drugs emerging across the US - https://hyp.is/aeMEIBYeEe-VK49zALV-KA/theconversation.com/nitazenes-are-a-powerful-class-of-street-drugs-emerging-across-the-us-222244
-
- Dec 2023
-
-
the third is as a psychological uh a psychological perspective on on what hope needs to be in order to give us a sense of agency 00:25:20 and powerful motivation to persevere through difficult times so those three components i mean frankly they're a reflection of my own kind of hope
-
for: powerful hope - description
-
description - powerful hope
- psychological view of what hope needs to be in order to motivate agency
-
-
- Nov 2023
-
pragprog.com pragprog.com
-
The result is a toolkit so powerful that it allows a single individual to create modern applications upon which they can build a competitive business. The way it used to be.
-
-
-
The url_for helpers now support a new option called path_params. This is very useful in situations where you only want to add a required param that is part of the route's URL but for other route not append an extraneous query param.
-
- Oct 2023
-
stackoverflow.com stackoverflow.com
-
I'd argue that when you find a programming language devoid of danger, you've found one that's not very useful.
-
The reason eval is there is because when you need it, when you really need it, there are no substitutes. There's only so much you can do with creative method dispatching, after all, and at some point you need to execute arbitrary code.
-
- Feb 2023
-
docs.google.com docs.google.com
-
I am Joaquín,who bleeds in many ways.The altars of Moctezuma I stained a bloody red. My back of Indian slavery Was stripped crimson from the whips of masters who would lose their blood so pure when revolution made them pay,standing against the walls of Retribution.
I believe Rodolfo Gonzales uses this powerful imagery of a Native American back bloodied from the whips of imperialist masters to show how strong and unbreakable his people are. They stand free today after having endured centuries of abuse and mistreatment.
-
- Dec 2022
-
www.wired.com www.wired.com
-
Unlike numbers or facts, stories can trigger an emotional response, harnessing the power of motivation, imagination, and personal values, which drive the most powerful and permanent forms of social change.
!- reason for : storytelling -storytelling can trigger emotion responses - triggers our imagination and personal values - leading to the most powerful forms of social change
-
- Jul 2022
-
stackoverflow.com stackoverflow.com
-
Process Substitution is something everyone should be using regularly! It is super useful. I do something like vimdiff <(grep WARN log.1 | sort | uniq) <(grep WARN log.2 | sort | uniq) every day.
underused
-
- Jan 2022
-
formidable.com formidable.com
-
It's worth noting that an error can coexist and be returned in a successful request alongside data. This is because in GraphQL a query can have partially failed but still contain some data. In that case CombinedError will be passed to us with graphQLErrors, while data may still be set.
-
- Nov 2021
-
svelte.school svelte.school
-
Actions are deceptively simple yet incredibly powerful.
-
- Sep 2021
-
www.airtable.com www.airtable.com
-
Airtable evolves with you and your team, so you can build a solution with increasing sophistication and capability.
-
- Aug 2021
-
charlypoly.com charlypoly.com
-
We will see that this is not a fatality, because TypeScript is more powerful than you thought and some developers of the community are very crafty.
-
-
medium.com medium.com
-
We focus so much on black magic and avoiding it that we rarely have a chance to enjoy any of the benefits. When used responsibly and when necessary, it gives a lot of power and expressiveness.
-
- May 2021
-
kit.svelte.dev kit.svelte.dev
-
This allows you to modify response headers or bodies, or bypass SvelteKit entirely
Tags
Annotators
URL
-
-
github.com github.com
-
This allows you to have any sort of object as a prop (e.g. you could dynamically import a component inside load and use it with <svelte:component>).
Tags
Annotators
URL
-
- Apr 2021
-
unix.stackexchange.com unix.stackexchange.com
-
I think you can do more with sed as it is an editor rather than simply translate characters.
-
- Mar 2021
-
github.com github.com
-
Or if you need to change the way the string is assembled, you can provide a proc, for example: if defined?(BetterErrors) BetterErrors.editor = proc { |file, line| "vscode://file/%{file}:%{line}" % { file: URI.encode_www_form_component(file), line: line } } end
-
-
trailblazer.to trailblazer.to
-
You don’t have to stick to the task interface! The [circuit interface] is a bit more clumsy, but gives you much better control over how ctx and signals are handled.
-
The circuit interface is a bit more clumsy but it gives you unlimited power over the way the activity will be run.
-
Using this interface empowers you to fully take control of the flow™.
-
patch: -> { step Destroy.method(:tidy_storage), before: :delete_model }
-
- Feb 2021
-
trailblazer.to trailblazer.to
-
For branching out a separate path in an activity, use the Path() macro. It’s a convenient, simple way to declare alternative routes
Seems like this would be a very common need: once you switch to a custom failure track, you want it to stay on that track until the end!!!
The problem is that in a Railway, everything automatically has 2 outputs. But we really only need one (which is exactly what Path gives us). And you end up fighting the defaults when there are the automatic 2 outputs, because you have to remember to explicitly/verbosely redirect all of those outputs or they may end up going somewhere you don't want them to go.
The default behavior of everything going to the next defined step is not helpful for doing that, and in fact is quite frustrating because you don't want unrelated steps to accidentally end up on one of the tasks in your custom failure track.
And you can't use
fail
for custom-track steps becase that breaksmagnetic_to
for some reason.I was finding myself very in need of something like this, and was about to write my own DSL, but then I discovered this. I still think it needs a better DSL than this, but at least they provided a way to do this. Much needed.
For this example, I might write something like this:
step :decide_type, Output(Activity::Left, :credit_card) => Track(:with_credit_card) # Create the track, which would automatically create an implicit End with the same id. Track(:with_credit_card) do step :authorize step :charge end
I guess that's not much different than theirs. Main improvement is it avoids ugly need to specify end_id/end_task.
But that wouldn't actually be enough either in this example, because you would actually want to have a failure track there and a path doesn't have one ... so it sounds like Subprocess and a new self-contained ProcessCreditCard Railway would be the best solution for this particular example... Subprocess is the ultimate in flexibility and gives us all the flexibility we need)
But what if you had a path that you needed to direct to from 2 different tasks' outputs?
Example: I came up with this, but it takes a lot of effort to keep my custom path/track hidden/"isolated" and prevent other tasks from automatically/implicitly going into those steps:
class Example::ValidationErrorTrack < Trailblazer::Activity::Railway step :validate_model, Output(:failure) => Track(:validation_error) step :save, Output(:failure) => Track(:validation_error) # Can't use fail here or the magnetic_to won't work and Track(:validation_error) won't work step :log_validation_error, magnetic_to: :validation_error, Output(:success) => End(:validation_error), Output(:failure) => End(:validation_error) end
puts Trailblazer::Developer.render o Reloading... #<Start/:default> {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model> #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model> {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=save> #<Trailblazer::Activity::TaskBuilder::Task user_proc=save> {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<End/:success> #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Left} => #<End/:validation_error> {Trailblazer::Activity::Right} => #<End/:validation_error> #<End/:success> #<End/:validation_error> #<End/:failure>
Now attempt to do it with Path... Does the Path() have an ID we can reference? Or maybe we just keep a reference to the object and use it directly in 2 different places?
class Example::ValidationErrorTrack::VPathHelper1 < Trailblazer::Activity::Railway validation_error_path = Path(end_id: "End.validation_error", end_task: End(:validation_error)) do step :log_validation_error end step :validate_model, Output(:failure) => validation_error_path step :save, Output(:failure) => validation_error_path end
o=Example::ValidationErrorTrack::VPathHelper1; puts Trailblazer::Developer.render o Reloading... #<Start/:default> {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model> #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model> {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=save> #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<End/:validation_error> #<Trailblazer::Activity::TaskBuilder::Task user_proc=save> {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<End/:success> #<End/:success> #<End/:validation_error> #<End/:failure>
It's just too bad that:
- there's not a Railway helper in case you want multiple outputs, though we could probably create one pretty easily using Path as our template
- we can't "inline" a separate Railway acitivity (Subprocess "nests" it rather than "inlines")
Tags
- concise
- flexibility
- helper functions
- tip
- useful
- powerful
- example: not how you would actually do it (does something wrong/bad/nonideal illustrating but we should overlook it because that's not the one thing the example is trying to illustrate/show us)
- verbose / noisy / too much boilerplate
Annotators
URL
-
-
trailblazer.to trailblazer.to
-
Six lines of code create an executable object that, when invoked, will run your code in the order as visible in our diagram, plus the ability to “error out” when something goes wrong.
-
-
en.wikipedia.org en.wikipedia.org
-
Each of the programming language generations aims to provide a higher level of abstraction of the internal computer hardware details, making the language more programmer-friendly, powerful, and versatile.
-
-
github.com github.com
-
If you have value objects or you would like to build one object from another, you can use the converter option. It is only called if the value provided is not an instance of the class or one of its subclasses.
-
Lambda defaults are evaluated in the context of the interaction, so you can use the values of other inputs in them.
-
hash :with_defaults, default: {} do boolean :likes_cookies, default: true end
-
-
www.smashingmagazine.com www.smashingmagazine.com
-
With Grid and generated content, we can add a line either side of our heading without adding any additional markup. The line will grow and shrink according to available space
-
-
alistapart.com alistapart.com
-
When you generate before- and after-content pseudo-elements, Grid treats them as actual elements and makes them grid items.
-
The 1 / -1 means “go from the first grid line to the last grid line of the explicit grid”, regardless of how many grid lines there might be. It’s a handy pattern to use in any situation where you have a grid item meant to stretch from edge to edge of a grid.
-
-
github.com github.com
-
#grid::grid-area(1 / 2 / 3 / 4) { background-color: red;
-
- Jan 2021
-
sankeymatic.com sankeymatic.com
-
SankeyMATIC builds on the open source tool D3.js and its Sankey library, which are very powerful but require a fair amount of work & expertise to use.
-
-
www.paulryancodes.com www.paulryancodes.com
-
This is really cool! Having the content decide on the space it needs is so powerful!
-
-
developer.mozilla.org developer.mozilla.org
-
While custom iterators are a useful tool, their creation requires careful programming due to the need to explicitly maintain their internal state. Generator functions provide a powerful alternative: they allow you to define an iterative algorithm by writing a single function whose execution is not continuous. Generator functions are written using the function* syntax.
-
-
atomiks.github.io atomiks.github.ioFAQ1
-
Can I use the title attribute?Yes. The content prop can be a function that receives the reference element as an argument and returns a string or element.tippy('button', { content(reference) { const title = reference.getAttribute('title'); reference.removeAttribute('title'); return title; }, });The title attribute should be removed once you have its content so the browser's default tooltip isn't displayed along with the tippy.
-
-
github.com github.com
-
It's more powerful to have them happen in definition order, because this lets you intercept thing in event handlers or in actions.
-
-
github.com github.com
-
Headless: With React's DOM rendering for improved usage with CSS-in-JS and spring libraries. If you want greater control over your poppers to integrate fully with design systems, this is for you.
-
- Dec 2020
-
developer.mozilla.org developer.mozilla.org
-
If a reviver is specified, the value computed by parsing is transformed before being returned.
-
- Nov 2020
-
-
Service Workers are very powerful. They allow offline functionality, push notifications, content caching, and more. They have a short lifetime, and the way they work is by waking up when they get an event (e.g., network requests, push notifications, connectivity changes) and then they start running only as long as the process needs it.
-
-
github.com github.com
-
You can add props to lower components and elements with things like input$maxlength="15".
-
- Oct 2020
-
unix.stackexchange.com unix.stackexchange.com
-
(../)#.git(:h) # relative path to containing directory, eg. '../../..', '.' (../)#.git(:a) # absolute path to actual file, eg. '/home/you/src/prj1/.git' (../)#.git(:a:h) # absolute path to containing directory, eg. '/home/you/src/prj1'
-
-
docs.gitlab.com docs.gitlab.com
-
The needs: keyword enables executing jobs out-of-order, allowing you to implement a directed acyclic graph in your .gitlab-ci.yml. This lets you run some jobs without waiting for other ones, disregarding stage ordering so you can have multiple stages running concurrently.
-
-
-
Powerful: MDX blends markdown and JSX syntax to fit perfectly in JSX-based projects.
-
-
-
Arguably, it leans into JSX land—including logic in the templates.
-
-
-
IMO svelte does have a responsibility to teach/demo the basics of "functional javascript" probably as a docs/tutorial/demos chapter on "the power of javascript expressions"
-
-
rollupjs.org rollupjs.orgRollup2
-
If you return an object, then it is possible to resolve an import to a different id while excluding it from the bundle at the same time. This allows you to replace dependencies with external dependencies without the need for the user to mark them as "external" manually via the external option
-
Defines a custom resolver.
Tags
Annotators
URL
-
- Sep 2020
-
www.thelancet.com www.thelancet.com
-
Torres, Irene, Osvaldo Artaza, Barbara Profeta, Cristina Alonso, and JaHyun Kang. ‘COVID-19 Vaccination: Returning to WHO’s Health For All’. The Lancet Global Health 0, no. 0 (25 September 2020). https://doi.org/10.1016/S2214-109X(20)30415-0.
-
-
github.com github.com
-
I think Svelte's approach where it replaces component instances with the component markup is vastly superior to Angular and the other frameworks. It gives the developer more control over what the DOM structure looks like at runtime—which means better performance and fewer CSS headaches, and also allows the developer to create very powerful recursive components.
-
They don't need to add a prop for every action. The action itself can be passed in as a prop. <script> export let action; </script> <div use:action>whatever</div> The argument for the action can be another prop or can be part of the same prop.
Tags
- emergent
- I didn't know you could do that / that was possible!
- React
- feeling in control
- better than the alternatives
- better/superior solution/way to do something
- programming paradigm
- flexibility
- comparison
- component properties (props)
- Angular
- powerful
- Svelte: action (use:)
- contrast
Annotators
URL
-
-
github.com github.com
-
{#each section as {depth, title, lines}} <h{depth}>{title}</h{depth}> {#each lines as line} <p>{content}</p> {/each} {/each}
Tags
Annotators
URL
-
-
github.com github.com
-
await schema.validateAt('foo[0].bar', rootValue); // => ValidationError: must be a string await schema.validateAt('foo[1].bar', rootValue); // => '1'
-
- May 2020
-
en.wikipedia.org en.wikipedia.org
-
All of the features of NLS were in support of Engelbart's goal of augmenting collective knowledge work and therefore focused on making the user more powerful, not simply on making the system easier to use.
-
-
httpd.apache.org httpd.apache.org
-
Conditional Per-Request Settings For additional flexibility, the directives provided by mod_setenvif allow environment variables to be set on a per-request basis, conditional on characteristics of particular requests. For example, a variable could be set only when a specific browser (User-Agent) is making a request, or only when a specific Referer [sic] header is found. Even more flexibility is available through the mod_rewrite's RewriteRule which uses the [E=...] option to set environment variables.
Tags
Annotators
URL
-
- Jan 2020
-
unix.stackexchange.com unix.stackexchange.com
-
However forget the "one-liner" idea once you start using sed's micro-commands. It is useful to lay it out like a structured program until you get the feel of it... It is surprisingly simple, and equally unusual. You could think of it as the "assembler language" of text editing.
-
- Jan 2019
-
static1.squarespace.com static1.squarespace.com
-
power
This claim is articulated pretty strongly in Gorgias's Encomium of Helen. The piece is a kind of thought experiment where Gorgias attempts to defend Helen. He points out that language (or speech) is "a powerful lord, which by means of the finest and most invisible body effects the divinest works: it can stop fear and banish grief and create joy and nature pity" (sec. 8). Part of his defense, then, is that Helen almost didn't have a choice; the speech was too powerful, god-like even. I found a .pdf copy of it here: http://myweb.fsu.edu/jjm09f/RhetoricSpring2012/Gorgias%20Encomium%20of%20Helen.pdf
-
-
static1.squarespace.com static1.squarespace.com
-
power
This claim is articulated pretty strongly in Gorgias's Encomium of Helen. The piece is a kind of thought experiment where Gorgias attempts to defend Helen. He points out that language (or speech) is "a powerful lord, which by means of the finest and most invisible body effects the divinest works: it can stop fear and banish grief and create joy and nature pity" (sec. 8). Part of his defense, then, is that Helen almost didn't have a choice; the speech was too powerful, god-like even. I found a .pdf copy of it here: http://myweb.fsu.edu/jjm09f/RhetoricSpring2012/Gorgias%20Encomium%20of%20Helen.pdf
-
- Jul 2017
-
www.swamirara.com www.swamirara.com
- Mar 2017
-
static1.squarespace.com static1.squarespace.com
-
speech is prior to and somehow superior to writing
No matter how well written a document is, one powerful speech can move thousands in a single day while a document can only reach a few at a time.
Not to mention the amount of illiterate people that were around when rhetoric came about.
-
-
drive.google.com drive.google.com
-
i!.course to exercise power. T
We all know they immense power that discourse can hold, regardless of where the original knowledge came from, the appropriate discourse can light a match that starts a fire.
-