小编Soc*_*ers的帖子

Windows 10"驱动程序上的Docker无法在端点上编程外部连接"

我正在尝试$ docker-compose up -d用于项目,并收到此错误消息:

错误:for api无法启动服务api:驱动程序无法在端点dataexploration_api_1上编程外部连接(8781c95937a0a4b0b8da233376f71d2fc135f46aad011401c019eb3d14a0b117):启动userland代理时出错:mkdir /port/tcp:0.0.0.0:9000:tcp:172.19.0.2:80:输入/输出错误在启动项目时遇到错误.

我想知道它是否可能是港口?我以前一直在尝试端口8080.该项目最初是在mac上设置的,我已经从gitHub克隆了存储库.

非常感谢你提前!

windows github windows-10 docker-compose

121
推荐指数
6
解决办法
5万
查看次数

D3使用classed()添加和删除带复选框的类

我无法使用复选框删除我添加的类.选中该复选框以开始.当用户取消选中它时,它会添加一个带有分类('hideRect',true)的"hideRect"类; 这很有效但是当我再次检查该框时,课程不会消失.

这是我的代码:

this.$node.append('input')
    .attr('type', 'checkbox')
    .attr('checked', true)
    .attr('value', 'med')
    .on('click', () => this.updateRectLine());
  }

private updateRectLine() {

  //var rect = this.$node.getElementsByClassName('.MEDICATION');
  var cbMed = this.$node.attr("checked");
  if (cbMed !== true){
      this.$node.selectAll(".MEDICATION").classed('hideRect', true);
  }

  else if (cbMed == true){
      this.$node.selectAll(".MEDICATION").classed('hideRect', false);
  }
Run Code Online (Sandbox Code Playgroud)

}

提前致谢!

javascript checkbox d3.js

3
推荐指数
1
解决办法
6044
查看次数

获取多个数组中给定索引处所有元素的平均值

我有大约 300 个数组,每个数组都有 100 个 x 和 y 值数组。我想为 300 个数组的 y 值获得一个 100 均值的数组。做这个的最好方式是什么?我相信我应该使用某种减少但有点迷失。这是我到目前为止所拥有的:

let yval = cohort.map((d, i) => {
    let bin = d3.nest()
        .key(function(d) {
            return i;
        })
        .rollup(function(d) {
            return d;
        })
        .entries(d);

    return bin;
});

console.log(yval);
Run Code Online (Sandbox Code Playgroud)

'cohort' 是一个对象数组。我想隔离每个群组对象中的“bins”数组。每个元素的长度为 117 个元素。对于每个 bins[i],我想从所有 bins 中得到 [i] 的平均值。我想基本上把117的300个数组变成一个117个数组。任何帮助将不胜感激!

javascript arrays reduce d3.js

3
推荐指数
1
解决办法
101
查看次数

添加脚本以查找for循环的最小值c#

我正在添加到我的for循环中,以便在解析文本文件时找到数组中的最小值和最大值.找到最大值很容易,但是对于最小值,我得到零值,它应该是1.这是我用于循环的东西 - (我到目前为止,我只是测试得到最小的温度. X)

       for (int i = 0; i < lineCount; i++) {

        string line = dataLines [i];
        lineValues = line.Split (' ');

        Vector4 temp = new Vector4 ();
        Vector3 center = new Vector3 ();

        temp.x = float.Parse (lineValues [0]);

        maxvalueX = float.MinValue;
        minvalueX = float.MaxValue;

        if (temp.x > maxvalueX) { maxvalueX = temp.x; } 
        if (temp.x < minvalueX) { minvalueX = temp.x; }

        temp.y = float.Parse (lineValues [1]);
            if (temp.y > maxvalueY) { maxvalueY = temp.y; }

        temp.z …
Run Code Online (Sandbox Code Playgroud)

c# arrays min unity-game-engine

0
推荐指数
1
解决办法
279
查看次数