settings

Create new settings on runtime and read after restart

空扰寡人 提交于 2019-12-02 00:59:04
问题 I would like to store usersettings. They are created at runtime and should be read after restarting the application. private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { var property = new SettingsProperty("Testname"); property.DefaultValue = "TestValue"; Settings.Default.Properties.Add(property); Settings.Default.Save(); } At this point, the setting is stored and I can access it. After restarting the application, the newly created setting is away: public MainForm() {

How do I supply extra info to IApplicationSettingsProvider class?

徘徊边缘 提交于 2019-12-01 21:13:57
Perhaps this question has been asked before in a different way, but I haven’t been able to find it. I have one or more plugin adapter assemblies in my application all having the type IPlugin, for instance. Each adapter has its own settings structures stored in a common directory. Whether they are stored in one contiguous file or in separate ones doesn’t matter. Each adapter can have one or more settings associated with it. The settings will have both a name and the Plugin it will be used for. How would I create such a configuration system using the following requirements: I want to use .NETs

How to open Battery Use in About Device part of Settings Programatically in android?

心不动则不痛 提交于 2019-12-01 20:16:47
i am developing an android app where i want to open the Battery use intent which is present in About device part of settings programatically. I am using the below code for it. Intent i = new Intent(); i.setAction(android.provider.Settings.ACTION_DEVICE_INFO_SETTINGS); startActivity(i); The above code opens the About Device intent. But i want to open the Battery use option which is inside the About device part of Settings. Not getting how to do it. Please Help! Thanks! Intent intentBatteryUsage = new Intent(Intent.ACTION_POWER_USAGE_SUMMARY); startActivity(intentBatteryUsage); Try this.. Intent

SP2010 Client Object Model 3 MB limit - updating maxReceivedMessageSize doesnt get applied

空扰寡人 提交于 2019-12-01 19:26:44
I am using Client Object Model to interact with Sharepoint 2010. When I tried to upload documents greater than 3 MB using Client OM, it gave an error Bad Request. Microsoft suggests this to fix the problem. I tried that and updated the maxReceivedMessageSize property. It works fine after I restart the system, but doesnt get applied to a running sharepoint server. I assume that as the setting might have been kept in memory, so needs an application reset, but I cudnt figure out what to reset. I have tried reseting different Sharepoint services. I have tried reseting Sharepoint website in IIS.

iOS - How to know if iCloud photo transfer ability is enabled

∥☆過路亽.° 提交于 2019-12-01 16:49:33
问题 The new iCloud service has many possible configurations. How may I know if the device of my user is configured to send taken pictures to an iCloud server instead of storing them just on the device ? 回答1: If you want to know if iCloud is activated you could simply call: NSFileManager *fileManager = [NSFileManager defaultManager]; NSURL *cloudURL = [fileManager URLForUbiquityContainerIdentifier:nil]; if (cloudURL != nil) { // iCloud is available } This can give you a hint if iCloud is available

How do you prevent vim from showing an at symbol (@) when a line doesn't fit on screen?

只愿长相守 提交于 2019-12-01 15:39:00
In vim, when I have a line that can not be entirely shown on screen, the line appears as an at symbol "@" all the way down to the bottom of the screen. For example, if I have a file as such: 1 Hello World 2 Really long sentence that doesn't fit on one line. And I am at the beginning of the document, with a screen height of 3 lines, vim shows the following: 1 Hello World @ @ I would rather have vim show the following: 1 Hello World 2 Really long sentence that doesn't fit on Is this possible? Add set display+=lastline to your ~/.vimrc From :help 'display' : lastline When included, as much as

How to the change php settings from php code?

自闭症网瘾萝莉.ら 提交于 2019-12-01 14:40:11
I want to change the php setting but from ".php" page not php.ini. The settings I want to change is upload_max_filesize , post_max_size and memory_limit The only one of those that can be changed from within PHP is the last one, which can be changed with ini_set like this: ini_set('memory_limit', '32M'); PHP always processes the client request before the PHP script is started. This means that uploaded files are already uploaded and posted forms are already fully posted beforeb he script starts. The upload and post settings can therefore not be set in the script, ebcause they are already

Arraylist of custom classes inside My.Settings

别等时光非礼了梦想. 提交于 2019-12-01 14:24:19
I have a Visual Basic .Net 2.0 program. I'm moving the settings from an older settings file, to an app.config program settings file. I'm trying to do this as nicely as possible. So, I added my setting as shown in this image . On load I do this: If My.Settings.databaseConnectionSettings Is Nothing Then My.Settings.databaseConnectionSettings = New ArrayList() End If This is my custom class: Imports System.Xml.Serialization <Serializable()> Public Class DatabaseConnectionSettings Private _nickname As String = String.Empty Private _username As String = String.Empty Private _password As String =

How to the change php settings from php code?

痞子三分冷 提交于 2019-12-01 12:56:43
问题 I want to change the php setting but from ".php" page not php.ini. The settings I want to change is upload_max_filesize , post_max_size and memory_limit 回答1: The only one of those that can be changed from within PHP is the last one, which can be changed with ini_set like this: ini_set('memory_limit', '32M'); PHP always processes the client request before the PHP script is started. This means that uploaded files are already uploaded and posted forms are already fully posted beforeb he script

Disable window and transition settings

坚强是说给别人听的谎言 提交于 2019-12-01 11:48:53
So what I need to do is toggle window and/or transition animations on and off in code, to have the same effect of going Settings > Display > Animations > Disable all animations. The way I am familiar with changing device settings is by using a ContentResolver within the Settings.System.putInt() method as follows: ContentResolver cr = getContentResolver(); Settings.System.putInt(cr, Settings.System.WINDOW_ANIMATION_SCALE, 0); As described in the documentation 'Setting to 0 will disable all .... animations' for both settings. When reading the setting before and after using the putInt() method,