move cursor to where the fields row and col are
 private
546942
def setpos r=@row, c=@col
      #$log.debug "setpos : (#{self.name}) #{r} #{c} XXX"
      ## adding just in case things are going out of bounds of a parent and no cursor to be shown
      return if r.nil? or c.nil?  # added 2009-12-29 23:28 BUFFERED
      return if r<0 or c<0  # added 2010-01-02 18:49 stack too deep coming if goes above screen
      @window.wmove r,c
    end
267736
function _updateCursorInfo(event, editor) {
        editor = editor || EditorManager.getActiveEditor();

        // compute columns, account for tab size
        var cursor = editor.getCursorPos(true);

        var cursorStr = StringUtils.format(Strings.STATUSBAR_CURSOR_POSITION, cursor.line + 1, cursor.ch + 1);

        var sels = editor.getSelections(),
            selStr = "";

        if (sels.length > 1) {
            //Send analytics data for multicursor use
            HealthLogger.sendAnalyticsData(
                "multiCursor",
                "usage",
                "multiCursor",
                "use"
            );
            selStr = StringUtils.format(Strings.STATUSBAR_SELECTION_MULTIPLE, sels.length);
        } else if (editor.hasSelection()) {
            var sel = sels[0];
            if (sel.start.line !== sel.end.line) {
                var lines = sel.end.line - sel.start.line + 1;
                if (sel.end.ch === 0) {
                    lines--;  // end line is exclusive if ch is 0, inclusive otherwise
                }
                selStr = _formatCountable(lines, Strings.STATUSBAR_SELECTION_LINE_SINGULAR, Strings.STATUSBAR_SELECTION_LINE_PLURAL);
            } else {
                var cols = editor.getColOffset(sel.end) - editor.getColOffset(sel.start);  // end ch is exclusive always
                selStr = _formatCountable(cols, Strings.STATUSBAR_SELECTION_CH_SINGULAR, Strings.STATUSBAR_SELECTION_CH_PLURAL);
            }
        }
        $cursorInfo.text(cursorStr + selStr);
    }
279680
def UpdateColums(self, cursor, field, FieldType, model, columns, UNCHANGED):
        '''
        '''
        table = model.__name__.lower()
        if field not in columns:
            n = UNCHANGED.pop()
            new_sql = f"ALTER TABLE {table} ADD COLUMN {field} {FieldType} AFTER {n}"
            cursor.execute(new_sql)
            print("\n\n", new_sql)
        else:
            UNCHANGED.append(field)

        # We drop the fields in the table not in models
        TCOLS = set(columns)-set(model._fields)
        for col in TCOLS:
            columns.remove(col)
            QRY = f"ALTER TABLE {table} DROP COLUMN {col}"
            cursor.execute(QRY)
            print("\n\n", QRY)

        return True
483056
public static void dumpCurrentRow(Cursor cursor, StringBuilder sb) {
        String[] cols = cursor.getColumnNames();
        sb.append("" + cursor.getPosition() + " {\n");
        int length = cols.length;
        for (int i = 0; i < length; i++) {
            String value;
            try {
                value = cursor.getString(i);
            } catch (SQLiteException e) {
                // assume that if the getString threw this exception then the column is not
                // representable by a string, e.g. it is a BLOB.
                value = "<unprintable>";
            }
            sb.append("   " + cols[i] + '=' + value + "\n");
        }
        sb.append("}\n");
    }
677505
function ()
	{
		var aoColumns = this.s.dt.aoColumns;

		this.s.aoTargets.splice( 0, this.s.aoTargets.length );

		this.s.aoTargets.push( {
			"x":  $(this.s.dt.nTable).offset().left,
			"to": 0
		} );

		var iToPoint = 0;
		for ( var i=0, iLen=aoColumns.length ; i<iLen ; i++ )
		{
			/* For the column / header in question, we want it's position to remain the same if the
			 * position is just to it's immediate left or right, so we only incremement the counter for
			 * other columns
			 */
			if ( i != this.s.mouse.fromIndex )
			{
				iToPoint++;
			}

			if ( aoColumns[i].bVisible )
			{
				this.s.aoTargets.push( {
					"x":  $(aoColumns[i].nTh).offset().left + $(aoColumns[i].nTh).outerWidth(),
					"to": iToPoint
				} );
			}
		}

		/* Disallow columns for being reordered by drag and drop, counting right to left */
		if ( this.s.fixedRight !== 0 )
		{
			this.s.aoTargets.splice( this.s.aoTargets.length - this.s.fixedRight );
		}

		/* Disallow columns for being reordered by drag and drop, counting left to right */
		if ( this.s.fixed !== 0 )
		{
			this.s.aoTargets.splice( 0, this.s.fixed );
		}
	}
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()
158742
function removeRow(opts: Options, change: Change, at: number): Change {
    const { value } = change;
    const { startKey } = value;

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

    let rowKey;
    if (typeof at === 'undefined') {
        rowKey = pos.row.key;
    } else {
        rowKey = pos.table.nodes.get(at).key;
    }

    return removeRowByKey(opts, change, rowKey);
}
1048622
private void disablePKFields() {

        for (int i = 0; i < primaryKeys.length; i++) {
            komponente[pkColIndex[i]].setEditable(false);
        }    // end of for (int i=0; i<columns.length; i++)
    }
