Sync token values according to current culture and it's fallback.
193913
function(){
      for (var tokenName in this.tokens)
      {
        var token = this.tokens[tokenName];
        var descriptor = this.getDescriptor(tokenName) || NULL_DESCRIPTOR;
        var savedType = token.getType();

        token.descriptor = descriptor;

        if (token.value !== descriptor.value)
        {
          // on value change apply will be ivoked and new type applied
          basisTokenPrototypeSet.call(token, descriptor.value);
        }
        else
        {
          // apply changes if type has been changed
          if (token.getType() != savedType)
            token.apply();
        }
      }
    }
265653
public void synchronizeTokens(Endpoint tokenEndPoint) {

	    Integer subscriptionId = tokenEndPoint.getSubscriptionId();
	    String partnerAuthorizationToken = tokenEndPoint.getSubscription().getPartnerAuthorizationToken();
		String lastSyncDate = getLastSyncDate(subscriptionId);

		int totalCount = 1;
		int numberRetrieved = 0;
		Date startOfSync = new Date();

		while (totalCount > numberRetrieved) {
			String tokenUrl = tokenEndPoint.getUrl();
			tokenUrl += "?offset=" + numberRetrieved + "&limit=" + PAGE_SIZE;

			if (lastSyncDate != null) {
				tokenUrl += "&date_from=" + lastSyncDate;
			}
			LOG.info("Get tokens at endpoint: " + tokenUrl);

			TokenResponse tokenResponse = (TokenResponse) doRequest(new HttpGet(tokenUrl), partnerAuthorizationToken, TokenResponse.class);

			if (tokenResponse.totalCount == null) {
				break;
			}
			totalCount = tokenResponse.totalCount;

			numberRetrieved += tokenResponse.data.size();
			LOG.info("Inserting " + tokenResponse.data.size() + " tokens");

			for (io.motown.ocpi.dto.Token token : tokenResponse.data) {
				insertOrUpdateToken(token, subscriptionId);
			}
		}

		updateLastSynchronizationDate(startOfSync, subscriptionId);
		LOG.info("Number of tokens retrieved: " + numberRetrieved);
	}
159254
public void processDefaultCurrency(Row row)
   {
      ProjectProperties properties = m_project.getProjectProperties();
      properties.setCurrencySymbol(row.getString("curr_symbol"));
      properties.setSymbolPosition(CURRENCY_SYMBOL_POSITION_MAP.get(row.getString("pos_curr_fmt_type")));
      properties.setCurrencyDigits(row.getInteger("decimal_digit_cnt"));
      properties.setThousandsSeparator(row.getString("digit_group_symbol").charAt(0));
      properties.setDecimalSeparator(row.getString("decimal_symbol").charAt(0));
   }
1130983
def restore(self, value, context=None):
        
        context = context or orb.Context()
        value = super(ReferenceColumn, self).restore(value, context=context)

        # check to make sure that we're processing the right values
        if self.testFlag(self.Flags.I18n) and context.locale == 'all':
            return {locale: self._restore(val, context) for locale, val in value.items()}
        else:
            return self._restore(value, context)
436716
private final void prevToken()
  {

    if (m_queueMark > 0)
    {
      m_queueMark--;

      m_token = (String) m_ops.m_tokenQueue.elementAt(m_queueMark);
      m_tokenChar = m_token.charAt(0);
    }
    else
    {
      m_token = null;
      m_tokenChar = 0;
    }
  }
926886
public static void reinitializeCurrencySettings ()
  {
    s_aRWLock.writeLocked ( () -> {
      s_aSettingsMap.clear ();
      for (final ECurrency e : ECurrency.values ())
      {
        s_aSettingsMap.put (e, new PerCurrencySettings (e));

        for (final Locale aLocale : e.matchingLocales ())
          if (!localeSupportsCurrencyRetrieval (aLocale))
            throw new IllegalArgumentException ("Passed locale " + aLocale + " does not support currency retrieval!");
      }
    });
  }
1145995
function offsetInToken(ctx) {
        var offset = ctx.pos.ch - ctx.token.start;
        if (offset < 0) {
            console.log("CodeHintUtils: _offsetInToken - Invalid context: pos not in the current token!");
        }
        return offset;
    }
663016
def get_token(cls, value):
        ""

        # Use try/except because after running for a short time most tokens
        # should already be cached
        try:
            return cls._cache[value]
        except KeyError:
            token = Token(value)
            cls._cache[value] = token
            return token
1327849
function(options) {
      options = langx.mixin({parse: true}, options);
      var entity = this;
      var success = options.success;
      options.success = function(resp) {
        var serverAttrs = options.parse ? entity.parse(resp, options) : resp;
        if (!entity.set(serverAttrs, options)) return false;
        if (success) success.call(options.context, entity, resp, options);
        entity.trigger('sync', entity, resp, options);
      };
      wrapError(this, options);
      return this.sync('read', this, options);
    }
669833
private function updateOrigin()
    {
        foreach ($this->array as $key => $value) {
            $this->dataSet($this->origin, $key, $value);
        }
    }
