小编Ban*_*San的帖子

Visual Studio不编译TypeScript

我有一个Visual Studio项目,其结构如下:

文件夹结构

tsconfig.json看起来像:

{
  "compilerOptions": {
    "noImplicitAny": false,
    "noEmitOnError": true,
    "removeComments": false,
    "sourceMap": true,
    "target": "es5",
    "outDir": "../wwwroot/"
  },
  "exclude": [
    "node_modules",
    "wwwroot"
  ]
}
Run Code Online (Sandbox Code Playgroud)

但是,VS没有编译app.tswwwroot文件夹中.

我错过了什么?

visual-studio typescript visual-studio-2015 asp.net-core

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

Razor 页面可以放入 Pages 之外的任何其他目录吗?

使用 ASP.NET Core 中的新 Razor Pages,如果Pages文件夹特殊(例如该Controllers文件夹),或者可以将其配置为使用其他目录吗?

我并不是建议我想要这样做,只是想了解这个框架。

.net asp.net-core-mvc asp.net-core asp.net-core-2.0

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

“记忆压力”是什么意思?

阅读Tess Ferrandez关于垃圾收集的博客,她说收集有 3 种可能的原因:

  1. 当您分配一个新对象并且达到第 0 代预算时,即新对象是否会导致其超出预算。
  2. 当有人调用 GC.Collect (Induced GC)
  3. 基于内存压力

我理解第 1 点和第 2 点,但是第 3 点中的内存压力是什么意思?

我原以为这是系统中可用的通用内存,但如果系统真的用光了所有内存,那么我想整个系统都会蓝屏。

内存压力实际上是什么意思?它与超过一代人的预算有何不同?

.net windows clr garbage-collection memory-management

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

!DumpStackObjects显示重复的实例?

我有一个小测试程序.当我查看主要线程的堆栈对象时,它MyClass在那里显示两次.任何想法为什么MyClass堆栈上有两个对象?

class Program  
{  
    struct MyStruct  
    {  
        int x;  
        int y;  
    }  

    class MyClass 
    {  
        int x;  
        int y;  
    }  


    static void Main(string[] args)  
    {  
        MyStruct s ;  
        MyClass c = new MyClass();  
    }  
}  
Run Code Online (Sandbox Code Playgroud)
0:000> !DumpStackObjects  
OS Thread Id: 0xf74 (0)  
RSP/REG          Object           Name  
000000000023e9e8 00000000028f3c90 ConsoleApplication2.Program+MyClass  
000000000023e9f8 00000000028f3c90 ConsoleApplication2.Program+MyClass  
000000000023ea10 00000000028f3c70 System.Object[]    (System.String[])  
000000000023eb98 00000000028f3c70 System.Object[]    (System.String[])  
000000000023ed80 00000000028f3c70 System.Object[]    (System.String[])  
000000000023eda8 00000000028f3c70 System.Object[]    (System.String[])  
Run Code Online (Sandbox Code Playgroud)

.net c# windbg sos

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

如何在Visual Studio 2012 Web Express中提交数据库表更改?

这可能很明显,但我看不到。

我正在使用Visual Studio 2012 Web Express。我使用内部编辑器打开一个现有的数据库表,转到表定义并添加几个额外的列。

我可以看到创建表的T-SQL,如果保存表,则会提示保存SQL文件,如果运行SQL,则是创建表...

如何更改现有表?我真的必须手动执行此操作吗?

t-sql sql-server visual-studio visual-studio-2012

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

重复"从现在开始的异步会话清理阶段"

当我运行我的测试套装时,我发现间歇性的一些文本将会持续长时间(15分钟到半小时),PhantomJS会不断报告:

Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting NOW
Asynchronous Sessions cleanup phase starting …
Run Code Online (Sandbox Code Playgroud)

testing headless-browser phantomjs

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

在 Git 中恢复移动文件的历史记录

如果文件的名称和内容已更改,是否可以在提交后标记移动?

例如

  1. file1.txt更改为file2.txt和内容更改。
  2. git commit
  3. Git 认为file1.txt已被删除并且file2.txt是一个不相关的新文件。

有没有办法在提交发生后将其标记为重命名?

git version-control

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

为什么我的第一个snippit工作,但我的第二个没有?

我正在尝试将点击事件发送到<div />jQuery中的新事件.以下snippit工作(当我点击div时,我看到'clicked'消息)但是,第二个没有.

谁能告诉我为什么?

工作片段:

'use strict';

(function () {
    $(document).ready(function () {
        var $display = $('#display'),
            $drawingArea = $('<div />')
                .attr('id', 'drawing-area')
                .click(function() {
                    alert('clicked');
                });

        $display.wrap($drawingArea);
    })
})();
Run Code Online (Sandbox Code Playgroud)

不工作的片段:( 警告"准备好"被触发,但不是点击')

'use strict';

(function () {
    $(document).ready(function () {
        var $display = $('#display'),
            $drawingArea = $('<div />')
                .attr('id', 'drawing-area');
        $display.wrap($drawingArea);

        $drawingArea.ready(function() {
            alert('ready');
            $drawingArea.click(function() {
                alert('clicked');
            })
        });

    })
})();
Run Code Online (Sandbox Code Playgroud)

更新

刚试过以下内容:

(function () {
    $(document).ready(function () {
        var $display = $('#display'),
            $drawingArea = $('<div />')
                .attr('id', 'drawing-area'); …
Run Code Online (Sandbox Code Playgroud)

javascript jquery dom

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

Teamcity:无法对代理执行签出:无法在路径 C:\Program Files (x86)\Git\bin\sh.exe 运行 git

当我运行构建时,它失败并出现错误:

Failed to perform checkout on agent: Unable to run git at path C:\Program Files (x86)\Git\bin\sh.exe
Run Code Online (Sandbox Code Playgroud)

路径正确,我可以运行该文件,并且 Teamcity 正在使用我的登录帐户。

我是否需要在某个地方设置更多凭据,或以管理员权限启动服务?

我在 Windows 8 中运行。

git teamcity windows-8 teamcity-8.0

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

COMException未知错误(0x80005000) - DirectoryServices

我在我的一个应用程序上遇到错误,每个月发生几次,但本周发生了两次.当这种情况发生时,第一个用户加载应用程序并开始工作时,它总是第一件事(Web应用程序,3-4个内部用户)错误源于这个非常简单的方法,一旦失败,它将无法工作,直到我重启应用程序池.现在,我也以其他方式查询AD,但这是用户在早上开始工作时调用的第一个AD相关方法.

public DomainUser GetDomainUser(string userLoginName)
    {
        using (PrincipalContext context = new PrincipalContext(ContextType.Domain, this.DomainName))
        {
            using (UserPrincipal user = UserPrincipal.FindByIdentity(context, userLoginName))
            {
                // If user is null, the result is not a UserPrinciple
                if (user != null)
                {
                    string firstName = user.GivenName;
                    string middleName = user.MiddleName;
                    string lastName = user.Surname;
                    int empId = Convert.ToInt32(user.EmployeeId);
                    string emailAddr = user.EmailAddress;
                    string userName = user.SamAccountName;
                    DateTime? accountExp = user.AccountExpirationDate;

                    return new DomainUser
                    {
                        FirstName = firstName,
                        MiddleName = middleName,
                        LastName = lastName,
                        EmployeeId = …
Run Code Online (Sandbox Code Playgroud)

asp.net directoryservices active-directory account-management

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