settings

Get hardware serial number of Android device

余生长醉 提交于 2019-12-02 22:54:43
I need to get the hardware serial code of Android device where my app is installed. This hardware serial number is the one that you can see on Settings > About Device > Status > Serial number . I though I would get it using Settings.Secure.ANDROID_ID or android.os.Build.SERIAL , but neither of them worked, meaning that they didn't give me unique identifier I'm looking for. For instance android.os.Build.SERIAL got me the unique ID shown on ADB when you run the command adb devices . Notice that the goal of this question is not to find another unique identifier that could help me, it's only about

Storing the secrets (passwords) in a separate file

◇◆丶佛笑我妖孽 提交于 2019-12-02 21:54:53
What's the simplest way to store the application secrets (passwords, access tokens) for a Python script? I thought it'd be a *.yml file like in Ruby but surprisingly I found that it wasn't the case. So what is it then? What are the most simplest solutions? I want to put them in a separate file because that way I'll be able not to push that file to a github repository. I think storing credentials inside another *py file is your safest bet. Then just import it. Example would look like this config.py username = "xy" password = "abcd" main.py import config login(config.username, config.password) I

iphone - how to add normal text to settings bundle

夙愿已清 提交于 2019-12-02 20:20:56
I've 3 groups created in iphone settings bundle Root.plist file. Its showing fine. But for every group, i want to add some description. It will be something like follows: GroupName Description Settings in that group. Is it possible. How to add description? If the description color is different to identify from group name and settings in that group, it will be good. Oscar S. You can add text at the bottom of your Groups, that is commonly used as a hint about the preferences in that group. Add a new item to a Group (Yes!, additionally to the default Title and Type Keys). Replace the text under

Adding settings class to a UWP app

被刻印的时光 ゝ 提交于 2019-12-02 19:54:12
I'm developing a Universal Windows Platform app but there is no Settings template in Visual Studio. How can I implement an easy, strongly typed and observable class that stores my settings in LocalSettings or RoamingSettings? Create a new class inheriting from ObservableSettings. Call to the base class constructor indicating if you want to store the settings in LocalSettings or in RoamingSettings . Add all your properties calling the base class members Set and Get in the getter and in the setter. No need to pass the name of the property or use nameof() operator! Optionally you can set a

Java app behind proxy to use http_proxy variable in linux

元气小坏坏 提交于 2019-12-02 19:35:40
I am thinking of a simple Java appplication (command line) that connects to the internet to download a XML file, the problem is that my Ubuntu is using a proxy to connect to internet with username and password (through http_proxy ="http://<username>:<pwd>@<ip>:<port>" ). So my question is, could it be possible to write a java app to use http_proxy variable? Instead of programmatically setting http proxy and host in every app I will write. wiki1000 Don't forget the shell variable _JAVA_OPTIONS export _JAVA_OPTIONS='-Dhttp.proxyHost=cache.com -Dhttp.proxyPort=3128' For more properties look here:

Change browser proxy settings from Python?

不问归期 提交于 2019-12-02 19:34:48
I have written a program that relies on a proxy to function. I now need a script that will check to see if the browser is set to use the right proxy, and if not, change it to use it. I need this implemented for as many browsers as possible, but is only required for Internet Explorer, Google Chrome, Mozilla Firefox, Safari and Opera . I am not even sure how to go about this, but it is for a project for work that will be due in a few days. If anyone can help or lend advice, I would greatly appreciate it! I am programming on: MS Windows XP Python 2.6 Cesar Canassa The Windows stores its system

How to use different .settings files for different environments in .NET?

妖精的绣舞 提交于 2019-12-02 19:34:01
.NET allows you to use .settings files to manage application settings. I would like to store Production, Development and Test settings separately in a way that I can do something like this: EnvironmentSettings environmentSettings; // get the current environment (Production, Development or Test) ApplicationEnvironment Environment = (ApplicationEnvironment) Enum.Parse(typeof(ApplicationEnvironment), Settings.Default.ApplicationEnvironment); switch (Environment) { case ApplicationEnvironment.Production: environmentSettings = Settings.Production; break; ... } string reportOutputLocation =

Adding/Removing the language entries in the “Settings” -> “Select Locale” from Android phone

狂风中的少年 提交于 2019-12-02 19:06:24
My question: How can I add or remove the language entries in the "Settings" -> "Language & keyboard settings" -> "Select Locale"(or "Select Language") in the Android phone from the source code level? I'll provide more details on what I want and what I have done. Please excuse me if I present any silly understanding or information. I'm pretty new to Android development, starting to learn it several days ago. There is still a lot that I don't know. More info on what I want: I'm recently working on a task to localize the entire phone product with new languages(I mean, I'm not working on a

“sites framework” on a single django instance

天涯浪子 提交于 2019-12-02 18:55:30
I want to serve up specialized RSS feeds on a different subdomain from the rest of the site. Can I use the sites framework to use a different urls.py and settings.py file within a single django instance . or do I need to set up two apache locations and just set the different settings.py files in the apache conf. The reason I need to set up two urls.py files is to avoid duplicate content. I don't want the main site to be available at rss.example.com and I don't want the specialized feeds to be accessible on example.com Serving them from a single django instance would be ideal because we're on

Maven: Trying to Deploy with credentials in settings.xml file

淺唱寂寞╮ 提交于 2019-12-02 18:49:17
This seemed to be working last week and now it doesn't. We use Artifactory as our Maven repository. I am deploying a jar and pom using the deploy:deploy-file goal Our Artifactory repository requires authentication to deploy. I can deploy to the repository by embedding my credentials in the server URL on the command line: $ mvn deploy:deploy-file \ -Durl=http://deployer:swordfish@repo.veggiecorp.com/artifactory/ext-release-local \ -Dfile=crypto.jar \ -DpomFile=pom.xml \ -Did=VeggieCorp yadda...yadda...yadda... [INFO] ------------------------------------------------------------------------ [INFO