hash to offcanvas
764204
function(target) {
		parentNode = target.parentNode;
		if (parentNode) {
			if (parentNode.classList.contains(CLASS_OFF_CANVAS_WRAP)) {
				return parentNode;
			} else {
				parentNode = parentNode.parentNode;
				if (parentNode.classList.contains(CLASS_OFF_CANVAS_WRAP)) {
					return parentNode;
				}
			}
		}
	}
5195
function makeHref(to, params, query) {
        var path = Router.makePath(to, params, query);
        return location === HashLocation ? '#' + path : path;
      }
476738
function snapshotToHash(snap, idProp = "id") {
    const hash = snap.val() || {};
    Object.keys(hash).forEach(key => typeof hash[key] === "object"
        ? (hash[key][idProp] = key)
        : (hash[key] = { [idProp]: key, value: hash[key] }));
    return hash;
}
852121
def hash( key, seed = 0x0 ):
    '''  '''

    key = bytearray( xencode(key) )

    def fmix( h ):
        h ^= h >> 16
        h  = ( h * 0x85ebca6b ) & 0xFFFFFFFF
        h ^= h >> 13
        h  = ( h * 0xc2b2ae35 ) & 0xFFFFFFFF
        h ^= h >> 16
        return h

    length = len( key )
    nblocks = int( length / 4 )

    h1 = seed

    c1 = 0xcc9e2d51
    c2 = 0x1b873593

    # body
    for block_start in xrange( 0, nblocks * 4, 4 ):
        # ??? big endian?
        k1 = key[ block_start + 3 ] << 24 | \
             key[ block_start + 2 ] << 16 | \
             key[ block_start + 1 ] <<  8 | \
             key[ block_start + 0 ]
             
        k1 = ( c1 * k1 ) & 0xFFFFFFFF
        k1 = ( k1 << 15 | k1 >> 17 ) & 0xFFFFFFFF # inlined ROTL32
        k1 = ( c2 * k1 ) & 0xFFFFFFFF
        
        h1 ^= k1
        h1  = ( h1 << 13 | h1 >> 19 ) & 0xFFFFFFFF # inlined ROTL32
        h1  = ( h1 * 5 + 0xe6546b64 ) & 0xFFFFFFFF

    # tail
    tail_index = nblocks * 4
    k1 = 0
    tail_size = length & 3

    if tail_size >= 3:
        k1 ^= key[ tail_index + 2 ] << 16
    if tail_size >= 2:
        k1 ^= key[ tail_index + 1 ] << 8
    if tail_size >= 1:
        k1 ^= key[ tail_index + 0 ]
    
    if tail_size > 0:
        k1  = ( k1 * c1 ) & 0xFFFFFFFF
        k1  = ( k1 << 15 | k1 >> 17 ) & 0xFFFFFFFF # inlined ROTL32
        k1  = ( k1 * c2 ) & 0xFFFFFFFF
        h1 ^= k1

    #finalization
    unsigned_val = fmix( h1 ^ length )
    if unsigned_val & 0x80000000 == 0:
        return unsigned_val
    else:
        return -( (unsigned_val ^ 0xFFFFFFFF) + 1 )
278336
def to_hash
      OPTIONS.inject({}) do |hash, option|
        hash.merge(option.to_sym => send(option))
      end
    end
398353
def make_hash(s, n_bytes):
    """"""
    raw_h = int(md5(s.encode('utf-8')).hexdigest()[:n_bytes], 16)
    # Make it a signed int.
    return 16**n_bytes//2 - raw_h
586168
function(data, keysize) {
      var input, mode;
      if (keysize == null) {
        keysize = 512;
      }
      data = this.toHex(data);
      mode = "SHA-" + keysize;
      input = new jsSHA(data, "HEX");
      return input.getHash(mode, "HEX");
    }
98123
def set_dampening_get
      hash = {}
      hash[:half_life] = false
      hash[:reuse] = false
      hash[:suppress] = false
      hash[:max] = false
      str = config_get('route_map', 'set_dampening', @get_args)
      return hash if str.nil?
      arr = str.split
      hash[:half_life] = arr[0].to_i
      hash[:reuse] = arr[1].to_i
      hash[:suppress] = arr[2].to_i
      hash[:max] = arr[3].to_i
      hash
    end
790951
def _dhash(self, params):
        """"""
        m = hashlib.new('md5')
        m.update(self.hash.encode('utf-8'))
        for key in sorted(params.keys()):
            h_string = ('%s-%s' % (key, params[key])).encode('utf-8')
            m.update(h_string)
        return m.hexdigest()
