Search Results

Search found 877 results on 36 pages for 'preference'.

Page 2/36 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Using optimization to assign by preference

    - by Aarthi
    I have 100 objects ("candies") that I need to distribute between five people so that each has an equal number of candies (in this case, 20 candies per person). However, each person has also expressed their preferences of candy to me in a chart, similar to below. Top-favored candies receive 10 points, least-favored candies receive -10 points, and neutral-favored candies receive 0.5 points. I need to sort the items out so that: Each person receives the same number of candies Each person's total "satisfaction" (points) is maximized My output is a list of each person's assigned items I'm familiar with Excel's in-house Monte Carlo simulation tools (Solver, F9 diceroll, etc) and would like to stick to those tools. While I know how to set up the chart, and how to use the column summation to input into Solver, I don't know how to get it to give me the desired output. Furthermore, how do I adjust the solver so it takes into account individual preferences rather than empirical ones? To wit: how do I begin setting up this model?

    Read the article

  • Always use one slow connection in preference of a "faster" one

    - by billc.cn
    In Windows, there's this automatic metric thing where the metric is selected according to the declared speed of the link. I now have a gigabit LAN routed to a 2MB DSL service and a HSDPA mobile broadband connection. The former is always chosen for Internet packets even though the latter is actually faster. I tried setting the mobile broadband's interface metric to 1 and raising its priority in the advanced settings of the adapter settings, but this does not seem to affect the metric of the default route. The default route to the Ethernet interface always have a lower metric than the mobile broadband interface. Am I missing something here?

    Read the article

  • Custom android preference type loses focus when typing

    - by Brian
    I created a simple preference class that shows an AutoCompleteTextView control and it displays properly but when i focus on the AutoCompleteTextView and start typing it brings up the keyboard but then immediately loses focus on the control. Any idea why this loses focus? Here's what i did to create the view. the inflated layout is just a basic linear layout with a title textview in it. I could change it to a dialog preference instead I guess but it'd be smoother if it could be part of the base view. @Override protected View onCreateView(ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); LinearLayout layout = (LinearLayout) inflater.inflate(R.layout.base_preference, null); if (mHint != null) { TextView hintView = (TextView) layout.findViewById(R.id.PreferenceHintTextView); hintView.setText(mHint); } TextView titleView = (TextView) layout.findViewById(R.id.PreferenceTitleTextView); titleView.setText(getTitle()); AutoCompleteTextView inputView = new AutoCompleteTextView(getContext()); inputView.setGravity(Gravity.FILL_HORIZONTAL); ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(getContext(), R.layout.auto_complete_text_list_item, getEntries()); inputView.setAdapter(adapter); inputView.setThreshold(1); inputView.setOnItemSelectedListener(this); layout.addView(inputView); return layout; }

    Read the article

  • Preference values - static without tables using a model with virtual attributes

    - by Mike
    Im trying to eliminate two tables from my database. The tables are message_sort_options and per_page_options. These tables basically just have 5 records which are options a user can set as their preference in a preferences table. The preferences table has columns like sort_preferences and per_page_preference which both point to a record in the other two tables containing the options. How can i set up the models with virtual attributes and fixed values for the options - eliminating table lookups every time the preferences are looked up?

    Read the article

  • Custom Preference Including EditText

    - by Shardul
    Hello, I am creating an custom preference which contains an EditText. The problem is when user clicks the EdiText for input suggestion box opens up and EditText looses focus. When EditText is clicked again for input, no problem occurs until 'blank space' is entered, which results in suggestion box and hence loss of focus. What I mean by suggestion box is the box which pops up when entering text in EditText

    Read the article

  • Responding to preference updates in Android

    - by hgpc
    I am calling a PreferenceActivity from another activity and then updating the application state (ie: changing the font size) on onActivityResult, based on the preference changes. I was thinking it would be better to put the state update logic in the PreferenceActivity. That way I don't have the duplicate the logic in each activity that calls the PreferenceActivity. What's the best or correct way to do this?

    Read the article

  • give preference to print array values in php

    - by Bharanikumar
    Hi , I have country table, i fetch all values and moved into array , these value i like to populate into combo/dropdown list , here i want to do some magic things, that is , for my site most of the users coming from uk,us,Australia,Romain and few, So i like to populate by my preference , is there any array will do this magic work, else is it possible mysql query , So final question is , Populate country name into combo based on my prefernce , Thanks

    Read the article

  • Getting a Soft Keyboard for a EditTextPreference

    - by user313135
    Hello, I have a shared preference that is being accesed via an EditTextPreference. I am in the process of porting this application to a device that does not have a hardware keyboard for text entry. When the time comes to modify the EditTextPreference, there is no soft keyboard that becomes available, and I am at a loss as to how to invoke the soft keyboard for text input to edit this preference. Thanks

    Read the article

  • Emulating Preference look/feel with LinearLayout

    - by colinodell
    I really like the look and feel of the Preference UI items and want to replicate that in my application. Basically I've got an Activity with a couple LinearLayouts set to be focusable. When they are focused, I want them to turn green (like Preferences do). Any idea how to apply that style to my LinearLayouts? Note: The LinearLayouts are essentially going to be clickable 'buttons' to launch a separate activity. They are NOT actual preferences or buttons, although they need to look/act similar to them.)

    Read the article

  • Deprecated Preference Activity method

    - by Adnan Nazir
    package com.adi.preferencedemotest; i am working on PreferenceActivity but when i call my preference xml(prefs.xml) with the help of addPreferencesFromResource it says this method is deprecated and "This function is not relevant for a modern fragment-based PreferenceActivity" is there any alternative of this method? how i can handle ? public class PrefsActivity extends PreferenceActivity { @SuppressWarnings("deprecation") <------- @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.prefs); <------- } } Note: may be my question rate as duplicated but i didn't find any.

    Read the article

  • Xcode - "Preference Pane" project - how to access bundle?

    - by Nippysaurus
    I have created a "Preference Pane" project. In this project I would like to load an image from my bundles resources folder. This seems difficult because "[NSBundle mainBundle]" seems to return the following: 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </Applications/System Preferences.app> (loaded) Iterating through "[NSBundle allBundles]" reveals that my projects bundle appears, but does not appear to be loaded: 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Mouse.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Sound.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Spotlight.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/TimeMachine.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </Library/PreferencePanes/DivX.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Trackpad.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/UniversalAccessPref.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Dock.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/DateAndTime.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Keyboard.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/MobileMe.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/FibreChannel.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Appearance.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/DigiHubDiscs.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Ink.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Security.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/EnergySaver.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Speech.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </Users/michael/Library/PreferencePanes/MyPrefPane.prefPane> (loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </Users/michael/Code/MyPrefPane/build/Debug/MyPrefPane.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/SharingPref.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Expose.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/SoftwareUpdate.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/ParentalControls.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/PrintAndFax.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Accounts.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/DesktopScreenEffectsPref.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Bluetooth.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Localization.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/StartupDisk.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Network.prefPane> (not yet loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </Applications/System Preferences.app> (loaded) 27/12/10 9:24:18 PM System Preferences[5076] NSBundle </System/Library/PreferencePanes/Displays.prefPane> (not yet loaded) I'm not sure whats going on here. How can I access my prefpane bundle?

    Read the article

  • Read SharedPreferences when you haven't set the name of the file.

    - by Pentium10
    When you createa a PreferenceScreen on Android, your application creates a default SharedPreferences file for the settings. I want to read this name, or get a reference without specifing the name. Currently I use: SharedPreferences prefs = ctx.getSharedPreferences("prefs", 0); SharedPreferences.Editor ed=prefs.edit(); But this returns another copy of the preference. When I checked the folder in /data/data/myapk/shared_prefs I see two files, one named prefs.xml and the other is my [package name]_preferences.xml (this was created by the PreferenceActivity); How do I get an instance of the shared preference with the usage of the default file name, so I should not mention a name for it?

    Read the article

  • Adding configChanges ="locale" programatically

    - by chrisonline
    I use configChanges="locale" on my activities. Without this options in AndroidManifest.xml in 2.x i get flickering screens. It works in all my activities excepting in the preferences screen i add programatically. I have one Preference Activity -- it works after setting configChanges="locale" to the AndroidManifest.xml. Inside of the Preference Activity i add programatically a new preferencescreen. For this new PreferenceScreen i dont have an activity in the AndroidManifest.xml! So i cannot add the configChanges="locale" and the screen flickers on 2.x !! How can i add the attribute configChanges="locale" programatically?

    Read the article

  • Using checkbox to enable eventlistener

    - by Lefty
    I have looked for a solution to this for days and days. The examples I found don't make sence to me, probably because I am both old and new (old to life and new to android/jave). I would like to add a checkbox to my preference activity that would either enable or disable receivers. This is for a service which will run in the background, at boot completed, and will depend on two things 1)is the preference true and 2) is wifi enabled. So it would work something like this; user turns on phone boot completed checks if receivers are enabled (set by checkboxpreference) if checkboxpreference is true - looks for wifi if wifi is true - registers receivers Also required would be if wifi or checkboxpreference goes "false", unregister receivers. Thanks

    Read the article

  • Android - Using PreferenceScreen to display and save settings to/from ContentProvider

    - by Donal Rafferty
    I have my own custom Content Provider that loads a datasbase which contains the settings information for my application. I load the settings from the ContentProvider on the creation of my Settings activity. My Settings activity is made up of a PreferenceScreen and Dialog based EditText's. The following code shows how I use the preference screen and edit texts. So as you can see from the first image this works and displays the menu with the information underneath. The problem is in image two, when I click on a choice in the menu the dialog pops up but it is empty, I would like to be able to load the data from my content provider into the edit text in the dialog, so in image one it shows "Donal" as the user name so in image two "Donal" should also appear in the edit text in the dialog. I would also like to be able to listen to the OK button in the dialog so when a user changes a setting I can update the data in my content provider. Can anyone help me with what I'm trying to do? Code // Root PreferenceScreen root = getPreferenceManager().createPreferenceScreen(this); // Dialog based preferences PreferenceCategory dialogBasedPrefCat = new PreferenceCategory(this); dialogBasedPrefCat.setTitle(R.string.dialog_based_preferences); root.addPreference(dialogBasedPrefCat); // Edit text preference EditTextPreference editTextPref = new EditTextPreference(this); editTextPref.setDialogTitle(R.string.dialog_title_edittext_preference); editTextPref.setKey("edittext_preference"); editTextPref.setTitle(R.string.title_edittext_preference); editTextPref.setSummary(name); dialogBasedPrefCat.addPreference(editTextPref); Image One Image Two

    Read the article

  • indentation preference and personality

    - by dreftymac
    This question is similar in spirit to : http://stackoverflow.com/questions/492178/links-between-personality-types-and-language-technology-preferences But it is based specifically on indentation (spaces vs tabs and the number of spaces). The reason I am asking here instead of searching is because I remember seeing a specific document writing about this. If I remember correctly, it also talked about why Linus prefers eight spaces.

    Read the article

  • jface.preference.FileFieldEditor can't specify a new file

    - by G33k
    I'm setting up a series of preferences in my Eclipse (3.5.2) application and I'm having a problem with the FileFieldEditor. I want to allow the user to specify a log file to print output to. Often, this will be a new file. But when I use the file select dialog with FileFieldEditor, it complains that the file doesn't exists ("Value must be an existing file"). Is there a way, without extending the FileFieldEditor class, to suppress this error and have Java create that file if it doesn't exist? Thanks!

    Read the article

  • How to reschedule Alarm Manager on Preference Change

    - by Priyank
    Hi, I have an Android Service. When a phone boots up, a broadcast receiver receives a notification and it schedules the service to run repeatedly at a gap of X minutes. Henceforth After every X minutes another broadcast receiver gets those notifications and kicks the service off, which does it's job and quits. So far so good. Now I want those X minutes to be configurable. I have a perf.xml similar to what is given at the link below. This XML captures all my preferences along with that of service timer. http://android-journey.blogspot.com/2010/01/for-almost-any-application-we-need-to.html Now when user changes preferences; how can I reschedule the alarm? Is there a way I can set a listener on preferences change? I have used only XML files to speficy preferences screen. Any ideas will be welcome. Cheers

    Read the article

  • Custom preference screen

    - by rantravee
    Hi, I have a slider for the user to control the volume of my application. What I'd like to have is a icon or something else similar to "volume display" like in the next picture at the slider summary. Is this possible ? How could this be accomplished ?

    Read the article

  • How to detect application préference changes.

    - by Raphael Pinto
    I created a Settings.bundle in my app where the user can change some properties like font size. It works. But when I leave my App, and I change my setting, I don't know how I can get notified of the change. For the moment, I create a function call each time a view is loaded that check for app settings. But I wonder if there is an other and proper way to do this.

    Read the article

  • Access iphone setting preference

    - by Manu
    Hi, I would like to access smtp outgoing mail server address from global setting-mail-accounts-outgoing mail server. Is there any public API available now to get the user global setting values? Thanks Manoj

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >