Registers hash entry at a given timestamp.
507883
def AddHashEntry(self, hash_entry, timestamp):
    """"""

    if timestamp in self._hash_entries:
      message = ("Duplicated hash entry write for path '%s' of type '%s' at "
                 "timestamp '%s'. Old: %s. New: %s.")
      message %= ("/".join(self._components), self._path_type, timestamp,
                  self._hash_entries[timestamp], hash_entry)
      raise db.Error(message)

    if timestamp not in self._path_infos:
      path_info = rdf_objects.PathInfo(
          path_type=self._path_type,
          components=self._components,
          timestamp=timestamp,
          hash_entry=hash_entry)
      self.AddPathInfo(path_info)
    else:
      self._path_infos[timestamp].hash_entry = hash_entry
1285294
function hashChange(entry, url) {
  if (!entry)
    return false;
  const [aBase, aHash] = url.split('#');
  const [bBase, bHash] = entry.url.split('#');
  return (aBase === bBase) && (aHash !== bHash);
}
255555
def cleanup_full_hashes(self, keep_expired_for=(60 * 60 * 12)):
        """"""
        q = '''DELETE FROM full_hash WHERE expires_at < datetime(current_timestamp, '-{} SECONDS')
        '''
        log.info('Cleaning up full_hash entries expired more than {} seconds ago.'.format(keep_expired_for))
        with self.get_cursor() as dbc:
            dbc.execute(q.format(int(keep_expired_for)))
261578
def wsu_timestamp
      security_hash :wsu, "Timestamp",
        "wsu:Created" => (created_at || Time.now).utc.xmlschema,
        "wsu:Expires" => (expires_at || (created_at || Time.now) + 60).utc.xmlschema
    end
577889
@Override
    void createEntry(int hash, K key, V value, int bucketIndex) {
	HashMapPro.Entry<K, V> old = table[bucketIndex];
	Entry<K, V> e = new Entry<K, V>(hash, key, value, old);
	table[bucketIndex] = e;
	e.addBefore(header);
	size++;
    }
462803
private void verifyTimestamp(TimestampToken token, byte[] signature)
        throws NoSuchAlgorithmException, SignatureException {

        MessageDigest md =
            MessageDigest.getInstance(token.getHashAlgorithm().getName());

        if (!Arrays.equals(token.getHashedMessage(), md.digest(signature))) {
            throw new SignatureException("Signature timestamp (#" +
                token.getSerialNumber() + ") generated on " + token.getDate() +
                " is inapplicable");
        }

        if (debug != null) {
            debug.println();
            debug.println("Detected signature timestamp (#" +
                token.getSerialNumber() + ") generated on " + token.getDate());
            debug.println();
        }
    }
1342078
def make_hash_id():
    
    today = datetime.datetime.now().strftime(DATETIME_FORMAT)
    return hashlib.sha1(today.encode('utf-8')).hexdigest()
733766
void add(long hashEntryAdr, long expireAt)
    {
        // just ignore the fact that expireAt can be less than current time

        int slotNum = slot(expireAt);
        slots[slotNum].add(hashEntryAdr, expireAt);
    }
52055
public void add(long timestamp, String column, Object value) {
        if (!(value instanceof Long) && !(value instanceof Integer) && !(value instanceof Double) &&
            !(value instanceof Float) && !(value instanceof Boolean) &&
            !(value instanceof String)) {
            throw new IllegalArgumentException(
                "value must be of type: Long, Integer, Double, Float, Boolean, or String");
        }
        Map<String, Object> temp = new HashMap<String, Object>();
        temp.put(column, value);
        add(timestamp, temp);
    }
184464
protected function registerHasher()
	{
		$this->app->singleton('sentry.hasher', function($app)
		{
			$hasher = $app['config']->get('cartalyst.sentry.hasher');

			switch ($hasher)
			{
				case 'native':
					return new NativeHasher;
					break;

				case 'bcrypt':
					return new BcryptHasher;
					break;

				case 'sha256':
					return new Sha256Hasher;
					break;

				case 'whirlpool':
					return new WhirlpoolHasher;
					break;
			}

			throw new \InvalidArgumentException("Invalid hasher [$hasher] chosen for Sentry.");
		});
	}