646966
function toHash(highRank, arr) {
  const hash = {}
  for (let i = 0; i < arr.length; i++) {
    hash[highRank + arr[i]] = i
  }
  hash._size = arr.length
  return hash
}
570602
function hash256(data) {
  const out = Buffer.allocUnsafe(32);
  ctx.init();
  ctx.update(data);
  ctx._finish(out);
  ctx.init();
  ctx.update(out);
  ctx._finish(out);
  return out;
}
596680
function handleHashChange() {
  var prefix = '#pipeline-';
  var hash = location.hash;
  var pieces = hash.split(';', 2);
  var pipelineId = null;

  if (pieces[0].indexOf(prefix) == 0) {
    pipelineId = pieces[0].substr(prefix.length);
  } else {
    // Bad hash, just show the root pipeline.
    location.hash = '';
    return;
  }

  if (!pipelineId) {
    // No hash means show the root pipeline.
    pipelineId = STATUS_MAP.rootPipelineId;
  }
  var rootMap = STATUS_MAP.pipelines[STATUS_MAP.rootPipelineId];
  var infoMap = STATUS_MAP.pipelines[pipelineId];
  if (!rootMap || !infoMap) {
    // Hash not found.
    return;
  }

  // Clear any selection styling.
  $('.selected-link').removeClass('selected-link');

  if (pieces[1]) {
    // Show a specific status link.
    var statusLink = $(getTreePipelineElementId(pipelineId))
        .find('.status-links>a:contains("' + pieces[1] + '")');
    if (statusLink.size() > 0) {
      var selectedLink = $(statusLink[0]);
      selectedLink.addClass('selected-link');
      $('#status-console').attr('src', selectedLink.attr('href'));
      $('#status-console').show();
    } else {
      // No console link for this pipeline; ignore it.
      $('#status-console').hide();
    }
  } else {
    // Show the console link.
    var consoleLink = $(getTreePipelineElementId(pipelineId))
        .find('a.status-console');
    if (consoleLink.size() > 0) {
      var selectedLink = $(consoleLink[0]);
      selectedLink.addClass('selected-link');
      $('#status-console').attr('src', selectedLink.attr('href'));
      $('#status-console').show();
    } else {
      // No console link for this pipeline; ignore it.
      $('#status-console').hide();
    }
  }

  // Mark the pipeline as selected.
  var selected = $('#link-pipeline-' + pipelineId);
  selected.addClass('selected-link');
  selected.parents('.status-box').addClass('selected-link');

  // Title is always the info for the root pipeline, to make it easier to
  // track across multiple tabs.
  document.title = rootMap.classPath + ' - ID #' + STATUS_MAP.rootPipelineId;

  // Update the detail status frame.
  var stageNode = constructStageNode(pipelineId, infoMap, false);
  $('#overview').remove();
  stageNode.attr('id', 'overview');
  $('#detail').append(stageNode);

  // Make sure everything is the right size.
  adjustStatusConsole();
}
1152320
function Hash (blockSize, finalSize) {
	  this._block = Buffer$4.alloc(blockSize);
	  this._finalSize = finalSize;
	  this._blockSize = blockSize;
	  this._len = 0;
	}
667453
function formatHash(hash, bRemoveId){
			var sRes = hash, iSharpIndex = hash ? hash.indexOf("#") : -1;

			if (iSharpIndex === 0) {
				sRes = sRes.slice(iSharpIndex + 1);
			}

			if (bRemoveId) {
				sRes = sRes.replace(rIdRegex, "");
			}

			return sRes;
		}
611315
def hash_to_liquid(hash)
      hash.map { |key, value| [key.to_s, empty2nil(value)] }.to_h
    end
51168
def get_token_from_hash(hash)
      access_token = hash.delete('access_token') || hash.delete(:access_token) || hash.delete('oauth_token') || hash.delete(:oauth_token)
      opts = {:expires_at => hash["expires"] || hash[:expires],
              :header_format => "OAuth2 %s",
              :param_name => "access_token"}
      
      @token = OAuth2::AccessToken.new(self, access_token, opts)
    end
504717
def _get_hash():
    '''
    
    '''
    # Using bitmask to emulate rollover behavior of C unsigned 32 bit int
    bitmask = 0xffffffff
    h = 0

    for i in bytearray(salt.utils.stringutils.to_bytes(__grains__['id'])):
        h = (h + i) & bitmask
        h = (h + (h << 10)) & bitmask
        h = (h ^ (h >> 6)) & bitmask

    h = (h + (h << 3)) & bitmask
    h = (h ^ (h >> 11)) & bitmask
    h = (h + (h << 15)) & bitmask

    return (h & (_HASH_SIZE - 1)) & bitmask