在具有缩放事件的 内的两个元素之间放置一条线?

2024-02-16

我有这段代码,并且我有一个算法可以将线放在两个之间nodes。我想要这条线加入#nodo4#nodo6, the rectanglesnodes并且每个都有与其相同的名字id.

代码有点长,但实现这一点的重要部分在这里:

setTimeout(() => {
    let source = d3.select("#node4");
    let target = d3.select("#node6");
    source.datum(source.node().getBoundingClientRect())
        .attr('nodeX', d => d.x + d.width / 2)
        .attr('nodeY', d => d.y + d.height / 2)

    target.datum(target.node().getBoundingClientRect())
        .attr('nodeX', d => d.x + d.width / 2)
        .attr('nodeY', d => d.y + d.height / 2)

    d3.select("#g_main").append("line")
        .style("stroke", "black") // colour the line
        .attr("x1", source.attr('nodeX')) // x position of the first end of the line
        .attr("y1", source.attr('nodeY')) // y position of the first end of the line
        .attr("x2", target.attr('nodeX')) // x position of the second end of the line
        .attr("y2", target.attr('nodeY')); // y position of the second end of the line

}, 5000)

但考虑到我可以不断缩放和平移,我无法让线条出现在应有的位置。 我想要一个动态解决方案,因为将来我想放置一条连接到其他节点的线,并且我想做这个动态计算。 我究竟做错了什么?

var width = 960,
    height = 800;
var i = 0,
    duration = 750,
    rectW = 100,
    rectH = 30;
var tree = d3.layout.tree().nodeSize([220, 40]);
var diagonal = d3.svg.diagonal()
    .projection(function(d) {
        return [d.x + rectW / 2, d.y + rectH / 2];
    });

var svg = d3.select("#body").append("svg").attr("width", 1000).attr("height", 1000).style("border", "1px solid red")
    .call(zm = d3.behavior.zoom().scaleExtent([0.3, 3]).on("zoom", redraw)).append("g").attr("id", "g_main")
    .attr("transform", "translate(" + 350 + "," + 20 + ")");

//necessary so that zoom knows where to zoom and unzoom from
zm.translate([350, 20]);


var root = {
    "name": "node6",
    "children": [{
            "name": "node5",
            "respuesta": "SI",
            "children": [{
                "name": "node4",
                "children": [{
                    "name": "node3"
                }]
            }]
        }, {
            "name": "node2",
            "respuesta": "NO"
        },

        {
            "name": "node1",
            "respuesta": "SI"
        }
    ]
}
root.x0 = 0;
root.y0 = height / 2;
root.children.forEach(collapse);
update(root);


root.x0 = 0;
root.y0 = height / 2;

setTimeout(() => {
    let source = d3.select("#node4");
    let target = d3.select("#node6");
    source.datum(source.node().getBoundingClientRect())
        .attr('nodeX', d => d.x + d.width / 2)
        .attr('nodeY', d => d.y + d.height / 2)

    target.datum(target.node().getBoundingClientRect())
        .attr('nodeX', d => d.x + d.width / 2)
        .attr('nodeY', d => d.y + d.height / 2)

    d3.select("#g_main").append("line")
        .style("stroke", "black") // colour the line
        .attr("x1", source.attr('nodeX')) // x position of the first end of the line
        .attr("y1", source.attr('nodeY')) // y position of the first end of the line
        .attr("x2", target.attr('nodeX')) // x position of the second end of the line
        .attr("y2", target.attr('nodeY')); // y position of the second end of the line

}, 5000)

function collapse(d) {
    if (d.children) {
        d._children = d.children;
        d._children.forEach(collapse);
        // d.children = null;
    }
}

root.children.forEach(collapse);
update(root);

d3.select("#body").style("height", "800px");

