小编Ark*_*Ark的帖子

在smartgit中重新定位"git-am正在进行中"

我会尝试解释我遇到的问题.我多次使用rebasegit bash选项.现在我有SmartGit,不知道为什么rebase不正确.

步骤1:

第2步:

第3步:

结果是HEAD分离.

git rebase git-rebase smartgit

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

获取异常""仅当将方法ToList()应用于IQueryable <>时,至少有一个对象必须实现icomparable""

当我不使用ToList()方法查询firsQue时,一切都是"好的!" 但我需要立即执行firsQue!然后我添加到结束ToList()方法并在第二个查询secQue中得到异常"至少有一个对象必须实现IComparable".


我不明白导致它,分组执行g.Action.ActionType.Name ...它的字符串,字符串类型实现IComparer接口

static void Main(string[] args)
{
    var firsQue  = GetAll()
        .SelectMany(s => s.Goals
            .Where(s2 => s2.ID == 2)
             .SelectMany(f => f.Actions
                 .SelectMany(h => h.GoalProgresses))).ToList();


    var secQue = (from g in firsQue  
                        group g by g.Action.ActionType.Name into a
                        select new
                        {
                            Name = a.Key,
                            Duration = a.Sum(s => s.Action.Duration),
                            Done = a.Sum(s => s.DurationComplete),
                            RemainsToDo = (a.Sum(s => s.Action.Duration) - a.Sum(s => s.DurationComplete))
                        })
                         .OrderBy(s => s)
                         .ToList();

    System.Console.ReadLine();
}

static IQueryable<Patient> GetAll()
{
    return db.Patients;
}
Run Code Online (Sandbox Code Playgroud)

}

.net c# linq entity-framework

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

在为WCF服务生成类型时,.NET加载了查找另一个程序集版本

尝试在Visual Studio 2013中向ASP.NET Web应用程序添加服务引用时出现此错误.我在项目中引用了Microsoft.Owin.Security版本2.1.0.0.但是我很沮丧他为什么要寻找2.0.1.0版本?

无法导入wsdl:portType详细信息:运行WSDL导入扩展时抛出异常:System.ServiceModel.Description.DataContractSerializerMessageContractImporter错误:无法加载文件或程序集'Microsoft.Owin.Security,Version = 2.0.1.0,Culture = neutral, PublicKeyToken = 31bf3856ad364e35'或其依赖项之一.该系统找不到指定的文件.

.net c# asp.net wcf wsdl

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

Node.JS 非阻塞 IO 和其他框架,如 ASP.NET MVC 非阻塞 io 通过 async/await

node.js 非阻塞模型和 ASP.NET MVC 非阻塞异步/等待任务之间有什么区别?我的意思是他们以同样的方式成功解决了同样的问题,或者我错过了什么?我认为其他框架在 node 之前有相同的解决方案?

c# asp.net asp.net-mvc node.js

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

淘汰赛,如何订阅observableArray中的每一个变化

你可以帮助我订阅我的可观察收藏品的每次变化和每个项目的变化.没有在http://knockoutjs.com/documentation/observableArrays.html上找到相关信息

$(document).ready(function () {

    var Item = function (isSelected, isEnabled, errorState,
    name, group, processed, errors, state) {
        var self = this;
        self._isSelected = ko.observable(isSelected);
        self._isEnabled = ko.observable(isEnabled);
        self._errorState = ko.observable(errorState);
        self._name = ko.observable(name);
        self._group = ko.observable(group);
        self._processed = ko.observable(processed);
        self._errors = ko.observable(errors);
        self._state = ko.observable(state);
    };

    function ViewModel() {
        var self = this;
        self.SentinelList= ko.observableArray([
        ko.observable(new Item(false, false, false, 'Mail1', 'Mailing', 4, 0, 1)),
        ko.observable(new Item(false, false, false, 'Ident1', 'Identity', 5, 0, 0)),
        ko.observable(new Item(false, false, …
Run Code Online (Sandbox Code Playgroud)

javascript knockout.js

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

SignalR:使用moq框架模拟IHub并测试他的方法

我尝试测试我的自定义RepositoryHub,它继承了基类Hub(实现了IHub接口).我嘲笑了IHub的所有必要属性和我要测试的方法调用.方法调用被模仿为派生自定义类RepositoyHub的调用:
hubMock.Setup(p => p.OnConnected()).Returns(new RepositoryHub().OnConnected());
问题是该方法无法访问模拟的IHub字段.

    [TestMethod]
    public void Is_OnConnected_Successive_When_Instances_is_Absent_And_User_Authenticated()
    {
        try
        {
            var connectionId = "1";

            var request = new Mock<IRequest>();
            request.Setup(s => s.User.Identity.Name).Returns(user + "&" + server + "&" + password + "&" + level);
            request.Setup(s => s.User.Identity.IsAuthenticated).Returns(true);

            var mockClients = new Mock<IHubCallerConnectionContext>();
            var mockGroupManager = new Mock<IGroupManager>();
            var mockHubCallerContext = new Mock<HubCallerContext>(request.Object, connectionId);

            var hubMock = new Mock<IHub>(); 
            hubMock.Setup(p => p.Groups).Returns(mockGroupManager.Object);
            hubMock.Setup(p => p.Context).Returns(mockHubCallerContext.Object);
            hubMock.Setup(p => p.Clients).Returns(mockClients.Object);
            //Mock virtual method call
            hubMock.Setup(p => p.OnConnected()).Returns(new RepositoryHub().OnConnected()); …
Run Code Online (Sandbox Code Playgroud)

c# unit-testing mstest signalr signalr-hub

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

Goroutines 8kb和Windows操作系统线程1 MB

作为Windows用户,我知道操作系统线程占用大约1 Mb的内存,因为如果OS线程更加贪婪,每个内存By default, Windows allocates 1 MB of memory for each thread’s user-mode stack.如何golang使用~8kb的内存goroutine.是goroutine那种虚拟线程的?

windows multithreading go threadpool goroutine

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