settings

Dynamic In-App Settings

最后都变了- 提交于 2019-12-10 15:33:38
问题 I have an app where Location is important. Currently I have a multi-value setting in the settings bundle where I have 5 locations defined. The problem with this approach is that the settings bundle is static - i.e. I cannot update that from a JSON list on my server as far as I know. I want to update the location list from a dynamic list on the server. I have looked at InAppSettingsKit but this also uses the standard settings bundles. Is it possible to use InAppSettingsKit to import settings

Android: launch app info dialog via adb shell am

倖福魔咒の 提交于 2019-12-10 15:22:29
问题 I'm trying to write a script which will launch the "app info" system dialog via adb for an app I'm testing. I have done some investigation and came up with this command, which will launch "app info" but fails with a force close (NullPointerException in logcat): adb shell am start -a android.intent.action.VIEW -n com.android.settings/.applications.InstalledAppDetails -es com.android.settings.ApplicationPkgName com.my.app -es pkg com.my.app Seems that the package name isn't being properly

Querying a custom postgresql parameter with SELECT statement

喜你入骨 提交于 2019-12-10 13:51:11
问题 In another question, it was asked how to query a postgresql runtime parameter (e.g. SHOW search_path; ) using a SELECT query. In the answer, it was suggested to use SELECT * FROM pg_settings WHERE name = 'search_path'; This works great, but how can this be done for custom parameters defined in an extension? (See docs about Customized Options). Example: SET abc.my_var = 1; SHOW abc.my_var; outputs 1 but SELECT * FROM pg_settings WHERE name = 'abc.my_var'; returns no rows. Is there some other

Django cannot import LOCAL settings

青春壹個敷衍的年華 提交于 2019-12-10 13:18:57
问题 EDIT: Playing around with Django 1.7... and Python 3 I can't seem to import local_settings.py into my settings.py file when using manage.py. If I execute the settings.py file directly, my local_settings.py file is imported fine, without any errors. However, when I run manage.py, it complains that it could not find the local_settings.py module. settings.py and local_settings.py are in the same folder... Any ideas? Traceback (most recent call last): File "/home/cg/webdev/riv_com/lib/python3.4

Resharper - How to turn off 'private' access modifier?

独自空忆成欢 提交于 2019-12-10 12:59:25
问题 I don't like having 'private' placed before my access modifiers. They're all private by default anyways and it's just visual clutter. How do I turn off resharper constantly tagging everything with 'private'? 回答1: ReSharper 9.1 ReSharper -> Options -> Code Editing -> C# -> Code Style -> Modifiers -> Use explicit private modifier (Un-Check) **ReSharper 2016.1 ReSharper -> Options -> Code Editing -> C# -> Code Style -> Modifiers -> 回答2: In the ReSharper Options menu, go to Code Editing -> C# ->

Android Studio 3.0 - Settings are not saved

十年热恋 提交于 2019-12-10 12:43:29
问题 I've increased the "Right margin (columns)" in File->Settings->Editor->Code Style from default 100 to 140. Unfortunately the margin is reset after each time I restart Android Studio. I also tried to export and import my settings but this does not prevent the right margin to be reset. Hopefully someone can tell me how to save the margin. 回答1: If you are selecting the default option in Code Style then it is going to reset again to 100 value Try to select Project from Scheme and apply the

Unable to access Heroku config vars from Django settings.py

泄露秘密 提交于 2019-12-10 12:08:08
问题 I have some config vars set on Heroku as described here: https://devcenter.heroku.com/articles/config-vars. When I run: heroku config I see the config var in the list: COMPRESS_OFFLINE: True and I can run heroku config:get COMPRESS_OFFLINE and I get: True In my Django settings.py, I have: import os COMPRESS_OFFLINE = os.environ['COMPRESS_OFFLINE'] This is how the article linked above tells you to access Heroku config variables in Django. I have this config var set in my local .env file, and I

form_for and ledermann rails-settings

帅比萌擦擦* 提交于 2019-12-10 11:35:19
问题 I want to make a form for ledermann rails-settings, in this question: Creating form for rails-setting, there is a solution, but it only works with current_user.settings(:email) , and i have other user preferences as well: current_user.settings(:detail) and current_user.settings(:preferences) . How can I change rails_settings_setting_object to the exact name of my settings? I now have: <%= form_for(resource, as: resource_name, url: edit_registration_path(resource_name), html: { method: :put })

(Django) Create a management command that will override the default settings in BaseCommand

こ雲淡風輕ζ 提交于 2019-12-10 11:11:07
问题 We always run our tests off of settings_test, like so: ./manage.py test someapp --settings=settings_test. The problem is that it's sometimes problematic to remember to add the option. I'd like to introduce a common app that just has the management command test.py. Depending on it's placement in the INSTALLED_APPS setting, it will override the default. Inside the command itself, I'd like to change the default of the --settings option. How can I do that? I am aware that I can create a local.py

Store custom application settings in XML

有些话、适合烂在心里 提交于 2019-12-10 10:44:56
问题 please help. I have this code, it's my class to serialize\deserialize application settings. [XmlRoot("EvaStartupData")] [Serializable] public class MyConfigClass { public string ServerName { get; set; } public string Database { get; set; } public string UserName { get; set; } public string UserLogin { get; set; } public static void MyConfigLoad() { FileInfo fi = new FileInfo(myConfigFileName); if (fi.Exists) { XmlSerializer mySerializer = new XmlSerializer(myConfigClass.GetType());