Programmatically set WCF timeout in debug mode

I’m using WCF in communication between a server and client (both written in C#). In release-mode, the timouts should be set to ~20 seconds, but in debug mode I want to set them to a higher value so that I can debug/step in my code without the timeout occurring. I know that I can change … Read more

Java -jar : access external configuration file

I’m looking to do something which I thought was not going to be difficult. I have an application that I’d like to package up as a jar because I’ve got ~30 dependencies and I would like to be able to deploy a single file. I have some configuration files – a properties file and a … Read more

How to, using dependency injection, get configuration from multiple sources?

I’m using Simple Injector, but maybe what I need is more of a conceptual answer. Here’s the deal, suppose I have an interface with my application settings: public interface IApplicationSettings { bool EnableLogging { get; } bool CopyLocal { get; } string ServerName { get; } } Then, one would usually have a class which … Read more

How do I locate CouchDB’s local.ini file so I can customize its settings?

I’ve installed CouchDB (to run a local npm registry) and need to locate the local.ini file so I can customize the couch settings. How do I find the local.ini file? Answer Run the following to display the chain of configuration files CouchDB uses, which should include the local.ini file: couchdb -c Example output: /usr/local/etc/couchdb/default.ini /usr/local/etc/couchdb/local.ini … Read more

Operating RDD failed while setting Spark record delimiter with org.apache.hadoop.conf.Configuration

I want to process a large text file “mydata.txt” (the size of actual file is about 30GB) with Spark. It’s record delimiter is “\ |” followed by “\n”. Because the default record separator of loading file (by “sc.textFile”) is “\n”, I set “textinputformat.record.delimiter” property of org.apache.hadoop.conf.Configuration to “\ |\n” to specify the record delimiter: AAAAA_|BBBBB_| … Read more

Solr error creating core: fieldType [x] not found in the schema

I am trying to get a Solr core running with my own schema.xml, but Solr (version 5.2.1) keeps complaining about missing fieldType elements that aren’t even in my fields definitions. org.apache.solr.common.SolrException: fieldType ‘booleans’ not found in the schema Whenever I add a ‘missing’ fieldtype another error pops up complaining about another fieldType missing, like longs, … Read more

relative path for database file in config file

I’ve created a WCF REST service that uses nhibernate to connect to sql server compact edition database. Hence I configure the NHibernate datasource like: <property name=”connection.connection_string”>Data Source=[Path]\MyDb.sdf</property> The annoyance I’m running into now is that I can’t figure out how to avoid having to write out the absolute path in the config. This is annoying … Read more

nginx – Can I add a new virtual host without restarting the server?

Can I set a new virtual host using the server object in the nginx.conf configuration file, without restarting the server (and without closing the active connections)? Thanks Answer Yes you can. nginx -s reload Or you can send SIGHUP to the nginx process. sudo kill -HUP [nginx’s pid] AttributionSource : Link , Question Author : … Read more

Visual Studio 2012 Web Deploy Publish ignores selected Configuration for transform and build

When I create a publish profile I have the option to select which Configuration I want the publish to use for this profile. The options are like Debug, Release or any custom defined one like Staging. The problem is that if I select any Configuration other than Release or Debug, say Staging, visual studio totally … Read more

“set iskeyword-=_” not being set from vimrc

Basically the title. When I include in my vimrc set iskeyword-=_ and save it, when I reload gvim and type :set iskeyword I still see iskeyword=@,48-57,_,192-255 As you can see, the ‘_’ is still there. If I just :set iskeyword-=_ it works as intended. Why doesn’t this work from my vimrc? Is there an alternate … Read more