*******************BEGINNING OF FUNCTION********************//
4450
public static boolean is_kavarganta(String str)
    {

        // System.out.print("Entered is_kavarganta, returning: ");
        String s1 = VarnaUtil.getAntyaVarna(str);
        // System.out.print("s1 == " + s1);
        if (is_kavarga(s1))
        {
            // Log.logInfo("true");
            return true;
        }
        // Log.logInfo("false");
        return false;
    }
118071
function(start, end, line, offset, len) {
			// We use typeof because we need to distinguish the number 0 from an undefined or null parameter
			if (typeof(start) === "number") { //$NON-NLS-0$
				if (typeof(end) !== "number") { //$NON-NLS-0$
					end = start;
				}
				this.moveSelection(start, end);
				return true;
			} else if (typeof(line) === "number") { //$NON-NLS-0$
				var model = this.getModel();
				var pos = model.getLineStart(line-1);
				if (typeof(offset) === "number") { //$NON-NLS-0$
					pos = pos + offset;
				}
				if (typeof(len) !== "number") { //$NON-NLS-0$
					len = 0;
				}
				this.moveSelection(pos, pos+len);
				return true;
			}
			return false;
		}
1058067
public static final Function<BigInteger,String> toPercentStr() {
        return (Function<BigInteger,String>)((Function)FnNumber.toPercentStr());
    }
537425
function stringStartsWith (str, val, startIndex) {
  var rest = '' + str
  return (arguments.length === 1 ? rest : rest.substring(startIndex)).indexOf(val) === 0
}
569071
function checkFunctionsList(i) {
  let d = 0; // Number of dots
  let l;

  if (i >= tokensLength) return 0;

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

  while (i < tokensLength && tokens[i].type === TokenType.FullStop) {
    d++;
    i++;
  }

  return d === 3 ? l + d : 0;
}
56900
function init(input) {

		// rgba
		result = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(input);
		if (result) {
			rgba = [pInt(result[1]), pInt(result[2]), pInt(result[3]), parseFloat(result[4], 10)];
		} else { // hex
			result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(input);
			if (result) {
				rgba = [pInt(result[1], 16), pInt(result[2], 16), pInt(result[3], 16), 1];
			}
		}

	}
188566
function(fn) {
    var n = this.elements.length, k = n, i;
    do { i = k - n;
      fn(this.elements[i], i+1);
    } while (--n);
  }
