Creates col at the right of the data array
@param {Object} [coords] Optional. Coords of the cell before which the new column will be inserted
497896
function (coords) {
      if (priv.dataType === 'object' || priv.settings.columns) {
        throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting");
      }
      var r = 0;
      if (!coords || coords.col >= self.colCount) {
        for (; r < self.rowCount; r++) {
          if (typeof priv.settings.data[r] === 'undefined') {
            priv.settings.data[r] = [];
          }
          priv.settings.data[r].push('');
        }
      }
      else {
        for (; r < self.rowCount; r++) {
          priv.settings.data[r].splice(coords.col, 0, '');
        }
      }
    }
2061
function insertArray (table, object, fields) {
  var input = this

  input.forEach(function addRow (entry, rowNo) {
    var tableRow = fields.map(function cell (fieldName) {
      return getCellContent.call(entry, object.fields[fieldName], rowNo)
    })
    table.push(tableRow)
  })
}
885801
def _add_column(self, label, field):
        
        # Don't call this directly.
        assert self.headers is not None
        cols = 0
        if len(self._headers) > 0:
            cols = max([int(c.cell.col) for c in self._headers])
        new_col = cols + 1
        if int(self._ws.col_count.text) < new_col:
            self._ws.col_count.text = str(new_col)
            self._update_metadata()

        cell = self._service.UpdateCell(1, new_col, label,
                                        self._ss.id, self.id)
        self._headers.append(cell)
1166904
def OnInsertCols(self, event):
        """"""

        bbox = self.grid.selection.get_bbox()

        if bbox is None or bbox[1][1] is None:
            # Insert rows at cursor
            ins_point = self.grid.actions.cursor[1] - 1
            no_cols = 1
        else:
            # Insert at right edge of bounding box
            ins_point = bbox[0][1] - 1
            no_cols = self._get_no_rowscols(bbox)[1]

        with undo.group(_("Insert columns")):
            self.grid.actions.insert_cols(ins_point, no_cols)

        self.grid.GetTable().ResetView()

        # Update the default sized cell sizes
        self.grid.actions.zoom()

        event.Skip()
503213
function create_header_col(m) {
    var $e = $$('hcol nowrap');
    $e.css({width: p});
    if (m.options) {
      $e.css(m.options);
    }
    $e.text(m.name);
    var hilight = function () {
      if (!order)
        return;
      if (order == m.name)
      {
        $e.addClass('order asc');
        $lh = $e;
      }
      else if (order.substring(1) == m.name)
      {
        $e.addClass('order desc');
        $lh = $e;
      }
    }
    hilight();
    $e.click(function () {
      if (order == m.name) {
        order = '-' + m.name;
      }
      else {
        order = m.name;
      }
      zcookie.set('order-'+type, order);
      if ($lh)
        $lh.removeClass('order asc desc');
      hilight();
      $lh = $e;
     request_data();
    });
    return $e;
  }
1203108
private Column createColumnFromCell(Sheet sheet, Cell cell) {
    if (cell.getCellTypeEnum() == CellType.STRING) {
      return Column.create(
          cell.getStringCellValue(),
          cell.getColumnIndex(),
          getColumnDataFromSheet(sheet, cell.getColumnIndex()));
    } else {
      throw new MolgenisDataException(
          String.format(
              "Celltype [%s] is not supported for columnheaders", cell.getCellTypeEnum()));
    }
  }
414052
def add_cell(self, row="unknown", col="unknown",
                 val="unknown", type="int32", meta=""):
        
        if self.arr is None:
            self.arr = np.array(
                [(row, val)], dtype=[ (self.name, "S50"), (col, type)])
            self.meta = np.array(
                [(row, val)], dtype=[ (self.name, TYPE_META), (col, type)])
            self.irt[row] = 0

        if not row in self._get_row_hdrs():
            self._expand_row(row)

        if not col in self._get_col_hdrs():
            self._expand_col(col, type)

        try:
            self._add_cell(val, row, col, meta)
        except ValueError:
            logging.error("unable to add val %s to [%s,%s]: "
                          "not a compatible data type" % (val, row, col))
            return False

        return True
1234125
function inferColumns(rows) {
  var columnSet = Object.create(null),
      columns = [];

  rows.forEach(function(row) {
    for (var column in row) {
      if (!(column in columnSet)) {
        columns.push(columnSet[column] = column);
      }
    }
  });

  return columns;
}
1269405
function position() {
    var start = { line: lineno, column: column };
    return function(node){
      node.position = new Position(start);
      whitespace();
      return node;
    };
  }
