Saving show/hide delivery address state
2948
protected function _saveDeliveryAddressState()
    {
        $oSession = \OxidEsales\Eshop\Core\Registry::getSession();

        $blShow = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('blshowshipaddress');
        if (!isset($blShow)) {
            $blShow = $oSession->getVariable('blshowshipaddress');
        }

        $oSession->setVariable('blshowshipaddress', $blShow);
    }
61361
def update_delivery_note_comment(self, delivery_note_comment_id, delivery_note_comment_dict):
        
        return self._create_put_request(
            resource=DELIVERY_NOTE_COMMENTS,
            billomat_id=delivery_note_comment_id,
            send_data=delivery_note_comment_dict
        )
1172906
def OnShowFindReplace(self, event):
        """"""

        data = wx.FindReplaceData(wx.FR_DOWN)
        dlg = wx.FindReplaceDialog(self.grid, data, "Find & Replace",
                                   wx.FR_REPLACEDIALOG)
        dlg.data = data  # save a reference to data
        dlg.Show(True)
774990
void saveState(Bundle outState) {
        outState.putString(STATE_CURRENT_PATH, currentPath);
        outState.putSerializable(STATE_FOLDERS, folders);
        outState.putSerializable(STATE_NEXT_TOKENS, nextTokens);
    }
1330841
public function Stash() {
      $this->DeliveryType(DELIVERY_TYPE_BOOL);
      $this->DeliveryMethod(DELIVERY_METHOD_JSON);
      $Name = TrueStripSlashes(GetValue('Name', $_POST, ''));
      $Value = TrueStripSlashes(GetValue('Value', $_POST, ''));
      $Response = Gdn::Session()->Stash($Name, $Value);
      if ($Name != '' && $Value == '')
         $this->SetJson('Unstash', $Response);

      $this->Render();
   }
958225
def hide_selected():    
    ''''''
    ss = current_representation().selection_state
    hs = current_representation().hidden_state
    res = {}
    
    for k in ss:
        res[k] = hs[k].add(ss[k])
    
    current_representation().hide(res)
945424
def _save_state(self, state_file, last_pk):
        """"""
        fp = open(state_file, 'w+')
        try:
            fp.write(str(last_pk))
        finally:
            fp.close()
791459
def dump_state(self):
        

        state = {}

        state['tile_states'] = {}

        for address, tile in self._tiles.items():
            state['tile_states'][address] = tile.dump_state()

        return state
737944
function replaceState(state) {
    state = state.replace('上海互换局 已出口直封', 'Shanghai Exchange Bureau has been export direct seal')
    state = state.replace('上海互换局 已出口开拆', 'Shanghai Interchange has been opened for export')
    state = state.replace('广商国际小包 已封发', 'Guangshang international package has been closed')
    state = state.replace('广商国际小包 已收寄', 'Guangshang international package has been received')
    state = state.replace('广商国际小包 离开，下一站【广商大宗】',
        'Canton business international package to leave, the next stop [Canton business bulk]')

    return state
}
64816
def on_save_as(self):
        
        self.tabWidget.save_current_as()
        self._update_status_bar(self.tabWidget.current_widget())
978019
function savePrivateProfile(objPrivateProfile, address, attestor_address, onDone){
	db.query(
		"INSERT "+db.getIgnore()+" INTO private_profiles (unit, payload_hash, attestor_address, address, src_profile) VALUES(?,?,?,?,?)", 
		[objPrivateProfile.unit, objPrivateProfile.payload_hash, attestor_address, address, JSON.stringify(objPrivateProfile.src_profile)], 
		function (res) {
			var private_profile_id = (res.insertId && res.affectedRows) ? res.insertId : 0;

			var insert_fields = function(current_src_profile) {
				var arrQueries = [];
				var isSrcProfileUpdated = false;
				for (var field in objPrivateProfile.src_profile){
					var arrValueAndBlinding = objPrivateProfile.src_profile[field];
					if (ValidationUtils.isArrayOfLength(arrValueAndBlinding, 2)) {
						if (!current_src_profile || !current_src_profile[field] || !ValidationUtils.isArrayOfLength(current_src_profile[field], 2)) {
							if (current_src_profile) {
								isSrcProfileUpdated = true;
								current_src_profile[field] = arrValueAndBlinding;
							}
							db.addQuery(arrQueries, "INSERT INTO private_profile_fields (private_profile_id, field, value, blinding) VALUES(?,?,?,?)", 
							[private_profile_id, field, arrValueAndBlinding[0], arrValueAndBlinding[1] ]);
						}
					}
				}
				if (isSrcProfileUpdated)
					db.addQuery(arrQueries, "UPDATE private_profiles SET src_profile=? WHERE private_profile_id=?", [JSON.stringify(current_src_profile), private_profile_id]);
				async.series(arrQueries, onDone);
			}

			if (!private_profile_id) { // already saved profile but with new fields being revealed
				db.query("SELECT private_profile_id, src_profile FROM private_profiles WHERE payload_hash=?", [objPrivateProfile.payload_hash], function(rows) {
					if (!rows.length)
						throw Error("can't insert private profile "+JSON.stringify(objPrivateProfile));
					private_profile_id = rows[0].private_profile_id;
					var src_profile = JSON.parse(rows[0].src_profile);
					insert_fields(src_profile);
				});
			}
			else
				insert_fields();

		}
	);
}
759708
function (entering, params, onEnter, updateParams) {
          var inactivatedState = getInactivatedState(entering);
          if (inactivatedState && (updateParams || !getInactivatedState(entering, params))) {
            var savedLocals = entering.locals;
            this.stateExiting(inactivatedState);
            entering.locals = savedLocals;
          }
          entering.self.status = 'entered';

          if (onEnter)
            $injector.invoke(onEnter, entering.self, entering.locals.globals);
        }
493274
def bvlpdu_contents(self, use_dict=None, as_class=dict):
        """"""
        # make/extend the dictionary of content
        if use_dict is None:
            use_dict = as_class()

        # save the content
        use_dict.__setitem__('address', str(self.fdAddress))
        use_dict.__setitem__('ttl', self.fdTTL)
        use_dict.__setitem__('remaining', self.fdRemain)

        # return what we built/updated
        return use_dict
764084
def update_delivery_note(self, delivery_note_id, delivery_note_dict):
        
        return self._create_put_request(
            resource=DELIVERY_NOTES,
            billomat_id=delivery_note_id,
            send_data=delivery_note_dict
        )
423671
def ack(delivery_tag, multiple = false)
      if multiple
        @acknowledged_state[:pending].keys.each do |key|
          ack(key, false) if key <= delivery_tag
        end
      elsif @acknowledged_state[:pending].key?(delivery_tag)
        update_acknowledgement_state(delivery_tag, :acked)
      end
      nil
    end
895644
def save_state(self):
        """"""
        set_setting('lastSourceDir', self.source_directory.text())
        set_setting('lastOutputDir', self.output_directory.text())
        set_setting(
            'useDefaultOutputDir', self.scenario_directory_radio.isChecked())
1212312
def deliver!(mail)
      check_delivery_params(mail) if respond_to?(:check_delivery_params)

      clean_up

      basepath = File.join(settings[:location], Time.now.to_i.to_s)

      save_email(mail, basepath)

      return true unless mail.attachments.any?

      add_attachments(mail, basepath)
    end