Saves changed mapping configurations
8121
public function save()
    {
        $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");
        $aRDFaPayments = (array) \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("ardfapayments");

        // Delete old mappings
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $oDb->execute("DELETE FROM oxobject2payment WHERE oxpaymentid = '" . \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("oxid") . "' AND OXTYPE = 'rdfapayment'");

        // Save new mappings
        foreach ($aRDFaPayments as $sPayment) {
            $oMapping = oxNew(\OxidEsales\Eshop\Core\Model\BaseModel::class);
            $oMapping->init("oxobject2payment");
            $oMapping->assign($aParams);
            $oMapping->oxobject2payment__oxobjectid = new \OxidEsales\Eshop\Core\Field($sPayment);
            $oMapping->save();
        }
    }
727354
private void initializeChangedMap() {
    // set changed flags
    changed.put("display_name", false);
    changed.put("description", false);
    changed.put("notes", false);
    changed.put("created", false);
    changed.put("custom", false);
    changed.put("units", false);
    changed.put("data_type", false);
    changed.put("retention", false);
    changed.put("max", false);
    changed.put("min", false);
    changed.put("last_received", false);
    changed.put("created", false); 
  }
337202
private function updatePluginSettings ()
	{
		echo '    > Upgrade Maps settings' . PHP_EOL;

		/** @var Settings $settings */
		$settings = SimpleMap::getInstance()->getSettings()->toArray();
		$newSettings = SimpleMap::getInstance()->getSettings()->toArray();

		$craft2Settings = \Craft::$app->projectConfig->get(
			Plugins::CONFIG_PLUGINS_KEY . '.simple-map.settings'
		);

		if (is_array($craft2Settings) && !empty($craft2Settings))
		{
			$settings = [
				'apiKey' => $craft2Settings['browserApiKey'],
				'unrestrictedApiKey' => $craft2Settings['serverApiKey'],
			];
		}

		if ($settings['unrestrictedApiKey'])
		{
			$newSettings['geoService'] = GeoService::GoogleMaps;
			$newSettings['geoToken'] = $settings['unrestrictedApiKey'];
		}

		if ($settings['apiKey'])
		{
			$newSettings['mapTiles'] = MapTiles::GoogleRoadmap;
			$newSettings['mapToken'] = $settings['apiKey'];

			if (!$settings['unrestrictedApiKey'])
			{
				$newSettings['geoService'] = GeoService::GoogleMaps;
				$newSettings['geoToken'] = $settings['apiKey'];
			}
		}

		\Craft::$app->plugins->savePluginSettings(
			SimpleMap::getInstance(),
			$newSettings
		);

		\Craft::$app->plugins->enablePlugin(SimpleMap::getInstance()->handle);
	}
