问:
Build fails when adding dialogflow dependency
When I add

```<code>implementation 'com.google.cloud:google-cloud-dialogflow:0.92.0-alpha'
</code>```

to my java/android project build fails with the message that duplicate classes were found:

```Duplicate class com.google.api.Advice found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Advice$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Advice$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AdviceOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AnnotationsProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthProvider found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthProvider$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthProvider$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthProviderOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthRequirement found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthRequirement$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthRequirement$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthRequirementOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Authentication found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Authentication$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Authentication$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthenticationOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthenticationRule found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthenticationRule$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthenticationRule$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthenticationRuleOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthorizationConfig found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthorizationConfig$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthorizationConfig$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthorizationConfigOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthorizationConfigProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Backend found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Backend$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Backend$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BackendOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BackendProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BackendRule found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BackendRule$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BackendRule$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BackendRuleOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Billing found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Billing$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Billing$BillingDestination found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Billing$BillingDestination$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Billing$BillingDestinationOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Billing$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BillingOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BillingProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ChangeType found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ChangeType$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ConfigChange found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ConfigChange$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ConfigChange$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ConfigChangeOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ConfigChangeProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ConsumerProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Context found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Context$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Context$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ContextOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ContextProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ContextRule found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ContextRule$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ContextRule$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ContextRuleOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Control found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Control$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Control$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ControlOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ControlProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.CustomHttpPattern found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.CustomHttpPattern$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.CustomHttpPattern$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.CustomHttpPatternOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Explicit found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Explicit$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$ExplicitOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Exponential found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Exponential$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$ExponentialOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Linear found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Linear$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$LinearOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$OptionsCase found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptionsOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$Range found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$Range$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$RangeOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DistributionOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DistributionProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Documentation found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Documentation$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Documentation$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DocumentationOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DocumentationProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DocumentationRule found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DocumentationRule$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DocumentationRule$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DocumentationRuleOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Endpoint found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Endpoint$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Endpoint$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.EndpointOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.EndpointProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Experimental found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Experimental$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Experimental$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ExperimentalOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ExperimentalProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Http found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Http$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Http$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
```

<p>I am not goingtoinclude the whole stacktrace because it is too long to fit in this post(it's about 65000 chars, it is the same like eabove in every line until the end of the stacktrace).
Most of the conflicting classes seem to be firebase classes.
<strong>When i remove te dialogflow dependency, my project builds as normal.
These are all my dependencies:</strong></p>

```dependencies {
    implementation fileTree(include: ['*.aar', '*.jar'], dir: 'libs')
    implementation project(':pocketsphinx-android-5prealpha-release')
    implementation 'androidx.preference:preference:1.1.0-alpha05'
    implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.gridlayout:gridlayout:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.palette:palette-ktx:1.0.0'
    implementation 'com.google.android.material:material:1.1.0-alpha06'
    implementation 'com.google.firebase:firebase-core:16.0.9'
    implementation 'com.google.firebase:firebase-database:17.0.0'
    implementation 'com.google.firebase:firebase-storage:17.0.0'
    implementation 'com.google.firebase:firebase-auth:17.0.0'
    implementation 'com.google.firebase:firebase-firestore:19.0.0'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'
    implementation 'com.google.cloud:google-cloud-dialogflow:0.47.0-alpha'
    implementation 'com.mikhaellopez:circularimageview:3.2.0'
    implementation 'com.google.ar.sceneform.ux:sceneform-ux:1.9.0'
    implementation 'com.google.ar.sceneform:core:1.9.0'
    implementation 'com.google.ar:core:1.9.0'
    implementation 'com.github.AppIntro:AppIntro:v5.1.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.0'
    testImplementation 'junit:junit:4.13-beta-2'
    androidTestImplementation 'androidx.test:runner:1.2.0-beta01'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-beta01'
}
```

I don't know what this is caused by.
Thanks for any help.

答:
This solves the build problem for me:

```<code>implementation('com.google.cloud:google-cloud-dialogflow:0.93.0-alpha'){
     exclude group: 'com.google.api.grpc'
     exclude group: 'com.google.protobuf'
}
</code>```

I think you may only need the first exclude line, but for me both groups have duplicated classes.

Body:
When I add

implementation 'com.google.cloud:google-cloud-dialogflow:0.92.0-alpha'

to my java/android project build fails with the message that duplicate classes were found:

Duplicate class com.google.api.Advice found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Advice$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Advice$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AdviceOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AnnotationsProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthProvider found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthProvider$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthProvider$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthProviderOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthRequirement found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthRequirement$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthRequirement$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthRequirementOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Authentication found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Authentication$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Authentication$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthenticationOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthenticationRule found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthenticationRule$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthenticationRule$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthenticationRuleOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthorizationConfig found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthorizationConfig$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthorizationConfig$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthorizationConfigOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.AuthorizationConfigProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Backend found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Backend$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Backend$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BackendOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BackendProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BackendRule found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BackendRule$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BackendRule$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BackendRuleOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Billing found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Billing$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Billing$BillingDestination found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Billing$BillingDestination$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Billing$BillingDestinationOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Billing$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BillingOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.BillingProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ChangeType found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ChangeType$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ConfigChange found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ConfigChange$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ConfigChange$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ConfigChangeOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ConfigChangeProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ConsumerProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Context found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Context$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Context$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ContextOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ContextProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ContextRule found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ContextRule$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ContextRule$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ContextRuleOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Control found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Control$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Control$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ControlOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ControlProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.CustomHttpPattern found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.CustomHttpPattern$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.CustomHttpPattern$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.CustomHttpPatternOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Explicit found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Explicit$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$ExplicitOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Exponential found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Exponential$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$ExponentialOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Linear found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$Linear$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$LinearOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptions$OptionsCase found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$BucketOptionsOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$Range found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$Range$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Distribution$RangeOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DistributionOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DistributionProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Documentation found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Documentation$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Documentation$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DocumentationOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DocumentationProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DocumentationRule found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DocumentationRule$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DocumentationRule$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.DocumentationRuleOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Endpoint found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Endpoint$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Endpoint$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.EndpointOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.EndpointProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Experimental found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Experimental$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Experimental$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ExperimentalOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.ExperimentalProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Http found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Http$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)
Duplicate class com.google.api.Http$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.11.0.jar (com.google.api.grpc:proto-google-common-protos:1.11.0)

