60 Matching Annotations
- Sep 2024
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
Updated
Tags
Annotators
URL
-
- Sep 2023
- Aug 2023
-
stackoverflow.com stackoverflow.com
-
– Tyler Rick
-
- Jun 2023
-
stackoverflow.com stackoverflow.com
-
Excellent, underrated answer!
-
- Mar 2023
-
stackoverflow.com stackoverflow.com
-
Your answer (422) makes sense to me. This is also what Rails (respond_with) uses when a resource couldn't be processed because of validation errors.
-
- Sep 2022
-
-
TylerRick commented
Tags
Annotators
URL
-
-
github.com github.com
-
TylerRick commented
Tags
Annotators
URL
-
- Aug 2022
-
english.stackexchange.com english.stackexchange.com
-
Sure, you can try to solve that problem by using a one-word alternative for any multi-word phrase, but that's not always possible. Instead of relying on luck, being at the mercy of copy writers, and artificially limited to only allowing one-word items, IMHO you would be better off finding a general design solution that works even for multi-word phrases. Adjusting the letter-spacing and margin between items in your list isn't that hard
-
- Jul 2022
-
-
commented
-
- May 2022
-
stackoverflow.com stackoverflow.com
-
You should mentioned what you listed after the word try_files. Here's what I ended up using that seemed to work: try_files $uri $uri/index.html $uri.html /index.html; The /index.html at the end needs to match the fallback: 'index.html' part of your adapter-static config. Otherwise going directly to a route that doesn't have a matching file at that path -- such as any route with a dynamic param like [id] -- will result in a 404.
-
-
wordpress.com wordpress.com
-
"The need to engage with people in terms of evaluating them for the aim of acquiring a different point of view was one occasion this semester where the knowledge I received in class positively changed the way I approached an issue. I was patient enough to explore other perspectives, some of which disagreed with mine, so that I might learn about their opinions without bias or prejudice."
Tags
- (Major Essay) Ending/Conclusion paragraph. 5
- In my annotation, I addressed the problem of not stating how and why this circumstance benefits me in the future. In the annotation, I continued to describe how hearing other people's ideas and responding to their comments and insights during class discussions will aid me in my career aspirations.
Annotators
URL
-
- Dec 2021
-
github.com github.com
- Nov 2021
-
-
TylerRick
Tags
Annotators
URL
-
-
www.reddit.com www.reddit.com
-
I can't blame you. This problem seems anything but a newbie question! I was surprised when I noticed that this post (which was the only post I could find about trying to use chromedriver with flatpak chromium) in the linux4noobs forum. I've been using Linux as my primary desktop for ~15 years and this problem has stumped me too.
-
I'm having this problem too. Trying to use chromedriver with com.github.Eloston.UngoogledChromium (also tried org.chromium.Chromium) on Pop!_OS and selenium/webdriver (I'm using it with Ruby/capybara).This was the only post I could find (so far) about using chromedriver with a flatpak chrome/chromium... I wish someone would answer how or if this is possible.I created a chrome wrapper script that launches the flatpak, so that I could point to the script as my binary location. Did you do the same?It manages to open a window but the window is empty, and it just hangs for a hwile, and then eventually fails with:unknown error: DevToolsActivePort file doesn't exist (Selenium::WebDriver::Error::UnknownError) Any ideas how to get it working? I'd rather not install the "official" (proprietary software) Chrome binary on my system.Like you said, I never had any problems back in the good old days when we had deb packages for chromium. But now that we have to use a flatpak, I wonder if that's what the problem is — maybe chromedriver can't communicate directly with the chrome process because it is isolated/containerized??
-
As soon as I installed a Chrome deb everything worked.sudo dpkg -i \~/Downloads/google-chrome-stable\_current\_amd64.deb It's unfortunate that that's the only way I could get it to work.
-
- Sep 2021
- Jul 2021
-
github.com github.com
-
Sure, the slow way is always "good enough" — until you learn a better way of doing things. By your logic, then, we shouldn't have the option of including "Move to" in our context menus either — because any move operation could be performed using the cut and paste operations instead? The method you proposed is 6-7 steps long, with step 4 being the most onerous when you're in a hurry: Select files "Cut" "Create New Folder" Think of a name for the new folder. Manually type in that name, without any help from the tool. (We can't even use copy and paste to copy some part of one of the file names, for example, because the clipboard buffer is already being used for the file selection.) Press Enter Press Enter again to enter the new folder (or use "Paste Into Folder") "Paste" The method that Nautilus (and apparently Mac's Finder) provides (which I and others love) is much more efficient, especially because it makes step 4 above optional by providing a default name based on the selection, coming in at 4-5 steps (would be 3 steps if we could assign a keyboard shortcut to this command like Mac apparently has ): Select files Bring up context menu (a direct shortcut key would make this even sweeter) Choose "New Folder With Selection" Either accept the default name or choose a different name (optional) Press Enter Assuming "Sort folders before files" option is unchecked, you can continue working/sorting in this outer folder, right where you left off: Can you see how this method might be preferable when you have a folder with 100s or 1000s of files you want to organize it into subfolders? Especially when there is already a common filename prefix (such as a date) that you can use to group related files together. And since Nemo kindly allows us to choose which commands to include in our context menu, those who don't use/like this workflow are free to exclude it from their menus... Having more than one way to accomplish something isn't necessarily a bad thing.
-
- Jun 2021
-
gist.github.com gist.github.com
-
git diff-index --name-status --relative --cached @ might be a bit easier to parse (and only includes staged files so you don't have to do an extra step to filter them). Also, I couldn't use git status --porcelain because my Rails app is in a sub-folder so I needed the list of files to be relative to the Rails root instead of relative to the git repo root (although git status in general seems to respect the --relative option, git status --porcelain seems to not).
-
-
stackoverflow.com stackoverflow.com
-
https://github.com/rycus86/githooks is a really option for managing hooks It is... safe (it uses an opt-in model, where it will ask for confirmation whether new or changed scripts should be run or not (or disabled)) configurable handles a lot of the details for you lets you keep your hooks nicely organized. For example:
-
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
Same feature in TypeScript¶ It's worth mentioning that other languages have a shortcut for assignment var assignment directly from constructor parameters. So it seems especially painful that Ruby, despite being so beautifully elegant and succinct in other areas, still has no such shortcut for this. One of those other languages (CoffeeScript) is dead now, but TypeScript remains very much alive and allows you to write this (REPL): class Foo { constructor(public a:number, public b:number, private c:number) { } } instead of this boilerplate: class Foo { constructor(a, b, c) { this.a = a; this.b = b; this.c = c; } } (The public/private access modifiers actually disappear in the transpiled JavaScript code because it's only the TypeScript compiler that enforces those access modifiers, and it does so at compile time rather than at run time.) Further reading: https://www.typescriptlang.org/docs/handbook/2/classes.html#parameter-properties https://basarat.gitbook.io/typescript/future-javascript/classes#define-using-constructor https://kendaleiv.com/typescript-constructor-assignment-public-and-private-keywords/ I actually wouldn't mind being able to use public/private modifiers on instance var parameters in Ruby, too, but if we did, I would suggest making that be an additional optional shortcut (for defining accessor methods for those instance vars) that builds on top of the instance var assignment parameter syntax described here. (See more detailed proposal in #__.) Accessors are more of a secondary concern to me: we can already define accessors pretty succinctly with attr_accessor and friends. The bigger pain point that I'm much more interested in having a succinct shortcut for is instance var assignment in constructors. initialize(@a, @b, @c) syntax¶ jsc (Justin Collins) wrote in #note-12: jjyr (Jinyang Jiang) wrote: I am surprised this syntax has been repeatedly requested and rejected since 7 years ago. ... As someone who has been writing Ruby for over 10 years, this syntax is exactly that I would like. I grow really tired of writing def initialize(a, b, c) @a = a @b = b @c = c end This would be perfect: def initialize(@a, @b, @c) end I'm a little bit sad Matz is against this syntax, as it seems so natural to me. Me too!! I've been writing Ruby for over 15 years, and this syntax seems like the most obvious, simple, natural, clear, unsurprising, and Ruby-like. I believe it would be readily understood by any Rubyist without any explanation required. Even if you saw it for the first time, I can't think of any way you could miss or misinterpret its meaning: since @a is in the same position as a local variable a would normally be, it seems abundantly clear that instead of assigning to a local variable, we're just assigning to the variable @a instead and of course you can reference the @a variable in the constructor body, too, exactly the same as you could with a local variable a passed as an argument. A workaround pattern¶ In the meantime, I've taken to defining my constructor and list of public accessors (if any) like this: attr_reader \ :a, :b def new( a, b) @a, @b = a, b end ... which is still horrendously boilerplatey and ugly, and probably most of you will hate — but by lining up the duplicated symbols into a table of columns, I like that I can at least more easily see the ugly duplication and cross-check that I've spelled them all correctly and handled them all consistently. :shrug: Please??¶ Almost every time I write a new class in Ruby, I wish for this feature and wonder if we'll ever get it. Can we please?
-
-
stackoverflow.com stackoverflow.com
-
Thanks, this was just what I was looking for! This is a perfect appropriate use of instance_eval. I do not understand the nay-sayers. If you already have your array in a variable, then sure, a.reduce(:+) / a.size.to_f is pretty reasonable. But if you want to "in line" find the mean of an array literal or an array that is returned from a function/expression — without duplicating the entire expression ([0,4,8].reduce(:+) / [0,4,8].length.to_f, for example, is abhorrent) or being required to assign to a local, then instance_eval option is a beautiful, elegant, idiomatic solution!!
-
instance_eval is analogous to using tap, yield_self, … when you are dealing with a chain of method calls: do use it whenever it's appropriate and helpful! And in this case, I absolutely believe that it is.
-
- Feb 2021
-
-
commented
Tags
Annotators
URL
-
- Jan 2021
-
github.com github.com
-
TylerRick
Tags
Annotators
URL
-
-
github.com github.com
-
TylerRick
Tags
Annotators
URL
-
- Dec 2020
- Oct 2020
-
stackoverflow.com stackoverflow.com
-
Also, it looks like the sandbox, as posted, is not actually doing any debouncing.
-
-
gist.github.com gist.github.com
-
TylerRick commented
-
- Sep 2020
-
-
commented
-
-
-
commented
Tags
Annotators
URL
-
-
github.com github.com
-
The dynamic routes are a great way to keep the routing.rb DRY and avoid unneeded dependencies between the routing and the controller files That is exactly the problem: I've already defined the (white)list of actions in the controller; I just want to make them all available via routes. I shouldn't have to repeat myself in the routes file.
-
- Aug 2020
-
-
Tyler Rick
Tags
Annotators
URL
-
- Jul 2020
-
github.com github.com
-
TylerRick commented
Tags
Annotators
URL
-
- Jun 2020
-
-
commented
Tags
Annotators
URL
-
-
gist.github.com gist.github.com
-
commented
Tags
Annotators
URL
-
-
discuss.rubyonrails.org discuss.rubyonrails.org
-
discuss.rubyonrails.org discuss.rubyonrails.org
- May 2020
-
stackoverflow.com stackoverflow.com
-
To anyone running across this in the modern era, as I did:
-
-
stackoverflow.com stackoverflow.com
-
Updated to add .join. Also looked like the 2nd example was missing result.save so added that too. Haven't tested the code, so hopefully it is correct...
-
- Apr 2020
-
-
TylerRick commented
Tags
Annotators
URL
-
-
github.com github.com
-
TylerRick commented
-
-
github.com github.com
-
stackoverflow.com stackoverflow.com
-
I came up with a Delegator-like implementation of this that I called DelegatorToAll
-
- Mar 2020
-
stackoverflow.com stackoverflow.com
- Feb 2020
-
gist.github.com gist.github.com
-
commented
-
- Jan 2020
-
stackoverflow.com stackoverflow.com
-
This illustrates a pretty common challenge with joins: you want them to be used for some of the query but not for other of it.
-
- Dec 2019
-
github.com github.com
-
TylerRick commented
Tags
Annotators
URL
-
- Nov 2019
- Oct 2019
-
meta.stackoverflow.com meta.stackoverflow.com
-
The comment length is limited to 600. But sometimes I want to post a link to some code on typescriptlang.org/play whose URL is ~ 650 chars long.
-