function update(source) {

    // Compute the new tree layout.
    var nodes = tree.nodes(root).reverse(),
        links = tree.links(nodes);

    // Normalize for fixed-depth.
    nodes.forEach(function(d) {
        d.y = d.depth * 180;
    });

    // Update the nodes…
    var node = svg.selectAll("g.node")
        .data(nodes, function(d) {
            return d.id || (d.id = ++i);
        });

    // Enter any new nodes at the parent's previous position.
    var nodeEnter = node.enter().append("g")
        .attr("class", "node")
        .attr("transform", function(d) {
            return "translate(" + source.x0 + "," + source.y0 + ")";
        })

    nodeEnter.append("rect")
        .attr("id", function(d) {
            return "node" + d.id
        })
        .attr("width", rectW)
        .attr("height", rectH)
        .attr("stroke", "white")
        .attr("stroke-width", 1)
        .style("fill", function(d) {
            return d._children ? "lightsteelblue" : "#fff";
        });

    nodeEnter.append("image").attr("href", "plus-flat.png").attr("width", (d) => {
        let length = 0;
        if (d.children) {
            length = d.children.length;
        } else {
            length = 0;
        }
        if (d.name == "INICIO" && length == 0) {
            return 0;
        } else if (d.name == "INICIO" && length != 0) {
            return 0;
        } else {
            return 25;
        }

    }).style("transform", "translate(65px, -10px)")
    nodeEnter.append("text")
        .attr("x", rectW / 2)
        .attr("y", rectH / 2)
        .attr("dy", ".35em")
        .text(function(d) {
            return d.name;
        })



    // Transition nodes to their new position.
    var nodeUpdate = node.transition()
        .duration(duration)
        .attr("transform", function(d) {
            return "translate(" + d.x + "," + d.y + ")";
        });

    nodeUpdate.select("rect")
        .attr("width", rectW)
        .attr("height", rectH)
        .attr("stroke", "black")
        .attr("stroke-width", 1)
        .style("fill", function(d) {
            return d._children ? "lightsteelblue" : "#fff";
        });

    nodeUpdate.select("text")
        .style("fill-opacity", 1);

    // Transition exiting nodes to the parent's new position.
    var nodeExit = node.exit().transition()
        .duration(duration)
        .attr("transform", function(d) {
            return "translate(" + source.x + "," + source.y + ")";
        })
        .remove();

    nodeExit.select("rect")
        .attr("width", rectW)
        .attr("height", rectH)
        //.attr("width", bbox.getBBox().width)""
        //.attr("height", bbox.getBBox().height)
        .attr("stroke", "black")
        .attr("stroke-width", 1);

    nodeExit.select("text");

    // Update the links…
    var link = svg.selectAll("path.link")
        .data(links, function(d) {
            return d.target.id;
        });

    // Enter any new links at the parent's previous position.
    link.enter().insert("path", "g")
        .attr("class", "link")
        .style("stroke", (d) => {
            let respuesta = d.target.respuesta;
            if (respuesta == "SI") {
                return "#2a8841";
            } else if (respuesta == "NO") {
                return "#d44646";

            } else {
                return "#b7b7b7";
            }
        })
        .attr("x", rectW / 2)
        .attr("y", rectH / 2)
        .attr("d", function(d) {
            var o = {
                x: source.x0,
                y: source.y0
            };
            return diagonal({
                source: o,
                target: o
            });
        });


    // Transition links to their new position.
    link.transition()
        .duration(duration)
        .attr("d", diagonal);

    // Transition exiting nodes to the parent's new position.
    link.exit().transition()
        .duration(duration)
        .attr("d", function(d) {
            var o = {
                x: source.x,
                y: source.y
            };
            return diagonal({
                source: o,
                target: o
            });
        })
        .remove();
    link.append("text").text("otros")

    // Stash the old positions for transition.
    nodes.forEach(function(d) {
        d.x0 = d.x;
        d.y0 = d.y;
    });
}

// Toggle children on click.
function click(d) {
    if (d.children) {
        d._children = d.children;
        d.children = null;
    } else {
        d.children = d._children;
        d._children = null;
    }
    update(d);
}

