---编辑-不再工作---请帮助---也许最新的neo4j图像中的某些内容发生了变化(SE我的答案如下以获取更多详细信息)
我试图通过这个 github repo(包含 docker-compose.yml)使用 docker-compose 运行 neo4j
https://github.com/GraphRM/workshop-neo4j-docker
这个 repo 中包含的 docker-compose 文件只不过是一个普通的 Neo4j docker 镜像,已经附加了一些数据(你可以自己试试,镜像真的很小)
运行此文件docker-compose up -d(从文件所在的docker-compose.yml文件夹)似乎一切顺利(没有显示错误,控制台的输出为Starting workshopneo4jdocker_neo4j_1 ... done),但在浏览器中,以下地址未显示任何内容:
localhost:7474
0.0.0.0:7474
127.0.0.1:7474
<dockermachine ip>:7474 got this address with `docker-machine ip`
Run Code Online (Sandbox Code Playgroud)
我想这是一个网络问题(错误的 IP 地址或相关的东西)所以我注意到在 docker-compose.yml 文件中缺少元素 network_mode:
docker-compose.yml
version: '3'
services:
neo4j:
image: neo4j:latest
ports:
- "7474:7474"
- "7687:7687"
environment:
- NEO4J_dbms_security_procedures_unrestricted=apoc.*
- NEO4J_apoc_import_file_enabled=true
- NEO4J_dbms_shell_enabled=true
volumes:
- ./plugins:/plugins
- ./data:/data
- ./import:/import
Run Code Online (Sandbox Code Playgroud)
我想修改此文件,添加network_mode: "bridge" 或使用其他值进行测试 ( host,none,service:[service name],container:[container name/id] …
我需要映射这样的对象
let obj = {
a : { value : 5, meta: "sss" },
b : { value : 1, meta: "rrr" },
a : { value : 6, meta: "nnn" },
}`
Run Code Online (Sandbox Code Playgroud)
像这样获得并反对
{ a: 5, b: 1, c:6}
Run Code Online (Sandbox Code Playgroud)
我无法获取字符串形式的“密钥”。
我试过了:
let yyy = Object.keys(obj).map(function (key) {
return { key: obj[key].value };
});
Run Code Online (Sandbox Code Playgroud)
但它会生成一个“数组”(虽然我需要一个对象),其中包含{key : 5}... 字符串“key”而不是键的名称。
编辑:
是否存在 FxLayout 指令将关闭按钮移动到左侧并将其他按钮保留在右侧?或者我怎样才能通过CSS达到相同的结果?
<div class="actions" fxLayout="row" fxLayoutAlign="end center" fxLayoutGap="8px">
<button mat-raised-button color="secondary" [mat-dialog-close]="true" >Close</button>
<button mat-raised-button color="primary" (click)="previous()" >Previous</button>
<button mat-raised-button color="primary" (click)="next()" >Next</button>
</div>
Run Code Online (Sandbox Code Playgroud) 当我尝试插入一个实体时,我收到了一个关于“映射”的错误。
插入是通过CreateCrudAppService的方法进行的。我的实体继承自FullAuditedEntity但相关的 DTO 仅指定了几个属性。
我该如何处理这种情况?
Unmapped members were found. Review the types and members below.
Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type
For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters
==========================================================================
PostDto -> Post (Destination member list)
MaiPiuSprechi.Domain.Posts.Dto.PostDto -> MaiPiuSprechi.Domain.Posts.Post (Destination member list)
Unmapped properties:
Items
IsDeleted
DeleterUser
DeleterUserId
DeletionTime
CreatorUser
LastModifierUser
LastModificationTime
LastModifierUserId
CreationTime
CreatorUserId
Run Code Online (Sandbox Code Playgroud)
我的 DTO: …
现成的GetAll和Get方法CrudAppService不包括子实体。
是否可以修改其行为?
GetAllIncluding如果所包含的实体具有到父级的导航属性,则存在一些问题;它属于一种循环依赖关系。是否有任何Attribute技巧可以将导航属性排除在序列化之外?该[NonSerialized]属性似乎不适用于导航属性。
PostAppService:
public class PostAppService : CrudAppService<Post, PostDto>, IPostAppService
{
IRepository<Post> _repository = null;
public PostAppService(IRepository<Post> repository) : base(repository)
{
_repository = repository;
}
protected override IQueryable<Post> CreateFilteredQuery(PagedAndSortedResultRequestDto input)
{
return _repository.GetAllIncluding(p => p.Items);
}
}
Run Code Online (Sandbox Code Playgroud)
PostDto:
[AutoMap(typeof(Post))]
public class PostDto : EntityDto
{
public ICollection<Item> Items { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
职位实体:
[Table("AbpPosts")]
public class Post : FullAuditedEntity<int,User>
{
public virtual ICollection<Item> …Run Code Online (Sandbox Code Playgroud) c# parent-child entity-framework-core asp.net-core aspnetboilerplate
Update-Database命令,但此命令不存在!entity-framework ef-migrations entity-framework-core .net-core aspnetboilerplate
我无法使用rxjs take()运算符限制模板中的显示结果,模板始终显示所有记录.
api http://jsonplaceholder.typicode.com/users返回10个元素,我只想拿四个元素.
[service]
public getData(): Observable<User[]> {
return this.http.get<User[]>(`http://jsonplaceholder.typicode.com/users`).pipe(
take(4)
);
}
[component]
export class GridComponent implements OnInit {
_data : Observable<User[]>;
constructor(public _ds : DataService) {
}
ngOnInit() {
this._data = this._ds.getData();
}
}
[template]
<tr *ngFor="let d of _data | async">
<td>{{d.id}}</td>
<td>{{d.name}}</td>
<td>{{d.email}}</td>
<td>{{d.phone}}</td>
</tr>
Run Code Online (Sandbox Code Playgroud) c# ×2
.net-core ×1
angular ×1
asp.net-core ×1
automapper ×1
docker ×1
dockerfile ×1
ecmascript-6 ×1
flexbox ×1
javascript ×1
neo4j ×1
parent-child ×1
rxjs ×1
rxjs6 ×1