<rowBreaks count="3" manualBreakCount="3">
 <brk id="1" max="16383" man="1"/>
 <brk id="7" max="16383" man="1"/>
 <brk id="13" max="16383" man="1"/>
 </rowBreaks>
167740
def to_xml_string(str='')
      return if empty?
      str << ('<rowBreaks count="' << self.size.to_s << '" manualBreakCount="' << self.size.to_s << '">')
      each { |brk| brk.to_xml_string(str) }
      str << '</rowBreaks>'
    end
1223821
public void setRowMargin(int l, int t, int r, int b) {
        mRowMargin[0] = l; mRowMargin[1] = t; mRowMargin[2] = r; mRowMargin[3] = b;
    }
610694
public void fixRowsAndCols() {
        rows = (int) Math.round((n - s) / ns_res);
        if (rows < 1)
            rows = 1;
        cols = (int) Math.round((e - w) / we_res);
        if (cols < 1)
            cols = 1;
    }
57400
@Override
  public CounterRow<K, N> peekLast() {
    return rowsList != null && rowsList.size() > 0 ? rowsList.get(rowsList.size()-1) : null;
  }
509118
private function _writeBreaks()
	{
		// initialize
		$vbreaks = array();
		$hbreaks = array();

		foreach ($this->_phpSheet->getBreaks() as $cell => $breakType) {
			// Fetch coordinates
			$coordinates = PHPExcel_Cell::coordinateFromString($cell);

			// Decide what to do by the type of break
			switch ($breakType) {
				case PHPExcel_Worksheet::BREAK_COLUMN:
					// Add to list of vertical breaks
					$vbreaks[] = PHPExcel_Cell::columnIndexFromString($coordinates[0]) - 1;
					break;

				case PHPExcel_Worksheet::BREAK_ROW:
					// Add to list of horizontal breaks
					$hbreaks[] = $coordinates[1];
					break;

				case PHPExcel_Worksheet::BREAK_NONE:
				default:
					// Nothing to do
					break;
			}
		}

		//horizontal page breaks
		if (!empty($hbreaks)) {

			// Sort and filter array of page breaks
			sort($hbreaks, SORT_NUMERIC);
			if ($hbreaks[0] == 0) { // don't use first break if it's 0
				array_shift($hbreaks);
			}

			$record  = 0x001b;			   // Record identifier
			$cbrk	= count($hbreaks);	   // Number of page breaks
			$length  = 2 + 6 * $cbrk;	  // Bytes to follow

			$header  = pack("vv", $record, $length);
			$data	= pack("v",  $cbrk);

			// Append each page break
			foreach ($hbreaks as $hbreak) {
				$data .= pack("vvv", $hbreak, 0x0000, 0x00ff);
			}

			$this->_append($header . $data);
		}

		// vertical page breaks
		if (!empty($vbreaks)) {

			// 1000 vertical pagebreaks appears to be an internal Excel 5 limit.
			// It is slightly higher in Excel 97/200, approx. 1026
			$vbreaks = array_slice($vbreaks, 0, 1000);

			// Sort and filter array of page breaks
			sort($vbreaks, SORT_NUMERIC);
			if ($vbreaks[0] == 0) { // don't use first break if it's 0
				array_shift($vbreaks);
			}

			$record  = 0x001a;			   // Record identifier
			$cbrk	= count($vbreaks);	   // Number of page breaks
			$length  = 2 + 6 * $cbrk;	  // Bytes to follow

			$header  = pack("vv",  $record, $length);
			$data	= pack("v",   $cbrk);

			// Append each page break
			foreach ($vbreaks as $vbreak) {
				$data .= pack("vvv", $vbreak, 0x0000, 0xffff);
			}

			$this->_append($header . $data);
		}
	}
741469
function() {
            	var maxes = [];

            	for(var i = 1; i <= this.rows(); i++) {
            	    var max = null;
            	    var maxIndex = -1;

            	    for(var j = 1; j <= this.cols(); j++) {
            		if(max === null || this.e(i, j) > max) {
            		    max = this.e(i, j);
            		    maxIndex = j;
            		}
            	    }

            	    maxes.push(maxIndex);
            	}

            	return $V(maxes);
                }
461496
function () {
      var select, data, r, maxR, c;

      if (selection.isMultiple()) {
        select = priv.selectionBorder.corners;
      }
      else {
        select = priv.currentBorder.corners;
      }

      autofill.fillBorder.disappear();

      data = datamap.getAll();
      rows : for (r = select.BR.row + 1; r < self.rowCount; r++) {
        for (c = select.TL.col; c <= select.BR.col; c++) {
          if (data[r][c]) {
            break rows;
          }
        }
        if (!!data[r][select.TL.col - 1] || !!data[r][select.BR.col + 1]) {
          maxR = r;
        }
      }
      if (maxR) {
        autofill.showBorder(self.view.getCellAtCoords({row: maxR, col: select.BR.col}));
        autofill.apply();
      }
    }
