小编The*_*Cat的帖子

在Visual Studio代码中如何在两个本地分支之间合并?

在Visual Studio Code中,我似乎只允许推送,拉取和同步.有文档支持合并冲突,但我无法弄清楚如何在两个分支之间实际合并.VSC中的Git命令行(按F1键)仅显示命令的子集:

VSCode中提供的eGit选项

尝试从备用分支或推送到备用分支会产生:

git命令限制

这是VSCode的Git Visual Studio Code Git文档的文档

我在俯瞰什么?

git visual-studio-code

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

新的C#Span <T>与ArraySegment <T>有何不同?

我无法概念化C#中新Span的用法.

  1. 它取代了哪些结构?ArraySegment现在已经过时了吗?

  2. 以前不支持哪些功能?

  3. Span是C#Arrays的有效替代品吗?在哪些情况下是,在哪些情况下没有?

  4. 我何时使用ArraySegment而不是Span?

我试图了解我的编码样式将如何更改以有效使用新的Span.

c# .net-core

25
推荐指数
3
解决办法
4247
查看次数

如何使用Visual Studio在线持续交付部署内部部署

我的团队使用Visual Studio Online("VSO")来管理我们的ALM.

我们已经有一个按钮构建过程,用于从我们的本地Git仓库(远程)构建代码,并将其部署到Azure上的Microsoft Azure网站.

除此之外,我们还希望通过按下按钮构建和部署本地开发测试环境.

从VSO的ALM生态系统中将自动化的本地开发测试部署集成到我们的开发流程中的最佳方法是什么?

[我们也拥有TFS 2012 - 有没有办法从VSO利用它来驱动我们的VSO git仓库的内部部署构建部署?]

continuous-integration continuous-deployment continuous-delivery azure-devops

11
推荐指数
1
解决办法
8791
查看次数

Knockout.js - 简单的"Hello World"失败

我正在为knockout js做一个非常简单的hello世界(来自http://goo.gl/lddLl):但是我的代码产生了一个我不明白的错误.

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>AJAX Example</title>
    <script src="../Scripts/jquery-2.0.3.js"></script>
    <script src="../Scripts/knockout-3.0.0.debug.js"></script>

    <script>

        // Here's my data model
        var ViewModel = function (first, last) {
            this.firstName = ko.observable(first);
            this.lastName = ko.observable(last);

            this.fullName = ko.computed(function () {
                // Knockout tracks dependencies automatically. It knows that fullName depends on firstName and lastName, because these get called when evaluating fullName.
                return this.firstName() + " " + this.lastName();
            }, this);
        };

        ko.applyBindings(new ViewModel("Planet", "Earth")); // This makes Knockout get to …
Run Code Online (Sandbox Code Playgroud)

javascript knockout.js

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

NancyFx单元测试如何通过测试浏览器传递浏览器路由参数?

我试图通过Nancy.Testing.Browser对象传递路由参数(而不是查询参数!).我理解(现在)如何向/从我的NancyModule发送和使用查询字符串:

var customerResponse = browser.Get("/customer/id", with =>
{
    with.HttpRequest();
    with.Query("{id}", alansIdGuid.ToString());
});
Run Code Online (Sandbox Code Playgroud)

...

Get["/customer/{id}"] = parameters =>
{
    string idFromQuery = Request.Query.id;
    Customer customerFromId = _customerRepo.GetCustomerById(idFromQuery);
    return Response.AsJson<Customer>(customerFromId);
};
Run Code Online (Sandbox Code Playgroud)

但是 - 我想要做的是点击我的路线并检索我的路线参数,如下所示:

Get["/customer/{id}"] = parameters =>
{
    string id = parameters.id;
    Customer customerFromId = _customerRepo.GetCustomerById(id);
    return Response.AsJson<Customer>(customerFromId);
};  
Run Code Online (Sandbox Code Playgroud)

如何使用Nancy.Testing.Browser将我的Id参数作为路由参数传递?

- 没有使用标题,Cookie或查询字符串?

这是一个3小时的搜索看似简单的任务!以下问题围绕这个问题展开,但不解决它:

从测试发送参数到Nancy模块

NancyFX:带有查询字符串参数的路由始终返回404 NotFound

为什么没有查询参数传递给我的NancyFX模块?

unit-testing nancy

4
推荐指数
1
解决办法
1486
查看次数

在 Windows 上的 git Git 中忽略文件名大小写更改

我有一个 reactjs 应用程序,我正在将所有文件名规范化为小写以符合Nodejs 最佳实践

但是,当我在 Visual Studio Code 中更改文件名时,git 会忽略这些更改,因此我无法提交更改。

我按照此处概述的步骤关闭了 git 的默认文件大小写忽略 Windows,但在我确认它被切换为关闭后没有任何变化——我的文件名发生了更改,但 git 不接受更改以允许我提交它们。切换分支会重置我所做的文件名大小写更改。

如何在 git 中提交对文件名大小写的更改?

git filenames windows-10 visual-studio-code

4
推荐指数
2
解决办法
3570
查看次数

在客户端OWIN Web应用程序中实现Azure Active Directory身份验证

您好我已阅读并实施了这些Vittorio Bertocci教程:

"使用Windows Azure AD和Microsoft OWIN组件保护ASP.NET Web API"

"使用Microsoft.Owin.Security.ActiveDirectory保护自托管API"

然而,与教程不同,我的Web应用程序由以下OWIN组件组成:NancyFx和ASP.NET Web API(遵循此处所述的体系结构模式)当我尝试将AAD身份验证(如Bertocci先生在其教程中所做的)实现到我的身份时NancyFx模块(用于验证访问需要身份验证的路由的用户):

我收到以下错误

附加信息:加载交互式用户身份验证所需的程序集失败.确保程序集"Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35"存在.

显然,弹出的要求用户登录的AAD对话框依赖于WindowsForms,不应该从Web应用程序调用.

我应该使用什么AAD凭证提示?如何在Web应用程序客户端中实现AAD身份验证?

authentication nancy owin katana azure-active-directory

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