- Jan 2023
-
stackoverflow.com stackoverflow.com
-
There is no such method in ruby, but you can easily define it like: def my_strip(string, chars) chars = Regexp.escape(chars) string.gsub(/\A[#{chars}]+|[#{chars}]+\z/, "") end
-
- Nov 2022
-
github.com github.com
-
The thing is Chrome doesn't provide details about such resources.
-
-
www.suffix.be www.suffix.be
-
So far for the obligatory warning. I get the point, I even agree with the argument, but I still want to send a POST request. Maybe you are testing an API without a user interface or you are writing router tests? Is it really impossible to simulate a POST request with Capybara? Nah, of course not!
-
-
gitlab.com gitlab.com
-
Good commit hygiene is considered a best practice. GitLab should encourage and enable these kinds of best practices. This feature currently creates a problem and requires workarounds that remove information, or significant manual work.
-
-
github.com github.com
-
www.markusdosch.com www.markusdosch.com
- Oct 2022
-
-
Note that one extra type that is accepted by convention is the Boolean type, which represents both the TrueClass and FalseClass types.
-
-
apple.stackexchange.com apple.stackexchange.com
-
This is great because it works in Terminal, iTerm2, Chrome, Sublime & Outlook. The alternative (Karabina) is less good because that maps "Home" to Command+LeftArrow, which actually switches windows in Terminal.
-
- Apr 2022
-
css-tricks.com css-tricks.com
-
There are ways to create aspect-ratio sized boxes in HTML/CSS today. None of the options are particularly elegant because they rely on the “hack” of setting a zero height and pushing the boxes height with padding. Wouldn’t it be nicer to have a platform feature to help us here?
-
-
stackoverflow.com stackoverflow.com
-
t's annoying there's no native event for this yet (popstate did not work for me)
-
- Nov 2021
-
-
Yep, we experimented with this, but what we found is that you loose most of Svelte's niceness like slots, and instead you'll pass around deeply nested objects.
-
-
manpages.ubuntu.com manpages.ubuntu.com
-
apt-rdepends exists. This functionality should really reside in apt-cache itself.
Update: Maybe it does already exist now. I was able to run this, for example without apt-rdepends being installed: apt-cache rdepends --installed libwebpmux3
-
- Oct 2021
-
news.softpedia.com news.softpedia.com
-
Exporting your active tabs to a TXT or HTML file is something that many people want to do, but which is impossible right now in Google Chrome without turning to an extension.
-
-
github.com github.com
-
while with server/externalFetch there is no direct way to pass cookie headers from the original request to the external one
-
- Aug 2021
-
destroytoday.com destroytoday.com
-
With JavaScript, you can actually calculate the width of the scrollbar and whether it’s visible by comparing two properties—window.innerWidth and document.body.clientWidth. If these are equal, the scrollbar isn’t visible. If these are different, we can subtract the body width from the window width to get the width of the scrollbar:const scrollbarWidth = window.innerWidth - document.body.clientWidthWe’ll want to perform this both on page load and on resize, in case someone resizes the window vertically and changes the overflow. Then, once we have the scrollbar width, we can assign it as a CSS variable:document.body.setProperty("--scrollbarWidth", `${scrollbarWidth}px`)
missing feature: vw/vh can't be used "directly" because doesn't account for scrollbars
-
-
github.com github.com
-
In the vast majority of cases when I'm using prettier-ignore I'm only really looking to prevent it from breaking my code into new lines, whilst keeping its other transformations such as switching quotes and adding space between brackets. When ignoring single lines, fixing these formatting problems by hand is very manageable. With the ability to have Prettier ignore entire blocks of code I think the ability to specify what you want it to ignore is essential.
-
This should be basic functionality.
-
- Jul 2021
-
stackoverflow.com stackoverflow.com
-
I think that it's nonsense not to have a method that just gives -1 or +1. Even BASIC has such a function SGN(n). Why should we have to deal with Strings when it's numbers we want to work with. But's that's just MHO.
-
- Apr 2021
-
store.steampowered.com store.steampowered.com
-
It's as good as online-only, however with noone actually playing you'll find yourself queueing for bot matches (even having to wait for the "other players" to select their vehicles). You want to just race your mate in a local game- nope! Local races are single-player only (apparently the devs couldn't be bothered with coding a split-screen or zooming camera to enable local multiplayer races). Want to play online but specify the map? Nope! Play a game online with a good lobby and want to stick with that group? Nope! Every game forces you to exit after each event.
-
-
store.steampowered.com store.steampowered.com
-
Basically every review complains that saves don't work and the dev still hasn't fixed it after four years, gj.
-
it WILL NOT SAVE the progress!!!!!!!So, no, forget it!!!!
-
With absolutely no means of saving progression in this game I cannot for the life of me understand why anyone would give this game a positive review. It could have been a decent enough game for the genre, however unless you have all day to dedicate to completing the game in one sitting, avoid.
-
I was going to give this a good review, then I went and read the other reviews about the game not saving. I thought to myself, surely not! This must some sort of smear campaign against the fine developers at jemchicomac?!? Alas, it is my duty to report that there is indeed no save functionality in this game. Tis a pity.
-
Alright, let me get this straight: the developer decided to create a game that's 60 levels long, which is 5 worlds each with 12 levels, and didn't implement a save feature? We are in a time where save features are a high need for a game. If anything, for a long game, they'd have passcodes, but we're past those times now, so a save feature is what one would expect in a game. Why does the developer ignore the players who want a save feature? I saw in the discussions that what looked like a parent/guardian bought this game specifically for their kids to play. Do you think the kids will be able to play a game like this and complete it in one sitting? No, I don't think so. Those poor kids are now stuck with a game where they won't feel any accomplishment with because they have to restart every time.
-
The game save doesnt work, what is the point in playing something with so many levels if you cant and never will reach the end of it, unless you dont turn of your pc/game for days till you pass all the levels.
-
Despite being a nice game... no saving progress kills it.
-
-
store.steampowered.com store.steampowered.com
-
Unstoppable CrapsterThis is crap shovelwareRe-skinned exact same other 10 games this sad excuse for a developer been farting out.No sound, no gameplay, no nothing.Can't press two buttons at the same time like jump and move.Plays like sonic the hedgehog just had sex with painbrushWhile having a stroke, heart attack and anal prolapse at the same time.Don't support this developer.Steam get your sh!t together, start filtering out this crap.
-
-
store.steampowered.com store.steampowered.com
-
(note: this is meant to be an informational review, not a positive or negative review)
-
-
trevershick.github.io trevershick.github.io
-
The default fill_in method of Capybara is case sensitive. This is apparently due to their use of XPath. Anyhow, this seems to not be very well aligned with the entire idea of DSLs and letting non programmers write tests.
not very well aligned
-
After some searching i found a stack overflow problem that didn't fix my issue but anyhow… I simply used a little ruby and the capybara library to find the field myself with some case insensitive regex and the ruby detect method
-
- Mar 2021
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
In fact, I'm only here because it seems like something one would 'expect' ruby already to do.
-
-
unix.stackexchange.com unix.stackexchange.com
-
If you really want this, I suggest you write a little function that extracts the executable name from the .desktop file and runs it. Add these lines to your shell's initialization file (e.g. ~/.bashrc): runDesktop () { eval "$(awk -F= '$1=="Exec"{$1=""; print}' "$1")" } Then, you can run your .desktop file with runDesktop ~/Desktop/slack.desktop
-
-
stackoverflow.com stackoverflow.com
-
The :empty selector refers only to child nodes, not input values. [value=""] does work; but only for the initial state. This is because a node's value attribute (that CSS sees), is not the same as the node's value property (Changed by the user or DOM javascript, and submitted as form data).
-
There is (currently) no CSS selector for detecting directly whether an input control has a nonempty value, so we need to do it indirectly, as described above.
-
-
css-tricks.com css-tricks.com
-
But there doesn’t appear to be a simple way to test for :placeholder-shown.
-
-
www.html5rocks.com www.html5rocks.com
-
Validating forms has notoriously been a painful development experience. Implementing client side validation in a user friendly, developer friendly, and accessible way is hard. Before HTML5 there was no means of implementing validation natively; therefore, developers have resorted to a variety of JavaScript based solutions.
-
- Feb 2021
-
github.com github.com
-
Thanks, I'll continue leaning on the array workaround for my use case then.
-
-
railscasts.com railscasts.com
-
So how are we going to create a model that doesn’t have a database table behind it? There are several potential solutions including various plugins but we’re going to use the method described in an entry on the Code Tunes blog. This shows a techinque that involves overriding a couple of methods in an ActiveRecord model and then manually defining the columns in the model file rather than in the database table. In our Recommendation model we’ll add in the two overridden methods and then use the column class method to define the columns in a similar way to how they’re defined in a migration file.
Does this still work in Rails 6? I wonder.
-
-
coderwall.com coderwall.com
-
There is nothing wrong with accepts_nested_attributes_for. This is what you should use in your typical case. My post describes a non-typical case. ContactListForm is not an ActiveRecord object, it is an object that includes ActiveModel::Model, which does not support accepts_nested_attributes_for.
-
-
www.smashingmagazine.com www.smashingmagazine.com
-
Adding backgrounds and borders does feel like a missing feature of the CSS Grid specification and one which the Working Group have discussed along with many members of the community (the discussion thread is on GitHub).
-
-
alistapart.com alistapart.com
-
I hope we see new CSS capabilities arise that allow this sort of effect without the need for trickery.
-
Since CSS doesn’t (yet) offer a way to style grid cells, areas, or tracks directly, we have to stretch elements over the parts we want to style independently from the elements that contain content.
-
They likely won’t have any content, making them a sort of structural filler to spackle over the gaps in Grid’s capabilities.
-
-
github.com github.com
-
proposes adding a grid-cell pseudo so you can add (responsive) decorative elements to grids without having to add empty elements to your page.
-
- Jan 2021
-
svelte.dev svelte.dev
-
https://github.com/sveltejs/svelte/issues/1037#issuecomment-737872461
Explanation (from https://github.com/sveltejs/svelte/issues/1037#issuecomment-739458005):
@AlexGalays register is an action created and passed in from the parent node (Wrapper) which allows the child to register with it. Not builtin to svelte.
That's very clever @PatrickG. Nice one. I was a bit confused when first looking at it to understand what was going on, but I think that will be a handy tool in the toolbox.
But why do we need this? If we remove all use:register, it still toggles just fine. Seems the only benefit is that this allows cleanup.
-
-
ux.stackexchange.com ux.stackexchange.com
-
Material Design guidelines don't specify popovers, but the specification of material properties provide a clear set of properties that can be used to create popups.
-
- Dec 2020
-
www.npmjs.com www.npmjs.com
-
No more waiting around for pull requests to be merged and published. No more forking repos just to fix that one tiny thing preventing your app from working.
This could be both good and bad.
potential downside: If people only fix things locally, then they may be less inclined/likely to actually/also submit a merge request, and therefore it may be less likely that this actually (ever) gets fixed upstream. Which is kind of ironic, considering the stated goal "No more waiting around for pull requests to be merged and published." But if this obviates the need to create a pull request (does it), then this could backfire / work against that goal.
Requiring someone to fork a repo and push up a fix commit -- although a little extra work compared to just fixing locally -- is actually a good thing overall, for the community/ecosystem.
Ah, good, I see they touched on some of these points in the sections:
- Benefits of patching over forking
- When to fork instead
-
Yarn only runs the postinstall hook after yarn and yarn add, but not after yarn remove. The postinstall-postinstall package is used to make sure your postinstall hook gets executed even after a yarn remove.
Tags
- limitations leading to workarounds
- maintaining a fork while waiting for upstream to merge
- pull request stalled
- unfortunate workarounds
- forking to add a desired missing feature/change
- missing feature leading to less-than-ideal workarounds
- irony
- making it easy to do the wrong thing
Annotators
URL
-
-
-
It seems being able to bind:this={slotEl} directly on a slot element is a popular request. I'll add my +1 as adding div wrappers just to get dom references gets old really fast.
-
-
gamefaqs.gamespot.com gamefaqs.gamespot.com
-
I also would like to see any hidden blocks or dev shortcuts.
-
I'm more bothered by the fact that you can't practice other people's levels, just certain parts of the level, before actually going back and trying to beat it completely.
-
- Nov 2020
-
github.com github.com
-
You can also see this repo: default-passive-events.
-
-
github.com github.com
-
Not being cancelable makes validating dialog content impossible - eg a login dialog or anything that takes user input. Of course, it's easy enough to get around - but I think this should be a requirement of a dialog.
-
-
github.com github.com
-
It used to be great that I was able to select a layer from any image and use it as a starting point. Currently, I am given an image that has 4 layers to be stripped off to get to the original base image. The original image is not reconstructable in any other way.
-
-
stackoverflow.com stackoverflow.com
-
# Run once, hold otherwise if [ -f "already_ran" ]; then echo "Already ran the Entrypoint once. Holding indefinitely for debugging." cat fi touch already_ran
-
Edit this file (corresponding to your stopped container): vi /var/lib/docker/containers/923...4f6/config.json Change the "Path" parameter to point at your new command, e.g. /bin/bash. You may also set the "Args" parameter to pass arguments to the command. Restart the docker service (note this will stop all running containers):
-
-
stackoverflow.com stackoverflow.com
-
I came over from Vue as well, the out-in is one thing I miss with Svelte. Rich Harris even acknowledged it prior to Svelte 3 but never really implemented a fix as far as I'm aware.
-
-
imfeld.dev imfeld.dev
-
Directives like ng-if="info.report.revenue" sort of work in Angular if info.report is undefined, in that the ng-if becomes false. But the Svelte equivalent {#if info.report.revenue} throws an error. For now we're using lodash get in places where we need to and looking forward to Svelte support for optional chaining.
-
-
news.ycombinator.com news.ycombinator.com
-
Since you've been using Svelte for a few months after using React, haven't you been hit by the lack of composability in Svelte?Passing around components as variables is such a common pattern in React, and there's no good replacement in Svelte. The lack of dynamism in components and styles makes theming and crafting reusable components (outside of simple widgets) very tedious [1][2]. I'm genuinely curious how someone can come from React and not be bothered by it.
Tags
Annotators
URL
-
-
-
If this is getting implemented, I think I'll love to see both implemented. I can see a lot of use cases where I would like to encapsulate the component with additional wrappers and in another scenarios I would like to just use the component. Now i work around this using empty div but then at times it breaks the structure because of the div element and I'll have to add more class utilities to make it work. This will be a great addition for Svelte.
-
-
-
I also tried to use <!-- svelte-ignore unused-export-let --> before the script tag but still no chance.
-
-
github.com github.com
-
You can only adopt a workaround, which can be one of
-
- Oct 2020
-
stackoverflow.com stackoverflow.com
-
I use a mutator and use it's changeValue function to 'change' the value of the relevant field (I supply the same value). This in turn notifies all relevant parties of the change to the form's state, and a validation is triggered.
Nearly duplicate annotation here: https://hyp.is/I2t56hjLEeuPXIsZG-jYog/xtzmf.csb.app/
-
-
xtzmf.csb.app xtzmf.csb.app
-
Use the same value that was submitted, which ensures that a 'change' is triggered even though the value itself doesn't change. Therefore, the same value gets validated again.
Calling it "change" even though it didn't change is kind of cheating/abuse ... but I guess it's okay...??
mutateValue([name], state, { changeValue }) { // change the value to the same value, thus // triggering a revalidation of the same value changeValue(state, name, value => value); }
-
-
-
I have a feature spec to test the Javascript behavior of the blur event, sadly Capybara's native DSL doesn't seem to support it yet.
-
-
github.com github.com
-
I discovered that a solution can be hacked using an {#if}, but a proper one would be nice:
-
-
github.com github.com
-
This reactive statement is just used to have the store automatically subscribed and unsubscribed.
-
-
dylanvann.com dylanvann.com
-
the code is a bit verbose/convoluted
-
-
dylanvann.com dylanvann.com
-
Using another reactive statement with $effect we have Svelte automatically handle subscribing and unsubscribing to the store
-
-
-
Here's a proxy store I wrote to derive the value of a store nested within other stores, it plays nice with typescript and can go infinitely deep
-
- Sep 2020
-
-
I guess we could always add a bunch of adapter code to watch the flag and trigger a callback when it becomes true or false...
-
but would it be reasonable to expect svelte-select to handle that so that consumers of this lib don't have to do all that?
-
-
svelte.dev svelte.dev
-
-
Most simple example: <script> import ChildComponent from './Child.svelte'; </script> <style> .class-to-add { background-color: tomato; } </style> <ChildComponent class="class-to-add" /> ...compiles to CSS without the class-to-add declaration, as svelte currently does not recognize the class name as being used. I'd expect class-to-add is bundled with all nested style declarations class-to-add is passed to ChildComponent as class-to-add svelte-HASH This looks like a bug / missing feature to me.
-
Vue does this in a way that just makes sense.
-
-
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
- 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
- workarounds
- forking to add a desired missing feature/change
- component/library author can't consider/know ahead of time all of the ways users may want to use it
- Svelte: how to affect child component styles
- maintenance burden to explicitly define/enumerate/hard-code possible options (explicit interface)
- 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)
- ugly/kludgey
Annotators
URL
-
-
github.com github.com
-
There's no way to change style incapsulation method without patching the compiler, and this means maintaing a fork, which is not desirable.
-
-
github.com github.com
-
Ideally, you should be able to write pure css in style tags in components, just like you can other frameworks(React or vue)
-
-
github.com github.com
-
stackoverflow.com stackoverflow.com
-
being able to compose multiple components' functionality via decoration (not creating new "combo" components or something) is more elegant, and something I wish React had.
-
- Jun 2020
-
stackoverflow.com stackoverflow.com
-
What would be nice is if JavaScript had a built-in way to do what I can do in Ruby with:
> I18n.interpolate('Hi, %{name}', name: 'Fred') => "Hi, Fred"
But to be fair, I18n comes from i18n library, so JS could just as easily (and I'm sure does) have a library that does the same thing.
Update: Actually, you can do this in plain Ruby (so why do we even need
I18n.interpolate
?):main > "Hi, %{name}" % {name: 'Fred'} => "Hi, Fred"
main > ? String#% From: string.c (C Method): Owner: String Visibility: public Signature: %(arg1) Number of lines: 9 Format---Uses str as a format specification, and returns the result of applying it to arg. If the format specification contains more than one substitution, then arg must be an Array or Hash containing the values to be substituted. See Kernel::sprintf for details of the format string. "%05d" % 123 #=> "00123" "%-5s: %016x" % [ "ID", self.object_id ] #=> "ID : 00002b054ec93168" "foo = %{foo}" % { :foo => 'bar' } #=> "foo = bar"
I guess that built-in version is fine for simple cases. You only need to use
I18n.translate
if you need its more advanced features likeI18n.config.missing_interpolation_argument_handler
.
-
-
rails.lighthouseapp.com rails.lighthouseapp.com
-
Seems a little unfortunate that there is no obvious way to edit or remove my previous reply.
-
-
-
With inline diff tags you can display {+ additions +} or [- deletions -].
Can also use/abuse for general highlighting (background color) purposes. Too bad there's no first-class support for that, and that you can only highlight with green or red and not yellow, etc.
-
- May 2020
-
-
-
I want my Page Translator extension to be made irrelevant by Firefox having built-in language translation, like Google Chrome and Microsoft Edge. It is a critical feature used by millions of people daily. It bridged a feature gap. Mozilla killing this add-on without replacing it hurts users.
-
-
github.com github.com
-
I would love for Mozilla to make this extension irrelevant by providing the functionality natively. Language translation is a standard and yet highly differentiating feature in Chrome and Edge.
-
I wish Mozilla would recognize the importance of built-in translation that Google Chrome and Microsoft Edge have.
-
- Apr 2020
-
code.luasoftware.com code.luasoftware.com
-
Some variety of markdown support the following syntax, but not supported in Hugo/BlackFriday. [Lua Software](http://www.luasoftware.com){:target="_blank"}
-
-
stackoverflow.com stackoverflow.com
-
[link](url){:target="_blank"} Works for jekyll or more specifically kramdown, which is a superset of markdown, as part of Jekyll's (default) configuration. But not for plain markdown. ^_^
-
-
stackoverflow.com stackoverflow.com
-
For ghost markdown use: [Google](https://google.com" target="_blank) Found it here: https://cmatskas.com/open-external-links-in-a-new-window-ghost/
-