881706
public void newColumns()
    {
        column = new Table(0);
        columns = 1;
        table.newRow();
        table.addCell(column);
        table.cell().top();
    }
1187376
function (rows) {
		var row,
			rowsLength,
			col,
			colsLength,
			columns;

		if (rows) {
			columns = [];
			rowsLength = rows.length;
			for (row = 0; row < rowsLength; row++) {
				colsLength = rows[row].length;
				for (col = 0; col < colsLength; col++) {
					if (!columns[col]) {
						columns[col] = [];
					}
					columns[col][row] = rows[row][col];
				}
			}
		}
		return columns;
	}
140435
def coord_to_col( self, pos ):
        
        start,end = self.get_forward_strand_start(),self.get_forward_strand_end()
        if pos < start or pos > end:
            raise ValueError("Range error: %d not in %d-%d" % ( pos, start, end ))
        if not self.index:
            self.index = list()
            if (self.strand == '-'):
                # nota bene: for - strand self.index[x] maps to one column
                # higher than is actually associated with the position;  thus
                # when slice_by_component() and slice_by_coord() flip the ends,
                # the resulting slice is correct
                for x in range( len(self.text)-1,-1,-1 ):
                    if not self.text[x] == '-':
                        self.index.append( x + 1 )
                self.index.append( 0 )
            else:
                for x in range( len(self.text) ):
                    if not self.text[x] == '-':
                        self.index.append(x)
                self.index.append( len(self.text) )
        x = None
        try:
            x = self.index[ pos - start ]
        except:
            raise Exception("Error in index.")
        return x
36503
private void utah(int row, int col, int pos) {
    module(row - 2, col - 2, pos, 1);
    module(row - 2, col - 1, pos, 2);
    module(row - 1, col - 2, pos, 3);
    module(row - 1, col - 1, pos, 4);
    module(row - 1, col, pos, 5);
    module(row, col - 2, pos, 6);
    module(row, col - 1, pos, 7);
    module(row, col, pos, 8);
  }
1063879
function insertColumn(
    opts: Options,
    change: Change,
    at?: number, // Column index
    getCell?: (column: number, row: number) => Block
): Change {
    const { value } = change;
    const { startKey } = value;

    const pos = TablePosition.create(opts, value.document, startKey);
    const { table } = pos;

    const columnIndex =
        typeof at === 'undefined' ? pos.getColumnIndex() + 1 : at;

    // Insert the new cell
    table.nodes.forEach((row, rowIndex) => {
        const newCell = getCell
            ? getCell(columnIndex, rowIndex)
            : createCell(opts);
        change.insertNodeByKey(row.key, columnIndex, newCell, {
            normalize: false
        });
    });

    // Update the selection (not doing can break the undo)
    return moveSelection(
        opts,
        change,
        pos.getColumnIndex() + 1,
        pos.getRowIndex()
    );
}
1101950
function (coordsArr) {
      function mapProp(func, array, prop) {
        function getProp(el) {
          return el[prop];
        }

        if (Array.prototype.map) {
          return func.apply(Math, array.map(getProp));
        }
        return func.apply(Math, $.map(array, getProp));
      }

      return {
        TL: {
          row: mapProp(Math.min, coordsArr, "row"),
          col: mapProp(Math.min, coordsArr, "col")
        },
        BR: {
          row: mapProp(Math.max, coordsArr, "row"),
          col: mapProp(Math.max, coordsArr, "col")
        }
      };
    }
192654
private void addColumn(String storeName, String rowKey, String colName, byte[] colValue) {
        Map<String, Map<String, byte[]>> rowMap = m_columnAdds.get(storeName);
        if (rowMap == null) {
            rowMap = new HashMap<>();
            m_columnAdds.put(storeName, rowMap);
        }
        
        Map<String, byte[]> colMap = rowMap.get(rowKey);
        if (colMap == null) {
            colMap = new HashMap<>();
            rowMap.put(rowKey, colMap);
        }
        
        byte[] oldValue = colMap.put(colName, colValue);
        if (oldValue == null) {
            m_totalUpdates++;
        } else if (!Arrays.equals(oldValue, colValue)) {
            m_logger.debug("Warning: duplicate column mutation with different value: " +
                           "store={}, row={}, col={}, old={}, new={}",
                           new Object[]{storeName, rowKey, colName, oldValue, colValue});
        }
    }
952355
function addCoordinates(coordArray, number) {
  for (var i = 0; i < number; i++) {
    coordArray.push(generateLonLat());
  }
}