我正在建立一个WAF项目.当我调试我的项目.我很喜欢这个问题
"The composition produced a single composition error. The root cause is provided below.
Review the CompositionException.Errors property for more detailed information.\r\n\r\n1)
No exports were found that match the constraint: \n\tContractName\tWaf.InformationManager.OneNote.Modules.Applications.Views.INoteView\n\t
RequiredTypeIdentity\tWaf.InformationManager.OneNote.Modules.Applications.Views.INoteView\r\n"
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?
我解决了我的问题(感谢sgrassie)我没有创建一个NoteView.xaml(它实现了INoteView并在类头中添加[Export(typeof(INoteView)])
在Ionic中,当值改变时,如何在文本输入字段上捕获事件?
输入字段:
<input type="search" placeholder="Search" ng-text-change="searchMenu()">
Run Code Online (Sandbox Code Playgroud)
控制器:
// ...
$scope.searchMenu = function () {
alert('changed')
console.log(1);
};
// ...
Run Code Online (Sandbox Code Playgroud)
在文本字段中输入时没有任何反应.
Visual Studio 2015为我们带来了一个很棒的功能,就是使用Ripple在浏览器上运行Cordova项目.
它只为我们提供了3个虚拟设备.
我们可以通过像这样更改设备上的设备选项来模拟我们在其他虚拟设备上的项目.
好吧,我知道这里不支持的东西,那就是Visual Studio或Ripple不支持iPad设备.
如何让他们支持(或添加配置文件)iPad?
这是我的HTML Cod
<ion-view view-title="Home" ng-controller="makeOrderController">
<input type="search" placeholder="Tìm ki?m" ng-model="searchKeyword" ng-change="searchMenu()" >
</ion-view>
Run Code Online (Sandbox Code Playgroud)
这是我的JS代码
....
.controller('makeOrderController', ['$scope', function ($scope) {
$scope.searchMenu = function ($scope) {
console.log($scope.searchKeyword);
}
}]);
Run Code Online (Sandbox Code Playgroud)
是啊.当我在搜索文本框中键入时,执行searchMenu()方法,但它引发了错误
Cannot read property 'searchKeyword' of undefined
Run Code Online (Sandbox Code Playgroud)
我搜索了SO,我试过了:
添加$parent.到ng-model
或者使用js语句是$ scope.model.searchKeyword.但这些代码不起作用:(
请帮我控制console.log在用户类型上写下更新的关键字.
var datetime1 = DateTime.Now;
var datetime2 = DateTime.Now.AddHours(5);
Console.WriteLine((datetime2-datetime1).TotalDays);
Run Code Online (Sandbox Code Playgroud)
datetime1值是11:30 PM
datetime2值是日期时间值再加上5个小时.
控制台输出必须为2.但结果为0.2xxxxxxxxxx.
我认为上面的代码根据两个日期的小时计算天数.不是基于两个日期的日子.
我该怎么做才能使输出为2?
这是我使用 MongoDB 身份验证机制登录 MongoDB 的代码。
try
{
var credential = MongoCredential.CreateMongoCRCredential("test", "admin", "123456");
var settings = new MongoClientSettings
{
Credentials = new[] { credential }
};
var mongoClient = new MongoClient(settings);
var _database = mongoClient.GetDatabase("test");
var collection = _database.GetCollection<Test>("book");
var filter = new BsonDocument();
var document = collection.Find(new BsonDocument()).ToList();
}
catch (Exception ex)
{
}
Run Code Online (Sandbox Code Playgroud)
当我们在Credential中输入错误的用户名/密码时,如何检查登录结果?目前我无法检查它,我必须等待抛出collection.Find().ToList()一个TimeoutException,在这种情况下它的身份验证失败。我们必须进行 CRUD 来检查身份验证结果(通过捕获TimeoutException)。这不是检查登录状态的好方法。
当我们输入正确的用户名/密码进行身份验证时,如何检查该数据库中的帐户角色?