16 Matching Annotations
- Apr 2022
-
stackoverflow.com stackoverflow.com
-
join = Arel::Nodes::NamedFunction.new('json_b_array_elements', [Arel::Nodes::SqlLiteral.new("subscriptions")]) .as(Arel::Nodes::NamedFunction.new('sd', [Arel::Nodes::SqlLiteral.new("subscription_data")]).to_sql) p = e.project( Arel::Nodes::SqlLiteral.new( Arel::Nodes::Grouping.new( Arel::Nodes::InfixOperation.new('->>', sd[:subscription_data], Arel::Nodes::SqlLiteral.new("'id'"))).to_sql) << '::uuid' ).where( Arel::Nodes::InfixOperation.new('->>', sd[:subscription_data], Arel::Nodes::SqlLiteral.new("'type'").eq( Arel::Nodes::SqlLiteral.new("'Company'") ) ).and(e[:slug].eq(event_slug))) p.join_sources << Arel::Nodes::StringJoin.new( Arel::Nodes::SqlLiteral.new('CROSS JOIN LATERAL')) << join
-
- Jun 2021
-
stackoverflow.com stackoverflow.com
-
There is a (hack-ish, i know, but) more reliable way to do the "cast" in 9.3: ('[' || d::text || ']')::json ->> 0
-
- May 2021
-
jakedeichert.com jakedeichert.com
-
The super hacky alternative... using an error's stack trace When I got this to work I literally laughed out loud 😂. It might be the most hacky solution to a problem I've found yet
-
-
stackoverflow.com stackoverflow.com
-
there are bugs aplenty with ie's, the way to address them is by complimenting your otherwise sound html/css with fail safe code, rather than degenerating your sound html into hacky html for ie's sake.
-
- Dec 2020
-
developer.mozilla.org developer.mozilla.org
-
This creates an options object with a getter function for the passive property; the getter sets a flag, passiveSupported, to true if it gets called. That means that if the browser checks the value of the passive property on the options object, passiveSupported will be set to true; otherwise, it will remain false. We then call addEventListener() to set up a fake event handler, specifying those options, so that the options will be checked if the browser recognizes an object as the third parameter.
-
- Oct 2020
-
-
always end up with a boilerplate function somewhere, which feels hacky.
-
-
dylanvann.com dylanvann.com
-
the code is a bit verbose/convoluted
-
-
-
I couldn't land on how I wanted to box primitives. Should I use a getter/setter, or function form like Knockout, or explicit get/set like MobX? These were all ugly.
-
-
-
We have to be careful not to mutate state so when we have some complex state like an object or an array we have to use some ugly tricks like in the setTodoCompleted function above.
-
- Sep 2020
-
github.com github.com
-
Svelte will not offer a generic way to support style customizing via contextual class overrides (as we'd do it in plain HTML). Instead we'll invent something new that is entirely different. If a child component is provided and does not anticipate some contextual usage scenario (style wise) you'd need to copy it or hack around that via :global hacks.
Tags
- Svelte: how to affect child component styles
- maintenance burden to explicitly define/enumerate/hard-code possible options (explicit interface)
- run-time dynamicness/generics vs. having to explicitly list/hard-code all options ahead of time
- trying to prevent one bad thing leading to people doing/choosing an even worse option
- forced to fork/copy and paste library code because it didn't provide enough customizability/extensibility / didn't foresee some specific prop/behavior that needed to be overridable/configurable (explicit interface)
- workarounds
- component/library author can't consider/know ahead of time all of the ways users may want to use it
- ugly/kludgey
- forking to add a desired missing feature/change
Annotators
URL
-
-
github.com github.com
-
I took that approach as a work around, I just disliked the file every time I looked at it. Also felt like it increased your bundle size just to implement something that should possibly be built in.
-
Svelte:element as proposed here would nicely fit my use case and avoid some otherwise pretty ugly conditions I'll need to bake into Lists.svelte.
Tags
Annotators
URL
-
-
github.com github.com
-
but that feels like a hack
-
-
github.com github.com
-
Having to write css inline on html is indeed hacky.
Tags
Annotators
URL
-
-
-
Having to wrap everything in a selector :global(child) { } is hacky
-
-
github.com github.com
-
This has all of the downsides of global CSS (except being able to style different instances of a component differently) plus more: it may result in the need for additional DOM, and... it's kinda ugly. It feels like a hack.
-