小编HG-*_*HG-的帖子

找到同一列/行中的第一个空单元格

我正在尝试制定一个公式,它将为我提供列中第一个空单元格的行号.目前我正在使用:

=MATCH(TRUE, INDEX(ISBLANK(A:A), 0, 0), 0)
Run Code Online (Sandbox Code Playgroud)

这工作正常,除非公式与我正在搜索的列放在同一列中,在这种情况下,它会执行某种循环引用或其他内容.是否有一个我可以使用的公式,当它在搜索时放在同一列中时会起作用?

excel cell match excel-formula

8
推荐指数
1
解决办法
5万
查看次数

如何在子类同名方法中调用父类方法?

我正在尝试使用 ES6 中的类语法创建一个简单的继承结构。我有一个带有方法的父类,比如说update(),还有一个也需要一个方法的子类update()。我想要一个调用来child.update()包含对 的调用parent.update(),以及包含一些特定于子类的附加功能。

我发现在子类中创建此方法似乎会覆盖父类中对该方法的引用,这意味着我无法同时调用这两个方法。

这是一个例子:

class Xmover {
    constructor(x, speedX) {
        this.x = x;
        this.speedX = speedX;
    }

    update() {
        this.x += this.speedX;
    }
}

class XYmover extends Xmover {
    constructor(x, y, speedX, speedY) {
        super(x, speedX);
        this.y = y;
        this.speedY = speedY;
    }

    update() {
        this.y += this.speedY;
        // *** I would like this to also update the x position with a call
        //    to Xmover.update() so I don't have …
Run Code Online (Sandbox Code Playgroud)

javascript class

7
推荐指数
1
解决办法
3642
查看次数

标签 统计

cell ×1

class ×1

excel ×1

excel-formula ×1

javascript ×1

match ×1