小编Gin*_*ina的帖子

如何在恢复之后挑选承诺?

我正在研究我的工作feature branch,经过审核后,将其合并development到部署中.后来,一位同事决定发布并合并他和我的master.在部署时,他意识到他的代码是错误的并且还原了master.

在我们的fork-and-pull流程中,这意味着现在developmentmaster都被还原.

当我今天早上进来的时候,我按照惯例从发展中重新定位,然后学会了恢复.

现在我正在尝试cherry-pick从原来的工作feature branch只是意识到它给了我"空提交消息",因为恢复.

  1. 这是因为还原是我之前提交的镜像吗?
  2. 有没有办法恢复还原?(让我头痛)
  3. 无论如何,让我的提交出现在差异中,因为我已经重新定位了

任何帮助是极大的赞赏.

git github git-revert git-cherry-pick

6
推荐指数
1
解决办法
3134
查看次数

如何使流图响应(d3.js)?

我正在为我的公司使用d3.js制作流图,我想知道如何使其响应.我的代码与此示例没有太大区别:http://bl.ocks.org/mbostock/4060954

在此输入图像描述

我一直在玩设置viewBox="0 0 height width"preserveAspectRatio = "xMinYMid meet"无济于事.

有什么建议?

javascript graph responsive-design d3.js stream-graph

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

NUnit没有运行我的测试用例

我有一个看起来像的测试用例:

namespace UnitTests

[<TestFixture>]
module ValidatorTests = 

    [<Test>]
    let VerifyBasicFunctionality () = 
        Assert.That(bool)
        Assert.That(bool)
Run Code Online (Sandbox Code Playgroud)

当我尝试在Visual Stuido测试资源管理器中运行它时,没有任何反应(即使使用NUnit 3的测试适配器),只是说"成功构建"并且没有发现任何测试.然后,当我从命令行运行nunit-console runner(尝试使用v.1,v.2,v.4)时,我得到了一些不同的东西:

$ nunit-console4 bin/Release/UnitTests.dll
NUnit version 2.4.8
Copyright (C) 2002-2007 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment - 
   OS Version: Unix 15.6.0.0
  CLR Version: 4.0.30319.42000 ( 4.4.2 (Stable 4.4.2.11/f72fe45 Thu Aug 11 06:03:25 BST 2016) )

.N.N.N
Tests run: 0, Failures: 0, Not run: 3, Time: …
Run Code Online (Sandbox Code Playgroud)

f# nunit unit-testing nunit-console nunit-3.0

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

为什么我的TopoJSON拉杆和长点不显示在我的美国地图上?

我正在使用TopoJSON绘制美国地图上的点数.我认为我的数据格式正确,一切都在加载,状态显示......但我没有分数.控制台没有错误.这是我的脚本:

var width = 800,
height = 500;

var projection = d3.geo.albersUsa()
    .scale(1070)
    .translate([420, height / 2]);

var path = d3.geo.path()
    .projection(projection)
    .pointRadius(1.5);

var svg = d3.select("#map").append("svg")
    .attr("width", width)
    .attr("height", height);

queue()
    .defer(d3.json, "../us.json")
    .defer(d3.json, "../users.json")
    .await(ready);

function ready(error, us, users) {
  svg.append("path")
      .datum(topojson.feature(us, us.objects.land))
      .attr("class", "land")
      .attr("d", path);

     svg.append("path")
          .datum(topojson.mesh(us, us.objects.states, function(a, b) { return a !== b;    }))
          .attr("class", "states")
          .attr("d", path);


    svg.append("path")
          .datum(topojson.feature(users, users.objects.users))
          .attr("class", "points")
          .attr("d", path);
};
Run Code Online (Sandbox Code Playgroud)

我的数据看起来像:

{
    "type": "Topology",
    "transform": {
        "scale": [ …
Run Code Online (Sandbox Code Playgroud)

javascript json d3.js topojson

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

折线图d3 js-- x轴月

我正在尝试做一个简单的折线图,其中包含x轴上1月 - 12月的月份以及我公司网站上发布的y分配数量.我在映射y域时遇到了一些麻烦......基本上理解这个api应该如何工作.我找到了大量的解析日期或数值x轴的例子,但我似乎无法用几个月来解决它.

我用这段代码调整了这么长时间,我甚至不确定我在看什么.

对于一个年轻的菜鸟,非常感谢任何帮助.

这是要点:https://gist.github.com/wiredsister/8148974

我的造型看起来像:

.axis path,
.axis line {
  fill: none;
  stroke: #000;
  shape-rendering: crispEdges;
}

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

.line {
  fill: none;
  stroke: steelblue;
  stroke-width: 1.5px;
}
Run Code Online (Sandbox Code Playgroud)

javascript css svg linechart d3.js

2
推荐指数
1
解决办法
9747
查看次数