Questions tagged [annotations]

In programming, annotations are used to add information to a code element which cannot be expressed by the type system.

annotations
Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Zoom Video SDK iOS Annotations not showing

I am using the MyVideoSDKAppSample for zoom video calling and screen sharing, the video calling and screen sharing is working fine, the problem is occuring when i am trying to annotate on the view. ...
0 votes
0 answers
9 views

Bounding box is in misplaced

I'm currently engaged in refining Faster RCNN. I annotate my images using makesense.ai. Within these images, I focus solely on a single class. However, upon plotting the images and bounding boxes, I'...
0 votes
2 answers
81 views

Java: Spotbugs-Annotation `@CheckForNull` deprecated. What to use instead?

In order to help my static code analysis, I have used the @CheckForNull -Annotation from spotbugs: edu.umd.cs.findbugs.annotations.CheckForNull It has come to my awareness that this annotation though ...
26 votes
5 answers
14k views

use of custom annotations

I found several related (not duplicate) question to this, but they didn't satisfy me. I am unable to understand where and why to use custom annotations? I read an example of custom annotation in a ...
0 votes
0 answers
8 views

Java use a custom annotation to trigger a method call from @PreAuthorize

I have a controller with an endpoint I need to authorize. I want to use a custom annotation which contains @PreAuthorize annotation. This is my controller @RestController public class ActorController {...
0 votes
2 answers
145 views

Gson annotations with Kotlin

I have a SpringBoot project with Kotlin, and I am using Gson to read and write Json. I am trying to annotate some fields away from Json by custom annotations: data class Order( val external: ...
0 votes
1 answer
28 views

Matplotlib .contains method no longer works with updated environment

.contains method worked with matplotlib 3.4.3 and python 3.8.19 no longer works with updated environment. The method returns a boolean and dictionary. It is always returning False and empty dictionary ...
-1 votes
0 answers
13 views

Update gradle: An annotation argument must be a compile-time constant [closed]

android com.android.tools.build:gradle:7.4.2 upgrate to 8.3.2 annotation class not work kotlin version:1.9.23 Android Studio Iguana | 2023.2.1 Patch 2 compile SDK = 34 my annotation class and error: ...
0 votes
1 answer
15k views

Join two tables in Hibernate with Criteria API and Annotation

I want to join 2 tables in MySQL with Hibernate Annotations and Criteria Like for example: I have 2 tables, candidates and jobs, having 2 columns each: candidates: candID & candName jobs: ...
1 vote
1 answer
43 views

Add pch to rowAnnotation when the input is a data frame with variable number of continuous columns

Following up on this question, I am using ComplexHeatmap inside a function that takes as input the variable names that I want to study. While before I found trouble with the discrete grouping of my ...
48 votes
6 answers
36k views

Hibernate mapping between PostgreSQL enum and Java enum

Background Spring 3.x, JPA 2.0, Hibernate 4.x, Postgresql 9.x. Working on a Hibernate mapped class with an enum property that I want to map to a Postgresql enum. Problem Querying with a where ...
-1 votes
1 answer
25 views

How to inject specific arguments into constructor in spring?

@Component public class A { String one; int two; public A a = new ("bro",1); public A b = new ("come",2); public A(String one, int two) { this.one = ...
0 votes
1 answer
20 views

Mapping between properties with distinct names between domain class and YAML file

I'm creating a YAML parser and one of the features I want to implement is that properties of the domain class should be able to have names different from those used in the YAML representation. For ...
9 votes
1 answer
9k views

How to add conditional based @NotNull constraint in spring boot?

We are using spring-boot. I want to add conditional based constraint in java class. For e.g. @Entity public class User { @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name = "...
1 vote
3 answers
2k views

how can set properties swagger to list of String List<String>

I am trying to create springDoc swagger documentation, and I'd like to represent a data like this List<String> elements; having some properties like minSize and MaxSize / minLength Max length ...
2 votes
1 answer
32 views

Python inheritance with @dataclasses.dataclass and annotations

I am very confused by the following code: import dataclasses @dataclasses.dataclass() class Base(): x: int = 100 @dataclasses.dataclass() class Derived(Base): x: int = 200 @dataclasses....
1 vote
1 answer
29 views

Annotations not working as intended in Kotlin

I have a question regarding how annotations in Kotlin are supposed to work. First, I created an annotation class called AltArg: @Target(AnnotationTarget.PROPERTY) annotation class AltArg(val name : ...
5 votes
3 answers
13k views

Spring AOP with Around advice and @annotation not working

I am using Spring AOP for logging in my application. Here is the applicationContext.xml file <mvc:annotation-driven /> <context:component-scan base-package="com.template" /> <context:...
2 votes
1 answer
27 views

R Highcharts Annotation associated with two locations

I would like to create a plot with R and Highcharter and place an annotation on it that is connected to two points (and not just one point). That ist what I try: # Laden der Bibliothek library(...
0 votes
1 answer
32 views

Generate test source using Java's annotation processor

I'm using the java annotation processor to generate code based off an annotation in my project, and that is working well. I'm using AbstractProcessor, and writing the output file like this: Filer ...
0 votes
2 answers
12k views

Hibernate Mapping Error: MappingException: An AnnotationConfiguration instance

I have a project with Hibernate.I tried to read the configuration file hibernate.cfg and got this error: Error creando una factoria de session.org.hibernate.MappingException: An ...
2578 votes
30 answers
1.2m views

What's the difference between @Component, @Repository & @Service annotations in Spring?

Can @Component, @Repository, and @Service annotations be used interchangeably in Spring or do they provide any particular functionality besides acting as a notation device? In other words, if I have a ...
0 votes
1 answer
739 views

Spring Batch application not detecting the beans even if annotations are put

I believe I have correctly used the annotations @EnableBatchProcessing and @Autowire but I cannot resolve that error. The package structure is correct. enter image description here enter image ...
0 votes
2 answers
53 views

No query-parameter types are displayed in the FASTAPI documentation if I use the annotation T | None

I write annotations like this for the path operation function in FastAPI: min_price: int | None = None As a result, the OpenAPI documentation is missing an indication of the required variable type: ...
-3 votes
1 answer
59 views

How can i suppress this warning?

I can suppose that compiler displays warning because there is return invocation in upper when block Image with code and warning: https://i.stack.imgur.com/J5oSE.png P.S when I delete this branch, ...
0 votes
1 answer
35 views

Annotating text data with ontologies

I have a list of plant organisms (text) and I want to annotate them with ontologies(Plant ontology, Crop Ontology, Food Ontology, etc), I was using ontology lookup services to do the annotation ...
1 vote
3 answers
60 views

How to tell PHPStan about method that exists in class implementation but not in it's interface?

I have two interfaces (ClienInterface, ClientFactoryInterface) and two classes implementing them (ConcreteClient, ConcreteApiClientFactory). ConcreteClient has method not definded in ClienInterface. ...
-1 votes
1 answer
45 views

Annotation Processor to generate class like lombok

Hi I'm starting study annotation processing in Java using gradle, follow multi project struct: ROOT | |-sample # contains main classes |-annotation # annotations read by processor |-processor # ...
0 votes
0 answers
17 views

control javac options per class from annotation processor

I'd like to use reflection to get names (in addition to types) of a class method parameters in runtime. This is only possible when my class is compiled with -parameters javac option. There are ...
0 votes
1 answer
25 views

How to create a custom annotation that do the task of @Schedule annotation in java conditionally

Previously I used @Schedule annotation to execute some methods according to some schedule for example, @Schedule(minute ="*/5", hour = "*", persistent = false, info = "Every 5 ...
0 votes
0 answers
10 views

Customize Spring Boot Annotation With New Fields

I want to customize spring-boot Cacheable annotation with new fields. Is it possible? @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Inherited @Documented @...
1 vote
1 answer
17 views

Could not resolve compiling @angular/animations

I need help, i want to resolve this problème, but i can't because, i dont know where start enter image description here when i run my lacal server with ng serve, i get this error this is after ...
2 votes
2 answers
472 views

Is there a Java Validation annotation for value equality

Is there an annotation for checking that two variables of an object have the same value? Somethin like this: public class User{ private String id; @Size(min = 3, max = 18) private ...
2 votes
1 answer
9k views

Tomcat 7 SEVERE: Context [] startup failed due to previous errors after add spring-data-jpa to dependency in pom

I have a spring rest app.It is configured with annotations. When I add spring-data-jpa dependency the application is falling with error on Tomcat 7(jdk 1.7): Jun 22, 2015 5:05:18 PM org.apache....
9 votes
1 answer
8k views

Ant warning: Implicitly compiled files were not subject to annotation processing

I am receiving this warning when running an Ant build script (Ant 1.8.2, Java 1.6). [javac] warning: Implicitly compiled files were not subject to annotation processing. [javac] Use -proc:none to ...
3 votes
2 answers
7k views

how to merge multiple coco json files in python

I have multiple coco json files. for example, train1.json train2.json … train10.json I have a similar problem this site(Combine json files containing COCO person keypoint annotations) I want to make ...
2 votes
1 answer
11k views

BindingResult.rejectValue does not find value from ValidationMessages.properties

We're using spring with annotations, and our annotated fields get validated fine and error messages get displayed from ValidationMessages.properties, but for custom validation message from ...
-1 votes
0 answers
17 views

Is there a VB.net way to clear/remove Vertical Line annotations?

I am currently creating a fastpoint chart in VB.net that gives me a select amount of data from a .csv file. I have created a VerticalLineAnnotation to create a vertical line each time a specific value ...
14 votes
3 answers
33k views

Lombok and @Autowired

How to inject beans using @Autowired annotation, if I use Lombok in the project? The answers on these links seem to be unstable (support?): Spring + Lombok: Can I have @Autowired @Setter Spring ...
0 votes
0 answers
27 views

Why does openshift ingress not allow router annotations?

Small question for you. I have just setup a dev openshift cluster in the cloud and I am trying to create an ingress yaml to define router settings. I basically just want to stop the default redirect ...
0 votes
0 answers
18 views

External annotation processor not working

I'm trying to use Jilt in several projects. Since I'm using the same builder annotation in all of them, I thought it would be a good idea to do a custom annotation in a common library which could be ...
0 votes
1 answer
10k views

A Foreign key refering has the wrong number of column. should be 2

Here is my code VirsualPerson public class VirsualPerson extends Person{ @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @PrimaryKeyJoinColumn(name="VIRSUALPERSON_ID") private long ...
-1 votes
0 answers
27 views

How to inherit and use swagger’s schema annotation

I would like to inherit and use swagger’s schema annotation. For example, a swagger document is being created in the name field within a java class as shown below. @Schema(title = "birthDay",...
0 votes
1 answer
88 views

Adding Annotation with PDF.js

PDF.js is currently adding the ability to add annotation to a PDF, with an expected release on 1 May 23, with little to no documentation at all and no examples... I'm having a hard time putting things ...
0 votes
1 answer
23 views

ChIP-seq Analysis: Extracting Sequences and Generating Bed File

I'm Logan who study Bioinformatics. I have analyzed ChIP-seq data by conducting peak calling with MACS3 and annotating the peaks using HOMER. The output provides coordinates for each peak, such as ...
1 vote
0 answers
23 views

Remove annotation from subtree commits (--unannotate) when Git subtree becomes a standalone repository

It's very useful to annotate subtree commits (whether manually or via --annotate option) to differentiate them from super repository or another subtree commits. But if I want to export a subtree as a ...
0 votes
2 answers
214 views

Python typing: How to assert which type from a union of types a value has?

In short, I have a function that returns either int or float. The caller function then checks the return-type of the first function and return -1 if float else return the original value since it must ...
0 votes
0 answers
18 views

Missing categorical annotations in R pheatmap() despite no missing values in data

I am trying to make a clustere emphasized text*d heatmap with pheatmap() in R for cytokine values. I also want to add in annotations based on a categorical variable with 4 different options. Despite ...
0 votes
1 answer
131 views

Django QuerySet Annotations - More efficient way?

In a class Based ListView I want to annotate each Post with the number of comments (this method works) def get_context_data(self, *args, **kwargs): context = super().get_context_data(*args, **...
0 votes
1 answer
34 views

Does the [NotifyCanExecuteChangedFor] Annotation Not Work in Combination with ObservableCollection?

I've noticed odd behaviour in my .NET MAUI application regarding the use of NotifyCanExecuteChangedFor in combination with ObservableCollection. Here is the premise: My UI is the following: Of ...

1
2 3 4 5
263