xhash属性名视图，如果不存在xhash属性，那么返回空数组，而不是null
543686
@JSONField(serialize = false)
    public String[] getXhashNames() {
        List<Obj> xhash = getXhash();
        String[] xhashNames = new String[xhash.size()];
        for (int i = 0; i < xhash.size(); i++) {
            xhashNames[i] = xhash.get(i).getName();
        }
        return xhashNames;
    }
1093109
function createFilenameHash(uploadDir, files) {
    let hashPath = path.resolve(uploadDir, 'name.json');
    let hashContent;
    let result = [];

    if (hashFileExist || fs.existsSync(hashPath)) {
      try {
        let content = fs.readFileSync(hashPath, 'utf8');
        hashContent = JSON.parse(content);
      } catch (err) {
        debug('get hash file failed:' + err);
      }
    } else {
      hashContent = {};
    }

    for (let item in files) {
      let fileName = files[item].name;
      let hashName = getUniqueId(0, hashContent, fileName);

      let fileItem = getFileItem(files[item], uploadDir)
      hashContent[hashName] = fileItem;
      result.push(util._extend(fileItem, {
        filename: hashName
      }))
    }

    try {
      let file = JSON.stringify(hashContent, null, 2);
      fs.writeFileSync(hashPath, file);
    } catch (err) {
      debug('write hash file failed:' + err);
    }

    hashFileExist = true;

    return result;
  }
834549
function hashSelectorContent() {
    var content = '';
    outer: while (!source.isAtEnd()) {
      var token = source.first();

      switch (token) {
        case '}':
          source.shift();
          break outer;

        case '/':
          cssComment();
          break;
        case "'":
          singleQuoteString();
          break;
        case '"':
          doubleQuoteString();
          break;
        default:
          content += source.shift();
      }
    }

    var bareContent = content.replace(/\s|;/g, '');
    return stringHash(bareContent);
  }
886814
def gethash(compiled):
    """"""
    lines = compiled.splitlines()
    if len(lines) < 3 or not lines[2].startswith(hash_prefix):
        return None
    else:
        return lines[2][len(hash_prefix):]
1322768
function checkVhash(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

  // Skip `#`.
  if (tokens[i].type === TokenType.NumberSign) i++;
  else return 0;

  if (l = checkNmName2(i)) i += l;
  else return 0;

  return i - start;
}
447130
function getTargetName($includeHash = true)
    {
        $target = $this->getBasename(false);

        if ($includeHash) {
            $target .= '-' . $this->getDigest();
        }

        $target .= $this->getFormatExtension();

        return $target;
    }
872741
public static function Serialize($hash){
		if(is_null($hash))
			return null;
		$res=Array();
		$keys=array_keys($hash);
		$i=-1;
		$len=sizeof($keys);
		while(++$i<$len)
			$res[]=new PhpWsdlHash($keys[$i],$hash[$keys[$i]]);
		return $res;
	}