I am not goingtoinclude the whole stacktrace because it is too long to fit in this post(it's about 65000 chars, it is the same like eabove in every line until the end of the stacktrace).
Most of the conflicting classes seem to be firebase classes.
When i remove te dialogflow dependency, my project builds as normal.
These are all my dependencies:

dependencies {
    implementation fileTree(include: ['*.aar', '*.jar'], dir: 'libs')
    implementation project(':pocketsphinx-android-5prealpha-release')
    implementation 'androidx.preference:preference:1.1.0-alpha05'
    implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.gridlayout:gridlayout:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.palette:palette-ktx:1.0.0'
    implementation 'com.google.android.material:material:1.1.0-alpha06'
    implementation 'com.google.firebase:firebase-core:16.0.9'
    implementation 'com.google.firebase:firebase-database:17.0.0'
    implementation 'com.google.firebase:firebase-storage:17.0.0'
    implementation 'com.google.firebase:firebase-auth:17.0.0'
    implementation 'com.google.firebase:firebase-firestore:19.0.0'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'
    implementation 'com.google.cloud:google-cloud-dialogflow:0.47.0-alpha'
    implementation 'com.mikhaellopez:circularimageview:3.2.0'
    implementation 'com.google.ar.sceneform.ux:sceneform-ux:1.9.0'
    implementation 'com.google.ar.sceneform:core:1.9.0'
    implementation 'com.google.ar:core:1.9.0'
    implementation 'com.github.AppIntro:AppIntro:v5.1.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.0'
    testImplementation 'junit:junit:4.13-beta-2'
    androidTestImplementation 'androidx.test:runner:1.2.0-beta01'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-beta01'
}

I don't know what this is caused by.
Thanks for any help.

Body:
This solves the build problem for me:

implementation('com.google.cloud:google-cloud-dialogflow:0.93.0-alpha'){
     exclude group: 'com.google.api.grpc'
     exclude group: 'com.google.protobuf'
}

I think you may only need the first exclude line, but for me both groups have duplicated classes.


来源: stackexchange

问:
Java [unchecked] unchecked case warning
Ok, I've been looking around and done alot of google searching, but I still can't find a way to avoid this warning.

```<code>Integer result = chooser.showOpenDialog(null);
if (result.equals(0))
{
    String tempHolder = chooser.getSelectedFile().getPath();
    filenameLoad = new File(tempHolder);
    filenameSave = filenameLoad;
    FileInputStream fis = null;
    ObjectInputStream in = null;
    try
    {
        fis = new FileInputStream(filenameLoad);
        in = new ObjectInputStream(fis);;
    }
    catch(IOException ex)
    {
        ex.printStackTrace();
    }

    try
    {
        loadFile = (ArrayList<Dot>)in.readObject();
    }
    catch(IOException ex)
    {
        System.out.println("Cast fail");
    }
    catch(ClassNotFoundException ex)
    {
        System.out.println("Cast fail");
    }
    catch (ClassCastException ex)
    {
        System.out.println("Cast fail");
    }

    try
    {
        in.close();
    }
    catch(Exception ex)
    {
        System.out.println("failed to close in");
    }
    save.setEnabled(true);
      gpanel.setDotList(loadFile);
  }
</code>```

It gives me the warning at the line loadFile = (ArrayList)in.readObject();  I've added in the catchs so i'm not sure why it still says its uncatched.  Any help?  thanks?

答:
It means the compiler cannot check that the object you read in, matches the type you are casting it to. Thus the unchecked warning.

BTW: You might want to work on your error handling to make it simpler and clearer. ;)

ContentLicense: CC BY-SA 3.0

Title: Java [unchecked] unchecked case warning

Body:
Ok, I've been looking around and done alot of google searching, but I still can't find a way to avoid this warning.

Integer result = chooser.showOpenDialog(null);
if (result.equals(0))
{
    String tempHolder = chooser.getSelectedFile().getPath();
    filenameLoad = new File(tempHolder);
    filenameSave = filenameLoad;
    FileInputStream fis = null;
    ObjectInputStream in = null;
    try
    {
        fis = new FileInputStream(filenameLoad);
        in = new ObjectInputStream(fis);;
    }
    catch(IOException ex)
    {
        ex.printStackTrace();
    }

    try
    {
        loadFile = (ArrayList<Dot>)in.readObject();
    }
    catch(IOException ex)
    {
        System.out.println("Cast fail");
    }
    catch(ClassNotFoundException ex)
    {
        System.out.println("Cast fail");
    }
    catch (ClassCastException ex)
    {
        System.out.println("Cast fail");
    }

    try
    {
        in.close();
    }
    catch(Exception ex)
    {
        System.out.println("failed to close in");
    }
    save.setEnabled(true);
      gpanel.setDotList(loadFile);
  }

It gives me the warning at the line loadFile = (ArrayList)in.readObject();  I've added in the catchs so i'm not sure why it still says its uncatched.  Any help?  thanks?


问:
Writing Scrapy Python Output to JSON file
I'm new to Python and web scraping. In this program I want to write final output (product name and price from all 3 links) to JSON file. Please help!</p>

