What are the differences between set -g, set -ga and set-option -g in a .tmux.conf file?

set is the alias of set-option. set -g is used to set global options and -ga appends values to existing settings. From Tmux’s man page: With -a, and if the option expects a string or a style, value is appended to the existing setting. For example: set -g status-left “foo” set -ag status-left “bar” Will … Read more

Equivalents of XDG_CONFIG_HOME and XDG_DATA_HOME on Mac OS X?

Comparing Apple’s documentation for the various paths to the XDG Base Directory specifications approximates to the following locations: XDG_CONFIG_HOME ▶︎ ~/Library/Preferences/ XDG_DATA_HOME ▶︎ ~/Library/ XDG_CACHE_HOME ▶︎ ~/Library/Caches/ Mapping XDG Base Directory Specification locations for “My App” on Mac OS X could look like this: XDG_CONFIG_HOME ▶︎ ~/Library/Preferences/name.often.with.domain.myapp.plist XDG_DATA_HOME ▶︎ ~/Library/My App/ XDG_CACHE_HOME ▶︎ ~/Library/Caches/My App/ … Read more

How to set authorization in mongodb config file?

For mongod version 2.4 (ini config file) auth = true https://docs.mongodb.com/v2.4/reference/configuration-options/#auth For mongod versions 2.6+ (yaml config file) security: authorization: enabled https://docs.mongodb.com/v3.2/reference/configuration-options/#security.authorization https://docs.mongodb.com/v3.0/reference/configuration-options/#security.authorization https://docs.mongodb.com/v2.6/reference/configuration-options/#security.authorization

Correct implementation of a custom config section with nested collections?

I finally found this guy’s example. It was coded and worked right out of the box. http://manyrootsofallevilrants.blogspot.com/2011/07/nested-custom-configuration-collections.html I am going to paste the code here……only because I cannot stand it when someone says “Your answer is here”, and the link is dead. Please try his website first, and leave a “thank you” if it works. … Read more

How can I make shift+spacebar page up in Vim?

You cannot. CMS’s solution will work for gVim, but not in vim because terminals cannot distinguish between <Space> and <S-Space> because curses sees them the same. It might be possible in the future if vim gains libtermkey support and your terminal supports the proper <CSI> sequences (xterm does if properly configured; nothing else does yet).

How to programmatically modify WCF app.config endpoint address setting?

Is this on the client side of things?? If so, you need to create an instance of WsHttpBinding, and an EndpointAddress, and then pass those two to the proxy client constructor that takes these two as parameters. // using System.ServiceModel; WSHttpBinding binding = new WSHttpBinding(); EndpointAddress endpoint = new EndpointAddress(new Uri(“http://localhost:9000/MyService”)); MyServiceClient client = new … Read more

How to read a configuration file in Java

app.config app.name=Properties Sample Code app.version=1.09 Source code: Properties prop = new Properties(); String fileName = “app.config”; try (FileInputStream fis = new FileInputStream(fileName)) { prop.load(fis); } catch (FileNotFoundException ex) { … // FileNotFoundException catch is optional and can be collapsed } catch (IOException ex) { … } System.out.println(prop.getProperty(“app.name”)); System.out.println(prop.getProperty(“app.version”)); Output: Properties Sample Code 1.09

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