小编rei*_*den的帖子

Notepad ++在文件中找到过滤器EXCLUDE

我正在寻找一种方法来获取n ++在文件对话框中的查找以排除某些文件...

到目前为止,我发现的唯一参考是http://sourceforge.net/project/shownotes.php?release_id=536795&group_id=189927,但不幸的是,它不起作用.

我正在使用*[^*.dll],我认为,搜索所有内容但是dll文件.

我该如何解决这个问题?

谢谢

notepad++ find

55
推荐指数
6
解决办法
4万
查看次数

重构时出现StackOverflowError

我正在尝试重构一个包名(非常接近项目层次结构的根目录),并且我收到以下错误(flash builder 4):

A fatal error occurred while performing the refactoring

An unexpected exception occurred while creating a change object.  See the error log for more details.
Run Code Online (Sandbox Code Playgroud)

日志文件看起来像这样....

!ENTRY org.eclipse.ltk.ui.refactoring 4 10000 2010-09-30 10:57:25.134
!MESSAGE Internal Error
!STACK 0
java.lang.reflect.InvocationTargetException
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.run(RefactoringWizardDialog2.java:330)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizard.createChange(RefactoringWizard.java:583)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizard.computeUserInputSuccessorPage(RefactoringWizard.java:422)
    at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.computeSuccessorPage(UserInputWizardPage.java:74)
    at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.getNextPage(UserInputWizardPage.java:114)
    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.nextOrPreviewPressed(RefactoringWizardDialog2.java:495)
    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.access$2(RefactoringWizardDialog2.java:492)
    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2$1.widgetSelected(RefactoringWizardDialog2.java:691)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:143)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:155)
    at com.adobe.flexbuilder.as.editor.ui.navigator.FlexPackageExplorerRenameAction.renamePackage(FlexPackageExplorerRenameAction.java:171) …
Run Code Online (Sandbox Code Playgroud)

apache-flex eclipse refactoring

10
推荐指数
1
解决办法
4374
查看次数

将Ninject.MVC3添加到现有的MVC(4)项目中

我正在使用MVC4开发一个项目,并决定我希望通过Ninject添加一些依赖注入.通过NuGet下载/安装后,我在NinjectWebCommon.cs(第23行)中发现了这个错误:

The type 'System.Web.IHttpModule' is defined in an assembly 
that is not referenced. You must add a reference to assembly 
'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Run Code Online (Sandbox Code Playgroud)

然后稍后(第44行):

The type or namespace name 'IHttpModule' could not be found 
(are you missing a using directive or an assembly reference?)
Run Code Online (Sandbox Code Playgroud)

我希望这通常有效,但事实上,当我将Ninject添加到项目中时,我做了一些不起作用的事情.

编辑:上述错误仅由测试项目抛出....

asp.net-mvc ninject

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

外部AppSettings文件不与web.config合并

在我的应用程序中,我有一个带有appSettings部分的web.config文件.appSettings部分包含应用使用的许多键.appSettings部分还包含该file="AppSettings.config"属性.然后,AppSettings.config文件包含主web.config中的值的子集.我们的想法是让web.config包含所有基本/默认设置,然后提供AppSettings.config文件中默认值的覆盖.

根据这篇文章(/sf/answers/485806051/),我的设置应该工作(特别是:) will merge (and override) settings in the .config file.

我看到的问题是它不起作用.我有一个默认值false,然后驱动一些关于显示某些beta报告功能的逻辑,并设置AppSettings.config以将此键重写为'true'.可悲的是,它继续隐藏报告系统.但是,如果我更改web.config值,则显示该项.

AppSettings可能没有合并吗? 我如何测试/证明真正发生的事情?

编辑

似乎AppSettings.config文件中存在某种错误.当一切正常时,合并完全按预期发生.但是,我仍然遇到如何检测AppSettings.config文件何时出现某种问题的问题.我已经测试过该文件是否是有效的XML(它确实存在),但是仍然存在一些问题.当我从web.config复制功能键,并将其粘贴在AppSettings.config中的非工作键的正下方时,它们似乎是相同的.我希望在配置文件合并错误的情况下必须有一些方法来抛出错误?

asp.net web-config

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

SimpleMembershipInitializer不会初始化

我正在努力在我的EntityFramework/MVC4/DatabaseFirst项目中使用简单的成员方案.我已经找到了很多首先使用代码的例子,但是对于DB来说没什么.

