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

What is Vec?

It means “Rust compiler, infer what type goes into the Vec“. And it is indeed analogous to the unused variable in Python (and in Rust itself), in that it represents a placeholder for a type, like it can represent a placeholder for a variable name. You can find an explanation in The Rust Programming Language … Read more

Curly braces in T-SQL

These are ODBC escape sequences. See Date, Time, and Timestamp Escape Sequences for more details. There is also similar syntax for uniqueidentifiers SELECT {guid ‘00000000-0000-0000-0000-000000000000′}, as well as procedure calls and some other constructs detailed off that link. With regard to the rest of your question I’m not aware of any way of having an … Read more

What does the period ‘.’ operator do in powershell?

The “.” dot sourcing operator will send AND receive variables from other scripts you have called. The “&” call operator will ONLY send variables. For instance, considering the following: Script 1 (call-operator.ps1): clear $funny = “laughing” $scriptpath = split-path -parent $MyInvocation.MyCommand.Definition $filename = “laughing.ps1” “Example 1:” # Call another script. Variables are passed only forward. … Read more

Passing function as block of code between curly braces

This is called either a nullary function or a thunk, and is an example of call-by-name evaluation: http://www.scala-lang.org/old/node/138 You can use nullaries pretty much anywhere you have a parameter list. They are basically just syntactic sugar around zero-argument functions that make them look like ordinary values, and are invoked whenever they are referenced. So def … Read more