Remembers values and uses them as condition.
332839
public function postInit()
    {
        foreach ($this->elements as $x => $field) {
            if ($field instanceof Form_Field) {
                $field->set($this->recall($x));

                if ($field->no_save || !$field->get()) {
                    continue;
                }

                // also apply the condition
                if ($this->view->model && $this->view->model->hasElement($x)) {

                    // take advantage of field normalization
                    $this->view->model->addCondition($x, $field->get());
                }
            }
        }

        // call applyFilter hook if such exist, pass model of associated view as parameter
        $this->hook('applyFilter', array($this->view->model));
    }
694613
private void incrementCurrentValue() {
    currentValues[currentValues.length - 1]++;
    int i = currentValues.length - 1;
    while (i > 0 &&
        currentValues[i] > finalValues[i]) {
      currentValues[i] = 0;
      currentValues[i - 1]++;
      i--;
    }
  }
469904
def _store(self, con):
        """"""
        self._con = con
        self._transaction = False
        self._closed = False
        self._usage = 0
710987
public void refreshCachedValues() {
        if (noteColumn) {
            note = getHistoryReference().hasNote();
        }
        if (tagsColumn) {
            tags = listToCsv(getHistoryReference().getTags());
        }
        if (highestAlertColumn) {
            alertRiskCellItem = AlertRiskTableCellItem.getItemForRisk(getHistoryReference().getHighestAlert());
        }
    }
1232746
synchronized long systemUpdate(long value) {

        if (value == currValue) {
            currValue += increment;

            return value;
        }

        if (increment > 0) {
            if (value > currValue) {
                currValue = value + increment;
            }
        } else {
            if (value < currValue) {
                currValue = value + increment;
            }
        }

        return value;
    }
572832
public void reset()
    {
        m_currentValue = null;
        useCurrentValue(false);
        setDerived(false);
        m_notKnown = false;
        setUnknown(m_lastUnknown);
    }
1340025
protected void setValue(int newPosition, T1[] values, int number,
      boolean currentExisting) {
    if (number > 0) {
      T1 valueSum = null;
      for (int i = 0; i < number; i++) {
        valueSum = (i == 0) ? values[i] : operations.add11(valueSum, values[i]);
      }
      if (currentExisting) {
        newBasicValueSumList[newPosition] = operations
            .add11(newBasicValueSumList[newPosition], valueSum);
        newBasicValueNList[newPosition] += number;
      } else {
        newBasicValueSumList[newPosition] = valueSum;
        newBasicValueNList[newPosition] = number;
      }
    }
  }
113991
def set(self, value, parse=False):
        
        self.value = self.parse(value) if parse else value
57865
void set(final long valueIteratedTo, final long valueIteratedFrom, final long countAtValueIteratedTo,
             final long countInThisIterationStep, final long totalCountToThisValue, final long totalValueToThisValue,
             final double percentile, final double percentileLevelIteratedTo, double integerToDoubleValueConversionRatio) {
        this.valueIteratedTo = valueIteratedTo;
        this.valueIteratedFrom = valueIteratedFrom;
        this.countAtValueIteratedTo = countAtValueIteratedTo;
        this.countAddedInThisIterationStep = countInThisIterationStep;
        this.totalCountToThisValue = totalCountToThisValue;
        this.totalValueToThisValue = totalValueToThisValue;
        this.percentile = percentile;
        this.percentileLevelIteratedTo = percentileLevelIteratedTo;
        this.integerToDoubleValueConversionRatio = integerToDoubleValueConversionRatio;
    }
206776
def set_value(self, value):
        """"""
        cache, cache_key = self._get_cache_plus_key()
        cache.set(cache_key, value)
1319093
def _memoize(f):
  """"""
  nothing = object()  # Unique "no value" sentinel object.
  cache = {}
  # Use a reentrant lock so that if f references the resulting wrapper we die
  # with recursion depth exceeded instead of deadlocking.
  lock = threading.RLock()
  @functools.wraps(f)
  def wrapper(arg):
    if cache.get(arg, nothing) is nothing:
      with lock:
        if cache.get(arg, nothing) is nothing:
          cache[arg] = f(arg)
    return cache[arg]
  return wrapper
785409
function set(key, value) {
  const entry = this.get(key, true);
  let oldvalue;
  if (entry) {
    oldvalue = entry.value;
    entry.value = value;
  } else {
    oldvalue = this.put(key, value);
    if (oldvalue) oldvalue = oldvalue.value;
  }
  return oldvalue;
}
1247943
private void storeOriginal(Pair<String, Object> keyValue) {
		String key = SharedPreferenceUtils.keyTestMode + keyValue.first;

		if (!preferenceUtils.isValueExistForKey(key)) {
			preferenceUtils.put(key, keyValue.second);

		}
	}
1055357
def remember(self, chain=-1, trace_index=None):
        
        if trace_index is None:
            trace_index = randint(self._cur_trace_index)

        for variable in self._variables_to_tally:
            if isinstance(variable, Stochastic):
                try:
                    variable.value = self.trace(
                        variable.__name__,
                        chain=chain)[trace_index]
                except:
                    cls, inst, tb = sys.exc_info()
                    warnings.warn(
                        'Unable to remember value of variable %s. Original error: \n\n%s: %s' %
                        (variable, cls.__name__, inst.message))
634317
protected function storeActivePageValuesInSession()
    {
        $this->getListMemory()->setPage($this->activePage);
        $this->getListMemory()->setPageSize($this->activePageSize);
    }
709775
def record(self, attr, value):
        
        msg = "Call new_epoch before recording for the first time."
        if not self:
            raise ValueError(msg)
        self[-1][attr] = value
144052
private V setValueInsideWriteLock(V newValue) {
		CachedValue<V> cached = cachedValue; // read the cached value
		V oldValue = cached != null ? cached.value : null;

		if (newValue != null) {
			long expiresAt = ttlInMs > 0 ? U.time() + ttlInMs : Long.MAX_VALUE;
			cachedValue = new CachedValue<>(newValue, expiresAt);

		} else {
			cachedValue = null;
		}

		return oldValue;
	}