1152863
private void registerStatus(MtasSolrStatus solrStatus) throws IOException {
		if (requestHandler != null) {
			Map<String, ShardStatus> shards = solrStatus.getShards();
			if (shards != null) {
				Status status = solrStatus.status();
				status.numberDocumentsTotal = Long.valueOf(0);
				status.numberSegmentsTotal = 0;
				for (Entry<String, ShardStatus> entry : shards.entrySet()) {
					// get shard info
					ShardInformation shardInformation = requestHandler.getShardInformation(entry.getKey());
					if (shardInformation == null) {
						throw new IOException("no shard information " + entry.getKey());
					}
					ShardStatus shardStatus = entry.getValue();
					shardStatus.name = shardInformation.name;
					shardStatus.location = entry.getKey();
					shardStatus.mtasHandler = shardInformation.mtasHandler;
					shardStatus.numberDocumentsTotal = shardInformation.numberOfDocuments;
					shardStatus.numberSegmentsTotal = shardInformation.numberOfSegments;
					status.numberDocumentsTotal += shardInformation.numberOfDocuments;
					status.numberSegmentsTotal += shardInformation.numberOfSegments;
				}
			}
			requestHandler.registerStatus(solrStatus);
		}
	}
688846
function TimeStamp(timestamp) {
    tr.b.u.Scalar.call(this, timestamp, tr.b.u.Units.timeStampInMs);
  }
722793
def _store_timestamp(self, timestamp):
        
        if getattr(self, 'first_timestamp', None) is None:
            self.first_timestamp = timestamp
            LOG.debug("Storing %d as the first timestamp of the trace file %s",
                    self.first_timestamp, self.filename)
1178183
def add_tt(self,oid,value,label=None):	
		""""""
		self.add_oid_entry(oid,'TIMETICKS',value,label=label)
579578
public final void setTimestamp(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setTimestamp", Long.valueOf(value));
        getHdr2().setLongField(JsHdr2Access.TIMESTAMP, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setTimestamp");
    }
728441
def add(hash, &func)
      raise ArgumentError.new('Expecting hash of arguments') unless hash.is_a?(Hash)
      raise ArgumentError.new('A period must be provided for timed action') unless hash[:period]
      raise ArgumentError.new('Block must be provided') unless block_given?
      raise ArgumentError.new('Block must accept data value') if hash[:data] && func.arity == 0
      args = {:once => false, :data => nil, :owner => nil}.merge(hash)
      action = Action.new(args.merge(:timer => self), &func)
      @add_lock.synchronize{ @new_actions << action }
      wakeup if running?
      action
    end
16262
private Deferred<Object> addPointInternal(final long timestamp,
      final byte[] value, final short flags) throws IllegalDataException {
    final boolean ms_timestamp = (timestamp & Const.SECOND_MASK) != 0;

    // we only accept unix epoch timestamps in seconds or milliseconds
    if (timestamp < 0 || (ms_timestamp && timestamp > 9999999999999L)) {
      throw new IllegalArgumentException((timestamp < 0 ? "negative " : "bad")
          + " timestamp=" + timestamp
          + " when trying to add value=" + Arrays.toString(value) + " to " + this);
    }

    // always maintain lastTimestamp in milliseconds
    if ((ms_timestamp ? timestamp : timestamp * 1000) <= last_timestamp) {
      throw new IllegalArgumentException("New timestamp=" + timestamp
          + " is less than or equal to previous=" + last_timestamp
          + " when trying to add value=" + Arrays.toString(value)
          + " to " + this);
    }
    last_timestamp = (ms_timestamp ? timestamp : timestamp * 1000);

    long incomingBaseTime;
    if (ms_timestamp) {
      // drop the ms timestamp to seconds to calculate the base timestamp
      incomingBaseTime = 
          ((timestamp / 1000) - ((timestamp / 1000) % Const.MAX_TIMESPAN));
    }
    else {
      incomingBaseTime = (timestamp - (timestamp % Const.MAX_TIMESPAN));
    }

    /**
     * First time we add a point initialize the rows timestamp.
     */
    if (base_time == Long.MIN_VALUE) {
      base_time = incomingBaseTime;
      Bytes.setInt(row_key, (int) base_time, 
          tsdb.metrics.width() + Const.SALT_WIDTH());
    }

    if (incomingBaseTime - base_time >= Const.MAX_TIMESPAN) {
      throw new IllegalDataException(
          "The timestamp is beyond the boundary of this batch of data points");
    }
    if (incomingBaseTime < base_time) {
      throw new IllegalDataException(
          "The timestamp is prior to the boundary of this batch of data points");
    }

    // Java is so stupid with its auto-promotion of int to float.
    final byte[] new_qualifier = Internal.buildQualifier(timestamp, flags);

    // compact this data point with the previously compacted data points.
    append(new_qualifier, value);
    size++;

    /**
     * Satisfies the interface.
     */
    return Deferred.fromResult((Object) null);
  }