66926
function (coords) {
      var row;
      if (priv.dataType === 'array') {
        row = [];
        for (var c = 0; c < self.colCount; c++) {
          row.push(null);
        }
      }
      else {
        row = $.extend(true, {}, datamap.getSchema());
      }
      if (!coords || coords.row >= self.rowCount) {
        priv.settings.data.push(row);
      }
      else {
        priv.settings.data.splice(coords.row, 0, row);
      }
    }
1304448
def update_cursor(self, dc, grid, row, col):
        """"""

        old_row, old_col = self.old_cursor_row_col

        bgcolor = get_color(config["background_color"])

        self._draw_cursor(dc, grid, old_row, old_col,
                          pen=wx.Pen(bgcolor), brush=wx.Brush(bgcolor))
        self._draw_cursor(dc, grid, row, col)
986282
function (coords, toCoords) {
      if (priv.dataType === 'object' || priv.settings.columns) {
        throw new Error("cannot remove column with object data source or columns option specified");
      }
      var r = 0;
      if (!coords || coords.col === self.colCount - 1) {
        for (; r < self.rowCount; r++) {
          priv.settings.data[r].pop();
        }
      }
      else {
        var howMany = toCoords.col - coords.col + 1;
        for (; r < self.rowCount; r++) {
          priv.settings.data[r].splice(coords.col, howMany);
        }
      }
    }
862559
function (instance, td, row, col, prop, keyboardProxy, isCancelled, ctrlDown) {
    if (texteditor.triggerOnlyByDestroyer) {
      return;
    }
    if (texteditor.isCellEdited) {
      texteditor.isCellEdited = false;
      var val;
      if (isCancelled) {
        val = [
          [texteditor.originalValue]
        ];
      }
      else {
        val = [
          [$.trim(keyboardProxy.val())]
        ];
      }
      if (ctrlDown) { //if ctrl+enter and multiple cells selected, behave like Excel (finish editing and apply to all cells)
        var sel = instance.handsontable('getSelected');
        instance.populateFromArray({row: sel[0], col: sel[1]}, val, {row: sel[2], col: sel[3]}, false, 'edit');
      }
      else {
        instance.populateFromArray({row: row, col: col}, val, null, false, 'edit');
      }
    }
    keyboardProxy.off(".editor");
    $(td).off('.editor');

    keyboardProxy.css({
      width: 0,
      height: 0
    });
    keyboardProxy.parent().addClass('htHidden').css({
      overflow: 'hidden'
    });

    instance.container.find('.htBorder.current').off('.editor');
    instance.rootElement.triggerHandler('finishediting.handsontable');
  }
966877
def set_cursor(self, col, row):
        """"""
        # Clamp row to the last row of the display.
        if row > self._lines:
            row = self._lines - 1
        # Set location.
        self.write8(LCD_SETDDRAMADDR | (col + LCD_ROW_OFFSETS[row]))
32315
def cursor_end
    blen = @buffer.rstrip.length
    if blen < @width
      set_form_col blen
    else
      # there is a problem here FIXME. 
      @pcol = blen-@width
      #set_form_col @width-1
      set_form_col blen
    end
    @curpos = blen # this is position in array where editing or motion is to happen regardless of what you see
                   # regardless of pcol (panning)
    #  $log.debug " crusor END cp:#{@curpos} pcol:#{@pcol} b.l:#{@buffer.length} d_l:#{@width} fc:#{@form.col}"
    #set_form_col @buffer.length
  end
1226817
public void moveSQLToField(ResultSet resultset, int iColumn) throws SQLException
    {
        int sResult = resultset.getInt(iColumn);
        if (resultset.wasNull())
            this.setString(Constants.BLANK, false, DBConstants.READ_MOVE);  // Null value
        else
        {
            if ((!this.isNullable()) && (sResult == NAN))
                this.setString(Constants.BLANK, false, DBConstants.READ_MOVE);  // Null value
            else
                this.setValue(sResult, false, DBConstants.READ_MOVE);
        }
    }
117864
def hidden_cursor():
    """"""
    if sys.stdout.isatty():
        _LOGGER.debug('Hiding cursor.')
        print('\x1B[?25l', end='')
        sys.stdout.flush()
    try:
        yield
    finally:
        if sys.stdout.isatty():
            _LOGGER.debug('Showing cursor.')
            print('\n\x1B[?25h', end='')
            sys.stdout.flush()
1070058
def select_field ix0
      if ix0.is_a? Widget
        ix0 = @widgets.index(ix0)
      end
      return if @widgets.nil? or @widgets.empty?
     #$log.debug "inside select_field :  #{ix0} ai #{@active_index}" 
      f = @widgets[ix0]
      return if !f.focusable?
      if f.focusable?
        @active_index = ix0
        @row, @col = f.rowcol
        #$log.debug " WMOVE insdie sele nxt field : ROW #{@row} COL #{@col} " 
        on_enter f
        @window.wmove @row, @col # added RK FFI 2011-09-7 = setpos

        f.set_form_row # added 2011-10-5 so when embedded in another form it can get the cursor
        f.set_form_col # this can wreak havoc in containers, unless overridden

        # next line in field changes cursor position after setting form_col
        # resulting in a bug.  2011-11-25 
        # maybe it is in containers or tabbed panes and multi-containers
        # where previous objects col is still shown. we cannot do this after 
        # setformcol
        #f.curpos = 0 # why was this, okay is it because of prev obj's cursor ?
        repaint
        @window.refresh
      else
        $log.debug "inside select field ENABLED FALSE :   act #{@active_index} ix0 #{ix0}" 
      end
    end