我遇到的问题是InitializeDatabaseConnection抛出一个错误("无法找到请求的.Net Framework数据提供程序.它可能没有安装.")代码如下所示:

WebSecurity.InitializeDatabaseConnection("DALEntities", "tblContacts1", "ContactID", "EMail", autoCreateTables: true);
Run Code Online (Sandbox Code Playgroud)

我不确定DataProvider失败了什么.如果我尝试跟踪'into'InitializeDatabaseConnection调用,它会立即抛出错误.

我错过了什么?

信息:
DALEntities是EF其余部分使用的connectionString的名称.以下代码工作正常....

    public ActionResult Test() {
        using (var db = new DALEntities()) {
            var query = from i in db.TBLINVENTORies
                            orderby i.ITEMNAME
                            select i;
            var cnt = query.Count();
            string str = "Total Inventory: " + cnt;
            return Content(str);
        }
    }
Run Code Online (Sandbox Code Playgroud)

我在web.config中的连接字符串部分:

  <connectionStrings>
    <add name="DALEntities" connectionString="metadata=res://*/DAL.DAL.csdl|res://*/DAL.DAL.ssdl|res://*/DAL.DAL.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=SOMECOMPUTER;initial catalog=SOMEDB;persist security info=True;user id=SOMEID;password=SOMEPASS;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
Run Code Online (Sandbox Code Playgroud)

这篇文章似乎问了同样的问题(但是在模型优先的背景下),但还没有解决方案:使用SimpleMembership和EF模型优先