```<code>    import scrapy
    from time import sleep
    import csv, os, json
    import random

    class spider1(scrapy.Spider):
        name = "spider1"

        def start_requests(self):
            list = [
                "https://www. example.com/item1",
                "https://www. example.com/item2",
                "https://www. example.com/item3"]

            for i in list:
                yield scrapy.Request(i, callback=self.parse)
                sleep(random.randint(0, 5))

        def parse(self, response):
            product_name = response.css('#pd-h1-cartridge::text')[0].extract()
            product_price = response.css(
                '.product-price .is-current, .product-price_total .is-current, .product-price_total ins, .product-price ins').css(
                '::text')[3].extract()

            name = str(product_name).strip()
            price = str(product_price).replace('\n', "")

data = {name, price}

yield data

extracted_data = []
    while i < len(data):

        extracted_data.append()
        sleep(5)
    f = open('data.json', 'w')
    json.dump(extracted_data, f, indent=4)
</code>```

答:
You're not closing the data.json file thus it stays in buffered state and does not get written.

Either add a close() method:

```<code>f = open('data.json', 'w')
json.dump(extracted_data, f, indent=4)
f.close()
</code>```

or use a with statement that automatically closes the file for you:

```<code>with open('data.json', 'w') as f:
    json.dump(extracted_data, f, indent=4)
</code>```

Make sure you really want to overwrite the file each time using the 'w' flag. If not, use the 'a' append flag instead.

ContentLicense: CC BY-SA 4.0

Body:
I'm new to Python and web scraping. In this program I want to write final output (product name and price from all 3 links) to JSON file. Please help!

    import scrapy
    from time import sleep
    import csv, os, json
    import random

    class spider1(scrapy.Spider):
        name = "spider1"

        def start_requests(self):
            list = [
                "https://www. example.com/item1",
                "https://www. example.com/item2",
                "https://www. example.com/item3"]

            for i in list:
                yield scrapy.Request(i, callback=self.parse)
                sleep(random.randint(0, 5))

        def parse(self, response):
            product_name = response.css('#pd-h1-cartridge::text')[0].extract()
            product_price = response.css(
                '.product-price .is-current, .product-price_total .is-current, .product-price_total ins, .product-price ins').css(
                '::text')[3].extract()

            name = str(product_name).strip()
            price = str(product_price).replace('\n', "")

data = {name, price}

yield data

extracted_data = []
    while i < len(data):

        extracted_data.append()
        sleep(5)
    f = open('data.json', 'w')
    json.dump(extracted_data, f, indent=4)

Body:
You're not closing the data.json file thus it stays in buffered state and does not get written.

Either add a close() method:

f = open('data.json', 'w')
json.dump(extracted_data, f, indent=4)
f.close()

or use a with statement that automatically closes the file for you:

with open('data.json', 'w') as f:
    json.dump(extracted_data, f, indent=4)

Make sure you really want to overwrite the file each time using the 'w' flag. If not, use the 'a' append flag instead.


问:
How to use condition WHERE json hierarchy column in Postgres?
I've created a small DW in Postgres that contains an XML column, JSON column and GEOmetry column , I want to use a clause group by in json column just.

let's focus on this table contains XML column, JSON column and GEOmetry column

I insert some line in the table.

here is the table view in postgres :

I want to display the lines with which the city is Tanger

note : I used the following query but it did not work :

答:
```<code>columnName->>'field'
</code>```

Accesses the field and returns the value as a string; whereas:

```<code>columnName->'field'
</code>```

accesses the field and returns the values as JSONB, which allows you to continue traversing the object to lower levels.

So -> gives you JSONB ->> gives you strings

Body:
columnName->>'field'

Accesses the field and returns the value as a string; whereas:

columnName->'field'

accesses the field and returns the values as JSONB, which allows you to continue traversing the object to lower levels.

So -> gives you JSONB ->> gives you strings


问:
How to check if an id value exists in an object array
Given an array "posts" of objects {id: "x", title: "title"}, i need to verify whether there is a previously entered id before entering a new post (via form in which id is a field).

I tried looping through posts, but it causes problems on entering repeated new data. Thank you for your help, this is driving me mad.

```<code>// ADD NEW POST FROM FORM TO ARRAY
$("#form").submit(function(event) {
    event.preventDefault();
    var id = Number($("#idPost").val());
    var title = $("#titlePost").val();
    var date = new Date($("#data").val());
// CHECK IF id ALREADY EXISTS, IF YES, BLOCK ENTRY
    for(num of posts){
        console.log (id, num.id);
        if(id === num.id){
            console.log("error");
        } else {
            var post = new Post(id, title, date);
        }
    };
});
</code>```

答:
As @Andreas suggested, you can use Array.Some() to find element exist in array or not.

```<code> var found = posts.some(el => el.id  === id ); // It returns true if id exist in an array
 if(found)
 {
  //Your codes here
 }
</code>```

Or you can try with Array.Filter() to find element is exist or not in array.

```<code>var found = posts.filter(el => el.id === id).length > 0; // .length returns 1 if id exist in an array
if(found)
{
   //Your code goes here
}
</code>```

You can try Array.find() or Array.IndexOf() to perform same operation

Following implementation with Array.Some()

//Lets consider below is the value in posts arry

var posts = [ { id: 1, username: 'foo' },{ id: 2, username: 'bar' } ];

