Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [interface]

An interface refers to the designated point of interaction with a component. Interfaces are applicable at both the hardware and software level. --- It also refers to the language-element `interface`, which is the sole exception to single-inheritance in Java, C# and similar languages.

0 votes
0 answers
8 views

Nested Interface Projections in Spring Data JPA

I am working on a spring boot based application where I want to utilize interface based projection as I want to select partial column from my mysql database. I have a CourseEntity.java class with a ...
Usama Abubakar's user avatar
0 votes
2 answers
36 views

Multiple Interfaces for the same object

I try to use a different type of declaration for my object "docs", because I want to use the same interface ResponseInterface for different requests, one is for User[] and other is for ...
Adrian Rojas's user avatar
-4 votes
0 answers
20 views

What would be idiomatic way to implement Abstract class in golang? [duplicate]

We have a code sample which is along the following lines type Foo interface { DoSome() error } type AbstractFoo struct { Foo X Y } type ConcreteFoo struct { ..... } This looks all ...
rajeshnair's user avatar
  • 1,629
-1 votes
3 answers
40 views

Adapt exception type of generic throwing iterator

I have an interface ThrowingIterator, which follows the general contract of Iterator, except the hasNext() and next() methods can throw exceptions: public interface ThrowingIterator<T, E extends ...
EarthTurtle's user avatar
-3 votes
0 answers
13 views

I would like to see it the twilio call log monitor on my webpage without logging in. Is there a template i can install enter my token? [closed]

I would like to see it the twilio call log monitor on my webpage without logging in. Does someone have a template i can install on my website, enter my API token, and see the call log? It sounds ...
Rose Holmes's user avatar
0 votes
1 answer
43 views

Strange behivour with Typescript and arrays [closed]

I'm trying to create a function which uses an array inside an interface to access many connections inside a request body object. What's strange, is that the property length does not exist on the array ...
John Knox's user avatar
0 votes
0 answers
30 views

C++ interface with only one implementation without performance overhead (for mocking in unit tests)

I am making a game engine in C++ and want to start implementing unit tests. As far as I'm aware, you can only create mocks of pure virtual functions. However, because I do not want to add needless ...
Bruno Jácome's user avatar
0 votes
2 answers
78 views

How do I create an interface for a conditional one-to-many relation?

I am creating an inventory app for electronic components. There is a package for each component which will change if their assemble technology is on SMD or DIP. Each SMD and DIP has its own options, ...
S2G's user avatar
  • 133
2 votes
0 answers
17 views

How can I check if key is part of an interface in typescript? [duplicate]

I have an interface [simplified] export default interface FormListarAtendimentosDTO { idArea?: number; idAssunto?: number; idMotivo?: number; order?: string; page?: number; ...
Asderek's user avatar
  • 21
0 votes
1 answer
58 views

How to a return generic type in go [duplicate]

I'm very new to go, still in the phase of learning and couldn't find any answers matching to my issue, so please don't downvote. I have this generic interface which can be instantiated by two type ...
ansme's user avatar
  • 443
0 votes
2 answers
133 views

How do interfaces solve the circle-ellipse problem?

It is sometimes said that interfaces solve several problems of object-oriented programming, in particular the circle-ellipse problem. It would be this interface class IEllipse { public: virtual ...
V. Semeria's user avatar
  • 3,226
0 votes
0 answers
14 views

Adding ImageView Dynamically Behind Transparent Areas in Multiple Frames in Android App kotlin

I am developing an app where each frame contains a transparent area where users can place their images. The size and position of this transparent area vary across more than 100 frames, some having 3 ...
Bashir Ali's user avatar
-1 votes
0 answers
15 views

How can I fix this error on my NestJs application: Type 'Role' has no properties in common with type 'Role'.ts(2559) (parameter) role: Role

enter image description here Here is my GitHub code: https://github.com/borisalibeja/EcoFarm I trying to build auth using RBAC, but I have some problems with the interface declared on the node Modules....
Boris Alibeja's user avatar
0 votes
0 answers
13 views

Android 12: Unable to use the launcher's built-in call over bluetooth function. How to change the default?

In my car I have a device running Android 12 and I tend to have my phone connected via Bluetooth. When I want to make a call or receive a call while driving it should use the built-in calling ...
Jarvice's user avatar
-1 votes
2 answers
42 views

How to implement the `From` trait for a generic type, and retrieve the internal generic type?

For example I have below generic struct: use std::convert::From; pub struct Rect<T> { pub top_left: (T, T), // 0 is x, 1 is y. pub bottom_right: (T, T), // 0 is x, 1 is y. } impl<T> ...
linrongbin's user avatar
  • 3,255

15 30 50 per page
1
2 3 4 5
1341