Save the state of the parameters before a call to include or forward.
551423
public void pushParameterStack(Map parameters)
    {
        if (parameters == null)
        {
            _paramStack.push(null);
        } else {
            _paramStack.push(((Hashtable)parameters).clone());
        }
    }
94451
def savestate(self, state):
        """"""
        oldstate = np.get_printoptions()
        np.set_printoptions(threshold=1e6)
        try:
            with open(os.path.join(self._directory, 'state.txt'), 'w') as f:
                print_(state, file=f)
        finally:
            np.set_printoptions(**oldstate)
404503
public void onSaveInstanceState(Bundle bundle) {
    bundle.putParcelableArrayList(TASK_PROXY_LIST, proxyTasks);
    for (TaskHandler proxyTask : proxyTasks) {
      bundle.putParcelable(GROUNDY_PROXY_KEY_PREFIX + proxyTask.getTaskId(), proxyTask);
    }
  }
385031
def save_state(self):
        '''
        
        '''
        self._save_state()
        while self.peek() != simpy.core.Infinity:
            delay = max(self.peek() - self.now, self.interval)
            utils.logger.debug('Step: {}'.format(self.now))
            ev = self.event()
            ev._ok = True
            # Schedule the event with minimum priority so
            # that it executes before all agents
            self.schedule(ev, -999, delay)
            yield ev
            self._save_state()
76898
def save_state(self):
        
        state = {
            'hazard': self.hazard_layer_combo.currentText(),
            'exposure': self.exposure_layer_combo.currentText(),
            'aggregation': self.aggregation_layer_combo.currentText(),
            'report': self.results_webview.page().currentFrame().toHtml()}
        self.state = state
1277075
function save(val) {
  if(Array.isArray(val)) {
    val.forEach(function(item) {
      var seconds = item[0]
        , changes = item[1];
      if(seconds < 1 || changes < 0) {
        throw new Error('Invalid save parameters');
      }
    })
  }
}
817595
static void saveState(Bundle outState) {
        stateKeeper.bundle = outState;
        MvcComponent root = getRootComponent();
        doSaveState(root);

        stateKeeper.bundle = null;
    }
112047
public function saveState()
    {
        $this->stateService->setByKey(
            self::IDENTIFIER,
            [
                $this->total,
                $this->status,
                $this->updateRequested
            ]
        );
    }
1056697
public void savePreviousPageInfo( ActionForward forward, ActionForm form, ActionMapping mapping,
                                      HttpServletRequest request, ServletContext servletContext,
                                      boolean isSpecialForward )
    {
        if ( forward != null )
        {
            //
            // If previous-page is disabled (unused in this pageflow), or if we've already saved prevous-page info in
            // this request (for example, forward to foo.faces which forwards to foo.jsp), just return.
            //
            if ( request.getAttribute( SAVED_PREVIOUS_PAGE_INFO_ATTR ) != null || isPreviousPageInfoDisabled() ) return;

            String path = forward.getPath();
            int queryPos = path.indexOf( '?' );
            if ( queryPos != -1 ) path = path.substring( 0, queryPos );

            //
            // If a form bean was generated in this request, add it to the most recent PreviousPageInfo, so when we
            // go back to that page, the *updated* field values are restored (i.e., we don't revert to the values of
            // the form that was passed into the page originally).
            //
            if ( form != null && _currentPageInfo != null )
            {
                ActionForm oldForm = _currentPageInfo.getForm();
                if ( oldForm == null || oldForm.getClass().equals( form.getClass() ) )
                {
                    _currentPageInfo.setForm( form );
                    _currentPageInfo.setMapping( mapping );
                }
            }

            //
            // Only keep track of *pages* forwarded to -- not actions or pageflows.
            //
            if ( ! FileUtils.osSensitiveEndsWith( path, ACTION_EXTENSION ) )
            {
                //
                // Only save previous-page info if the page is within this pageflow.
                //
                if ( isLocalFile( forward ) ) // || PageFlowUtils.osSensitiveEndsWith( path, JPF_EXTENSION ) )
                {
                    _previousPageInfo = _currentPageInfo;
                    _currentPageInfo = new PreviousPageInfo( forward, form, mapping, request.getQueryString() );
                    request.setAttribute( SAVED_PREVIOUS_PAGE_INFO_ATTR, Boolean.TRUE );
                }
            }
        }
    }