1359499
private int getTupleDataRowCount(List<DBBPool.BBContainer> outputBuffers) {
        if (outputBuffers == null || outputBuffers.size() != m_tableTasks.size()) return 0;
        int accumulator = 0;
        for (int i = 0; i < outputBuffers.size(); ++i) {
            SnapshotDataTarget target = m_tableTasks.get(i).m_target;
            int rowCount = target.getInContainerRowCount(outputBuffers.get(i));
            if (rowCount != SnapshotDataTarget.ROW_COUNT_UNSUPPORTED) {
                accumulator += target.getInContainerRowCount(outputBuffers.get(i));
            }
        }
        return accumulator;
    }
1064160
private int countOfMode(boolean data) {
        int count = 0;
        for (Node p = head; p != null; ) {
            if (!p.isMatched()) {
                if (p.isData != data)
                    return 0;
                if (++count == Integer.MAX_VALUE) // saturated
                    break;
            }
            Node n = p.next;
            if (n != p)
                p = n;
            else {
                count = 0;
                p = head;
            }
        }
        return count;
    }
236944
private boolean checkEdgeCount( SquareGrid grid ) {

		int left = 0, right = grid.columns-1;
		int top = 0, bottom = grid.rows-1;

		for (int row = 0; row < grid.rows; row++) {
			boolean skip = grid.get(row,0) == null;

			for (int col = 0; col < grid.columns; col++) {
				SquareNode n = grid.get(row,col);
				if( skip ) {
					if ( n != null )
						return false;
				} else {
					boolean horizontalEdge =  col == left || col == right;
					boolean verticalEdge =  row == top || row == bottom;

					boolean outer = horizontalEdge || verticalEdge;
					int connections = n.getNumberOfConnections();

					if( outer ) {
						if( horizontalEdge && verticalEdge ) {
							if( connections != 1 )
								return false;
						} else if( connections != 2 )
							return false;
					} else {
						if( connections != 4 )
							return false;
					}
				}
				skip = !skip;
			}
		}
		return true;
	}
56009
private function readHorizontalPageBreaks()
    {
        $length = self::getInt2d($this->data, $this->pos + 2);
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);

        // move stream pointer to next record
        $this->pos += 4 + $length;

        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {
            // offset: 0; size: 2; number of the following row index structures
            $nm = self::getInt2d($recordData, 0);

            // offset: 2; size: 6 * $nm; list of $nm row index structures
            for ($i = 0; $i < $nm; ++$i) {
                $r = self::getInt2d($recordData, 2 + 6 * $i);
                $cf = self::getInt2d($recordData, 2 + 6 * $i + 2);
                $cl = self::getInt2d($recordData, 2 + 6 * $i + 4);

                // not sure why two column indexes are necessary?
                $this->phpSheet->setBreakByColumnAndRow($cf, $r, PHPExcel_Worksheet::BREAK_ROW);
            }
        }
    }
794832
@VisibleForTesting
  RangeSet<RowKeyWrapper> rowSetToRangeSet(RowSet btRowSet) {
    RangeSet<RowKeyWrapper> rangeSet = TreeRangeSet.create();
    for (RowRange btRowRange : btRowSet.getRowRangesList()) {
      rangeSet.add(rowRangeToRange(btRowRange));
    }
    for (ByteString key : btRowSet.getRowKeysList()) {
      rangeSet.add(Range.singleton(new RowKeyWrapper(key)));
    }
    return rangeSet;
  }