var newObj = {"id": 3, "username": 'prasad'};
//console.log(posts);
var found = posts.some(el => el.id  === 2 );
 if(found)
 {
    for(num of posts){
        //console.log (3, num.id);
        if(4 === num.id){
          //Your code
            //console.log("error");
        } else {
          //Your code
            //console.log(num);
        }
    };
    posts.push(newObj);
    console.log(posts);
 }```

Body:
Given an array "posts" of objects {id: "x", title: "title"}, i need to verify whether there is a previously entered id before entering a new post (via form in which id is a field).

I tried looping through posts, but it causes problems on entering repeated new data. Thank you for your help, this is driving me mad.

// ADD NEW POST FROM FORM TO ARRAY
$("#form").submit(function(event) {
    event.preventDefault();
    var id = Number($("#idPost").val());
    var title = $("#titlePost").val();
    var date = new Date($("#data").val());
// CHECK IF id ALREADY EXISTS, IF YES, BLOCK ENTRY
    for(num of posts){
        console.log (id, num.id);
        if(id === num.id){
            console.log("error");
        } else {
            var post = new Post(id, title, date);
        }
    };
});

Body:
As @Andreas suggested, you can use Array.Some() to find element exist in array or not.

 var found = posts.some(el => el.id  === id ); // It returns true if id exist in an array
 if(found)
 {
  //Your codes here
 }

Or you can try with Array.Filter() to find element is exist or not in array.

var found = posts.filter(el => el.id === id).length > 0; // .length returns 1 if id exist in an array
if(found)
{
   //Your code goes here
}

You can try Array.find() or Array.IndexOf() to perform same operation

Following implementation with Array.Some()

//Lets consider below is the value in posts arry

var posts = [ { id: 1, username: 'foo' },{ id: 2, username: 'bar' } ];

var newObj = {"id": 3, "username": 'prasad'};
//console.log(posts);
var found = posts.some(el => el.id  === 2 );
 if(found)
 {
    for(num of posts){
        //console.log (3, num.id);
        if(4 === num.id){
          //Your code
            //console.log("error");
        } else {
          //Your code
            //console.log(num);
        }
    };
    posts.push(newObj);
    console.log(posts);
 }


问:
QueryException: JPA-style positional param was not an integral ordinal
I got "QueryException: JPA-style positional param was not an integral ordinal"
I try to solve by the way others solve such as org.hibernate.QueryException: JPA-style positional param was not an integral ordinal but it still doesn't work.

I  try to hardcode change form ?1 to some data that already have in the database and it works but after change to ?1 it gives an error again.

--- Before Hardcode (have Error)
-- In Repository --

```<code>@Query(
    value = "SELECT user_att_workshop.id, user_att_workshop.user_id, user_att_workshop.workshop_att_id, skill.skill_name, user_att_workshop.skill_score " +
            "FROM user_att_workshop LEFT JOIN skill on user_att_workshop.skill_id = skill.id " +
            "WHERE user_att_workshop.user_id = ?1 " +
            "AND user_att_workshop.workshop_att_id = ?2;",
            nativeQuery = true
)
public List<UserScoreByWorkshopAtt> findUserScoreByUserIdAndWorkshopId(int userId, int workshopId);
</code>```

-- In Service --

```<code>public List<UserScoreByWorkshopAtt> findUserScoreByUserIdAndWorkshopIdtest(
    int userId,
    int workshopId) {

    return
        userScoreByWorkshopAttRepository.findUserScoreByUserIdAndWorkshopId(
        userId,
        workshopId
    );
}
</code>```

-- In controller --

```<code>List<UserScoreByWorkshopAtt> getUserScooreByUserId(
    @PathVariable("user_id") int userId,
    @PathVariable("workshop_id") int workshopId) {

    return userScoreByWorkshopAttService.findUserScoreByUserIdAndWorkshopIdtest(
        userId,
        workshopId
    );

}
</code>```

--- After Hardcode (can run and have no error)
-- In Repository --

```<code> @Query(value = "SELECT user_att_workshop.id, user_att_workshop.user_id, user_att_workshop.workshop_att_id, skill.skill_name, user_att_workshop.skill_score FROM user_att_workshop LEFT JOIN skill on user_att_workshop.skill_id = skill.id  WHERE user_att_workshop.user_id = 5 AND user_att_workshop.workshop_att_id = 2;", nativeQuery = true)
public List<UserScoreByWorkshopAtt> findUserScoreByUserIdAndWorkshopId();
</code>```

-- In Service --

```<code>public List<UserScoreByWorkshopAtt> findUserScoreByUserIdAndWorkshopIdtest() {
    return userScoreByWorkshopAttRepository.findUserScoreByUserIdAndWorkshopId();
}
</code>```

-- In controller --

```<code>List<UserScoreByWorkshopAtt> getUserScooreByUserId(@PathVariable("user_id") int userId,
            @PathVariable("workshop_id") int workshopId) {
        return userScoreByWorkshopAttService.findUserScoreByUserIdAndWorkshopIdtest();
    }
