我当前版本的Cassandra是2.2.4,我想将其升级到3.0.10而不丢失任何数据.这怎么可能?
我的群集由3个节点组成,复制因子为2.此更新是否会影响我的群集体系结构?
当我尝试遵循https://material.angular.io/components/dialog/overview 中的对话教程时发生了这种情况, 并且我收到了上面的错误,所以如果有人知道我应该怎么做来解决这个问题?
这是我的代码:模态的 html
<h1 mat-dialog-title>Warning</h1>
<div mat-dialog-content>
<p>Are you sure you want to delete the book {{data.title}} ?</p>
</div>
<div mat-dialog-actions>
<button mat-button [mat-dialog-close]="data.title" tabindex="2">Ok</button>
<button mat-button (click)="onNoClick()" tabindex="-1">No Thanks</button>
</div>
Run Code Online (Sandbox Code Playgroud)
激活模态的类:
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA} from '@angular/material';
@Component({
selector: 'app-remove-book',
templateUrl: './remove-book.component.html',
styleUrls: ['./remove-book.component.scss']
})
export class RemoveBookComponent implements OnInit {
constructor(
public dialogRef: MatDialogRef<RemoveBookComponent>,
@Inject(MAT_DIALOG_DATA) public data: any) { }
onNoClick(): void {
this.dialogRef.close();
}
ngOnInit() …
Run Code Online (Sandbox Code Playgroud) 将 angular 7 更新为 9 后,我在无法读取 null 的属性“fileName”中出现错误。我已将所有依赖项更新到最新版本。
包.json
{
"name": "project name",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "9.0.6",
"@angular/cdk": "^9.1.3",
"@angular/cli": "9.0.6",
"@angular/common": "9.0.6",
"@angular/compiler": "9.0.6",
"@angular/core": "9.0.6",
"@angular/forms": "9.0.6",
"@angular/http": "7.2.16",
"@angular/platform-browser": "9.0.6",
"@angular/platform-browser-dynamic": "9.0.6",
"@angular/router": "9.0.6",
"@ngui/datetime-picker": "^0.16.2",
"angular-flash-message": "^3.4.0",
"angular2-clipboard": "^2.0.14",
"angular2-color-picker": "^1.3.1",
"angular2-cookie": "^1.2.6",
"angular2-flash-messages": "^3.0.1",
"angular2-modal": "^3.0.3",
"angular2-multiselect-dropdown": "^4.6.3",
"chart.js": …
Run Code Online (Sandbox Code Playgroud) 我有一个服务,向后端发出http请求我无法控制获取营销页面内容.有时,我需要同时加载多个营销内容.我可以创建一个调用服务的效果.
@Effect()
marketingContent$ = this.actions$
.ofType(LOAD_MARKETING_CONTENT)
.switchMap(({ payload }) => this.marketingService.getContent(payload)
.map(content => Action.LoadMarketingContentComplete(content))
)
Run Code Online (Sandbox Code Playgroud)
这很好,我可以打电话store.dispatch(Action.LoadMarketingContent('A'))
.
问题是,如果我需要一次加载多个营销内容,.switchMap
则会取消之前的请求.
store.dispatch(Action.LoadMarketingContent('A'));
store.dispatch(Action.LoadMarketingContent('B'));
// Only `'B'` is loaded since 'A' gets canceled before it completes
Run Code Online (Sandbox Code Playgroud)
我可以使用.mergeMap
而不是.switchMap
,但重复请求将不会被取消.
我还可以使用单独的操作来加载每个营销内容,但这需要为每个部分创建一个动作和效果.
有没有一种方法可以.switchMap
用来取消对同一内容的请求(在哪里payload
相同?)或同时在同一个流中取消重复请求时同时发出不同请求的方式?
我正在运行版本 2.2.4 的 Cassandra 集群。该集群由 3 个节点组成。当我使用 nodetool Repair 命令开始修复时,出现以下错误。而且它没有继续进行。
root@ems:/opt/apache-cassandra-2.2.4/bin# ./nodetool repair
[2017-05-16 00:26:37,919] Starting repair command #47, repairing keyspace contexxio with repair options (parallelism: parallel, primary range: false, incremental: true, job threads: 1, ColumnFamilies: [], dataCenters: [], hosts: [], # of ranges: 768)
[2017-05-16 00:26:39,571] Repair completed successfully
[2017-05-16 00:26:39,574] Repair command #47 finished in 1 second
[2017-05-16 00:26:39,606] Starting repair command #48, repairing keyspace watchtower_keyspace with repair options (parallelism: parallel, primary range: false, incremental: true, job threads: …
Run Code Online (Sandbox Code Playgroud) 我需要在我的Angular 5应用中包含webrtc-adapter。
我需要什么,除了做:npm install webrtc-adapter
?
我是否需要进行其他进口?
在我的文件下载 API 案例中,出现这样的错误。
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:380)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:420)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:345)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:405)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:393)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:96)
at org.springframework.util.StreamUtils.copy(StreamUtils.java:128)
at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:109)
at
Run Code Online (Sandbox Code Playgroud)
我注意到该错误仅在尝试下载名称包含逗号 (,) 的文件时发生,否则它可以正常工作。
在我的 API 中,我设置了这样的响应:
response.setContentType("application/octet-stream");
response.setHeader(Constants.CONTENT_DISPOSITION, "attachment; filename= " + fileSeedName);
System.out.println(file.exists());
FileCopyUtils.copy(new BufferedInputStream(new FileInputStream(file)), response.getOutputStream());
response.flushBuffer();
Run Code Online (Sandbox Code Playgroud)
谁能帮帮我吗。
大家好,我在我的项目中使用模型驱动的表单提交时,我在 formGroupObj.value 中得到空值。我想删除这些具有空值的字段。
我目前的输出是这样的。
{
"firstName":"Jack",
"lastName":"M",
"age":null
}
Run Code Online (Sandbox Code Playgroud)
我的期望输出是
{
"firstName":"Jack",
"lastName":"M"
}
Run Code Online (Sandbox Code Playgroud)
有没有默认的方法来解决这个问题?
任何人请帮助我。
我有一个像这样的json数组。
[
{
"variations": {
"title": {
"newValue": "test new value1",
"oldValue": "test old value1"
}
}
},
{
"variations": {
"data": {
"newValue": "new data",
"oldValue": "httpold data"
},
"length": {
"newValue": "48",
"oldValue": "9.00"
}
}
}
]
Run Code Online (Sandbox Code Playgroud)
从这个我想得到的HTML的变化的长度,还渲染和值来查看。
<table class="table table-bordered table-hover">
<thead class="table-title">
<tr>
<th class="text-center">Field count</th>
<th class="text-center">Field Name</th>
<th class="text-center">Old Value</th>
<th class="text-center">New Value</th>
</tr>
</thead>
<tbody *ngFor="let data of datas">
<tr>
<td class="text-left" rowspan="2">{{data.variations.length}}</td>
<td class="text-left" rowspan="2"></td>
<td class="text-left" rowspan="2"></td>
</tr>
<tr>
</tr> …
Run Code Online (Sandbox Code Playgroud) angular ×6
typescript ×4
cassandra ×2
angular5 ×1
angular7 ×1
angular9 ×1
html ×1
java ×1
java-stream ×1
json ×1
ngrx ×1
nodetool ×1
observable ×1
rxjs ×1
spring-boot ×1
webrtc ×1