1205591
@Override
    protected void updateStatsRow(Object rowKey, Object rowValues[]) {
        super.updateStatsRow(rowKey, rowValues);

        rowValues[columnNameToIndex.get("PARTITION_ID")] = m_partitionId;
        long totalTimedExecutionTime = m_totalPlanningTime;
        long minExecutionTime = m_minPlanningTime;
        long maxExecutionTime = m_maxPlanningTime;
        long cache1Level = m_cache1Level;
        long cache2Level = m_cache2Level;
        long cache1Hits  = m_cache1Hits;
        long cache2Hits  = m_cache2Hits;
        long cacheMisses = m_cacheMisses;
        long failureCount = m_failures;

        if (m_interval) {
            totalTimedExecutionTime = m_totalPlanningTime - m_lastTimedPlanningTime;
            m_lastTimedPlanningTime = m_totalPlanningTime;

            minExecutionTime = m_lastMinPlanningTime;
            maxExecutionTime = m_lastMaxPlanningTime;
            m_lastMinPlanningTime = Long.MAX_VALUE;
            m_lastMaxPlanningTime = Long.MIN_VALUE;

            cache1Level = m_cache1Level - m_lastCache1Level;
            m_lastCache1Level = m_cache1Level;

            cache2Level = m_cache2Level - m_lastCache2Level;
            m_lastCache2Level = m_cache2Level;

            cache1Hits = m_cache1Hits - m_lastCache1Hits;
            m_lastCache1Hits = m_cache1Hits;

            cache2Hits = m_cache2Hits - m_lastCache2Hits;
            m_lastCache2Hits = m_cache2Hits;

            cacheMisses = m_cacheMisses - m_lastCacheMisses;
            m_lastCacheMisses = m_cacheMisses;

            failureCount = m_failures - m_lastFailures;
            m_lastFailures = m_failures;

            m_lastInvocations = m_invocations;
        }

        rowValues[columnNameToIndex.get(VoltSystemProcedure.CNAME_SITE_ID)] = m_siteId;
        rowValues[columnNameToIndex.get("PARTITION_ID")] = m_partitionId;
        rowValues[columnNameToIndex.get("CACHE1_LEVEL")] = cache1Level;
        rowValues[columnNameToIndex.get("CACHE2_LEVEL")] = cache2Level;
        rowValues[columnNameToIndex.get("CACHE1_HITS" )] = cache1Hits;
        rowValues[columnNameToIndex.get("CACHE2_HITS" )] = cache2Hits;
        rowValues[columnNameToIndex.get("CACHE_MISSES")] = cacheMisses;
        rowValues[columnNameToIndex.get("PLAN_TIME_MIN")] = minExecutionTime;
        rowValues[columnNameToIndex.get("PLAN_TIME_MAX")] = maxExecutionTime;
        if (getSampleCount() != 0) {
            rowValues[columnNameToIndex.get("PLAN_TIME_AVG")] =
                 (totalTimedExecutionTime / getSampleCount());
        } else {
            rowValues[columnNameToIndex.get("PLAN_TIME_AVG")] = 0L;
        }
        rowValues[columnNameToIndex.get("FAILURES")] = failureCount;
    }
600737
private void fixRowsAndCols() {
        rows = (int) Math.round((north - south) / ns_res);
        if (rows < 1)
            rows = 1;
        cols = (int) Math.round((east - west) / we_res);
        if (cols < 1)
            cols = 1;
    }
444487
private function readVerticalPageBreaks()
    {
        $length = self::getInt2d($this->data, $this->pos + 2);
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);

        // move stream pointer to next record
        $this->pos += 4 + $length;

        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {
            // offset: 0; size: 2; number of the following column index structures
            $nm = self::getInt2d($recordData, 0);

            // offset: 2; size: 6 * $nm; list of $nm row index structures
            for ($i = 0; $i < $nm; ++$i) {
                $c = self::getInt2d($recordData, 2 + 6 * $i);
                $rf = self::getInt2d($recordData, 2 + 6 * $i + 2);
                $rl = self::getInt2d($recordData, 2 + 6 * $i + 4);

                // not sure why two row indexes are necessary?
                $this->phpSheet->setBreakByColumnAndRow($c, $rf, PHPExcel_Worksheet::BREAK_COLUMN);
            }
        }
    }
720615
def insert_break
      return -1 unless @editable
      # insert a blank row and append rest of this line to cursor
      $log.debug "ENTER PRESSED at  #{@curpos}, on row #{@current_index}"
      @delete_buffer = (delete_eol || "")
      @list[@current_index] << "\r"
      $log.debug "DELETE BUFFER #{@delete_buffer}" 
      @list.insert @current_index+1, @delete_buffer 
      @curpos = 0
      down
      col = @orig_col + @col_offset
      setrowcol @row+1, col
      # FIXME maybe this should be insert line since line inserted, not just data, undo will delete it
      fire_handler :CHANGE, InputDataEvent.new(@curpos,@curpos+@delete_buffer.length, self, :INSERT_LINE, @current_index, @delete_buffer)     #  2008-12-24 18:34 
    end
861302
private static void validateLineBreaks(int[] linebreaks, int textLength) {
        int prev = 0;
        for (int i = 0; i < linebreaks.length; ++i) {
            int next = linebreaks[i];
            if (next <= prev) {
                throw new IllegalArgumentException("bad linebreak: " + next + " at index: " + i);
            }
            prev = next;
        }
        if (prev != textLength) {
            throw new IllegalArgumentException("last linebreak must be at " + textLength);
        }
    }