ctrl + alt + shift + / (cmd + alt + shift + / on MacOS) should show you the following dialog:
Clicking on Registry you will get
The key you want to enable/disable is
editor.skip.copy.and.cut.for.empty.selection
Tested on Linux Ubuntu and MacOS.
While System.Diagnostics.Contracts is included within the .Net Framework. To use Code Contracts you must install the Visual Studio extensions.
Under Extensions and Updates search for Code Contracts then install the Code Contracts Tools
After the tools are installed you must enable Code Contract...
Docker volumes are not automatically removed when a container is stopped. To remove associated volumes when you stop a container:
docker rm -v <container id or name>
If the -v flag is not specified, the volume remains on-disk as a 'dangling volume'. To delete all dangling volumes:
docker ...
Booleans and other values
When dealing with lua it is important to differentiate between the boolean values true and false and values that evaluate to true or false.
There are only two values in lua that evaluate to false: nil and false, while everything else, including the numerical 0 evaluate to...
K&R
void* is a catch all type for pointers to object types. An example of this in use is with the malloc function, which is declared as
void* malloc(size_t);
The pointer-to-void return type means that it is possible to assign the return value from malloc to a pointer to any other type of ob...
Like many Java objects, all String instances are created on the heap, even literals. When the JVM finds a String literal that has no equivalent reference in the heap, the JVM creates a corresponding String instance on the heap and it also stores a reference to the newly created String instance in th...
With Clipping and Masking you can make some specified parts of elements transparent or opaque. Both can be applied to any HTML element.
Clipping
Clips are vector paths. Outside of this path the element will be transparent, inside it's opaque. Therefore you can define a clip-path property on elemen...
A declaration introduces an identifier and describes its type, be it a type, object, or function. A declaration is what the compiler needs to accept references to that identifier. These are declarations:
extern int bar;
extern int g(int, int);
double f(int, double); /* extern can be omitted for f...
The following embeds an untrusted web page with all restrictions enabled
<iframe sandbox src="http://example.com/"></iframe>
To allow the page to run scripts and submit forms, add allow-scripts and allow-forms to the sandbox attribute.
<iframe sandbox="allow-script...
The InputRange concept has three functions, example:
struct InputRange(T) {
@property bool empty();
@property T front();
void popFront();
}
In short, a way to
check if the range is empty
get the current element
move to the next element
To make our own type a InputRange, w...
(Select, one-to-one)
As with ActionBlock, TransformBlock<TInput, TOutput> enables the execution of a delegate to perform some action for each input datum; unlike with ActionBlock, this processing has an output. This delegate can be a Func<TInput, TOutput>, in which case processing of t...
(SelectMany, 1-m: The results of this mapping are “flattened”, just like LINQ’s SelectMany)
TransformManyBlock<TInput, TOutput> is very similar to TransformBlock<TInput, TOutput>.
The key difference is that whereas a TransformBlock<TInput, TOutput> produces one and only one outpu...
Casting an instance of a base class to a subclass as in : b = (B) a; is called narrowing (as you are trying to narrow the base class object to a more specific class object) and needs an explicit type-cast.
Casting an instance of a subclass to a base class as in: A a = b; is called widening and does...
Random and ThreadLocalRandom are good enough for everyday use, but they have a big problem: They are based on a linear congruential generator, an algorithm whose output can be predicted rather easily. Thus, these two classes are not suitable for cryptographic uses (such as key generation).
One can ...
std::ifstream f("file.txt");
if (f)
{
std::stringstream buffer;
buffer << f.rdbuf();
f.close();
// The content of "file.txt" is available in the string `buffer.str()`
}
The rdbuf() method returns a pointer to a streambuf that can be pushed into buffer...