Checks whether a table has grid layout with both row and column headers.

@param {NodeList} rows tr elements
@returns {boolean} Table does not have a complete grid layout
965541
function tableDoesNotHaveGridLayout(rows) {
        var headerCells = rows[0].children;

        for (var i = 1; i < headerCells.length; i++) {
            if (headerCells[i].tagName != 'TH') {
                return true;
            }
        }

        for (var i = 1; i < rows.length; i++) {
            if (rows[i].children[0].tagName != 'TH') {
                return true;
            }
        }
        return false;
    }
238530
function(data) {
        var headEnabled = false;
        if (this.rowSpan === 1) {
            this.$tableBody.find('tr[class!="sum"]').each(function(index, tr) {
                var td = $('<td width="24" align="center" class="select-col"><input type="checkbox" title=" "></td>');
                $(this).prepend(td);
                if (data[index].disabledSelect) {
                    $(this).addClass('select-disabled');
                    td.find(':checkbox').prop('disabled', true);
                } else {
                    headEnabled = true;
                }
            });
        } else {
            var self = this,
                dataIndex = 0;
            this.$tableBody.find('tr[class!="sum"]').each(function(index, tr) {
                if ((index + self.rowSpan) % self.rowSpan === 0) {
                    var td = $('<td width="24" align="center" class="select-col" rowspan="' + self.rowSpan + '"><input type="checkbox" title=" "></td>');
                    $(this).prepend(td);
                    if (data[dataIndex].disabledSelect) {
                        $(this).addClass('select-disabled');
                        td.find(':checkbox').prop('disabled', true);
                    } else {
                        headEnabled = true;
                    }
                    dataIndex++;
                }
            });
        }

        var th = $('<th nowrap width="24" class="select-col"><input type="checkbox" title=" "></th>');
        this.$tableHead.find('tr').prepend(th);
        if (!headEnabled) {
            th.find(':checkbox').prop('disabled', true);
        }

        this.$main.find(':checkbox').bizCheckbox({
            theme: 'gray'
        });
    }
994898
public boolean hasSingleActions() {

        Iterator<CmsListColumnDefinition> itCols = m_columns.elementList().iterator();
        while (itCols.hasNext()) {
            CmsListColumnDefinition col = itCols.next();
            if (!col.getDefaultActions().isEmpty() || !col.getDirectActions().isEmpty()) {
                return true;
            }
        }
        return false;
    }
1255452
function getTableDetails(table) {
        return Tools.map(table.rows, function (row) {

          var cells = Tools.map(row.cells, function (cell) {

            var rowspan = cell.hasAttribute('rowspan') ? parseInt(cell.getAttribute('rowspan'), 10) : 1;
            var colspan = cell.hasAttribute('colspan') ? parseInt(cell.getAttribute('colspan'), 10) : 1;

            return {
              element: cell,
              rowspan: rowspan,
              colspan: colspan
            };
          });

          return {
            element: row,
            cells: cells
          };

        });

      }
930967
protected function containsOnlyColumnNames(array $row)
    {
        $last = count($row)-1;

        foreach ($row as $i=>$column) {
            if (!$this->isColumnName($column, $i == $last)) {
                return false;
            }
        }
        return true;
    }
923344
public function hasColumns($table, array $columns)
    {
        $tableColumns = array_map('strtolower', array_keys($this->getColumnListing($table)));

        foreach ($columns as $column) {
            if (!in_array(strtolower($column), $tableColumns)) {
                return false;
            }
        }

        return true;
    }
422352
def <<(row)
      if row == Border::SEPARATOR
        separators << columns_size - (header ? 0 : 2)
      else
        rows_copy = rows.dup
        assert_row_sizes rows_copy << row
        rows << to_row(row)
      end
      self
    end
233540
def render_table(self, headers, rows, style=None):
        
        table = self.table(headers, rows, style)

        table.render(self._io)
