settings

How to return from preference screen to main activity?

依然范特西╮ 提交于 2019-12-05 09:57:30
I have one main activity and one preferenceActivity. On my first activity I call menu and go on preferenceActivity by calling startActivityForResult. case R.id.settings: startActivityForResult(new Intent(this, SettingsActivity.class), LAUNCH_SETTINGS); return true; Then I change my settings and want to return on main activity and see main activity with new settings applyed. In onPause() method do following (as I right understand this method will be called when I press back button, right?) @Override protected void onPause() { super.onPause(); setResult(RESULT_OK, new Intent(this, MainActivity

How to save user settings programmatically?

我的梦境 提交于 2019-12-05 09:00:00
问题 I have a button which opens windows color pallet and then assigns select color to selected element in some virtual studio. Element is first selected by the user on mouse click, and based on element ID, color is assigned. So, each time the button is clicked, color of the same or different element is changed. Element ID is obtained from a delegate that fires if mouse clicked on some element. The code for color-set button is like this: private void Btn_Choose_Color_Click(object sender,

Enterprise Architect project programming language

微笑、不失礼 提交于 2019-12-05 06:41:29
In Enterprise Architect when I model a class and specify the implementation language of the class, then use an instance of the class in a use case, the implementation language of the instance in the use case is not the implementation language of the class, but is the default. Is there a way to make Enterprise Architect use the set implementation language of the class for the implementation language of all instances of that class? There isn't an option to make instances follow the class language (but that's a good suggestion to send to Sparx), but you can set the default language for all new

c++11 code generates semantic errors in Eclipse, can't change build settings

房东的猫 提交于 2019-12-05 06:27:13
问题 I'm having trouble with c++11 code in Eclipse CDT. The code compiles fine, but in the editor I see that all references to c++11 standard library (such as std::shared_ptr and std::chrono::milliseconds) are flagged as errors by the discovery service / indexer, which prevents the program from being run. The include files are found, but I think the proper flags and macros aren't getting propagated through to CDT's internal checks, so none of the types or main content of the headers are defined. I

Elasticsearch: HOW-TO delete a (cluster) setting

人走茶凉 提交于 2019-12-05 06:20:45
my current luster configuration settings look like this : { "persistent": { "indices": { "store": { "throttle": { "type": "none", "max_bytes_per_sec": "150mb" } } } }, "transient": {} } and am wondering how can i delete the "max_bytes_per_sec" part of the settings. could you please advise on this one ? Resetting persistent or transient settings can be done by assigning a null value. Refer: https://www.elastic.co/guide/en/elasticsearch/reference/5.5/cluster-update-settings.html in your case it would be PUT /_cluster/settings { "persistent" : { "indices.store.throttle.max_bytes_per_sec" : null }

Different settings for each application with Django

我只是一个虾纸丫 提交于 2019-12-05 05:35:59
问题 How do I use different setting for each application? For example: http://www.mysite.com/app1 uses the settings.py + local_settings.py of the app1's folder... http://www.mysite.com/app2 uses the settings.py + local_settings.py of the app2's folder... etc... Thanks, 回答1: you could check all ways of splitting up your settings from here: https://code.djangoproject.com/wiki/SplitSettings 回答2: Older relevant thread talking about per application settings: http://groups.google.com/group/django

What is the difference between connectionstrings and appsettings?

半腔热情 提交于 2019-12-05 03:34:12
In one of the applications I have been referring to, the Connection String is stored in AppSettings! Till now I have been storing the connection in the <connectionstring/> element. But what is the correct way? So my question is, what are the differences between <connectionstrings> and <appsettings> in the web.config and are there any specific reasons why I should or should not be storing connection strings in appsettings? Are there any rules / guidelines provided to follow? Or is this completely the choice of the developer? VoodooChild There is a fundamental difference between connectionString

django - what should you do if you don't need a database engine?

给你一囗甜甜゛ 提交于 2019-12-05 02:22:10
If you fail to set a database engine in setting.py you get an error. Is there some way to disable the database portion of django for a specific site if you don't have a need for a database? You are required to use a database engine if you want to use some features of django, like sessions, for example. If you do not need those, just remove them from middleware classes. If you want to use sessions or store some data using django apps, but do not want to do all the complicated database configurations, you can use sqlite3 as your database engine. It does not require any setup, all you need is to

How do I update my PromptManager settings for IPython 5.0?

折月煮酒 提交于 2019-12-05 02:17:17
The lines # Output prompt. '\#' will be transformed to the prompt number c.PromptManager.out_template = '{color.Green}Out[{count}]{color.Green} : {color.LightGray}' # Continuation prompt. c.PromptManager.in2_template = '{color.Yellow} .\\D.{color.Green} : {color.LightGray}' # If True (default), each prompt will be right-aligned with the preceding one. c.PromptManager.justify = True # Input prompt. '\#' will be transformed to the prompt number c.PromptManager.in_template = '{color.Green}In [{count}]{color.LightGreen} : {color.DarkGray}' in my ipython_config.py give usr/local/lib/python2.7/site

Open Settings from App (like Twitter to turn on Wi-Fi) - With iOS 7.1

故事扮演 提交于 2019-12-05 02:11:10
I know that there are a lot of Q&A saying that from iOS 5.1 it is not possible to open Settings from the app, some examples: Opening the Settings app from another app is it possible to open Settings App using openURL? launch settings from alert But what is really annoying is that Twitter App (version 6.2.1, iPhone 4s, iOS 7.1) is opening Settings from the application. Check this image: Clicking on Settings, Twitter is opening Settings and a view with title Wi-Fi. It is true that this view do not have all the Wi-Fi properties. However, it is something into Settings. How is that possible? How is