//Redraw for zoom
function redraw() {
    //console.log("here", d3.event.translate, d3.event.scale);
    svg.attr("transform",
        "translate(" + d3.event.translate + ")" +
        " scale(" + d3.event.scale + ")");
}
.node {
    cursor: pointer;
}
.node circle {
    fill: #fff;
    stroke: steelblue;
    stroke-width: 1.5px;
}
.node text {
    font: 10px sans-serif;
}
.link {
    fill: none;
    stroke: #ccc;
    stroke-width: 1.5px;
}

body {
    overflow: hidden;
}
<script src="https://d3js.org/d3.v3.js"></script>
<div id="body"></div>

预期结果,如下所示:


不要覆盖datum源和目标。这意味着您将无法重绘树,因为您覆盖了它所需的所有值。

Also, don't use getBoundingClientRect()。如果缩放或平移会怎样?它会扭曲,并且线永远不会位于正确的位置。

相反,依赖于您已经提供给节点的数据,您已经拥有它,并且可以通过调用来访问它.datum()毫无争议!然后,计算节点的位置就没有问题,并且无论缩放或滚动,在您想要的位置精确添加一条线也没有问题。

var width = 960,
  height = 800;
var i = 0,
  duration = 750,
  rectW = 100,
  rectH = 30;
var tree = d3.layout.tree().nodeSize([220, 40]);
var diagonal = d3.svg.diagonal()
  .projection(function(d) {
    return [d.x + rectW / 2, d.y + rectH / 2];
  });

var svg = d3.select("#body").append("svg").attr("width", 1000).attr("height", 1000).style("border", "1px solid red")
  .call(zm = d3.behavior.zoom().scaleExtent([0.3, 3]).on("zoom", redraw)).append("g").attr("id", "g_main")
  .attr("transform", "translate(" + 350 + "," + 20 + ")");

//necessary so that zoom knows where to zoom and unzoom from
zm.translate([350, 20]);


var root = {
  "name": "node6",
  "children": [{
      "name": "node5",
      "respuesta": "SI",
      "children": [{
        "name": "node4",
        "children": [{
          "name": "node3"
        }]
      }]
    }, {
      "name": "node2",
      "respuesta": "NO"
    },

    {
      "name": "node1",
      "respuesta": "SI"
    }
  ]
}
root.x0 = 0;
root.y0 = height / 2;
root.children.forEach(collapse);
update(root);


root.x0 = 0;
root.y0 = height / 2;

setTimeout(() => {
  let source = d3.select("#node4").datum();
  let target = d3.select("#node6").datum();

  d3.select("#g_main").append("line")
    .style("stroke", "black") // colour the line
    .attr("x1", source.x0 + rectW / 2) // x position of the first end of the line
    .attr("y1", source.y0) // y position of the first end of the line
    .attr("x2", target.x0 + rectW / 2) // x position of the second end of the line
    .attr("y2", target.y0 + rectH); // y position of the second end of the line

}, 1000)

function collapse(d) {
  if (d.children) {
    d._children = d.children;
    d._children.forEach(collapse);
    // d.children = null;
  }
}

root.children.forEach(collapse);
update(root);

d3.select("#body").style("height", "800px");

