Determine the max count of characters for all task names.
 @return [integer] count of characters
424352
def width
      @width ||= list.map { |t| t.name_with_args ? t.name_with_args.length : 0 }.max || 10
    end
376218
@Override
    public int getNameCount() {
        String context = this.path;
        // Kill trailing slashes
        if (context.endsWith(ArchivePath.SEPARATOR_STRING)) {
            context = context.substring(0, context.length() - 1);
        }
        // Kill preceding slashes
        if (context.startsWith(ArchivePath.SEPARATOR_STRING)) {
            context = context.substring(1);
        }
        // Root
        if (context.length() == 0) {
            return 0;
        }
        // Else count names by using the separator
        final int pathSeparators = this.countOccurrences(context, ArchivePath.SEPARATOR, 0);
        return pathSeparators + 1;
    }
666375
def num_pending_tasks(self):
        
        return len(self._status_tasks[PENDING]) + len(self._status_tasks[RUNNING])
987477
def _count(self, method, limit, keywords):
        
        # The limit will be mutated, so copy it and leave the original intact
        limit = limit.copy()
        has_more = True
        count = None
        while has_more:
            limit.set_request_args(keywords)
            response = self.call(method, **keywords)
            limit.post_fetch(response)
            count += Count.from_response(response)
            last_evaluated_key = response.get('LastEvaluatedKey')
            has_more = last_evaluated_key is not None and not limit.complete
            if has_more:
                keywords['ExclusiveStartKey'] = last_evaluated_key
        return count
1368936
def count(self):
        
        params = self.dump()
        params['limit'] = 0
        params['count'] = 1
        content = self._do_request(params)
        return content['count']
119676
private static int countNewLines(char[] ch, int start, int length) {
        int newLineCount = 0;
        // quite reliable, since only Commodore 8-bit machines, TRS-80, Apple II family, Mac OS up to version 9 and OS-9
        // use only '\r'
        for (int i = start; i < length; i++) {
            newLineCount = newLineCount +  ((ch[i] == '\n') ? 1 : 0);
        }
        return newLineCount;
    }
344070
def show(recursively=false, out=STDOUT, depth=0)
      max_name_length = names.inject(5){|max_len, name| [max_len, name.length].max}
      if names.size > 0
        out.puts "#{" " * (depth*2)}*#{"-" * 80}"
      end
      names.each do |name|
        out.puts sprintf("#{" " * (depth*2)}%-#{max_name_length}s  Pos: %6s  Len: %6s  Type: %10s  Cont: %s",
                         name.to_s,
                         @scope.eval_bit_position(name),
                         @scope.eval_bit_length(name),
                         self[name].class.name.split("::").last,
                         self[name] ? self[name].content_description : "Nil")
        self[name].show(true, out, depth + 1) if recursively && self[name]
      end
    end
1027472
def getCounts
      result = {}
      @classes.each do |c|
        count = 0
        ObjectSpace.each_object(c){ count += 1 }
        result[c] = count
      end
      result
    end
1256453
def rake_task(name,*arguments)
      name = name.to_s

      unless arguments.empty?
        name += ('[' + arguments.join(',') + ']')
      end

      return name
    end
696091
private int _current() {
        if (buf != null) {
            return UTF16.charAt(buf, 0, buf.length, bufPos);
        } else {
            int i = pos.getIndex();
            return (i < text.length()) ? UTF16.charAt(text, i) : DONE;
        }
    }
1189568
private int countNLs() {
        String s = getText();
        int c = 0;
        for(int i=0; i< s.length(); i++)
            if ( s.charAt(i) == '\n' )
                c++;
        return c;
    }
1074281
def count(self):
        
        self.log.info("Running 'count'")
        retvals = {}

        # Numbers of 'tasks'
        num_tasks = self._count_tasks()
        retvals['num_tasks'] = num_tasks

        # Numbers of 'files'
        num_files = self._count_repo_files()
        retvals['num_files'] = num_files

        return retvals
1221978
private static int determineConsecutiveTextCount(CharSequence msg, int startpos) {
    int len = msg.length();
    int idx = startpos;
    while (idx < len) {
      char ch = msg.charAt(idx);
      int numericCount = 0;
      while (numericCount < 13 && isDigit(ch) && idx < len) {
        numericCount++;
        idx++;
        if (idx < len) {
          ch = msg.charAt(idx);
        }
      }
      if (numericCount >= 13) {
        return idx - startpos - numericCount;
      }
      if (numericCount > 0) {
        //Heuristic: All text-encodable chars or digits are binary encodable
        continue;
      }
      ch = msg.charAt(idx);

      //Check if character is encodable
      if (!isText(ch)) {
        break;
      }
      idx++;
    }
    return idx - startpos;
  }
546394
def characters(self):
        
        chars = 0
        for fragment in self.fragments:
            chars += fragment.characters
        return chars
300716
def text
      if handler = find_handler and
          text = handler.text(@file, max_size: max_plaintext_bytes)

        text.gsub!(/\s+/m, ' ')
        text.strip!
        text.mb_chars.compose.limit(max_plaintext_bytes).to_s
      end
    end
903083
function () {
            var delegate = THIS[ this.hash ],
                i,
                len = delegate.activePointersLists.length,
                count = 0;

            for ( i = 0; i < len; i++ ) {
                count += delegate.activePointersLists[ i ].getLength();
            }

            return count;
        }
540986
def completedLength
      num = @completeBlocks.countSet
      # Last block may be smaller
      extra = 0
      if @completeBlocks.set?(@completeBlocks.length-1)
        num -= 1
        extra = @lastBlockLength
      end
      num*@blockSize + extra
    end