Skip to main content

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
1 answer
42 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
27 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
73 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
16 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
53 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
132 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,216
0 votes
0 answers
12 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
12 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,235
0 votes
0 answers
18 views

Cannot import type interfaces of AWS js sdk v3

I am using AWS pinpoint service with typescript. And I want to define return type for GetSegmentCommand's output. The docs says that it is exported as this: export interface GetSegmentCommandOutput ...
Krutarth Dave's user avatar
0 votes
0 answers
30 views

Pyside (pyqt) how to control UI through qthread? what is the correct way for my example [duplicate]

I'm creating a program in pyside, where most of the functions will be linked through threads, as they are time-consuming functions. and the interface should work. but I need to have control of some UI ...
Lucas Feix's user avatar
1 vote
1 answer
32 views

Extract Generic Interface or Type keys as an Array [duplicate]

I want to know if it's possible to get a generic interface or type and get it's properties like an array of objects, like this: interface UserData { email: string } keys = extractKeys<UserData&...
João Pedro's user avatar
0 votes
0 answers
16 views

academic/scholarly term for Interface belonging to class library(in a dll or jar file) that must be implemented by the client application code

Let's say one has a Financial Foreign Exchange Processor Class Library called ForeignXchangeProc and a client business application that uses said Class Library. However, within the ForeignXchangeProc, ...
crazyTech's user avatar
  • 1,419
0 votes
2 answers
51 views

Covariance for value in Dictionary

I'm trying to add a more derived type as value to a dictionary<..., base> but i get the following error: Cannot convert from HandleIntegrationEvent<TR> to HandleIntegrationEvent<...
Paul Dreyer's user avatar

15 30 50 per page
1
2 3 4 5
1341