settings

Mono doesn't write settings defaults

旧城冷巷雨未停 提交于 2020-01-03 10:19:22
问题 Here is my problem. If I use only one Windows Forms project and call only - Settings.Default.Save() when running it, Mono creates a user.config file with the default value for each setting. It is fine, so far so good. But now I add a class library project, which is referenced from the Windows Forms project and I move the settings from the Windows Forms project to the Class Library one. Now I do the same - Settings.Default.Save() and to my great surprise, Mono creates a user.config file with

Unable to get a setting from settings file in django

最后都变了- 提交于 2020-01-03 07:20:14
问题 I've a setting say gi in settings.py file. I've created a separate python file (i.e. I'm not using it in views) and used import statement as: from django.conf import settings but when I try to access settings.gi , it says that 'Settings' object has no attribute 'gi' . What's missing? :s 回答1: From the Django docs on creating your own settings states: Setting names are in all uppercase. Try renaming the setting to GI . 回答2: The project must be added on the PYTHONPATH and the DJANGO_SETTINGS

C# Modify Connection String that exists inside a library

谁说我不能喝 提交于 2020-01-03 02:01:32
问题 I have a Class Library, which inside just has a DataSet (MySQL connector) and a Connector class. I use this class in multiple projects to connect to the database, and I always had the password embedded in the connection string but now I need to be able to modify this string(for security purposes) so I can have the user connect using their own account. How can I modify this connection string. I have tried the following Properties.Settings.Default.DataBaseConnectionString = "String"; But it

What's the max value of max_input_time?

爷,独闯天下 提交于 2020-01-02 03:19:08
问题 Seems that max_execution_time is 0 but memory_limit is -1 . For max_input_time is it 0 or -1 or both? 回答1: The absolute maximum value is the limit of the long type in C: long max_input_time; member in struct:_php_core_globals See: http://lxr.php.net/search?q=max_input_time&defs=&refs=&path=&hist=&project=PHP_5_4 The effective maximum value is 2147483647 , to maintain interoperability. It may be more on a specific platform or implementaion, but this is the most common, 32bit max. As you can

What's the max value of max_input_time?

非 Y 不嫁゛ 提交于 2020-01-02 03:19:06
问题 Seems that max_execution_time is 0 but memory_limit is -1 . For max_input_time is it 0 or -1 or both? 回答1: The absolute maximum value is the limit of the long type in C: long max_input_time; member in struct:_php_core_globals See: http://lxr.php.net/search?q=max_input_time&defs=&refs=&path=&hist=&project=PHP_5_4 The effective maximum value is 2147483647 , to maintain interoperability. It may be more on a specific platform or implementaion, but this is the most common, 32bit max. As you can

Settings.System API behaviour in Android API level 23

为君一笑 提交于 2020-01-02 02:24:26
问题 In my application with targetSdkVersion as 23, while using the API Settings.System.putString() . Following error is being thrown and app crashes "AndroidRuntime: java.lang.IllegalArgumentException: You cannot keep your settings in the secure settings." After trying solution at Can't get WRITE_SETTINGS permission and granting the app write permission in screen opened by ACTION_MANAGE_WRITE_SETTINGS. The app still gets the error "You cannot keep your settings in the secure settings". Is

How to load default settings with KConfig on kdelib?

橙三吉。 提交于 2020-01-01 19:59:28
问题 I've a question about KConfig usage. I'm able to write and read settings in my .kde4/share/config/_appname_rc configuration file like that KConfig basicconf; KConfigGroup conf = KConfigGroup(basicconf.group("Settings")); conf.writeEntry("filepath",QString("/path/")); basicconf.sync(); But I don't understand how to use a "default" configuration file to read at first time i run my application, or in case if application settings needs reset. I prefer do not use KConfig XT because my project is

How to load default settings with KConfig on kdelib?

荒凉一梦 提交于 2020-01-01 19:59:15
问题 I've a question about KConfig usage. I'm able to write and read settings in my .kde4/share/config/_appname_rc configuration file like that KConfig basicconf; KConfigGroup conf = KConfigGroup(basicconf.group("Settings")); conf.writeEntry("filepath",QString("/path/")); basicconf.sync(); But I don't understand how to use a "default" configuration file to read at first time i run my application, or in case if application settings needs reset. I prefer do not use KConfig XT because my project is

Android: Trying to start BluetoothSettings activity Force Close with NullPointerException

廉价感情. 提交于 2020-01-01 19:28:06
问题 I'm trying to bring up the standard window for Bluetooth Settings(with Device name, Discoverability etc). However, general approach with startActivity(intent) ends with NullPointerException pointing to BluetoothSettings.java onCreate:135. Checking with the Android code, I've found that at line 135 they get some extras from the intent. So I prepare the same extras (names I've found in android core BluetoothDevicePicker interface) and issue it -- the same effect with NullPointerException. Might

How do I store an array of a particular type into my settings file?

孤街浪徒 提交于 2020-01-01 17:10:21
问题 For some reason, I can't seem to store an array of my class into the settings. Here's the code: var newLink = new Link(); Properties.Settings.Default.Links = new ArrayList(); Properties.Settings.Default.Links.Add(newLink); Properties.Settings.Default.Save(); In my Settings.Designer.cs I specified the field to be an array list: [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Collections.ArrayList