- Apr 2022
-
mattbrictson.com mattbrictson.com
-
In Rails, this is known as nested layouts, and it is a bit awkward to use. The standard Rails practice for nested layouts is complicated and involves these considerations:
-
- Mar 2022
-
-
In 1994, The Unix-Haters Handbook was published containing a long list of missives about the software—everything from overly-cryptic command names that were optimized for Teletype machines, to irreversible file deletion, to unintuitive programs with far too many options. Over twenty years later, an overwhelming majority of these complaints are still valid even across the dozens of modern derivatives. Unix had become so widely used that changing its behavior would have challenging implications. For better
-
- Jan 2021
-
medium.com medium.com
-
In my opinion, it can sometimes look odd. Very interestingly, this is by design and is part of the Material design specification. This article isn’t to argue whether it should be this way or not, though; it’s just to change yours such that your MenuItem(s) show below the menu selection, like so:
-
- Sep 2020
-
stackoverflow.com stackoverflow.com
-
Determining this exact byte position within one massive mdat in each respective file is not trivial.
-
-
stackoverflow.com stackoverflow.com
-
The Moov atom can only exist after recording is complete when the relevant metadata can now be created for the stored data.
-
- Jul 2020
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
These seem to be better reasons to support sub-nanosecond resolution. I think either storing picoseconds or storing sec fraction as 64-bit integer are better approaches than storing a rational. However, either change would be very invasive, and it seems unlikely to be worth the effort.
-
-
code-examples.net code-examples.net
-
JSON parsing is always pain in ass. If the input is not as expected it throws an error and crashes what you are doing. You can use the following tiny function to safely parse your input. It always turns an object even if the input is not valid or is already an object which is better for most cases.
It would be nicer if the parse method provided an option to do it safely and always fall back to returning an object instead of raising exception if it couldn't parse the input.
-
-
twitter.com twitter.com
-
Are you angry now? Because I’m angry.
-
- Jun 2020
-
makandracards.com makandracards.com
-
However, a ActiveRecord::Rollback within the nested transaction will be caught by the block of the nested transaction, but will be ignored by the outer transaction, and not cause a roll back! To avoid this unexpected behaviour, you have to explicitly tell rails for each transaction to indeed use proper nesting: CopyActiveRecord::Base.transaction(joinable: false, requires_new: true) do # inner code end This is a safer default for working with custom transactions.
-
- May 2020
-
codepen.io codepen.io
-
the i18n object with all the strings
They don't require supplying all keys for other objects that can be overridden, such as
banner
: the default value is used for whatever keys are not provided within thebanner
object. In other words, values are merged, with the supplied values overriding the defaults. Thei18n
object should work the same way. Often you only need/want to override a couple phrases/translations, not all of them.See: https://www.iubenda.com/en/help/1205-how-to-configure-your-cookie-solution-advanced-guide
-
-
iandunn.name iandunn.name
-
I dismissed the idea, though, because I thought that cloning even part of a repository with git-svn required scanning every commit in the entire repository, in order to build the local history. With almost 1.5 million commits in the plugin repository, that would take roughly 4 hours to clone a plugin.
-
- Mar 2020
-
rubyworks.github.io rubyworks.github.io
-
Ruby's current handling of Dates and Times is all over the map. We have Date, Time, DateTime, ParseDate, and more, not to mention all the other common extensions running around out there. Ruby needs an improved class that incorporates them all.
-
- Feb 2020
-
-
The .ignore file , from what I can tell, needs to exist in the directory you're targeting for it to be recognized, not the current directory. If you're searching in .src, the file would need to be there for it to work.
-
- Jan 2020
-
unix.stackexchange.com unix.stackexchange.com
-
ssh doesn't let you specify a command precisely, as you have done, as a series of arguments to be passed to execvp on the remote host. Instead it concatenates all the arguments into a string and runs them through a remote shell. This stands out as a major design flaw in ssh in my opinion... it's a well-behaved unix tool in most ways, but when it comes time to specify a command it chose to use a single monolithic string instead of an argv, like it was designed for MSDOS or something!
-
- Dec 2019
-
play.google.com play.google.com
-
The Internet permission is only used to display the Google Map, which is only displayed once on creating a new location. Meaning, once you created all your needed locations, you can deactivate the Internet permission and still use the location based reminders (Note: Most devices don't allow you to revoke this permission, sorry).
-
-
www.howtogeek.com www.howtogeek.com
-
Directly on the Switch: Some third-party games including Fortnite and Overwatch don’t need a separate app. You just connect a standard headset to the single 3.5 mm audio jack on your Switch and chat without the app, just like a smartphone. Again, Nintendo’s own games won’t work with this.
This seems like the obvious solution. Why would Nintendo make you get a separate app on a separate platform (Android) when they could just let you chat directly via the Switch device like these games do?
-
-
stackoverflow.com stackoverflow.com
-
The IdentitiesOnly yes is required to prevent the SSH default behavior of sending the identity file matching the default filename for each protocol. If you have a file named ~/.ssh/id_rsa that will get tried BEFORE your ~/.ssh/id_rsa.github without this option.
-
-
serverfault.com serverfault.com
-
Try overriding this behaviour with this at the bottom of your .ssh/config file: Host * IdentitiesOnly yes
-
Basically, specifying IdentityFiles just adds keys to a current list the SSH agent already presented to the client.
-
-
stackoverflow.com stackoverflow.com
-
Arguably, the rails-team's choice of raising ArgumentError instead of validation error is correct in the sense that we have full control over what options a user can select from a radio buttons group, or can select over a select field, so if a programmer happens to add a new radio button that has a typo for its value, then it is good to raise an error as it is an application error, and not a user error. However, for APIs, this will not work because we do not have any control anymore on what values get sent to the server.
-
-
stackoverflow.com stackoverflow.com
-
In case anyone wants a hack, here is what I came up with.
-
- Nov 2019
-
developer.mozilla.org developer.mozilla.orgwith1
-
Using with is not recommended, and is forbidden in ECMAScript 5 strict mode. The recommended alternative is to assign the object whose properties you want to access to a temporary variable.
-