A tr is a heading row if: - the parent is a THEAD - or if its the first child of the TABLE or the first TBODY (possibly following a blank THEAD) - and every cell is a TH
177242
function isHeadingRow (tr) {
  var parentNode = tr.parentNode
  return (
    parentNode.nodeName === 'THEAD' ||
    (
      parentNode.firstChild === tr &&
      (parentNode.nodeName === 'TABLE' || isFirstTbody(parentNode)) &&
      every.call(tr.childNodes, function (n) { return n.nodeName === 'TH' })
    )
  )
}
1211503
function removeColByCell($cell) {
  const index = $cell.index();

  $cell.parents('table').find('tr').each((n, tr) => {
    $(tr).children().eq(index).remove();
  });
}
547190
public void getRealHeadingBasedOnCells(int YNum, int cc, TableCandidate tc) {
		int footnoteLineIndex = tc.getFootnoteBeginRow();
		String[][] cells = tc.getCells();
    	int i=0;
		while (i<footnoteLineIndex) {
			int j=0, nonNullCellNum = 0;
			while (j<cc) {
				if (cells[i][j]=="") {
					break;
				}
				nonNullCellNum ++;
				j++;
			}
			if (nonNullCellNum==cc)	break;
			else i++;
		}
		/*
		 * if the next row contain unit symbols, this row has a very large possibility to be a table column heading row
		 */
		if ((i+1)<footnoteLineIndex ) {
			boolean hasUnitSymbols =  false;
			int j=0;
			while (j<cc) {
				if ( (cells[i+1][j].indexOf("/yg rnI--")>0) || (cells[i+1][j].indexOf("(%)")>0) || (cells[i+1][j].indexOf("w-'")>0) ||
				(cells[i+1][j].indexOf("CLg g-'")>0) || (cells[i+1][j].indexOf("pg ml-1")>=0)	) {
					i++;
					break;
				}
				j++;
			}
		}
		/*
		 * Based on observation, the column heading rows always contain missing cells. 
		 * But the first data row always does not contain missing cell
		 */
		if (i==YNum) i=0;
		if (i>0) i--;	
		tc.setHeadingLineNumber(i);
	}
659787
def _check_fill_title_row(self, row_index):
        '''
        
        '''
        table_row = self.table[row_index]
        # Determine if the whole row is titles
        prior_row = self.table[row_index-1] if row_index > 0 else table_row
        for column_index in range(self.start[1], self.end[1]):
            if is_num_cell(table_row[column_index]) or is_num_cell(prior_row[column_index]):
                return
        # Since we're a title row, stringify the row
        self._stringify_row(row_index)
198780
def is_tabular_aligned(c):
    
    return same_table(c) and (
        is_col_aligned(_to_span(c[i]).sentence, _to_span(c[0]).sentence)
        or is_row_aligned(_to_span(c[i]).sentence, _to_span(c[0]).sentence)
        for i in range(len(c))
    )
730982
protected String getTextAt(final MBasicTable table, final int row, final int column) {
		String text = table.getTextAt(row, column);
		// suppression de tags éventuellements présents (par ex. avec un MultiLineTableCellRenderer)
		if (text != null && text.startsWith("<html>")) {
			text = text.replaceFirst("<html>", "");
			text = text.replaceFirst("<center>", "");
			text = text.replaceAll("<br/>", "\n");
			text = text.replaceAll("&nbsp;", " ");
			text = text.replaceFirst("<font color='#[0-9]*+'>", "");
		}
		return text;
	}
1169971
def _handle_table_cell(self, markup, tag, line_context):
        """"""
        old_context = self._context
        padding, style = "", None
        self._head += len(markup)
        reset = self._head
        if not self._can_recurse():
            self._emit_text(markup)
            self._head -= 1
            return

        cell = self._parse(contexts.TABLE_OPEN | contexts.TABLE_CELL_OPEN |
                           line_context | contexts.TABLE_CELL_STYLE)
        cell_context = self._context
        self._context = old_context
        reset_for_style = cell_context & contexts.TABLE_CELL_STYLE
        if reset_for_style:
            self._head = reset
            self._push(contexts.TABLE_OPEN | contexts.TABLE_CELL_OPEN |
                       line_context)
            padding = self._handle_table_style("|")
            style = self._pop()
            # Don't parse the style separator:
            self._head += 1
            cell = self._parse(contexts.TABLE_OPEN | contexts.TABLE_CELL_OPEN |
                               line_context)
            cell_context = self._context
            self._context = old_context

        close_open_markup = "|" if reset_for_style else None
        self._emit_table_tag(markup, tag, style, padding, close_open_markup,
                             cell, "")
        # Keep header/cell line contexts:
        self._context |= cell_context & (contexts.TABLE_TH_LINE |
                                         contexts.TABLE_TD_LINE)
        # Offset displacement done by parse():
        self._head -= 1
325187
def setformrowcol r, c
           @form.row = r unless r.nil?
           @form.col = c unless c.nil?
           # this is stupid, going through this route i was losing windows top and left
           # And this could get repeated if there are mult objects. 
        if !@parent_component.nil? and @parent_component != self
           r+= @parent_component.form.window.top unless  r.nil?
           c+= @parent_component.form.window.left unless c.nil?
           $log.debug " (#{@name}) calling parents setformrowcol #{r}, #{c} pa: #{@parent_component.name} self: #{name}, #{self.class}, poff #{@parent_component.row_offset}, #{@parent_component.col_offset}, top:#{@form.window.left} left:#{@form.window.left} "
           @parent_component.setformrowcol r, c
        else
           # no more parents, now set form
           $log.debug " name NO MORE parents setting #{r}, #{c}    in #{@form} "
           @form.setrowcol r, c
        end
     end
