Set the Accessibility preferences. Overrides the values in 'com.apple.Accessibility.plist' file.
969080
public void setAccessibilityOptions() {
    
    // Not enabling ApplicationAccessibility may cause intruments to fail with the error 
    // ScriptAgent[1170:2f07] Failed to enable accessiblity, kAXErrorServerNotFound
    // The above error is more prominent in Xcode5.1.1 when tested under OSX 10.9.5
    // Setting ApplicationAccessibilityEnabled for Xcode6.0
    File folder = new File(contentAndSettingsFolder + "/Library/Preferences/");
    File preferenceFile = new File(folder, "com.apple.Accessibility.plist");
    try {
      JSONObject preferences = new JSONObject();
      if (instrumentsVersion.getMajor() < 6) {
        
        // ex: <key>ApplicationAccessibilityEnabled</key><true/>
        preferences.put("ApplicationAccessibilityEnabled", true);
      } else {
        
        // Xcode6.0 has integer datatype for ApplicationAccessibilityEnabled
        // ex: <key>ApplicationAccessibilityEnabled</key><integer>1</integer>
        preferences.put("ApplicationAccessibilityEnabled", 1);
      }
      writeOnDisk(preferences, preferenceFile);
    } catch (Exception e) {
      throw new WebDriverException("cannot set options in " + preferenceFile.getAbsolutePath(), e);
    }
  }
398636
def set(opts)
      # Store new window attributes, or ignore if nil
      @title           = opts[:title]           || @title
      if Color.is_valid? opts[:background]
        @background    = Color.new(opts[:background])
      end
      @icon            = opts[:icon]            || @icon
      @width           = opts[:width]           || @width
      @height          = opts[:height]          || @height
      @fps_cap         = opts[:fps_cap]         || @fps_cap
      @viewport_width  = opts[:viewport_width]  || @viewport_width
      @viewport_height = opts[:viewport_height] || @viewport_height
      @resizable       = opts[:resizable]       || @resizable
      @borderless      = opts[:borderless]      || @borderless
      @fullscreen      = opts[:fullscreen]      || @fullscreen
      @highdpi         = opts[:highdpi]         || @highdpi
      unless opts[:diagnostics].nil?
        @diagnostics = opts[:diagnostics]
        ext_diagnostics(@diagnostics)
      end
    end
505284
def set_settings(new_settings, options = {}, request_options = {})
      client.put(Protocol.settings_uri(name, options), new_settings.to_json, :write, request_options)
    end
1222341
def set_options(self, force_read=False, force_fulltext=False):
        """"""
        self.options['force_read'] = force_read
        self.options['force_fulltext'] = force_fulltext
        return
432988
public void setPreferences(OperaPreferences newPreferences) {
    if (!(newPreferences instanceof OperaFilePreferences)) {
      OperaFilePreferences convertedPreferences = new OperaFilePreferences(preferenceFile);
      convertedPreferences.merge(newPreferences);
      preferences = convertedPreferences;
    } else {
      preferences = newPreferences;
    }
  }
748774
protected void setBeanDeploymentArchivesAccessibility() {
        for (WeldBeanDeploymentArchive beanDeploymentArchive : beanDeploymentArchives) {
            Set<WeldBeanDeploymentArchive> accessibleArchives = new HashSet<>();
            for (WeldBeanDeploymentArchive candidate : beanDeploymentArchives) {
                if (candidate.equals(beanDeploymentArchive)) {
                    continue;
                }
                accessibleArchives.add(candidate);
            }
            beanDeploymentArchive.setAccessibleBeanDeploymentArchives(accessibleArchives);
        }
    }
89282
def set_default(self):
        """"""
        try:
            os.makedirs(os.path.dirname(self._configfile))
        except:
            pass

        self._config = configparser.RawConfigParser()
        self._config.add_section('Settings')

        for key, val in self.DEFAULTS.items():
            self._config.set('Settings', key, val)

        with open(self._configfile, 'w') as f:
            self._config.write(f)
