Questions tagged [implementation]

Deals with various issues of implementation.

Deals with various issues of implementation of functions, features, languages, etc.

2196 questions
0
votes
2 answers

Implementation of stack using linked list

I am getting a "Function should return a value" error at the 91st line of the code in Turbo C++, please help me as I have to submit my project, I know that Turbo C++ is a very old compiler but that's what our University Teacher recommends so I cant…
Ansh Tyagi
  • 11
  • 4
0
votes
5 answers

How to proceed using Generics in java

I have a interface public interface Doable { public U doStuff(T t); } I have an abstract class which implements Doable public abstract class AbstractDoable implements Doable { private SomeClass someClass; } Now I…
Ganesh
  • 1,654
  • 2
  • 19
  • 32
0
votes
1 answer

How do I implement a begin() member function in my custom data structure?

I'm trying to create my own data-structure that can determine if a value is an element within it in O(1) time with a hash-map. I'm working on adding more member functions so that it's more similar to the STL containers. Here's what I currently have…
feverdreme
  • 467
  • 4
  • 12
0
votes
1 answer

Heap Type Implementation

I was implementing a heap sort and I start wondering about the different implementations of heaps. When you don need to access the elements by index(like in a heap sort) what are the pros and cons of implementing a heap with an array or doing it…
Topo
  • 4,783
  • 9
  • 48
  • 70
0
votes
1 answer

How to ensure redundancy of a polling process

I need to poll a database table (DB2) using Python. The table gets updated quite frequently so I am not particularly worried about empty pings. I wanted to get some tips around how to ensure redundancy for such a polling process. If I have only one…
0
votes
2 answers

Can't understand how to use SAM interface in Kotlin

I can't understand why the following code works: Sam Interface: fun interface WebResponseHandler { fun onWebResponseFinished(jsonObject:JSONObject) } and Implemnetaiton looks like: val onWebResponseHandler:…
Eitanos30
  • 1,331
  • 11
  • 19
0
votes
2 answers

Why set a property value of an interface?

In the following code for a custom HttpClient, I found a method take takes an interface and writes to it as if it was an object with properties: public async Task GetAsync(ICacheContext cacheContext = null) { try { T result =…
8protons
  • 3,591
  • 5
  • 32
  • 67
0
votes
0 answers

Python rise to the power ** operator in C++

Is this possible to implement the ** operator for C++ for two numbers of integer types? int main(){ int a = 6; int b = 2; int result = a**b; }
0
votes
2 answers

Is there a way to create a struct based on a trait implementation?

I'm trying to use a struct with multiple implementations of one method: trait Trait { fn apply(&self) -> vec; } struct Bar { vec: Vec } impl Bar { pub fn new(vec: Vec) -> Self { Self{vec} } pub fn test(&self)…
0
votes
1 answer

where can noSql be successfully implemented?

I took the time and see the entire Hadi Hariri presentation of CouchDB for .NET Developers that took place in OreDev conference last year. And I keep asking myself, where should I use such way to store data? What small, medium and large examples…
balexandre
  • 73,608
  • 45
  • 233
  • 342
0
votes
1 answer

What could be the possible error why my code doesn't read from a file? - dynamic arraylist

So I'm creating a dynamic array list class pointer. But my constructors doesn't read anything from the file. It's not showing any error and I was able to run it. So i'm not sure if i'm missing something to link the pointer. Implementation…
ceerie
  • 1
  • 2
0
votes
0 answers

How to remove listener in annonymous implementation

Can't understand how to stop Patient class from listening Subject when using anonymous implementation. I tried using Subject variable so I can acces it in reactToChange(); but could not figure out what to do next. import…
Dorinus
  • 1
  • 1
0
votes
0 answers

RE: implemrnting match range {m,n} in NFA?

I was able to using NFA to implement + and ? and ., but I'm having hard time figuring out how to implement match-range {m,n}. F.e.: a{1,3} (ab){2,4} .{,3} and so on. Is there a way to implement it with pure NFA ? If not what other advise can you…
sten
  • 7,028
  • 9
  • 41
  • 63
0
votes
1 answer

Issues with a char stack implementation in c++?

I want to make a char stack implementation, but i think something is wrong with it because when i try to use it for my other function it does not word and library stack works. Can you help to find an issue: using namespace std; Stack::Stack(int…
0
votes
1 answer

Why does my python program ignore/skip some cases

I'm trying to write a code which does the following: In the first line, it inputs two space-separated integers, the first presents the length of the list which will be input later, and the second presents an int, called k, which will be needed…
Liana
  • 314
  • 5
  • 15