</code>```

Caused by: org.hibernate.QueryException: JPA-style positional param
  was not an integral ordinal   at
  org.hibernate.engine.query.spi.ParameterParser.parse(ParameterParser.java:195)
    at
  org.hibernate.engine.query.spi.ParamLocationRecognizer.parseLocations(ParamLocationRecognizer.java:56)
    at
  org.hibernate.engine.query.internal.NativeQueryInterpreterStandardImpl.getParameterMetadata(NativeQueryInterpreterStandardImpl.java:30)
    at
  org.hibernate.engine.query.spi.QueryPlanCache.getSQLParameterMetadata(QueryPlanCache.java:128)
    at
  org.hibernate.internal.AbstractSharedSessionContract.getNativeQueryImplementor(AbstractSharedSessionContract.java:1000)
    ... 85 more

答:
Can you write it as follows :

```<code>@Query(
    value = "SELECT user_att_workshop.id, user_att_workshop.user_id, user_att_workshop.workshop_att_id, skill.skill_name, user_att_workshop.skill_score " +
            "FROM user_att_workshop LEFT JOIN skill on user_att_workshop.skill_id = skill.id " +
            "WHERE user_att_workshop.user_id = :userId " +
            "AND user_att_workshop.workshop_att_id = :workshopId;",
            nativeQuery = true
)
public List<UserScoreByWorkshopAtt> findUserScoreByUserIdAndWorkshopId(@Param("userId")int userId,@Param("workshopId") int workshopId);
</code>```

OR remove the ';' from end of the query and check for any whitespace

```<code>@Query(
    value = "SELECT user_att_workshop.id, user_att_workshop.user_id, user_att_workshop.workshop_att_id, skill.skill_name, user_att_workshop.skill_score " +
            "FROM user_att_workshop LEFT JOIN skill on user_att_workshop.skill_id = skill.id " +
            "WHERE user_att_workshop.user_id =?1 " +
            "AND user_att_workshop.workshop_att_id =?2",
            nativeQuery = true
)
public List<UserScoreByWorkshopAtt> findUserScoreByUserIdAndWorkshopId(int userId, int workshopId);
</code>```

Body:
I got "QueryException: JPA-style positional param was not an integral ordinal"
I try to solve by the way others solve such as org.hibernate.QueryException: JPA-style positional param was not an integral ordinal but it still doesn't work.

I  try to hardcode change form ?1 to some data that already have in the database and it works but after change to ?1 it gives an error again.

--- Before Hardcode (have Error)
-- In Repository --

@Query(
    value = "SELECT user_att_workshop.id, user_att_workshop.user_id, user_att_workshop.workshop_att_id, skill.skill_name, user_att_workshop.skill_score " +
            "FROM user_att_workshop LEFT JOIN skill on user_att_workshop.skill_id = skill.id " +
            "WHERE user_att_workshop.user_id = ?1 " +
            "AND user_att_workshop.workshop_att_id = ?2;",
            nativeQuery = true
)
public List<UserScoreByWorkshopAtt> findUserScoreByUserIdAndWorkshopId(int userId, int workshopId);

-- In Service --

public List<UserScoreByWorkshopAtt> findUserScoreByUserIdAndWorkshopIdtest(
    int userId,
    int workshopId) {

    return
        userScoreByWorkshopAttRepository.findUserScoreByUserIdAndWorkshopId(
        userId,
        workshopId
    );
}

-- In controller --

List<UserScoreByWorkshopAtt> getUserScooreByUserId(
    @PathVariable("user_id") int userId,
    @PathVariable("workshop_id") int workshopId) {

    return userScoreByWorkshopAttService.findUserScoreByUserIdAndWorkshopIdtest(
        userId,
        workshopId
    );

}

--- After Hardcode (can run and have no error)
-- In Repository --

 @Query(value = "SELECT user_att_workshop.id, user_att_workshop.user_id, user_att_workshop.workshop_att_id, skill.skill_name, user_att_workshop.skill_score FROM user_att_workshop LEFT JOIN skill on user_att_workshop.skill_id = skill.id  WHERE user_att_workshop.user_id = 5 AND user_att_workshop.workshop_att_id = 2;", nativeQuery = true)
public List<UserScoreByWorkshopAtt> findUserScoreByUserIdAndWorkshopId();

-- In Service --

public List<UserScoreByWorkshopAtt> findUserScoreByUserIdAndWorkshopIdtest() {
    return userScoreByWorkshopAttRepository.findUserScoreByUserIdAndWorkshopId();
}

-- In controller --

List<UserScoreByWorkshopAtt> getUserScooreByUserId(@PathVariable("user_id") int userId,
            @PathVariable("workshop_id") int workshopId) {
        return userScoreByWorkshopAttService.findUserScoreByUserIdAndWorkshopIdtest();
    }

Caused by: org.hibernate.QueryException: JPA-style positional param
  was not an integral ordinal   at
  org.hibernate.engine.query.spi.ParameterParser.parse(ParameterParser.java:195)
    at
  org.hibernate.engine.query.spi.ParamLocationRecognizer.parseLocations(ParamLocationRecognizer.java:56)
    at
  org.hibernate.engine.query.internal.NativeQueryInterpreterStandardImpl.getParameterMetadata(NativeQueryInterpreterStandardImpl.java:30)
    at
  org.hibernate.engine.query.spi.QueryPlanCache.getSQLParameterMetadata(QueryPlanCache.java:128)
    at
  org.hibernate.internal.AbstractSharedSessionContract.getNativeQueryImplementor(AbstractSharedSessionContract.java:1000)
    ... 85 more

Body:
Can you write it as follows :

@Query(
    value = "SELECT user_att_workshop.id, user_att_workshop.user_id, user_att_workshop.workshop_att_id, skill.skill_name, user_att_workshop.skill_score " +
            "FROM user_att_workshop LEFT JOIN skill on user_att_workshop.skill_id = skill.id " +
            "WHERE user_att_workshop.user_id = :userId " +
            "AND user_att_workshop.workshop_att_id = :workshopId;",
            nativeQuery = true
)
public List<UserScoreByWorkshopAtt> findUserScoreByUserIdAndWorkshopId(@Param("userId")int userId,@Param("workshopId") int workshopId);

OR remove the ';' from end of the query and check for any whitespace

@Query(
    value = "SELECT user_att_workshop.id, user_att_workshop.user_id, user_att_workshop.workshop_att_id, skill.skill_name, user_att_workshop.skill_score " +
            "FROM user_att_workshop LEFT JOIN skill on user_att_workshop.skill_id = skill.id " +
            "WHERE user_att_workshop.user_id =?1 " +
            "AND user_att_workshop.workshop_att_id =?2",
            nativeQuery = true
)
public List<UserScoreByWorkshopAtt> findUserScoreByUserIdAndWorkshopId(int userId, int workshopId);


问:
Is there a way to develop/release features 'when ready' without using version-control branches?
My team has been using Continuous Integration for a while now, using the 'everything goes in trunk' approach. We're investigating changing this practice to allow us to release individual features as soon as they are ready, without having to wait for other features to catch up (we have multiple teams working on different features at once). There are lots of examples on how to do this with branching strategies (branch per feature etc), using git and the like, and that's probably my preferred approach. But we've been asked by the managers to at least investigate other options, because the worry is that a branching strategy could result in delayed integration points, which we want to avoid. I don't want this to get into a discussion on CI/branchging strategy though, so I'll try and be specific in my question.

Has anyone used any strategies for releasing features when ready, without running multiple version-control branches? For example, using Branching by Abstraction or some other means of having features with different states of 'readiness' in a single branch. If anyone has experience (good or bad) with this kind of approach I'd love to know.

答:
The branching by abstraction mechanism don't scale easily for large projects with legacy architecture, because said "abstraction layer" isn't always easy/quick to introduce in order to isolate your changes.

However, the other idea mentioned in this article is a very few number of branches, with only commits representing an application ready to be deployed.

That is something a DVCS (Decentralized VCS like Git or Mercurial) can easily accommodate because of the publication mechanism (orthogonal to branching), and which allows to:

not publish (not push) private commits made in a local repository (so you can branch/experiment as you want, and more importantly, you can rebase your work on top of official branches very often and very quickly to ensure your work don't diverge from a working application)

publish (push) your work, once ready, only on a 'trunk' or a 'release' branch on a unique repository acting as the reference for all the revisions "ready to be deployed".

That don't prevent to have other intermediate repositories to push to, in order to share intermediate works, but since said work has been rebased locally on top of official branch, even that development effort can be deployed and tested.


问:
Passing the attached data frame to a function
I am working on a function that combines information about a particular variable with some basic information about the data frame it comes from. Here is an example of what I'm talking about:

```<code>fcn <- function(var,data) {
  return(ncol(data)*mean(var))
}