914868
public static TableCellElement getCell( Element root, int column, int row )
	{
		TableSectionElement tbody = getTBodyElement( root );
		
		TableRowElement tr = tbody.getChild( row ).cast();
		TableCellElement td = tr.getChild( column ).cast();
		
		return td;
	}
1002418
public Table newRow()
    {
        unnest();
        nest(row = new Block("tr"));
        if (_defaultRow!=null)
        {
            row.setAttributesFrom(_defaultRow);
            if (_defaultRow.size()>0)
                row.add(_defaultRow.contents());
        }
        cell=null;
        return this;
    }
1117956
function(oCellRef) {
			var oInfo = TableGrouping.TableUtils.getCellInfo(oCellRef);

			if (oInfo.isOfType(TableGrouping.TableUtils.CELLTYPE.DATACELL)) {
				return oInfo.cell.parent().hasClass("sapUiTableGroupHeader");
			} else if (oInfo.isOfType(TableGrouping.TableUtils.CELLTYPE.ROWHEADER | TableGrouping.TableUtils.CELLTYPE.ROWACTION)) {
				return oInfo.cell.hasClass("sapUiTableGroupHeader");
			}

			return false;
		}
699291
function(row, column, value) {

        if (value === undefined) {
            return this.prop(['table', 'rows', row + '', 'cells', column + '', 'value']);
        }
        return this.prop(['table', 'rows', row + '', 'cells', column + '', 'value'], value);
    }
1353881
function _fnCoordsFromCell( n )
	{
		if ( _oDatatable )
		{
			return [
				$('td', n.parentNode).index(n),
				$('tr', n.parentNode.parentNode).index(n.parentNode) + _oDatatable._iDisplayStart
			];
		}
		else
		{
			return [
				$('td', n.parentNode).index(n),
				$('tr', n.parentNode.parentNode).index(n.parentNode)
			];
		}
	}
948476
def table(self, header=None, rows=None, style=None):
        
        if style is not None:
            style = self.TABLE_STYLES[style]

        table = Table(style)

        if header:
            table.set_header_row(header)

        if rows:
            table.set_rows(rows)

        return table
760484
def _is_child(self, parent, child):  # type: (str, str) -> bool
        
        parent_parts = tuple(self._split_table_name(parent))
        child_parts = tuple(self._split_table_name(child))

        if parent_parts == child_parts:
            return False

        return parent_parts == child_parts[: len(parent_parts)]
285929
function (e)
	{
		if ( e.target && e.target.nodeName.toUpperCase() == "TD" &&
			 e.target != this.s.drag.endTd )
		{
			var coords = this._fnTargetCoords( e.target );

			if ( this.c.mode == "y" && coords.x != this.s.drag.startX )
			{
				e.target = $('tbody>tr:eq('+coords.y+')>td:eq('+this.s.drag.startX+')', this.dom.table)[0];
			}
			if ( this.c.mode == "x" && coords.y != this.s.drag.startY )
			{
				e.target = $('tbody>tr:eq('+this.s.drag.startY+')>td:eq('+coords.x+')', this.dom.table)[0];
			}

			if ( this.c.mode == "either")
			{
				if(coords.x != this.s.drag.startX )
				{
					e.target = $('tbody>tr:eq('+this.s.drag.startY+')>td:eq('+coords.x+')', this.dom.table)[0];
				}
				else if ( coords.y != this.s.drag.startY ) {
					e.target = $('tbody>tr:eq('+coords.y+')>td:eq('+this.s.drag.startX+')', this.dom.table)[0];
				}
			}

			// update coords
			if ( this.c.mode !== "both" ) {
				coords = this._fnTargetCoords( e.target );
			}

			var drag = this.s.drag;
			drag.endTd = e.target;

			if ( coords.y >= this.s.drag.startY ) {
				this._fnUpdateBorder( drag.startTd, drag.endTd );
			}
			else {
				this._fnUpdateBorder( drag.endTd, drag.startTd );
			}
			this._fnFillerPosition( e.target );
		}

		/* Update the screen information so we can perform scrolling */
		this.s.screen.y = e.pageY;
		this.s.screen.scrollTop = $(document).scrollTop();

		if ( this.s.dt.oScroll.sY !== "" )
		{
			this.s.scroller.scrollTop = $(this.s.dt.nTable.parentNode).scrollTop();
			this.s.scroller.top = $(this.s.dt.nTable.parentNode).offset().top;
			this.s.scroller.bottom = this.s.scroller.top + $(this.s.dt.nTable.parentNode).height();
		}
	}
630059
def _handle_table_row(self):
        """"""
        self._head += 2
        if not self._can_recurse():
            self._emit_text("|-")
            self._head -= 1
            return

        self._push(contexts.TABLE_OPEN | contexts.TABLE_ROW_OPEN)
        padding = self._handle_table_style("\n")
        style = self._pop()

        # Don't parse the style separator:
        self._head += 1
        row = self._parse(contexts.TABLE_OPEN | contexts.TABLE_ROW_OPEN)

        self._emit_table_tag("|-", "tr", style, padding, None, row, "")
        # Offset displacement done by parse():
        self._head -= 1