183255
function ensureTimestamps(columns, allowSyncedAt) {
  var now = Date.now();
  if (!allowSyncedAt || !columns.syncedAt) {
    columns.syncedAt = now;
  }
  if (!columns.createdAt) {
    // Take the value from the client, if present:
    columns.createdAt = columns.updatedAt;
  }
}
74910
public static function check_token($value = null)
	{
		$value = $value ?: \Input::param(static::$csrf_token_key, \Input::json(static::$csrf_token_key, 'fail'));

		// always reset token once it's been checked and still the same
		if (static::fetch_token() == static::$csrf_old_token and ! empty($value))
		{
			static::set_token(true);
		}

		return $value === static::$csrf_old_token;
	}
1346470
private void checkForTokens( String content, int startOffset, int endOffset ) {
        while( startOffset <= endOffset ) {
            // skip the delimiters to find the start of a new token
            while( isDelimiter(content.substring(startOffset, startOffset + 1)) ) {
                if (startOffset < endOffset)
                    startOffset++;
                else
                    return;
            }
            // Extract and process the entire token
            if (isQuoteDelimiter(content.substring(startOffset, startOffset + 1)))
                startOffset = getQuoteToken(content, startOffset, endOffset);
            else
                startOffset = getOtherToken(content, startOffset, endOffset);
        }
    }
871272
def async_stmt_check(self, original, loc, tokens):
        """"""
        return self.check_py("35", "async for/with", original, loc, tokens)
869946
def __set_token_expired(self, value):
        """"""
        self._token_expired = datetime.datetime.now() + datetime.timedelta(seconds=value)
        return
932041
protected function synchronize()
    {
        $conversions = $this->getConversions();
        if (!empty($conversions)) {
            foreach ($conversions as $currency => $currencyConversions) {
                // Map keys to date and synchronize other properties.
                $currencyConversions = array_reduce($currencyConversions, function ($currencyRates, Conversion $conversion) use ($currency) {
                    $conversion->setCurrency($currency);
                    $conversion->setDate($this->getDate() ?: $conversion->getDate());

                    // Sometimes this method is called before a date has been injected via the serializer.
                    // Index sequentially until we have dates loaded to index on.
                    if (!empty($conversion->getDate())) {
                        $currencyRates[$conversion->getDate()->format(\DateTime::ISO8601)] = $conversion;
                    } else {
                        $currencyRates[] = $conversion;
                    }

                    return $currencyRates;
                }, []);

                $conversions[$currency] = $currencyConversions;
            }

            $this->setConversions($conversions);
        }
    }
1151447
async function () {
    const oThis = this
    ;

    // validations
    if (!basicHelper.isNonZeroWeiValid(oThis.amountToStakeInWeis)) {
      logger.error('Invalid amount');
      process.exit(1);
    }

    // Format to big number
    oThis.amountToStakeInWeis = basicHelper.convertToBigNumber(oThis.amountToStakeInWeis);

    const amountToStakeForBT = ((oThis.amountToStakeInWeis.mul(0.9)).minus(oThis.amountToStakeInWeis.mul(0.9).modulo(1)))
      , amountToStakeForSTP = oThis.amountToStakeInWeis.minus(amountToStakeForBT)
      , stPrimeUuid = coreConstants.OST_OPENSTUTILITY_ST_PRIME_UUID
    ;

    // validations
    if (!basicHelper.isNonZeroWeiValid(amountToStakeForBT)) {
      logger.error('Invalid wei amount to stake for BT', amountToStakeForBT.toString(10));
      process.exit(1);
    }
    if (!basicHelper.isNonZeroWeiValid(amountToStakeForSTP)) {
      logger.error('Invalid wei amount to stake for ST Prime', amountToStakeForSTP.toString(10));
      process.exit(1);
    }

    logger.step('** Starting stake mint for branded token for beneficiary reserve of BT Reserve:', oThis.reserveAddr);

    // NOTE: In real case, Member Company transfers ST to staker and then approve is called. To simulate this, foundation
    // is transfering ST to staker.
    logger.info('* Foundation transfers ST to BT Reserve');
    await fundManager.transferST(
        foundationAddr, foundationPassphrase, stakerAddr, oThis.amountToStakeInWeis,
        {tag: 'transferSTToBTReserve', returnType: 'txReceipt'}
    );

    logger.info('* Staker approves openSTValue contract');
    const approveResponse = await (new approveService()).perform();
    if (approveResponse.isFailure()) {
      process.exit(1);
    }

    const approveTransactionHash = approveResponse.data.transaction_hash;

    logger.info('* Get approval status and keep doing so till success');
    const approveReceiptResponse =  await contractInteractHelper.waitAndGetTransactionReceipt(web3Provider, approveTransactionHash, {});
    if (!approveReceiptResponse.isSuccess()) {
      logger.error('Approval receipt error ', approveReceiptResponse);
      process.exit(1);
    }

    logger.info('* Start stake for Branded Token');
    await (new startStakeService({
      beneficiary: oThis.reserveAddr,
      to_stake_amount: amountToStakeForBT,
      uuid: oThis.brandedTokenUuid
    })).perform();

    logger.info('* Waiting for credit of Branded Token to BT Reserve');
    await oThis._waitForBrandedTokenMint();

    logger.info('* Start stake for Simple Token Prime');
    await (new startStakeService({
      beneficiary: oThis.reserveAddr,
      to_stake_amount: amountToStakeForSTP,
      uuid: stPrimeUuid
    })).perform();

    logger.info('* Waiting for credit of Simple Token Prime to BT Reserve');
    await oThis._waitForSimpleTokenPrimeMint();

    return Promise.resolve(responseHelper.successWithData({}));
  }