我一直试图找出一种方法来使用select运算符与rxjs的其他运算符一起查询树数据结构(在存储中规范化为平面列表),以便保留ChangeDetectionStrategy.OnPush的引用完整性语义,但我最好的尝试导致整个树在树的任何部分发生变化时被重新渲染.有没有人有任何想法?如果您将以下界面视为商店中数据的代表:
export interface TreeNodeState {
id: string;
text: string;
children: string[] // the ids of the child nodes
}
export interface ApplicationState {
nodes: TreeNodeState[]
}Run Code Online (Sandbox Code Playgroud)
我需要创建一个选择器,对上面的状态进行非规范化,以返回实现以下接口的对象图:
export interface TreeNode {
id: string;
text: string;
children: TreeNode[]
}Run Code Online (Sandbox Code Playgroud)
理想情况下,我想让图中的任何一部分只更新它的子项,如果它们已经改变而不是在任何节点改变时返回一个全新的图形.有谁知道如何使用ngrx/store和rxjs构建这样的选择器?
有关我尝试过的各种事情的更具体的例子,请查看下面的代码段:
// This is the implementation I'm currently using.
// It works but causes the entire tree to be rerendered
// when any part of the tree changes.
export function getSearchResults(searchText: string = '') { …Run Code Online (Sandbox Code Playgroud)尝试使用Windows上的ssl克隆git存储库时,我不断收到以下错误:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Run Code Online (Sandbox Code Playgroud)
ssl证书层次结构是可信的(颁发者证书被添加到受信任的根证书颁发机构),我可以浏览到托管站点(Gitorious的私有实例),而不会出现ssl错误.我已尝试在Windows 7和Windows Server 2008上进行克隆,但两次都失败了.
有人有任何想法吗?
我在尝试构建会话工厂时遇到以下错误:
PersistenceTests.Can_Map_Orders_To_Database : Failed
System.IndexOutOfRangeException: Index was outside the bounds of the
array.
at NHibernate.Mapping.Column.set_Name(String value)
at NHibernate.Cfg.XmlHbmBinding.ClassBinder.BindColumns(XmlNode node,
SimpleValue model, Boolean isNullable, Boolean autoColumn, String
propertyPath)
at NHibernate.Cfg.XmlHbmBinding.ClassBinder.BindColumnsOrFormula
(XmlNode node, SimpleValue simpleValue, String path, Boolean
isNullable)
at NHibernate.Cfg.XmlHbmBinding.ClassBinder.BindSimpleValue(XmlNode
node, SimpleValue model, Boolean isNullable, String path)
at
NHibernate.Cfg.XmlHbmBinding.CollectionBinder.BindCollectionSecondPass
(XmlNode node, Collection model, IDictionary`2 persistentClasses)
at
NHibernate.Cfg.XmlHbmBinding.CollectionBinder.<>c__DisplayClassd.<AddCollec tionSecondPass>b__c
(IDictionary`2 persistentClasses)
at NHibernate.Cfg.Configuration.SecondPassCompile()
at NHibernate.Cfg.Configuration.BuildSessionFactory()
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() in c:
\Code Samples\NHibernate\Fluent Nhibernate - Trunk\src\FluentNHibernate
\Cfg\FluentConfiguration.cs: line 94
FluentNHibernate.Cfg.FluentConfigurationException: An invalid or
incomplete …Run Code Online (Sandbox Code Playgroud)