function update(source) {

  // Compute the new tree layout.
  var nodes = tree.nodes(root).reverse(),
    links = tree.links(nodes);

  // Normalize for fixed-depth.
  nodes.forEach(function(d) {
    d.y = d.depth * 180;
  });

  // Update the nodes…
  var node = svg.selectAll("g.node")
    .data(nodes, function(d) {
      return d.id || (d.id = ++i);
    });

  // Enter any new nodes at the parent's previous position.
  var nodeEnter = node.enter().append("g")
    .attr("class", "node")
    .attr("transform", function(d) {
      return "translate(" + source.x0 + "," + source.y0 + ")";
    })

  nodeEnter.append("rect")
    .attr("id", function(d) {
      return "node" + d.id
    })
    .attr("width", rectW)
    .attr("height", rectH)
    .attr("stroke", "white")
    .attr("stroke-width", 1)
    .style("fill", function(d) {
      return d._children ? "lightsteelblue" : "#fff";
    });

  nodeEnter.append("image").attr("href", "plus-flat.png").attr("width", (d) => {
    let length = 0;
    if (d.children) {
      length = d.children.length;
    } else {
      length = 0;
    }
    if (d.name == "INICIO" && length == 0) {
      return 0;
    } else if (d.name == "INICIO" && length != 0) {
      return 0;
    } else {
      return 25;
    }

  }).style("transform", "translate(65px, -10px)")
  nodeEnter.append("text")
    .attr("x", rectW / 2)
    .attr("y", rectH / 2)
    .attr("dy", ".35em")
    .text(function(d) {
      return d.name;
    })



  // Transition nodes to their new position.
  var nodeUpdate = node.transition()
    .duration(duration)
    .attr("transform", function(d) {
      return "translate(" + d.x + "," + d.y + ")";
    });

  nodeUpdate.select("rect")
    .attr("width", rectW)
    .attr("height", rectH)
    .attr("stroke", "black")
    .attr("stroke-width", 1)
    .style("fill", function(d) {
      return d._children ? "lightsteelblue" : "#fff";
    });

  nodeUpdate.select("text")
    .style("fill-opacity", 1);

  // Transition exiting nodes to the parent's new position.
  var nodeExit = node.exit().transition()
    .duration(duration)
    .attr("transform", function(d) {
      return "translate(" + source.x + "," + source.y + ")";
    })
    .remove();

  nodeExit.select("rect")
    .attr("width", rectW)
    .attr("height", rectH)
    //.attr("width", bbox.getBBox().width)""
    //.attr("height", bbox.getBBox().height)
    .attr("stroke", "black")
    .attr("stroke-width", 1);

  nodeExit.select("text");

  // Update the links…
  var link = svg.selectAll("path.link")
    .data(links, function(d) {
      return d.target.id;
    });

  // Enter any new links at the parent's previous position.
  link.enter().insert("path", "g")
    .attr("class", "link")
    .style("stroke", (d) => {
      let respuesta = d.target.respuesta;
      if (respuesta == "SI") {
        return "#2a8841";
      } else if (respuesta == "NO") {
        return "#d44646";

      } else {
        return "#b7b7b7";
      }
    })
    .attr("x", rectW / 2)
    .attr("y", rectH / 2)
    .attr("d", function(d) {
      var o = {
        x: source.x0,
        y: source.y0
      };
      return diagonal({
        source: o,
        target: o
      });
    });


  // Transition links to their new position.
  link.transition()
    .duration(duration)
    .attr("d", diagonal);

  // Transition exiting nodes to the parent's new position.
  link.exit().transition()
    .duration(duration)
    .attr("d", function(d) {
      var o = {
        x: source.x,
        y: source.y
      };
      return diagonal({
        source: o,
        target: o
      });
    })
    .remove();
  link.append("text").text("otros")

  // Stash the old positions for transition.
  nodes.forEach(function(d) {
    d.x0 = d.x;
    d.y0 = d.y;
  });
}

// Toggle children on click.
function click(d) {
  if (d.children) {
    d._children = d.children;
    d.children = null;
  } else {
    d.children = d._children;
    d._children = null;
  }
  update(d);
}

//Redraw for zoom
function redraw() {
  //console.log("here", d3.event.translate, d3.event.scale);
  svg.attr("transform",
    "translate(" + d3.event.translate + ")" +
    " scale(" + d3.event.scale + ")");
}
.node {
  cursor: pointer;
}

.node circle {
  fill: #fff;
  stroke: steelblue;
  stroke-width: 1.5px;
}

.node text {
  font: 10px sans-serif;
}

.link {
  fill: none;
  stroke: #ccc;
  stroke-width: 1.5px;
}