880490
def put_mapping(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.put_mapping(index=self._name, **kwargs)
822529
def save_map(self, map_path, map_data):
    """"""
    return self._client.send(save_map=sc_pb.RequestSaveMap(
        map_path=map_path, map_data=map_data))
681253
def save(self):
        
        l = []
        h = {}
        s = {}
        h_r = {}

        idx = 0
        for i in self.map_list.get_obj():
            length = 0

            if isinstance(i, list):
                for j in i:
                    if isinstance(j, AnnotationsDirectoryItem):
                        if idx % 4 != 0:
                            idx = idx + (4 - (idx % 4))

                    l.append(j)

                    c_length = j.get_length()
                    if isinstance(j, StringDataItem):
                        c_length += 1
                    h[j] = idx + length
                    h_r[idx + length] = j
                    s[idx + length] = c_length

                    length += c_length
                    #debug("SAVE" + str(j) + " @ 0x%x" % (idx+length))

                debug("SAVE " + str(i[0]) + " @0x%x (%x)" % (idx, length))

            else:
                if isinstance(i, MapList):
                    if idx % 4 != 0:
                        idx = idx + (4 - (idx % 4))

                l.append(i)
                h[i] = idx
                h_r[idx] = i

                length = i.get_length()

                s[idx] = length

                debug("SAVE " + str(i) + " @0x%x (%x)" % (idx, length))

            idx += length

        self.header.file_size = idx

        for i in l:
            idx = h[i]
            i.set_off(idx)
            if isinstance(i, CodeItem):
                last_idx = idx
                for j in i.get_obj():
                    j.set_off(last_idx)
                    #j.set_debug_info_off(0)
                    last_idx += j.get_size()

        last_idx = 0
        buff = ""
        for i in l:
            idx = h[i]

            if idx != last_idx:
                debug("Adjust alignment @%x with 00 %x" % (idx, idx - last_idx))
                buff += "\x00" * (idx - last_idx)

            buff += i.get_raw()
            if isinstance(i, StringDataItem):
                buff += "\x00"
            last_idx = idx + s[idx]

        debug("GLOBAL SIZE %d" % len(buff))

        return self.fix_checksums(buff)
762495
function (rootdir, configData, platform, preferenceMappingData) {
        var preferences = lib.getPreferences(rootdir, platform),
            type = 'preference';

        if (!platform) {
            platform = 'generic';
        }

        preferences.forEach(function (preference) {
            // check if there are specific configuration to map to config for this platform
            if (!preferenceMappingData || !preferenceMappingData[platform]) {
                return;
            }

            var prefMappingData = preferenceMappingData[platform][preference.attrib.name],
                target,
                prefData;

            if (prefMappingData) {
                prefData = {
                    parent: prefMappingData.parent,
                    type: type,
                    destination: prefMappingData.destination,
                    data: preference,
                    map: prefMappingData
                };

                target = prefMappingData.target;
                if (!configData[target]) {
                    configData[target] = [];
                }
                configData[target].push(prefData);
            }
        });
    }
701246
def _update_mappings(self):
        """"""
        headers = {'Content-Type': 'application/json', 'DB-Method': 'PUT'}
        url = '/v2/exchange/db/{}/{}/_mappings'.format(self.domain, self.data_type)
        r = self.tcex.session.post(url, json=self.mapping, headers=headers)
        self.tcex.log.debug(
            'update mapping. status_code: {}, response: "{}".'.format(r.status_code, r.text)
        )
181463
def update_mappings(self):
        """"""
        self.pos2id = dict((v, k) for k, v in self.id2pos.iteritems())
        assert len(self.pos2id) == len(self.id2pos), "duplicate ids or positions detected"
892866
def save_settings(self):
        
        def _save_displayed_setting(conf, submenu):
            for source, visible_sensors in \
                    self.view.graphs_menu.active_sensors.items():
                section = source + "," + submenu
                conf.add_section(section)

                sources = self.sources
                logging.debug("Saving settings for %s", source)
                logging.debug("Visible sensors %s", visible_sensors)
                # TODO: consider changing sensors_list to dict
                curr_sensor = [x for x in sources if
                               x.get_source_name() == source][0]
                sensor_list = curr_sensor.get_sensor_list()
                for sensor_id, sensor in enumerate(sensor_list):
                    try:
                        conf.set(section, sensor, str(
                            visible_sensors[sensor_id]))
                    except IndexError:
                        conf.set(section, sensor, str(True))

        if not user_config_dir_exists():
            make_user_config_dir()

        conf = configparser.ConfigParser()
        config_file = get_user_config_file()
        with open(config_file, 'w') as cfgfile:
            conf.add_section('GraphControll')
            # Save the configured refresh rete
            conf.set('GraphControll', 'refresh', str(
                self.refresh_rate))
            # Save the configured UTF8 setting
            conf.set('GraphControll', 'UTF8', str(
                self.smooth_graph_mode))
            # Save the configured t_thresh
            if self.temp_thresh:
                conf.set('GraphControll', 'TTHRESH', str(
                    self.temp_thresh))

            _save_displayed_setting(conf, "Graphs")
            _save_displayed_setting(conf, "Summaries")
            conf.write(cfgfile)
1079758
def save_config(self, cmd="save config flash", confirm=False, confirm_response=""):
        """"""
        return super(MrvOptiswitchSSH, self).save_config(
            cmd=cmd, confirm=confirm, confirm_response=confirm_response
        )
471831
function compileMappings(oldMappings) {
    var mappings = oldMappings.slice(0);

    mappings.sort(function(map1, map2) {
      if (!map1.attribute) return 1;
      if (!map2.attribute) return -1;

      if (map1.attribute !== map2.attribute) {
        return map1.attribute < map2.attribute ? -1 : 1;
      }
      if (map1.value !== map2.value) {
        return map1.value < map2.value ? -1 : 1;
      }
      if (! ('replace' in map1) && ! ('replace' in map2)) {
        throw new Error('Conflicting mappings for attribute ' + map1.attribute + ' and value ' + map1.value);
      }
      if (map1.replace) {
        return 1;
      }
      return -1;
    });

    return mappings;
  }
640926
private static function _saveSystemConfig()
        {

            $sYmlDump = array(
                'parameters' => array(
                    'database_driver'   => self::checkEmpty(self::$_data['dbDriver']),
                    'database_host'     => self::checkEmpty(self::$_data['dbHost']),
                    'database_port'     => self::checkEmpty(self::$_data['dbPort']),
                    'database_name'     => self::checkEmpty(self::$_data['dbName']),
                    'database_user'     => self::checkEmpty(self::$_data['dbUser']),
                    'database_password' => self::checkEmpty(self::$_data['dbPassword']),
                    'mailer_transport'  => self::checkEmpty(self::$_data['mailerTransport']),
                    'mailer_host'       => self::checkEmpty(self::$_data['mailerHost']),
                    'mailer_user'       => self::checkEmpty(self::$_data['mailerUser']),
                    'mailer_password'   => self::checkEmpty(self::$_data['mailerPassword']),
                    'locale'            => 'de',
                    'secret'            => md5(uniqid(null, true)),
                ),
            );


            $oDumper = new Dumper();
            $sYaml   = $oDumper->dump($sYmlDump, 99, 0, true, false);
            $sAppPath = self::$_container->get('kernel')->getRootDir();
            $sPath   = $sAppPath. '/config/parameters.yml';
            $sYaml   = str_replace("'", '', $sYaml);
            file_put_contents($sPath, $sYaml);
        }
198450
function Map(editable, edit, config, root, size) {
    this._editable = editable;
    this._edit = edit;
    this._config = config;
    this._root = root;
    this._size = size;
}
1254473
def update_configuration(self):
        
        uri = "{}/configuration".format(self.data["uri"])
        result = self._helper.update({}, uri)
        self.refresh()

        return result
90359
def save_config(self, cmd="write mem", confirm=False, confirm_response=""):
        """"""
        return super(OneaccessOneOSBase, self).save_config(
            cmd=cmd, confirm=confirm, confirm_response=confirm_response
        )
5009
function HostMapping(settings) {
        settings.init("hostConfig", {});
        settings.init("hostMapping", {});
        settings.init("xdmConfig", {});
        this.settings = settings;
      }