另外,我看到WebSecurity.InitializeDatabaseConnection()帮助文本有一个重载:Initializes the membership system ((blah blah <snip> ProviderName: the …

ef-database-first asp.net-mvc-4 simplemembership

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

硬编码的ApplicationInsightsResourceId如何影响来自不同生产级别的资源中的AI数据收集?

我有一个要添加到Azure Application Insights遥测中的应用程序。我一直在阅读如何在运行时修改InstrumentationKey来选择其他遥测目标。但是,我读过的所有文档都没有解释如何选择一个不同的ApplicationInsightsResourceId,它似乎包含路径,带有我的subscriptionID,资源组和见解组件。当我第一次向项目添加AI时,此值存储在csproj文件中。

但是,在我的应用程序中,我们有4个主要环境:CI,Test,Stage,Prod。这些环境中的每一个都位于不同的资源组中,并且实际上,“ Prod”甚至完全位于不同的Azure订阅中。

所以我的问题是,如何基于从配置(应用程序设置等)中读取的启动值,确保将遥测数据发送到正确的环境?尽管他们位于不同的资源组(并希望订阅)中,但InstrumentationKey是否足以定位其他AI目标?

编辑

所以,没有什么比做一些学习的事情了吧?我只是从我的各种资源组和订阅中的洞察力资源中试用了几个不同的instrumentationKeys,显然,“它确实有效”。不论订阅或其他组织结构如何,向任何地方发送遥测数据所需的唯一更改似乎就是iKey。也许我们可以修改问题,以澄清我的结论不正确或具有误导性的任何观点,也许可以链接到解释此问题的资源?

c# azure azure-application-insights

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

ASP.Net应用程序将powershell脚本作为IIS_USR执行

我正在构建一个asp.net mvc应用程序,它将作为我们编写的许多PowerShell脚本的包装器来管理日常任务(最终目标是让非技术人员轻松使用脚本) .

我设法让脚本执行得很好:

var ctx = System.Web.HttpContext.Current;
var file = ctx.Server.MapPath("~/Content/Powershell/psStoreLive.ps1"); #activate a store
var shell = PowerShell.Create();
shell.AddCommand(file);  
shell.AddArgument(o.DBName);   # which store should we activate
var results = shell.Invoke();  # and then process the results....display output of script
Run Code Online (Sandbox Code Playgroud)

问题是脚本正在以IIS_USR(或类似)的形式执行.

我需要找到一种方法让IIS服务器以当前登录用户身份执行脚本(使用Windows身份验证(<authentication mode="Windows" />)).

我已经看过了http://stackoverflow.com/questions/10837377/loginview-and-passing-credentials-to-powershell,虽然看起来它可能会起作用,但我对这个想法并不满意.

在我看来,我应该能够使用一些C#代码执行此操作,就像在上面的代码块中一样,但我无法通过我的搜索来完成任何操作.

如何在C#中创建一个PowerShell环境,该环境将以登录用户的身份执行(如果需要,我会满足于重新询问凭据)

谢谢

编辑1

我已经查看了PSCredential对象,这似乎是正确的事情,但我仍然无法弄清楚如何将它插入到整个会话中(有关将其用作cmdlet参数的大量信息)需要凭证)

c# asp.net asp.net-mvc powershell credentials

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

SQL Server触发器隔离/范围文档

我一直在寻找明确的有关隔离级别的文档(或并发或范围......我不知道到底该怎么称呼它)在SQL Server中的触发器.

我找到了以下来源,表明我认为是真的(也就是说两个用户,对同一个表执行更新 - 即使是相同的行 - 将会执行独立且隔离的触发器):

第一个问题基本上是我试图找到答案的同一个问题,但给出的答案并未提供任何来源.第二个问题也接近标记,答案是相同的,但同样没有提供任何来源.

有人能指出我可用文档做出相同断言的地方吗?

谢谢!

sql-server triggers isolation-level

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

查找已修改文件"X"的命名分支中的所有更改集(包括合并)

我正在寻找TortoiseHg的方法(如果没有其他可能性,则使用普通的hg)来查找特定文件的所有更改.

我尝试过使用修订版集查询: merge() and file("path/to/filename.cs") 但这并没有让我得到我想要的东西.它返回一个空集.我假设这是因为merge()只返回合并,并且file()只有(看起来)返回非合并,因此交集是空的.

我也试过modifies(pattern),但不会出现从足够不同file(pattern)(在我看来就像file()是联盟adds()modifies()).contains(pattern)根本不会返回任何元素.

那么,是否有可能获得一个特定文件以任何方式被修改的变更集列表?

mercurial tortoisehg

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

命名空间中不存在"interface"

编辑:在@mattytommo帮助隔离错误的根本原因后,我发现IStatementRepository.cs文件未包含在项目中.包括它在项目中解决了这个案例.

我试图在我的控制器上实现一个存储库(抛出一些依赖注入),但我碰到了一堵墙.我定义了一个IStatementRepository,但是,当我尝试为DI目的创建一个带有IStatementRepository参数的构造函数时,我收到以下错误:

The type or namespace name 'IStatementRepository' does not 
exist in the namespace 'StatementsApplication.Models' (are 
you missing an assembly reference?) 

The type or namespace name 'IStatementRepository' could 
not be found (are you missing a using directive or an 
assembly reference?)    

'StatementsApplication.Controllers.StatementController' 
does not contain a definition for 'IStatementRepository' 
and no extension method 'IStatementRepository' accepting a 
first argument of type 
'StatementsApplication.Controllers.StatementController' 
could be found (are you missing a using directive or an 
assembly reference?)
Run Code Online (Sandbox Code Playgroud)

这是生成错误的代码块:

using StatementsApplication.Models;

namespace StatementsApplication.Controllers
{ …
Run Code Online (Sandbox Code Playgroud)

.net c# asp.net-mvc asp.net-mvc-3

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

Xamarin安卓播放器

我刚刚开始尝试使用Xamarin进行一些Android开发,在阅读有关安装Xamarin for Windows的文档时,我终于来到了这个页面

http://developer.xamarin.com/guides/android/getting_started/installation/android-player/

我在其中设置高性能的Android模拟器.

我已经按照所有步骤进行了操作,但是当我尝试运行它时,我会看到一个对话框告诉我

A Xamarin.Android subscription is required to use this beta.
Run Code Online (Sandbox Code Playgroud)

我是否正确理解该播放器不适用于"入门"计划?

假设以上情况属实,我可以假设我唯一的办法,直到我准备支付订阅费(或开始试用),是使用标准的谷歌提供的模拟器吗?

谢谢

xamarin xamarin-android-player

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

不正确的"无法重新定义不可变的变更集"错误

偶尔,当我使用rebase进行拉动时,我会收到以下错误:

abort: can't rebase immutable changeset fa044e766d1f
hint: see hg help phases for details
Run Code Online (Sandbox Code Playgroud)

有趣的是,改变错误(每次都是同一个错误)是非常古老的,并且已经公开了.

这是一个截图:https://db.tt/xHiOxm6R

我似乎可以忽略这个消息(至少,到目前为止,我没有遇到任何麻烦),但显然,我想帮助Hg解决这个问题,以便它不会继续将来会很麻烦.

谢谢.

更新

hg out没有列出它.克隆可能大约6个月大.另外,据我所知,其他开发人员都没有遇到这个问题.

mercurial tortoisehg

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