Keyboard shortcut to “Comment” a line in NANO?

The simplest workaround I’ve found: Comment-out: set the cursor at the first row that should be commented-out hit twice ‘M-R’ (or ‘Alt-r’; in order to Replace a RegExp) Search for: ‘^’ Replace with: ‘# ‘ Replace this instance?: ‘y’ press ‘y’ for each row to be commented-out Comment-in: The same procedure, replacing ‘# ‘ by … Read more

Text comparison algorithm

Typically this is accomplished by finding the Longest Common Subsequence (commonly called the LCS problem). This is how tools like diff work. Of course, diff is a line-oriented tool, and it sounds like your needs are somewhat different. However, I’m assuming that you’ve already constructed some way to compare words and sentences.

Always show scrollbar – Flutter

Updated Answer April 2023 As of v2.9.0-1.0.pre, isAlwaysShown is deprecated and you should use thumbVisibility instead. Check jayjw’s more complete answer: https://stackoverflow.com/a/71357052/9777674 Original Answer June 2020 As of Flutter version 1.17, on Scrollbar you can set isAlwaysShown to true, but you must set the same controller for your Scrollbar and your SingleChildScrollView (and that applies … Read more

Gradient Text in Flutter

You can use ShaderMask for that task. In ShaderMask, you need to set the BlendMode to BlendMode.srcIn, “src” means the widget to apply the gradient to (in this case Text), “in” means only show the part of the Text where it overlaps with the background which is the text itself (so the gradient doesn’t get … Read more