What is the difference between String and string in C#?

string is an alias in C# for System.String. So technically, there is no difference. It’s like int vs. System.Int32. As far as guidelines, it’s generally recommended to use string any time you’re referring to an object. e.g. string place = “world”; Likewise, I think it’s generally recommended to use String if you need to refer … Read more

In Bash, how to add “Are you sure [Y/n]” to any command or alias?

These are more compact and versatile forms of Hamish’s answer. They handle any mixture of upper and lower case letters: read -r -p “Are you sure? [y/N] ” response case “$response” in [yY][eE][sS]|[yY]) do_something ;; *) do_something_else ;; esac Or, for Bash >= version 3.2: read -r -p “Are you sure? [y/N] ” response if … Read more

Should I use alias or alias_method?

alias_method can be redefined if need be. (it’s defined in the Module class.) alias‘s behavior changes depending on its scope and can be quite unpredictable at times. Verdict: Use alias_method – it gives you a ton more flexibility. Usage: def foo “foo” end alias_method :baz, :foo

Aliases in Windows command prompt

To add to josh’s answer, you may make the alias(es) persistent with the following steps, Create a .bat or .cmd file with your DOSKEY commands. Run regedit and go to HKEY_CURRENT_USER\Software\Microsoft\Command Processor Add String Value entry with the name AutoRun and the full path of your .bat/.cmd file. For example, %USERPROFILE%\alias.cmd, replacing the initial segment … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)