df <- data.frame(a=1:10,b=1:10)

df %>% dplyr::mutate(c=fcn(a,df))
</code>```

This works fine! However, it would be really neat if, in cases where the function is used with with or inside a dplyr verb, I can just nab the data frame/tibble object without it being explicitly passed. So ideally something like

```<code>fcn <- function(var,data=attached_data_object) {
  return(ncol(data)*mean(var))
}

df <- data.frame(a=1:10,b=1:10)

df %>% dplyr::mutate(c=fcn(a))
</code>```

I've been reading up on the various environment functions - seems like I should be able to reach into the environment that with/dplyr creates from the data frame and pluck the whole thing out wholesale. As of yet I have been unable to figure out how to make this happen. Any tips appreciated! Thank you.

答:
I am not sure that the following is what you want.

Anyway, you must have the dataset as your first function argument.

```<code>library(dplyr)

fcn <- function(data, var) {
  var <- deparse(substitute(var))
  ncol(data)*mean(data[[var]])
}

df <- data.frame(a = 1:10, b = 11:20)

df %>% fcn(a)
#[1] 11

df %>% mutate(c = fcn(., a))
#    a  b  c
#1   1 11 11
#2   2 12 11
#3   3 13 11
#4   4 14 11
#5   5 15 11
#6   6 16 11
#7   7 17 11
#8   8 18 11
#9   9 19 11
#10 10 20 11

df %>% summarise(c = fcn(., a))
#   c
#1 11
</code>```

Body:
I am working on a function that combines information about a particular variable with some basic information about the data frame it comes from. Here is an example of what I'm talking about:

fcn <- function(var,data) {
  return(ncol(data)*mean(var))
}

df <- data.frame(a=1:10,b=1:10)

df %>% dplyr::mutate(c=fcn(a,df))

This works fine! However, it would be really neat if, in cases where the function is used with with or inside a dplyr verb, I can just nab the data frame/tibble object without it being explicitly passed. So ideally something like

fcn <- function(var,data=attached_data_object) {
  return(ncol(data)*mean(var))
}

df <- data.frame(a=1:10,b=1:10)

df %>% dplyr::mutate(c=fcn(a))

I've been reading up on the various environment functions - seems like I should be able to reach into the environment that with/dplyr creates from the data frame and pluck the whole thing out wholesale. As of yet I have been unable to figure out how to make this happen. Any tips appreciated! Thank you.

Body:
I am not sure that the following is what you want.

Anyway, you must have the dataset as your first function argument.

library(dplyr)

fcn <- function(data, var) {
  var <- deparse(substitute(var))
  ncol(data)*mean(data[[var]])
}

df <- data.frame(a = 1:10, b = 11:20)

df %>% fcn(a)
#[1] 11

df %>% mutate(c = fcn(., a))
#    a  b  c
#1   1 11 11
#2   2 12 11
#3   3 13 11
#4   4 14 11
#5   5 15 11
#6   6 16 11
#7   7 17 11
#8   8 18 11
#9   9 19 11
#10 10 20 11

df %>% summarise(c = fcn(., a))
#   c
#1 11


问:
single entry SQL/python
im trying to do a blog post simple app in witch you can write and than edit or delete a post.
I got so far that i can show post but i can not edit them

i did a /edit.html page on witch i would like to have a single blog post and than edit it. The problem is that the post does not appear

app.py

```<code>from flask import Flask, render_template, request
from flask_mysqldb import MySQL
import yaml
from flask_bootstrap import Bootstrap

app=Flask(__name__)
bootstrap = Bootstrap(app)

db = yaml.load(open('db.yaml'))
app.config['MYSQL_HOST'] = db['mysql_host']
app.config['MYSQL_USER'] = db['mysql_user']
app.config['MYSQL_PASSWORD'] = db['mysql_password']
app.config['MYSQL_DB'] = db['mysql_db']
mysql = MySQL(app)

@app.route('/', methods=['GET','POST'])
def index():
    if request.method == 'POST':
        form = request.form
        user_name = form['user_name']
        besedilo = form['besedilo']
        cur = mysql.connection.cursor()
        cur.execute("INSERT INTO post(user_name, besedilo) VALUES(%s, %s)", (user_name, besedilo))
        mysql.connection.commit()
    return render_template('index.html')

@app.route('/post/')
def post():
    cur = mysql.connection.cursor()
    result_value = cur.execute("SELECT * FROM post")
    if result_value > 0:
        posts = cur.fetchall()
        return render_template('post.html',posts = posts)

@app.route('/edit/<int:id>/', methods=['GET','POST'])
def edit(id):
    cur = mysql.connection.cursor()
    result_value = cur.execute("SELECT * FROM post WHERE post_id = {}".format(id))
    if result_value > 0:
        post = cur.fetchone()
    return render_template('edit.html', post = post)

## here i would like to single out one entry and show it on

