我是 kafka 的新手,我正在尝试使用 debezium postgres 连接器。但即使使用带有标准插件的 postgres 11 版,我也会收到此错误:org.apache.kafka.connect.errors.ConnectException: org.postgresql.util.PSQLException: ERROR: could not access file "decoderbufs": No such file or directory
要运行 kafka / debezium,我使用了 fast-data-dev docker 的图像,如下所示
# this is our kafka cluster.
kafka-cluster:
image: landoop/fast-data-dev:latest
environment:
ADV_HOST: 127.0.0.1 # Change to 192.168.99.100 if using Docker Toolbox
RUNTESTS: 0 # Disable Running tests so the cluster starts faster
ports:
- 2181:2181 # Zookeeper
- 3030:3030 # Landoop UI
- 8081-8083:8081-8083 # REST Proxy, Schema Registry, Kafka Connect ports
- …
Run Code Online (Sandbox Code Playgroud) 我在控制台中看到 ngmodel 已被弃用,并将在 angular 7 上删除。我有一个指令使用它来进行双向数据绑定,我如何才能做到这一点[(ngmodel)]
?
import {Directive, ElementRef, HostListener} from '@angular/core';
@Directive({
selector: '[onlyFloat]'
})
export class OnlyFloatDirective {
private regex: RegExp = new RegExp(/^-?[0-9]+(\.[0-9]*){0,1}$/g);
private specialKeys: Array<string> = [ 'Backspace', 'Tab', 'End', 'Home', '-' ];
constructor(private el: ElementRef) {
}
@HostListener('keydown', [ '$event' ])
onKeyDown(event: KeyboardEvent) {
if (this.specialKeys.indexOf(event.key) !== -1) {
return;
}
let current: string = this.el.nativeElement.value;
let next: string = current.concat(event.key);
if (next && !String(next).match(this.regex)) {
event.preventDefault();
}
}
}
Run Code Online (Sandbox Code Playgroud)
HTML:
<div class="ui-g-12 …
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 Primeng 主题在下拉列表中加载值。这是下拉启动的文档:
https://www.primefaces.org/primeng/#/dropdown
我想使用 ngfor 放置值,因为在我看到的文档模型中可以做到这一点,我收到了这个 json 对象的数组:
{
"$id": 1,
"@xdata.type": "XData.Default.Grupo",
"Id": 2,
"Descricao": "Tributada para Comercialização",
"EstoqueMin": 5,
"EstoqueMax": 20,
"Iat": "A",
"Ippt": "T",
"Ncm": "28220010",
"Validade": 0,
"PercentualLucro": 50,
"PercentualDesconto": 5,
"PercentualComissao": 5,
"NrCaracterCodInterno": 7,
"TipoProduto": 0,
"Foto": null,
"ItemSped": "00",
"IdGrupoTributario@xdata.proxy": "Grupo(2)/IdGrupoTributario",
"IdUnidadeProduto@xdata.proxy": "Grupo(2)/IdUnidadeProduto",
"IdSecao@xdata.proxy": "Grupo(2)/IdSecao",
"IdCategoria@xdata.proxy": "Grupo(2)/IdCategoria",
"IdSubCategoria@xdata.proxy": "Grupo(2)/IdSubCategoria",
"IdMarca@xdata.proxy": "Grupo(2)/IdMarca"
}
Run Code Online (Sandbox Code Playgroud)
我想显示描述,并在价值中捕获 id。
我的代码是这样的:
<div class="ui-g-12 ui-md-6">
<p-dropdown [options]="grupoList.Descricao" placeholder="Grupo" formControlName="IdGrupo" [autoWidth]="false" value="grupoList.Id"></p-dropdown>
</div>
Run Code Online (Sandbox Code Playgroud)
但不显示任何内容
如果我这样做:
<div class="ui-g-12 ui-md-6">
<p-dropdown [options]="grupoList" placeholder="Grupo" …
Run Code Online (Sandbox Code Playgroud) 我用 angular 6 制作了一个系统,我有更多的 100 个输入用于 make,但我有很多表单,并且表单多次使用一些输入。因为我想创建动态表单。但我认为如何将输入的配置连接到正确的对象的最佳形式。
我想创建输入的所有定义并捕获这个基于值的对象,但我的定义是这样做
let inputs: FormBase<any>[] = [
new InputTextForm({
key: 'Id',
label: 'Id',
value: '',
required: true,
order: 1
}),
new InputTextForm({
key: 'Nome',
label: 'Nome',
value: '',
required: true,
order: 2
}),
new InputTextForm({
key: 'Descricao',
label: 'Descricao',
order: 3
}),
new InputTextForm({
key: 'PodeFracionar',
label: 'Pode Fracionar',
order: 4
}),
new InputTextForm({
key: 'TaxaPis',
label: 'Taxa Pis',
order: 5
}),
];
return inputs.sort((a, b) => a.order - b.order);
}
Run Code Online (Sandbox Code Playgroud)
但是所有对象的名称都是 InputTextForm,我需要基于键的过滤器。但是我如何通过键过滤并将一个 InputTextForm …
i want move a ball on x and y axis, but the animate not is soft, the movement is tremulous, and if i move more fast it don't move on diagonally exact, but do a angle how i can move the ball with soft? here are the exemple:
https://snack.expo.io/HJvm5WI5N
代码是这样的:
import React from 'react';
import {Animated, StyleSheet, Text, TouchableOpacity, View} from 'react-native';
export default class App extends React.Component {
constructor(props) {
super(props)
this.ball = new Animated.ValueXY({x: 30, y: 30})
} …
Run Code Online (Sandbox Code Playgroud) angular ×3
angular7 ×1
apache-kafka ×1
debezium ×1
html ×1
javascript ×1
primeng ×1
react-native ×1
typescript ×1