- Jun 2020
-
stackoverflow.com stackoverflow.com
-
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.
-
-
api.rubyonrails.org api.rubyonrails.org
-
This is a poor solution
What's so bad about this solution? If it works, it works. And it only requires wrapping in 1 additional block. Pretty simple.
-
One workaround is to begin a transaction on each class whose models you alter:
-
- May 2020
-
stackoverflow.com stackoverflow.com
-
Note that this will pull the container if it exists. Pulling even the small alpine is quite an overhead just to get that information. Not mentioning the several GB-Image one often has in CI-Environments.
-
-
stackoverflow.com stackoverflow.com
-
'
because it's in YAML
but this means you can't use any ' in the actual script line
or you have to use different delimiters if you do
bottom line is it makes it harder to write/include your script than simply creating a separate shell script file.
-
-
csp.withgoogle.com csp.withgoogle.com
-
However, it's possible to enforce both a whitelist and nonces with 'strict-dynamic' by setting two policies:
-
-
iandunn.name iandunn.name
-
I just noticed that git svn clone has an optional --log-window-size parameter, though, and it lets you determine how many log entries are scanned at a time. The default is 100, but if you bump it up to 5000, then it only takes a few minutes to clone the plugin, making git-svn a viable option.
-
-
gist.github.com gist.github.com
-
-
This is it. I'm done with Page Translator, but you don't have to be. Fork the repo. Distribute the code yourself. This is now a cat-and-mouse game with Mozilla. Users will have to jump from one extension to another until language translation is a standard feature or the extension policy changes.
-
None of these methods are ideal and honestly, I'd only blame Mozilla for this. They dismiss all our efforts as incorrect but refuse to provide the correct solution.
-
- Apr 2020
-
stackoverflow.com stackoverflow.com
-
The issue I see is that the browser agent might be smart enough to learn the autocomplete attribute and apply it next time it sees the form. If it does do this, the only way I can see to still get around the problem would be to dynamically change the autocomplete attribute value when the page is generated.
-
Simply make your input readonly, and on focus, remove it. This is a very simple approach and browsers will not populate readonly inputs. Therefore, this method is accepted and will never be overwritten by future browser updates.
-
-
-
If you are signed in to Chrome with the a Google account and try to sign it to that Google account on a web page, Chrome will not offer to save that password.
You have to "disconnect" your Google Account from Chrome, which to me is an unfortunate workarounds.
They should just give the option to people who want to both have the accounts connected and save that password.
Tags
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
queue.acm.org queue.acm.org
-
We neglected to implement any form of partial export as well, which means that power users sometimes need to resort to silly things such as breaking up their export files by hand in order to have better success when importing
Tags
Annotators
URL
-
- Mar 2020
-
www.wired.com www.wired.com
-
More than two years later, one of those fixes is erasing gorillas, and some other primates, from the service’s lexicon. The awkward workaround illustrates the difficulties Google and other tech companies face in advancing image-recognition technology
-
-
tonydye.typepad.com tonydye.typepad.comTony Dye1
-
The absolutely worst thing that can happen in your anti-spam solution is to block a good email and not let anybody know about it! Anti-spam solutions should always generate an NDR such that a legitimate sender can know their message didn't get through. (Of course, we know many legitimate users don't read nor understand NDRs, so there's still an issue) A really good anti-spam solution should not only generate an NDR, but that NDR should have an "escape clause" in it that gives that legitimate user a special way to get through the anti-spam solution, if they take some reasonable steps.
-
-
thepugautomatic.com thepugautomatic.com
-
The easiest solution I found for this was simply to make small tweaks to avoid it altogether, e.g. “From: New York” instead of “From New York”. en.yml1 from_x: "From: %{x}" sv.yml1 from_x: "Från: %{x}" fi.yml1 from_x: "Lähettäjä: %{x}" Apparently this is enough to avoid inflecting the place name. Consult a speaker of the target language and see if you can come up with a workaround similar to this.
-
-
logichop.com logichop.com
-
To accomplish this, Logic Hop adds the CSS class .logichop-render-hide with the parameter opacity: 0 !important; to the <body> element. After the container is ready and Logic Hop has processed your personalizations the CSS class is automatically removed and the page is displayed. The Anti-Flicker Timeout setting is the time in milliseconds until page is automatically displayed (in the unlikely event Logic Hop takes too long to load).
-
While caching is great for speed and performance, it bypasses Pre-page Level and Page Level processing and the default Logic Hop functionality. Logic Hop has a Javascript Mode feature which allows the use of any cache Plugin while keeping the benefit of the page view tracking, goal tracking and page redirects.
-
-
help.dreamhost.com help.dreamhost.com
-
Output to STDERR for processes run through the Rack interface is directed to the master Apache error log file rather than the domain/subdomain specific log file. You do not have direct access to the master log file. This limitation can make debugging initialization errors (in particular syntax errors and gem resolution issues) tricky. Passenger will often produce an error output webpage including a stack traceback. However, in some cases it does not. If you have a persistent problem and Passenger is not producing sufficiently useful error output, you can try contacting the DreamHost support staff and ask them to examine the master log file for you
-
- Feb 2020
-
unix.stackexchange.com unix.stackexchange.com
-
COLUMNS=9999 top -b -c -n 1 | sed 's/ *$//'
-
- Jan 2020
-
guides.rubyonrails.org guides.rubyonrails.org
-
before_destroy callbacks should be placed before dependent: :destroy associations (or use the prepend: true option), to ensure they execute before the records are deleted by dependent: :destroy.
-
-
database.guide database.guide
-
Or to bring it up to SQL Server 2017 level: ALTER DATABASE MyDatabase SET COMPATIBILITY_LEVEL = 140;
-
-
stackoverflow.com stackoverflow.com
-
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!
-
-
unix.stackexchange.com unix.stackexchange.com
-
I think, it's better to replace \n symbol with some other symbol, and then work as usual:
-
- Dec 2019
-
rvm.io rvm.io
-
Note: Users must log out and back in to gain rvm group membership because group memberships are only evaluated by the operating system at initial login time.
Tags
Annotators
URL
-
-
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
-
-
stackoverflow.com stackoverflow.com
-
For those (like me) wondering why is the space needed, man bash has this to say about it: > Note that a negative offset must be separated from the colon by at least one space to avoid being confused with the :- expansion.
-
-
reactjs.org reactjs.org
-
This problem can also come up when you use npm link or an equivalent. In that case, your bundler might “see” two Reacts — one in application folder and one in your library folder. Assuming myapp and mylib are sibling folders, one possible fix is to run npm link ../myapp/node_modules/react from mylib. This should make the library use the application’s React copy.
-
-
stackoverflow.com stackoverflow.com
-
stackoverflow.com stackoverflow.com
-
In case anyone wants a hack, here is what I came up with.
-
-
-
Sadly, generating .d.ts files isn't supported by the webpack integration (not sure if this is planned), and due to microsoft/TypeScript#29490 it requires a separate tsconfig.json file to make it all work:
-
- Nov 2019
-
material-ui.com material-ui.com
-
This does not set the native input element to indeterminate due to inconsistent behavior across browsers. However, we set a data-indeterminate attribute on the input.
-
-
github.com github.com
-
Example of someone else defining a file that simply requires another file because this is the one that
gem
(?) orbundler
(?) looks for when your gem is namedactiverecord-pg_enum
-
-
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.
-
-
gist.github.com gist.github.com
-
// This is not really a mock, but jest prevents out of scope // variables unless prefixed with "mock".
-
-
stackoverflow.com stackoverflow.com
-
cant you see he has only 11 reputations, and how can he comment?
-
- Aug 2019