898308
public void setToDefaults() {
		styleName = "";
		styleNr = 0;
		alignment = Element.ALIGN_LEFT;
		justificationPercentage = 0;
		firstLineIndent = 0;
		leftIndent = 0;
		rightIndent = 0;
		adustRightIndent = 0;
		mirrorIndent = 0;
		overrideWidowControl = -1;
		AutoSpaceBetweenDBCEnglish = 0;
		AutoSpaceBetweenDBCNumbers = 0;
		noCharacterWrapping = 0;
		noWordWrapping = 0;
		noOverflowPeriodComma = 0;
		
	}
813096
def set_settings(key, value):
    """"""
    with Database("settings") as settings:
        if value in ['0', 'false', 'no', 'off', 'False']:
            del settings[key]
            print("Disabled setting")
        else:
            print(value)
            settings[key] = value
            print("Setting saved")
1000847
def set_language(language)
      edit_plist(path.global_preferences_plist) do |plist|
        key = 'AppleLanguages'
        plist[key] = [] unless plist.key?(key)
        plist[key].unshift(language).uniq!
      end
    end
1147483
def override(settings, yaml=None, env=None):
    
    if yaml is not None:
        if hasattr(yaml, 'read'):
            settings.update(load_yaml(yaml.read()))
        else:
            if os.path.exists(yaml):
                with open(yaml) as f:
                    settings.update(load_yaml(f.read()))

    if env is not None:
        for k, v in os.environ.items():
            if k.startswith(env):
                settings[k[len(env):]] = load_yaml(v)
953601
def configure(self):
        
        root = ElementTree.Element("dict")
        print ("It seems like you do not have a preferences file configured. "
               "Please answer the following questions to generate a plist at "
               "%s for use with python-jss." % self.preferences_file)

        self.url = _get_user_input(
            "The complete URL to your JSS, with port (e.g. "
            "'https://mycasperserver.org:8443')\nURL: ", "jss_url", root)

        self.user = _get_user_input("API Username: ", "jss_user", root)

        self.password = _get_user_input("API User's Password: ", "jss_pass",
                                        root, getpass.getpass)

        verify_prompt = ("Do you want to verify that traffic is encrypted by "
                         "a certificate that you trust?: (Y|N) ")
        self.verify = _get_user_input(verify_prompt, "verify", root,
                                      loop_until_valid_response)

        self._handle_repos(root)

        self._write_plist(root)
        print "Preferences created.\n"
302080
private void adaptButtonBarVisibility() {
        if (buttonBar != null && buttonBarShadowView != null) {
            buttonBar.setVisibility(isButtonBarShown() ? View.VISIBLE : View.GONE);
            buttonBarShadowView.setVisibility(isButtonBarShown() ? View.VISIBLE : View.GONE);

            if (isButtonBarShown() && !isSplitScreen()) {
                adaptNavigationVisibility();
            }

            adaptNavigationEnabledState();
            adaptWizardButtonVisibilities();
        }
    }
691819
public void setSensitivity(Context context, float sensitivity) {
        float s = Math.max(0f, Math.min(1.0f, sensitivity));
        ViewConfiguration viewConfiguration = ViewConfiguration.get(context);
        mTouchSlop = (int) (viewConfiguration.getScaledTouchSlop() * (1 / s));
    }
5289
def set_settings(self, releases=None, default_release=None):
        """"""
        if (self._storage is None or
                getattr(self, 'releases', {}) != releases or
                getattr(self, 'default_release', '') != default_release):
            self._storage = {}
            self.releases = releases or {}
            self.default_release = default_release
1087705
def set_defaults(self):
        
        for key, val in self.c_default.items():
            self._dict[key] = val
201293
def set_value(self, value):
        
        self.raw_value = self.preference.serializer.serialize(value)