1175562
boolean addRowsToGrid(List<SquareNode> column, List<SquareNode> ordered) {
		for (int i = 0; i < column.size(); i++) {
			column.get(i).graph = 0;
		}

		// now add the rows by traversing down the column
		int numFirsRow = 0;
		for (int j = 0; j < column.size(); j++) {
			SquareNode n = column.get(j);

			n.graph = SEARCHED;
			ordered.add(n);

			SquareNode nextRow;
			if( j == 0 ) {
				if( n.getNumberOfConnections() != 2 ) {
					if( verbose ) System.err.println(
							"Unexpected number of connections. want 2 found "+n.getNumberOfConnections());
					return true;
				}

				nextRow = pickNot(n, column.get(j + 1));

			} else if( j == column.size()-1 ) {
				if( n.getNumberOfConnections() != 2 ) {
					if (verbose) System.err.println(
							"Unexpected number of connections. want 2 found " + n.getNumberOfConnections());
					return true;
				}
				nextRow = pickNot(n,column.get(j-1));
			} else {
				if( n.getNumberOfConnections() != 3 ) {
					if (verbose) System.err.println(
							"Unexpected number of connections. want 2 found " + n.getNumberOfConnections());
					return true;
				}
				nextRow = pickNot(n, column.get(j-1),column.get(j+1));
			}

			nextRow.graph = SEARCHED;
			ordered.add(nextRow);
			int numberLine = addLineToGrid(n, nextRow, ordered);

			if( j == 0 ) {
				numFirsRow = numberLine;
			} else if(numberLine != numFirsRow ) {
				if( verbose ) System.err.println("Number of elements in rows do not match.");
				return true;
			}
		}
		return false;
	}
279544
private boolean skipBar(Row row)
   {
      List<Row> childRows = row.getChildRows();
      return childRows.size() == 1 && childRows.get(0).getChildRows().isEmpty();
   }
109684
function(table) {
        var data = [];
        var rows = table.rows;
        var index = 0;
        var length = rows.length;
        var columnIndex, colspanRange, rowspanRange;

        // Step 1: Init the data matrix
        for (; index < length; index += 1) {
            data[index] = [];
        }

        // Step 2: Traverse the table
        _.each(rows, function(tr, rowIndex) {
            columnIndex = 0;

            _.each(tr.cells, function(td) {
                var text = td.textContent || td.innerText;

                while (data[rowIndex][columnIndex]) {
                    columnIndex += 1;
                }

                colspanRange = [columnIndex, columnIndex + (td.colSpan || 1)];
                rowspanRange = [rowIndex, rowIndex + (td.rowSpan || 1)];

                // Step 3: Set the value of td element to the data matrix as colspan and rowspan ranges
                setDataInSpanRange(text, data, colspanRange, rowspanRange);

                columnIndex = colspanRange[1];
            });
        });

        return data;
    }
745493
static boolean containsAllColumns(OrderedHashSet columnSet, Table table,
                                      boolean[] columnCheckList) {

        for (int i = 0; i < columnCheckList.length; i++) {
            if (columnCheckList[i]) {
                if (columnSet == null) {
                    return false;
                }

                if (columnSet.contains(table.getColumn(i).getName())) {
                    continue;
                }

                return false;
            }
        }

        return true;
    }
1269183
def headers(row = nil)
      row ||= rows.first
      header_type = row.th.exist? ? 'th' : 'td'
      row.send("#{header_type}s")
    end
302905
public AbstractSheet<TRow, TColumn, TCell> setRows(List<TRow> rows) {
        this.rows = rows;
        return this;
    }
1033972
function widgetCell({
  col,
  row,
  width,
  height,
}) {
  return css({
    gridColumnStart: col + 1,
    gridColumnEnd: col + width + 1,
    gridRowStart: row + 1,
    gridRowEnd: row + height + 1,
  }).toString();
}
1275145
function getCellsAtRow(
    opts: Options,
    // The table
    table: Block,
    rowIndex: number
): List<Block> {
    return table.nodes.get(rowIndex).nodes;
}
512320
function getLayoutScheme() {
        var result = {
            rows: 1,
            columns: 1
        };

        if (_orientation === HORIZONTAL) {
            result.rows = 2;
        } else if (_orientation === VERTICAL) {
            result.columns = 2;
        }

        return result;
    }