@app.route('/delete/')
def delete():
    return render_template('delete.html')

if __name__ == '__main__':
    app.run(debug=True)
</code>```

edit.html

```<code>{% extends 'base.html' %}
{% block sub_content %}

<h1>{{post['user_name']}}</h1>
<h1>{{post['besedilo']}}</h1>
 {% if posts %}
   {% for post in posts %}
    <h3> <a href="/edit/{{edit['edit_id']}}">{{edit['title']}}</a></h3>
   {%endfor%}
{% endblock %}
</code>```

this should show single entry

答:
You may need to pass a properly prepared sql query not dynamic.
Try modifying your view like:

```<code>@app.route('/edit/<int:id>/', methods=['GET','POST'])
def edit(id):
    cur = mysql.connection.cursor()
    query = "SELECT * FROM post WHERE post_id = {}".format(id)
    result_value = cur.execute(query)
    if result_value > 0:
        post = cur.fetchone()
    return render_template('edit.html', post = post)
</code>```

Alternatively;

```<code>result_value = cur.execute("SELECT * FROM post WHERE post_id = %s", (id,))
</code>```

Title: single entry SQL/python

Body:
im trying to do a blog post simple app in witch you can write and than edit or delete a post.
I got so far that i can show post but i can not edit them

i did a /edit.html page on witch i would like to have a single blog post and than edit it. The problem is that the post does not appear

app.py

from flask import Flask, render_template, request
from flask_mysqldb import MySQL
import yaml
from flask_bootstrap import Bootstrap

app=Flask(__name__)
bootstrap = Bootstrap(app)

db = yaml.load(open('db.yaml'))
app.config['MYSQL_HOST'] = db['mysql_host']
app.config['MYSQL_USER'] = db['mysql_user']
app.config['MYSQL_PASSWORD'] = db['mysql_password']
app.config['MYSQL_DB'] = db['mysql_db']
mysql = MySQL(app)

@app.route('/', methods=['GET','POST'])
def index():
    if request.method == 'POST':
        form = request.form
        user_name = form['user_name']
        besedilo = form['besedilo']
        cur = mysql.connection.cursor()
        cur.execute("INSERT INTO post(user_name, besedilo) VALUES(%s, %s)", (user_name, besedilo))
        mysql.connection.commit()
    return render_template('index.html')

@app.route('/post/')
def post():
    cur = mysql.connection.cursor()
    result_value = cur.execute("SELECT * FROM post")
    if result_value > 0:
        posts = cur.fetchall()
        return render_template('post.html',posts = posts)

@app.route('/edit/<int:id>/', methods=['GET','POST'])
def edit(id):
    cur = mysql.connection.cursor()
    result_value = cur.execute("SELECT * FROM post WHERE post_id = {}".format(id))
    if result_value > 0:
        post = cur.fetchone()
    return render_template('edit.html', post = post)

## here i would like to single out one entry and show it on

@app.route('/delete/')
def delete():
    return render_template('delete.html')

if __name__ == '__main__':
    app.run(debug=True)

edit.html

{% extends 'base.html' %}
{% block sub_content %}

{{post['user_name']}}

{{post['besedilo']}}

 {% if posts %}
   {% for post in posts %}

 {{edit['title']}}

   {%endfor%}
{% endblock %}

this should show single entry

Body:
You may need to pass a properly prepared sql query not dynamic.
Try modifying your view like:

@app.route('/edit/<int:id>/', methods=['GET','POST'])
def edit(id):
    cur = mysql.connection.cursor()
    query = "SELECT * FROM post WHERE post_id = {}".format(id)
    result_value = cur.execute(query)
    if result_value > 0:
        post = cur.fetchone()
    return render_template('edit.html', post = post)

Alternatively;

result_value = cur.execute("SELECT * FROM post WHERE post_id = %s", (id,))


问:
missing rows of data in SAS
I wrote the following:

```<code>libname learn 'C:\Users\PCPCPC\Documents\sasdeposite';
data learn.test_score;
length ID $ 3 Name $ 15;
input ID $ Score1-Score3;
label ID = 'Student ID'
score1= 'Math Score'
score2= 'Science Score'
Score3= 'English Score';

datalines;
1 90 95 98
2 78 77 75
3 88 91 92
;

proc print
data = learn.test_scores;
run;
</code>```

I expect they displayed table to show three rows of data, but I only saw one row:

答:
Your code generates errors as @Kiran indicated so you should fix those, but once those are fixed it works as expected. </p>

```<code>data test_score;
length ID $ 3 Name $ 15;
input ID $ Score1-Score3;
label ID = 'Student ID'
score1= 'Math Score'
score2= 'Science Score'
Score3= 'English Score';

datalines;
1 90 95 98
2 78 77 75
3 88 91 92
;

proc print
data = test_score;
run;
</code>```

Title: missing rows of data in SAS

Body:
I wrote the following:

libname learn 'C:\Users\PCPCPC\Documents\sasdeposite';
data learn.test_score;
length ID $ 3 Name $ 15;
input ID $ Score1-Score3;
label ID = 'Student ID'
score1= 'Math Score'
score2= 'Science Score'
Score3= 'English Score';

datalines;
1 90 95 98
2 78 77 75
3 88 91 92
;

proc print
data = learn.test_scores;
run;

I expect they displayed table to show three rows of data, but I only saw one row:

Body:
Your code generates errors as @Kiran indicated so you should fix those, but once those are fixed it works as expected.

data test_score;
length ID $ 3 Name $ 15;
input ID $ Score1-Score3;
label ID = 'Student ID'
score1= 'Math Score'
score2= 'Science Score'
Score3= 'English Score';

datalines;
1 90 95 98
2 78 77 75
3 88 91 92
;

proc print
data = test_score;
run;


问:
Different behavior due to different "looping styles"
I have a simple problem. Navigate to a certain line in a fine, and delete everything after that. I use the suitable file.truncate() call. However, the two snippets of code below behave differently.

1)

```<code>with open(file, "a+b", 1) as f:
  #Navigate to the MARKER
  while True:
    line = f.readline()
    if MARKER in line:
      f.truncate()
      f.write(stuff)
      break