516281
function getHash(style) {
  var result = _.toString(this.getMembers(0));
  if (style == 'github') {
    if (result) {
      result += this.isPlugin() ? 'prototype' : '';
    }
    result += this.getCall();
    return result
      .replace(/[\\.=|'"(){}\[\]\t ]/g, '')
      .replace(/[#,]+/g, '-')
      .toLowerCase();
  }
  if (result) {
    result += '-' + (this.isPlugin() ? 'prototype-' : '');
  }
  result += this.isAlias() ? this.getOwner().getName() : this.getName();
  return result
    .replace(/\./g, '-')
    .replace(/^_-/, '');
}
431775
function hash(eat, value, silent) {
  var self = this
  var index = shaEnd(value, 0)
  var subvalue
  var href
  var now
  var node
  var exit

  if (index === -1) {
    return
  }

  subvalue = value.slice(0, index)

  if (isBlacklisted(subvalue)) {
    return
  }

  /* istanbul ignore if - maybe used by plug-ins */
  if (silent) {
    return true
  }

  href = gh(self.githubRepo) + 'commit/' + subvalue
  now = eat.now()
  exit = self.enterLink()

  node = eat(subvalue)({
    type: 'link',
    title: null,
    url: href,
    children: self.tokenizeInline(subvalue, now)
  })

  exit()

  node.children = [
    {
      type: 'inlineCode',
      value: abbr(subvalue),
      position: node.children[0].position
    }
  ]

  return node
}
1256715
def btInfoHash
      result = nil
      @params['xt'].each do |topic|
        if topic =~ /urn:btih:(.*)/
          hash = $1
          if hash.length == 40
            # Hex-encoded info hash. Convert to binary.
            result = [hash].pack "H*" 
          else
            # Base32 encoded
            result = Base32.decode hash
          end
          break
        end
      end
      result
    end
922968
function getHash (data, depth, index) {
    let element
    let elementsHash

    if (depth !== 0 && (depth + 1) !== height) {
      throw new Error('Value node is on wrong height in tree.')
    }

    if (start.gt(index) || end.lt(index)) {
      throw new Error('Wrong index of value node.')
    }

    if (start.plus(elements.length).neq(index)) {
      throw new Error('Value node is on wrong position in tree.')
    }

    if (typeof data === 'string') {
      if (!validateHexadecimal(data)) {
        throw new TypeError('Tree element of wrong type is passed. Hexadecimal expected.')
      }
      element = data
      elementsHash = element
    } else {
      if (Array.isArray(data)) {
        if (!validateBytesArray(data)) {
          throw new TypeError('Tree element of wrong type is passed. Bytes array expected.')
        }
        element = data.slice(0) // clone array of 8-bit integers
        elementsHash = hash(element)
      } else {
        if (!isObject(data)) {
          throw new TypeError('Invalid value of data parameter.')
        }
        if (!isType(type)) {
          throw new TypeError('Invalid type of type parameter.')
        }
        element = data
        elementsHash = hash(element, type)
      }
    }

    elements.push(element)
    return elementsHash
  }
1151650
private static String parseHashName(String param) {
        Matcher matcher = hashPattern.matcher(param);
        String name = null;
        while (matcher.find()){
            name = matcher.group(0);
        }
        return name == null? null : name.substring(1, name.length() - 1);
    }
635481
public static function simpleHash($string): ?string
    {
        if (!Any::isLine($string)) {
            return null;
        }

        return dechex(crc32($string));
    }
595138
public static BoBHash fromSrc(String src) {
        String hashType = src.substring(src.lastIndexOf("cid:") + 4, src.indexOf("+"));
        String hash = src.substring(src.indexOf("+") + 1, src.indexOf("@bob.xmpp.org"));
        return new BoBHash(hash, hashType);
    }
211994
private static String getNoSign(Map<String, Object> params, boolean includeEmptyParam) {
        //对参数按照key做升序排序，对map的所有value进行处理，转化成string类型
        //拼接成key=value&key=value&....格式的字符串
        StringBuilder content = new StringBuilder();

        // 按照key做排序
        List<String> keys = new ArrayList<String>(params.keySet());
        Collections.sort(keys);

        String value = null;
        Object object = null;
        boolean isFirstParm = true;
        for (int i = 0; i < keys.size(); i++) {
            String key = (String) keys.get(i);
            object = params.get(key);

            if (object == null) {
                value = "";
            }else if (object instanceof String) {
                value = (String) object;
            } else {
                value = String.valueOf(object);
            }

            if (includeEmptyParam || !TextUtils.isEmpty(value)) {
                content.append((isFirstParm ? "" : "&") + key + "=" + value);
                isFirstParm = false;
            } else {
                continue;
            }
        }

        //待签名的字符串
        return content.toString();
    }
122991
function getPathHash(path) {
            var hash = 0;
            var seed = 131;

            path.forEach(function (p) {
                hash = 0x7FFFFFFF & (hash * seed + getPointHash(p) + (p.onCurve ? 1 : 0));
            });

            return hash;
        }
637394
public function getKeyByHash($hash)
       {
            $index = array_search($hash, $this->map, true);
            return (false === $index) ? null : $index;
       }