1091792
def _hooks_apply_before_serialize(
        hooks,  # type: Optional[Hooks]
        state,  # type: _ProcessorState
        value  # type: Any
):
    # type: (...) -> Any
    """"""
    if hooks and hooks.before_serialize:
        return hooks.before_serialize(ProcessorStateView(state), value)

    return value
1003143
public void restoreState() {
    h0=s0;
    h1=s1;
    h2=s2;
    h3=s3;
    h4=s4;
    
    length = saveLength;
    
    finalBuffer.clear();
    finalBuffer.put(saveBuffer);
  }
491531
void savePreviousActionInfo( ActionForm form, HttpServletRequest request, ActionMapping mapping,
                                 ServletContext servletContext )
    {
        //
        // If previous-action is disabled (unused in this pageflow), just return.
        //
        if ( isPreviousActionInfoDisabled() ) return;
        String actionURI = InternalUtils.getDecodedServletPath( request );
        _previousActionInfo = new PreviousActionInfo( form, actionURI, request.getQueryString() );
    }
512460
public static void saveVMParameters(String classToLaunch, String... parameters) {
		classnameToLaunch = classToLaunch;
		commandLineParameters = parameters;
		if (commandLineOptions != null) {
			commandLineOptions.clear();
		}
		commandLineOptions = null;
		analyzed = false;
	}
1295038
public void saveState() {
    s0=h0;
    s1=h1;
    s2=h2;
    s3=h3;
    s4=h4;
    
    saveLength = length;
    
    int position = finalBuffer.position();
    
    finalBuffer.position(0);
    finalBuffer.limit(position);
    
    saveBuffer.clear();
    saveBuffer.put(finalBuffer);
    saveBuffer.flip();
    
    finalBuffer.limit(64);
    finalBuffer.position( position );
  }
365565
def save( self ):
        
        packets = self.__enumerate_packets()
        delete_expected_value(self.call_hash)
        for packet in packets:
            packet['call_hash'] = self.call_hash
            insert_expected_value(packet)

        return self
77820
def PushState(self, **unused_kwargs):
    """"""
    logging.debug('Storing state {0:s}'.format(repr(self.state)))
    self.state_stack.append(self.state)
1309232
def save_reduce(self, func, args, state=None,
                    listitems=None, dictitems=None, obj=None):
        """"""
        # Assert that args is a tuple or None
        if not isinstance(args, tuple):
            raise pickle.PicklingError("args from reduce() should be a tuple")

        # Assert that func is callable
        if not hasattr(func, '__call__'):
            raise pickle.PicklingError("func from reduce should be callable")

        save = self.save
        write = self.write

        # Protocol 2 special case: if func's name is __newobj__, use NEWOBJ
        if self.proto >= 2 and getattr(func, "__name__", "") == "__newobj__":
            #Added fix to allow transient
            cls = args[0]
            if not hasattr(cls, "__new__"):
                raise pickle.PicklingError(
                    "args[0] from __newobj__ args has no __new__")
            if obj is not None and cls is not obj.__class__:
                raise pickle.PicklingError(
                    "args[0] from __newobj__ args has the wrong class")
            args = args[1:]
            save(cls)

            #Don't pickle transient entries
            if hasattr(obj, '__transient__'):
                transient = obj.__transient__
                state = state.copy()

                for k in list(state.keys()):
                    if k in transient:
                        del state[k]

            save(args)
            write(pickle.NEWOBJ)
        else:
            save(func)
            save(args)
            write(pickle.REDUCE)

        if obj is not None:
            self.memoize(obj)

        # More new special cases (that work with older protocols as
        # well): when __reduce__ returns a tuple with 4 or 5 items,
        # the 4th and 5th item should be iterators that provide list
        # items and dict items (as (key, value) tuples), or None.

        if listitems is not None:
            self._batch_appends(listitems)

        if dictitems is not None:
            self._batch_setitems(dictitems)

        if state is not None:
            save(state)
            write(pickle.BUILD)