configuration-files

Programatically check if there is a configuration profile installed or not on an iPhone

拟墨画扇 提交于 2019-12-04 12:50:50
I need to develop an application that programatically checks if there is a configuration profile (called "X", for example) installed on the phone or not. I tried the solution already on this link but it didn't work. I also posted a question already related to this solution, but there has been no answer. This is very hard to do. If you are asking in the context of an MDM solution then your app on the device could ask the server for what is installed (assuming you, or your company, develop both the MDM-side and the app on the device). If your app needs to find out by itself then the only way to

File permissions across user profiles

余生长醉 提交于 2019-12-04 12:11:06
I am using ClickOnce deployment for a Windows Forms application and I need configuration information on a machine basis that persists across deployments and across user profiles. As such, per user configuration does not help. I would also like the configuration file to be easily accessible with a text editor in a well known location on each machine (well known, that is, by the organization). The problem I have is that ClickOnce overwrites the app.config on each deployment. I am aware of the configsource attribute, but from what I understand, the target file has to be in the path of the

Unit Testing custom ConfigurationElement & ConfigurationElementCollection

时光毁灭记忆、已成空白 提交于 2019-12-04 11:44:28
问题 I have created a custom ConfigurationElement and ConfigurationSection to make it easier to set up a host of application parameters at startup. However, I'd really like to unit test this logic. ServiceConnection public class ServiceConnection : ConfigurationElement { [ConfigurationProperty("locationNumber", IsRequired = true)] public string LocationNumber { get { return (string) base["locationNumber"]; } set { base["locationNumber"] = value; } } [ConfigurationProperty("hostName", IsRequired =

PHP GoDaddy maximum execution time not working

会有一股神秘感。 提交于 2019-12-04 11:21:06
The default maximun_execution_time is 120 seconds. I have followed all instructions to create php.ini file and placed in correct location public_html. I ran phpinfo() and found that the maximun_execution_time has successfully adjusted to 600 seconds. But the problem is it still not able to execute the script which more than 120 seconds. It will return error code 500 Internal server error after 2 minutes of execution time. sleep.php file: <?php $sleepTime = isset($_POST['sleepTime'])? intval($_POST['sleepTime']): 0; sleep($sleepTime); echo " woke up"; ?> sleep.html file: <script> var beginSleep

Separating configuration data and script logic in Perl scripts

坚强是说给别人听的谎言 提交于 2019-12-04 10:48:33
问题 I find the following anti-pattern repeated in my Perl scripts: the script contains some machine/setup specific settings which I store in-line as constants in the script whereas the rest of the script is general in nature: #!/usr/bin/perl use strict; use warnings; # machine specific settings at the start of the script. my $SETTING_1 = "foo"; my @SETTING_2 = ("123", "456"); my $SETTING_3 = "something"; # general part of script follows. ... This pattern is somewhat okay when running on one

Django: how to set log level to INFO or DEBUG

女生的网名这么多〃 提交于 2019-12-04 09:15:46
问题 I tried to change the debug level to DEBUG in Django because I want to add some debug messages to my code. It seems to have no effect. My logging configuration: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'simple': { 'format': '%(levelname)s %(message)s' }, }, 'handlers': { 'console':{ 'level':'DEBUG', 'class':'logging.StreamHandler', 'formatter': 'simple' }, }, 'loggers': { 'django.request':{ 'handlers': ['console'], 'propagate': False, 'level': 'DEBUG', }, }

How do you configure Firefox to allow Javascript to intercept a value pasted from the clipboard?

流过昼夜 提交于 2019-12-04 08:40:22
问题 I need to filter out certain characters when a user pastes from the clipboard. (I don't actually want to modify what's in the clipboard.) I already have this working in IE. Sigh ... tl;dr: capability.policy items in user.js make it into prefs.js but aren't taking effect. FYI, I can reasonably have all users install user.js . But none of us have admin access to our machines, so that's about all I can do regarding configuration. Thanks for any help! Note: For the purposes of this question, I do

Schema (XSD) for Microsoft .NET configuration file

此生再无相见时 提交于 2019-12-04 08:23:22
I'm searching the XSD (XML Schema) for the Microsoft .NET application configuration files. Till now I found only this: Configuration File Schema for the .NET Framework but I'm more interested in the XSD. Or - asked in general - I search also XSDs in general for .NET configuration files listed here . I've Visual Studio 2008 and don't see such files as in the first answer... DotNetConfig.xsd updated by Peter Ritchie based on C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\DotNetConfig.xsd . See Schema Cache . 来源: https://stackoverflow.com/questions/311782/schema-xsd-for-microsoft-net

Proper implementation of global configuration

不羁的心 提交于 2019-12-04 08:20:54
问题 My goal is to have global constants in a C++ game I'm working on (to represent some graphics info and the like). My current implementation is to toss them all in a .h and include them everywhere. This works, except that every time I change a setting, the entire code base must be recompiled. So, my next idea was to toss them in some configuration txt file and parse them in, that way no code is actually changed when settings change. The parser was simple enough, and I could put the values into

How do you prevent the IIS default site web.config file being inherited by virtual directories?

£可爱£侵袭症+ 提交于 2019-12-04 08:13:03
问题 I have the following code in a web.config file of the default IIS site. <httpModules> <add type="MDL.BexWebControls.Charts.ChartStreamHandler,Charts" name="ChartStreamHandler"/> </httpModules> Then when I setup and browse to a virtual directory I get this error Could not load file or assembly 'Charts' or one of its dependencies. The system cannot find the file specified. The virtual directory is inheriting the modules from the default web.config. How do you stop this inheritance? 回答1: I've