845275
public static <T> void lineByLine(InputStream inputStream, Function<String, T> function) {
        try (BufferedReader br = new BufferedReader(new InputStreamReader(inputStream))) {
            String line;
            while ((line = br.readLine()) != null) {
                function.apply(line);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
151114
function prelude(token) {
  token = token.toLowerCase();

  var result = '';
  var i = 0;

  // special case for i = 0 to avoid '-1' index
  if (token[i] === 'y' && isVowel(token[i + 1])) {
    result += token[i].toUpperCase();
  } else {
    result += token[i];
  }

  for (i = 1; i < token.length; i++) {
    if ((token[i] === 'u' || token[i] === 'i') && isVowel(token[i - 1]) && isVowel(token[i + 1])) {
      result += token[i].toUpperCase();
    } else if (token[i] === 'y' && (isVowel(token[i - 1]) || isVowel(token[i + 1]))) {
      result += token[i].toUpperCase();
    } else if (token[i] === 'u' && token[i - 1] === 'q') {
      result += token[i].toUpperCase();
    } else {
      result += token[i];
    }
  }

  return result;
}
1162528
int rangeEnd(int start, int limitp, int val) {
        int c;
        int limit = Math.min(highStart, limitp);

        for (c = start+1; c < limit; c++) {
            if (get(c) != val) {
                break;
            }
        }
        if (c >= highStart) {
            c = limitp;
        }
        return c - 1;
    }
860387
function __stringStartsWith(str, prefix) {
  // returns true for empty string or null prefix
  if ((!str)) return false;
  if (prefix == "" || prefix == null) return true;
  return str.indexOf(prefix, 0) === 0;
}
565746
private void basic(String operator, MtasFunctionParserItem item)
      throws ParseException {
    if (!defined()) {
      String type = item.getType();
      MtasFunctionParserFunction parser;
      tmpOperatorList.add(operator);
      if (operator.equals(BASIC_OPERATOR_DIVIDE)) {
        dataType = CodecUtil.DATA_TYPE_DOUBLE;
      }
      switch (type) {
      case MtasFunctionParserItem.TYPE_N:
        tmpTypeList.add(type);
        tmpIdList.add(0);
        needPositions = true;
        if (sumRule && degree != null) {
          if (operator.equals(BASIC_OPERATOR_ADD)
              || operator.equals(BASIC_OPERATOR_SUBTRACT)) {
            if (degree < 0) {
              sumRule = false;
              degree = null;
            } else if (degree > 0) {
              sumRule = false;
            }
          } else if (operator.equals(BASIC_OPERATOR_POWER) && (degree != 0)) {
            sumRule = false;
            degree = null;
          }
        }
        break;
      case MtasFunctionParserItem.TYPE_ARGUMENT:
        tmpTypeList.add(type);
        tmpIdList.add(item.getId());
        needArgument.add(item.getId());
        if (sumRule && degree != null) {
          if (operator.equals(BASIC_OPERATOR_ADD)
              || operator.equals(BASIC_OPERATOR_SUBTRACT)) {
            if (degree != 1) {
              sumRule = false;
            }
            if (degree >= 0) {
              degree = Math.max(degree, 1);
            } else {
              degree = null;
            }
          } else if (operator.equals(BASIC_OPERATOR_MULTIPLY)) {
            if (degree != 0) {
              sumRule = false;
            }
            degree += 1;
          } else if (operator.equals(BASIC_OPERATOR_DIVIDE)) {
            sumRule = false;
            degree -= 1;
          } else if (operator.equals(BASIC_OPERATOR_POWER)) {
            sumRule = false;
            degree = null;
          }
        }
        break;
      case MtasFunctionParserItem.TYPE_CONSTANT_LONG:
        tmpTypeList.add(type);
        tmpIdList.add(tmpConstantLongs.size());
        tmpConstantLongs.add(item.getValueLong());
        if (sumRule && degree != null) {
          if (operator.equals(BASIC_OPERATOR_ADD)
              || operator.equals(BASIC_OPERATOR_SUBTRACT)) {
            if (degree < 0) {
              sumRule = false;
              degree = null;
            } else if (degree > 0) {
              sumRule = false;
            }
          } else if (operator.equals(BASIC_OPERATOR_POWER) && (degree != 0)) {
            sumRule = false;
            degree = null;
          }
        }
        break;
      case MtasFunctionParserItem.TYPE_CONSTANT_DOUBLE:
        tmpTypeList.add(type);
        tmpIdList.add(tmpConstantDoubles.size());
        dataType = CodecUtil.DATA_TYPE_DOUBLE;
        tmpConstantDoubles.add(item.getValueDouble());
        if (sumRule && degree != null) {
          if (operator.equals(BASIC_OPERATOR_ADD)
              || operator.equals(BASIC_OPERATOR_SUBTRACT)) {
            if (degree < 0) {
              sumRule = false;
              degree = null;
            } else if (degree > 0) {
              sumRule = false;
            }
          } else if (operator.equals(BASIC_OPERATOR_POWER) && (degree != 0)) {
            sumRule = false;
            degree = null;
          }
        }
        break;
      case MtasFunctionParserItem.TYPE_PARSER_LONG:
        tmpTypeList.add(type);
        tmpIdList.add(tmpParserLongs.size());
        parser = item.getParser();
        parser.close();
        tmpParserLongs.add(parser);
        sumRule = sumRule ? parser.sumRule() : false;
        needPositions = needPositions ? needPositions : parser.needPositions();
        needArgument.addAll(parser.needArgument);
        if (sumRule && degree != null) {
          if (operator.equals(BASIC_OPERATOR_ADD)
              || operator.equals(BASIC_OPERATOR_SUBTRACT)) {
            if (!parser.degree.equals(degree)) {
              sumRule = false;
              if (degree < 0) {
                degree = null;
              } else {
                degree = Math.max(degree, parser.degree);
              }
            }
          } else if (operator.equals(BASIC_OPERATOR_MULTIPLY)) {
            if (degree != 0 || parser.degree != 0) {
              sumRule = false;
            }
            degree += parser.degree;
          } else if (operator.equals(BASIC_OPERATOR_POWER) && (degree != 0)) {
            sumRule = false;
            degree = null;
          }
        }
        break;
      case MtasFunctionParserItem.TYPE_PARSER_DOUBLE:
        tmpTypeList.add(type);
        tmpIdList.add(tmpParserDoubles.size());
        dataType = CodecUtil.DATA_TYPE_DOUBLE;
        parser = item.getParser();
        parser.close();
        tmpParserDoubles.add(parser);
        sumRule = sumRule ? parser.sumRule() : false;
        needPositions = needPositions ? needPositions : parser.needPositions();
        needArgument.addAll(parser.needArgument);
        if (sumRule && degree != null) {
          if (operator.equals(BASIC_OPERATOR_ADD)
              || operator.equals(BASIC_OPERATOR_SUBTRACT)) {
            if (!parser.degree.equals(degree)) {
              sumRule = false;
              if (degree < 0) {
                degree = null;
              } else {
                degree = Math.max(degree, parser.degree);
              }
            }
          } else if (operator.equals(BASIC_OPERATOR_MULTIPLY)) {
            if (degree != 0 || parser.degree != 0) {
              sumRule = false;
            }
            degree += parser.degree;
          } else if (operator.equals(BASIC_OPERATOR_POWER) && (degree != 0)) {
            sumRule = false;
            degree = null;
          }
        }
        break;
      default:
        throw new ParseException("incorrect type");
      }
    } else {
      throw new ParseException("already defined");
    }
  }
182544
public void computeRange( SortableParameter_F32 input[] , int start , int length ) {
		if( length == 0 ) {
			divisor = 0;
			return;
		}

		float min,max;

		min = max = input[start].sortValue;

		for( int i = 1; i < length; i++ ) {
			float val = input[start+i].sortValue;
			if( val < min )
				min = val;
			else if( val > max )
				max = val;
		}

		setRange(min,max);
	}
238698
function file$1(filePath, parser, parserOptions, cb) {
  var data = fs.readFileSync(filePath, 'utf8');
  var fileFormat = discernFormat(filePath);
  if ((fileFormat === 'json' || formatsIndex.json.indexOf(fileFormat) > -1) && data === '') {
    data = '[]';
  }

  var parsed;
  if (typeof parser === 'function') {
    parsed = parser(data, parserOptions);
  } else if ((typeof parser === 'undefined' ? 'undefined' : _typeof(parser)) === 'object' && typeof parser.parse === 'function') {
    parsed = parser.parse(data, parserOptions);
  } else {
    return new Error('Your specified parser is not properly formatted. It must either be a function or have a `parse` method.');
  }

  // if (opts_ && opts_.flatten) {
  //   parsed = _.map(parsed, flatten)
  // }
  return parsed;
}
1166824
function parseDefFunction( $funcName, &$args, $tpl, &$text, &$text_len, &$cur_pos,
                               $relatedTemplateName, $startLine, $startColumn, $rootNamespace )
    {
        if ( $cur_pos == $text_len && $funcName == 'def' ) // no more arguments
        {
            $this->showParseErrorMessage( $tpl, $text, $text_len, $cur_pos, $relatedTemplateName, $startLine, $startColumn,
                                          $funcName, 'Not enough arguments' );
            return;
        }

        while ( $cur_pos < $text_len )
        {
            // parse variable name
            if ( $text[$cur_pos] != '$' )
            {
                $this->showParseErrorMessage( $tpl, $text, $text_len, $cur_pos, $relatedTemplateName, $startLine, $startColumn,
                                              $funcName, '($) expected' );
                return;
            }

            $cur_pos++;
            $wordEndPos = $this->ElementParser->identifierEndPosition( $tpl, $text, $cur_pos, $text_len );
            $varName = substr( $text, $cur_pos, $wordEndPos-$cur_pos );
            $cur_pos = $wordEndPos;

            if ( !$varName )
            {
                $this->showParseErrorMessage( $tpl, $text, $text_len, $cur_pos, $relatedTemplateName, $startLine, $startColumn,
                                              $funcName, 'Empty variable name' );
                return;
            }

            if ( $funcName == 'def' )
            {
                // skip whitespaces
                $cur_pos = $this->ElementParser->whitespaceEndPos( $tpl, $text, $cur_pos, $text_len );

                // parse variable value
                if ( $cur_pos >= $text_len || $text[$cur_pos] != '=' )
                {
                    $this->showParseErrorMessage( $tpl, $text, $text_len, $cur_pos, $relatedTemplateName, $startLine, $startColumn,
                                                  $funcName, '(=) expected' );
                    return;
                }
                $cur_pos++;

                // skip whitespaces
                $cur_pos = $this->ElementParser->whitespaceEndPos( $tpl, $text, $cur_pos, $text_len );

                $args[$varName] = $this->ElementParser->parseVariableTag( $tpl, $relatedTemplateName, $text, $cur_pos, $cur_pos, $text_len, $rootNamespace );
            }
            else
            {
                $varValueText = '1';
                $args[$varName] = $this->ElementParser->parseVariableTag( $tpl, $relatedTemplateName, $varValueText, 0, $varValPos, 1, $rootNamespace );
            }


            // skip whitespaces
            $cur_pos = $this->ElementParser->whitespaceEndPos( $tpl, $text, $cur_pos, $text_len );
        }
    }
1191879
function (a) {

      // inlined from peanut, maybe a micro-optimisation?
      var constant_a = function () { return a; };

      var self = function () {
        // can't Fun.constant this one
        return me;
      };

      var map = function (f) {
        return some(f(a));
      };

      var bind = function (f) {
        return f(a);
      };

      var me = {
        fold: function (n, s) { return s(a); },
        is: function (v) { return a === v; },
        isSome: always,
        isNone: never,
        getOr: constant_a,
        getOrThunk: constant_a,
        getOrDie: constant_a,
        or: self,
        orThunk: self,
        map: map,
        ap: function (optfab) {
          return optfab.fold(none, function(fab) {
            return some(fab(a));
          });
        },
        each: function (f) {
          f(a);
        },
        bind: bind,
        flatten: constant_a,
        exists: bind,
        forall: bind,
        filter: function (f) {
          return f(a) ? me : NONE;
        },
        equals: function (o) {
          return o.is(a);
        },
        equals_: function (o, elementEq) {
          return o.fold(
            never,
            function (b) { return elementEq(a, b); }
          );
        },
        toArray: function () {
          return [a];
        },
        toString: function () {
          return 'some(' + a + ')';
        }
      };
      return me;
    }
733655
function processLines(begin, end) {
      var lines = ''
      var s = '';
      end -= 1;
      if (begin < end) {
//        console.log(begin, end);
        var src = sources[scope.name];
        lines = src.slice(begin, end);
        while (lines.length > 0 && lines[0] == '')
          lines = lines.slice(1, lines.length);
        if (lines.length > 0) // && !(lines.length == 1 && lines[0] == ''))
        {
          var s1 = lines.join('\n');
//          s1 = s1.replace(/\</g, "&lt;").replace(/\>/g, "&gt;");
          s += '<pre style="padding-left: 50px; display: none;"><code  class="language-'+scope.extlang+'" data-nodes="show" data-code="hide">'+htmlEscape(s1)+'</code></pre>' //prism
        }
//          s += '<pre style="padding-left: 50px;"><code>'+lines.join('\n')+'</code></pre>'
      }
      // EXECUTOR.HOOK: afterProcessLines [
      s = executor.hook('afterProcessLines', s, [sources, scope, begin, end, lines])
      // EXECUTOR.HOOK: afterProcessLines ]

      return s;
    }