settings

How do I override ODF Root RSID using the API

一世执手 提交于 2019-12-13 03:03:09
问题 I am generating ODT documents using the openoffice/libreoffice API, and I want the files to come out to be 100% identical every time (by MD5 comparison). At this point I can unzip the two files generated at different times and check all the files within the zip file and they all match 100%, except for the Settings.xml which has two unique differences (both RSID related). <config:config-item config:name="Rsid" config:type="int">1835643</config:config-item> and <config:config-item config:name=

Can bzr ignore empty lines when comparing revisions?

丶灬走出姿态 提交于 2019-12-13 02:50:00
问题 I would like to set up a bzr repository that does not require me to deal with the addition or subtraction of empty lines. Is it possible to do this? Are there any potential disadvantages? My code is in R and bash. 回答1: When comparing repositories or revisions using bzr diff, you can use diff-options to pass options through to the standard UNIX diff command. I've been unable to find a way to handle whitespace changes (tab to spaces, or spaces to tabs) gracefully. I've also been unable to find

How to persist from build programmatically?

戏子无情 提交于 2019-12-13 01:28:00
问题 I want to be able to load some information programmatically into Properties.Settings.Default before I publish it, but it doesn't persist. How do I overcome that? I have (as a test): private void button1_Click(object sender, EventArgs e) { Properties.Settings.Default.Setting1 = "abc"; Properties.Settings.Default.Save(); } private void button2_Click(object sender, EventArgs e) { Text = Properties.Settings.Default.Setting1; } I clicked on button1, then published (with clickonce) and then run the

android intent not work for wifi,sound,bluetooth?

拜拜、爱过 提交于 2019-12-12 22:15:21
问题 I'm try to call setting which display WiFi,sound and bluetooth but is not work: i will put my code here and also logcat i want this settings on button click event and display only selected icons if any other way to use this i want to use like see image here @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.wifi); Button wifi =(Button)findViewById(R.id.wifi); wifi.setOnClickListener(new OnClickListener() { public void

How detect time settings of device?

六月ゝ 毕业季﹏ 提交于 2019-12-12 22:00:22
问题 I have an application in which i have made a alarm clock. In my application problem is that when device date and time settings changed then text of label of alarm also changed. For example if time settings is set as 24 hours then in my label 's text don't show am and pm in last while when change settings as 12 hours then in label's text show am and pm. How detect that what is settings of date and time and how apply validation on label's text that whatever settings always display in am and pm

can't return to activity after System settings intent

▼魔方 西西 提交于 2019-12-12 19:24:34
问题 In my applicattion i need to go to de settings activity of the phone to activate GPS and want to return to my application using this code code: Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); startActivityForResult(intent); but when I used it I couldn't return to my app. when I pressed back so I tried this : Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); startActivityForResult(intent, 0); then I called all types of result in this code public void

How to use the WinInet API from Java?

China☆狼群 提交于 2019-12-12 17:25:42
问题 According to this answer to an earlier question of mine, the WinInet Windows API is the correct way to read and write internet connection settings in Windows. How can I use this API from Java? I'd prefer a free, open-source solution. 回答1: There's always JNI and JNA, but if you don't already know C or C++ there'll be a learning curve involved, especially with JNI: JNI Reference, JNA Site 回答2: Over the last months I had to mix with my Java project some C, C++ and Win32 alternatives for native

Save something into JAR

喜夏-厌秋 提交于 2019-12-12 14:11:01
问题 I have a java app, that needs to save and load user settings. I want to save them in a file located in the JAR file, how could I achieve this? 回答1: That's not possible. Rather consider using java.util.prefs.Preferences which is designed for exactly this purpose. See also this little guide. 回答2: This is not a sensible course of action. A JAR file is basically just a ZIP file. To rewrite its contents you need to extract them in full, make changes as needed and then write them to a new file that

Hiding preferences items in the settings bundle

假如想象 提交于 2019-12-12 11:43:40
问题 Just a question i've been stuck on for a while. I would like the user to be allowed to hide some settings found on the Root.plist. Anybody know if this is possible? failing this is it possible to essentially have two Root.plist files and swap between the two depending upon a variable? Please let me know if there is fundamentaly anything wrong with what I am try to achieve. Thanks for your help :) ps/ Alternatively could I be able to "grey-out" options within the app settings? 回答1: No,

Please supply the ENGINE value Django database configuration

戏子无情 提交于 2019-12-12 10:39:55
问题 Guys i'm so confused i've installed Django, and run the server ok, but when try to configure the database an run the db sync command it crash returning the my ENGINE parameter is not OK, but the settings file is OK. Follow the settings file: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'mysite', # Or path to database file if using sqlite3. 'USER': 'root', # Not used with sqlite3. 'PASSWORD':