body {
  overflow: hidden;
}
<script src="https://d3js.org/d3.v3.js"></script>
<div id="body"></div>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在具有缩放事件的 内的两个元素之间放置一条线? 的相关文章

  • 使用 d3 在两个节点之间绘制多条边

    我一直在关注 Mike Bostock 的代码这个例子 http bl ocks org 1153292学习如何在 d3 中绘制有向图 并且想知道如何构建代码 以便可以在图中的两个节点之间添加多个边 例如 如果上例中的数据集定义为 var
  • d3.js V4 按钮缩放实现表现得很奇怪

    我正在尝试实现 d3 平移和缩放功能 默认的平移和缩放工作正常 但要求是我们还需要放大和缩小按钮 我还实现了缩放按钮 它也有效 奇怪的是 当我第一次移动图像并单击缩放按钮时 图像会移回到以前的位置 不仅是当我第一次用鼠标缩放并使用按钮再次开
  • d3.js 中拖动后(有时)单击事件未触发

    观察到的行为 我正在使用 d3 js 并且我想根据以下情况更新一些数据drag https github com mbostock d3 wiki Drag Behavior wiki on事件 并重绘事件之后的所有内容dragend ht
  • 如何在 d3.scale.ordinal() 中指定域?

    var W 100 var H 200 var data v 4 v 8 v 15 v 16 v 23 v 42 var x d3 scale linear domain 0 max x range 0 W var y d3 scale o
  • 需要帮助在 D3.js 条形图中将 x 轴刻度与条形对齐

    我有一个可用的线性条形图D3 js http d3js org 它也有基于时间的 x 轴 条形图绑定到计数属性 而轴绑定到日期属性 轴上的刻度未与条形对齐 知道如何将它们两者排列起来吗 这是 jsFiddle http jsfiddle n
  • 如何使用数据对象中的值指定 d3.js 选择器?

    我在 Web 应用程序中使用 d3 js 描述我想要做的事情的最简单方法是查看下面链接的 Fiddle 但基本设置是我有一个包含数据对象的数组 my data id B text I want this text in B id C tex
  • D3.js 中的点图

    我有兴趣创建一个Dot plot 每个数据值都有连续的点 但到目前为止我所管理的是为每个值创建一个点 更清楚地说 假设对于 array1 我希望第一个值创建 5 个圆圈 第二个值创建 4 个圆圈 依此类推 array1 5 4 2 0 3
  • D3:如何在Groups of Force布局节点上绘制多个凸包?

    我试图在力布局中的所有组上绘制凸包 但我只画出了一半的凸包 当 D3 尝试绘制其余的船体时 控制台返回错误 元素尚未创建 然而 当我检查控制台中的 groups 变量时 所有组数据都在那里 x y 数据都设置得很好 见下图 我什至尝试在ti
  • 使用 D3.js 解析时间序列数据

    是时候寻求帮助了 我已经学习 D3 js 几个星期了 我才开始觉得我理解了其中的 10 哈哈哈 我正在尝试生成一个非常简单的线图 只要数据非常简单 我就可以做到这一点 但我的原始数据源具有 UTC 时间戳和实数 小数 这会导致任何超出简单范
  • D3 旭日弧尺寸

    我正在尝试根据以下示例创建 D3 旭日图 https bl ocks org maybelinot 5552606564ef37b5de7e47ed2b7dc099 https bl ocks org maybelinot 55526065
  • 需要帮助绘制多元线之间的区域 - 而不是从轴到线

    我是 d3 js 的新手 我正在努力填充多元百分位数图中线条之间的区域 我不希望在最底线下方或最顶线上方填充任何区域 第一列始终位于图表的底部 第 5 个百分位 最后一列将始终位于图表的顶部 第 95 个百分位 我需要每条线之间单独的区域段
  • 使用 CSS Grid,从任何地方滚动 div(不使用 jQuery 插件)

    div 怎样才能 scroll content https jsfiddle net blehmanade x1k3rhj7 33 可以从页面上的任何位置滚动吗 现在 scroll content仅当鼠标位于其上方时才可滚动 但是 当鼠标位
  • 如何使 d3 饼图响应式?

    我有一个 PIE 图表 它工作正常 但我无法使其具有响应能力和可调整大小 我需要它与移动浏览器和 iPad 等兼容 div div
  • D3 将现有 SVG 字符串(或元素)追加(插入)到 DIV

    我到处寻找这个问题的答案 并找到了一些我认为可能有用的资源 但最终没有让我找到答案 这里有一些 外部SVG http bl ocks org mbostock 1014829 嵌入SVG https stackoverflow com qu
  • nvd3 格式化日期始终返回 1970-01-01

    我正在尝试使用构建折线图nvd3 for d3js但我在 x 轴上使用日期域时遇到了一些问题 这是我的代码 data lineChart key key1 values x 2014 04 20 y 6 x 2014 04 13 y 5 x
  • 如何避免多系列折线图d3.js的工具提示重叠

    我已经在多系列折线图上创建了工具提示 如下所示在这里回答 https stackoverflow com questions 34886070 d3 js multiseries line chart with mouseover tool
  • d3.js比例符号图:根据数据值设置圆的半径

    我正在遵循这个关于如何使用 d3 js 和 mapbox 制作地图的精彩示例 https franksh com posts d3 mapboxgl https franksh com posts d3 mapboxgl 它工作得很好 除了
  • 获取现有 SVG 元素的属性并使用 d3.js 绑定为数据

    我有一个现有的 svg 元素 例如
  • 将json解析为条形图d3js

    我正在尝试使用 json url 创建条形图 关于印象和时间 我认为我没有正确引用 data data 中的数据 如何从 d3 中的 json 文件访问印象字段 var url https script google com macros
  • 如何进行多个 d3 窗口大小调整事件

    我有三个svg一页上的元素 每个元素都由 D3 陪伴 每个都有自己的页面调整大小逻辑 由我写的简单模块 https github com TimeMagazine d3 base让他们做出反应 问题在于 只有最后一个调整大小事件被触发 因为