</code>```

2)

```<code>with open(file, "a+b", 1) as f:
  #Navigate to the MARKER
  for line in f:
    if MARKER in line:
      f.truncate()
      f.write(stuff)
      break
</code>```

(1) behaves as expected. However in case of (2), the file in truncated several lines after the MARKER is found. I speculate that there is some buffering going on, but as you can see, I explicitly define the buffering behavior as "line buffered" to the open() call.

Any thoughts? I would like to use the more intuitive "for line in file" syntax...

答: The clue seems to be in this bit of Python's C source -- Python 2.7 seems to use a 8 KB readahead buffer for for line in file:.

Body:
I have a simple problem. Navigate to a certain line in a fine, and delete everything after that. I use the suitable file.truncate() call. However, the two snippets of code below behave differently.

1)

with open(file, "a+b", 1) as f:
  #Navigate to the MARKER
  while True:
    line = f.readline()
    if MARKER in line:
      f.truncate()
      f.write(stuff)
      break

2)

with open(file, "a+b", 1) as f:
  #Navigate to the MARKER
  for line in f:
    if MARKER in line:
      f.truncate()
      f.write(stuff)
      break

(1) behaves as expected. However in case of (2), the file in truncated several lines after the MARKER is found. I speculate that there is some buffering going on, but as you can see, I explicitly define the buffering behavior as "line buffered" to the open() call.

Any thoughts? I would like to use the more intuitive "for line in file" syntax...


问:
RegEx for capturing and replacing digits in a pattern
I would like to replace the 3rd argument in the string with a new number (let's say 100).  The matched string always starts with function, with the first argument either true or false, and with the number as second argument.

                                               Expected
                    |                             |
                    v                             v
'function(true, 0, 15)'   --> 'function(true, 0, 100)'
'function(false, 0, 23)'  --> 'function(false, 0, 100)'
```

<p>I have been reading the related posts but I believe I must have misunderstood some regex concept. The following code is that I had tried but it always replaces the whole string:</p>

<pre class="lang-py prettyprint-override"><code>import re
string = 'function(true, 0, 15)'
regex = re.compile('function\([a-zA-Z]*, [0-9]*, ([0-9]*)\)')
res = re.sub(regex, '100', string)

print(res) # 100
           # Expected: function(true, 0, 100)
</code>```

Question: Could you point me out why the above code doesn't work? How would I write the code to achieve the expected result?

答:
As the number you are trying to replace is just followed by a closing parenthesis ), you can just use this \d+(?=\s*\)) regex and replace it by 100 or whatever value you want. Try these Python codes,

```<code>import re
string = 'function(true, 0, 15)'
regex = re.compile(r'\d+(?=\s*\))')
res = re.sub(regex, '100', string)

print(res)
</code>```

Prints,

```<code>function(true, 0, 100)
</code>```

Also, the reason why your code isn't working as expected and is replacing whole of your string with 100 because the way you've written your regex, it matches your whole input and re.sub function replaces what all matches with second argument and hence all your input gets replaced with 100. But instead what you want is, to just replace the third argument with 100 hence the way you should write your regex, should only match the third argument value, like demonstrated in below regex demo,

Regex Demo matching only what you want to replace

And your current regex matches whole of your input as shown in below demo,

Regex Demo with your regex matching whole input

Also, in case you feel better and you want to match whole input and then selectively replace only third argument, you can use this regex to capture the function name and first two parameters in group1 like you wanted to capture in your original regex,

```<code>(function\([a-zA-Z]*, [0-9]*, )[0-9]*\)
</code>```

and replace it with \g<1>100) where \g<1> references the value captured in group1 and further it is replaced with 100)

Regex Demo with full match and selected replacement

Body:
I would like to replace the 3rd argument in the string with a new number (let's say 100).  The matched string always starts with function, with the first argument either true or false, and with the number as second argument.

                                               Expected
                    |                             |
                    v                             v
'function(true, 0, 15)'   --> 'function(true, 0, 100)'
'function(false, 0, 23)'  --> 'function(false, 0, 100)'

I have been reading the related posts but I believe I must have misunderstood some regex concept. The following code is that I had tried but it always replaces the whole string:

import re
string = 'function(true, 0, 15)'
regex = re.compile('function\([a-zA-Z]*, [0-9]*, ([0-9]*)\)')
res = re.sub(regex, '100', string)

print(res) # 100
           # Expected: function(true, 0, 100)

Question: Could you point me out why the above code doesn't work? How would I write the code to achieve the expected result?

Body:
As the number you are trying to replace is just followed by a closing parenthesis ), you can just use this \d+(?=\s*\)) regex and replace it by 100 or whatever value you want. Try these Python codes,

import re
string = 'function(true, 0, 15)'
regex = re.compile(r'\d+(?=\s*\))')
res = re.sub(regex, '100', string)

print(res)

Prints,

function(true, 0, 100)

Also, the reason why your code isn't working as expected and is replacing whole of your string with 100 because the way you've written your regex, it matches your whole input and re.sub function replaces what all matches with second argument and hence all your input gets replaced with 100. But instead what you want is, to just replace the third argument with 100 hence the way you should write your regex, should only match the third argument value, like demonstrated in below regex demo,

Regex Demo matching only what you want to replace

And your current regex matches whole of your input as shown in below demo,

Regex Demo with your regex matching whole input

Also, in case you feel better and you want to match whole input and then selectively replace only third argument, you can use this regex to capture the function name and first two parameters in group1 like you wanted to capture in your original regex,

(function\([a-zA-Z]*, [0-9]*, )[0-9]*\)

and replace it with \g<1>100) where \g<1> references the value captured in group1 and further it is replaced with 100)

Regex Demo with full match and selected replacement