随机推荐

  • 为什么 bash errexit 在函数调用中的行为不符合预期?

    在 bash 手册页中 它指出 如果管道 可能由单个简单命令组成 请立即退出 括在括号中的子 shell 命令 或执行的命令之一 用大括号括起来的命令列表的一部分 所以我假设函数应该被视为用大括号括起来的命令列表 但是 如果对函数调用应用条
  • UPS 访问许可证号

    我在用马克桑伯恩 UPS 功能 http www marksanborn net php calculating ups shipping rate with php 使用 php 计算 UPS 运费 在此函数中 您必须更改已定义的变量的一
  • 避免在 DispatchQueue 中使用 self

    我想知道如何消除使用self在 的里面DispatchQueue 作为一个好的实践 我们应该使用self仅在init func loadAllClasses DispatchQueue global qos background async
  • 如何避免在java unirest请求中发送Cookie头?

    我注意到使用unirest https github com Mashape unirest java默认情况下 java 库 cookie 在响应中设置后在请求中发送 就像任何浏览器一样 有什么办法可以避免吗 Example public
  • javascript 获取类型/实例名称

    有没有可靠的方法来获取 JavaScript 对象的实例 例如 依靠假 obj getInstance 功能 var T Q W C function var x new T Q W C console log x getInstance
  • 为什么Java不支持<<<运算符

    为什么Java不支持 lt lt lt 无符号左移 运算符 但确实支持 gt gt gt 无符号右移 运算符 Java添加了运算符 gt gt gt 来执行逻辑右移 但是 因为逻辑和算术左移运算是 完全相同的 Java中没有 from Ja
  • GUI什么时候会过载?

    假设你是永久在 UI 线程 调度程序上异步调用方法 while true uiDispatcher BeginInvoke new Action
  • 使用 KnockoutJS 和 Jquery 对话框时 jQuery 验证失败

    我有一个在 MVC3 中使用 html RenderAction 呈现的表单 除此之外 我有一个与淘汰赛一起使用的 jquery 模板 使用默认的 data val required 属性将模型正确呈现到视图中 不过我注意到 jQuery
  • 如何使条形图自动在不同颜色之间循环?

    In matplotlib 自动绘制颜色循环线 这两条线图将具有不同的颜色 axes plot x1 y axes plot x2 y 然而 条形图则不然 这两个数据系列都有蓝色条 axes bar x1 y axes bar x2 y 如
  • 使用 Perl,如何用逗号替换换行符?

    我放弃了 sed 我听说 Perl 中的它更好 我想要一个可以从 unix 命令行调用并转换 DOS 行结尾的脚本CRLF来自输入文件并在输出文件中用逗号替换它们 like myconvert infile gt outfile 其中 in
  • 警告:解析“显示”值时出错。宣言落空。线路:0

    警告 解析 显示 值时出错 宣言落空 线路 0 我不确定当我留下此警告时会发生什么 因为我在任何页面中都没有看到任何奇怪的行为 我还是想删除它以防万一 有人可以帮我尝试找到解决方案吗 谢谢 EDIT 我刚刚注意到我的 php 脚本中有一个错
  • 在 Eclipse 中抑制 FindBugs 警告

    我使用字符串作为锁 因此想确保该对象是一个新实例 FindBugs 抱怨是因为直接定义字符串 使用双引号 通常更有效 我的代码如下所示 A lock for the list of inputs edu umd cs findbugs an
  • System.Web.HttpException:无法在 DropDownList 中选择多个项目

    在页面加载期间 索引 0 已被选择 然后这段代码语句选择了索引1 dropDownList Items FindByValue myValue Selected true assume myValue is found at index 1
  • XAMPP:如何升级 PEAR

    尝试升级 XAMPP pear 时出现以下错误 Fatal error Cannot use result of built in function in write context in C xampp php pear Archive
  • 干净架构中从网关到框架的依赖关系

    假设我想要实现一个基于 Uncle Bobs Clean Architecture 的 ASP NET 应用程序 据我了解 Asp Net 本身将属于框架圈 Asp Net 控制器位于网关 接口适配器层 我的业务逻辑将位于用例 实体层 依赖
  • NoSQL 数据库 - 日志处理/聚合和汇总的良好候选者? [关闭]

    就目前情况而言 这个问题不太适合我们的问答形式 我们希望答案得到事实 参考资料或专业知识的支持 但这个问题可能会引发辩论 争论 民意调查或扩展讨论 如果您觉得这个问题可以改进并可能重新开放 访问帮助中心 help reopen questi
  • 将自定义元素添加到 ngRepeat 列表

    我正在使用 cordova onsenui angularJs 开发一个移动应用程序 并且对填充 ngRepeat 列表有特殊要求 有些项目可能有附加参数 在这种情况下 我想显示项目的附加信息 完全用新的替代模式 或在下面附加一个新的自定义
  • 两位数[关闭]

    这个问题不太可能对任何未来的访客有帮助 它只与一个较小的地理区域 一个特定的时间点或一个非常狭窄的情况相关 通常不适用于全世界的互联网受众 为了帮助使这个问题更广泛地适用 访问帮助中心 help reopen questions 我需要一个
  • Javascript/Jquery:使用数字范围验证输入

    我想验证预先配置的数字范围内的输入字段 只允许使用 1 到 24 之间的数字 我能怎么做 使用这样的自定义解决方案 field keypress function event var val parseInt this val HERE I
  • 在具有缩放事件的 内的两个元素之间放置一条线?

    我有这段代码 并且我有一个算法可以将线放在两个之间nodes 我想要这条线加入 nodo4与 nodo6 the rectangles是nodes并且每个都有与其相同的名字id 代码有点长 但实现这一点的重要部分在这里 setTimeout