Questions tagged [implementation]

Deals with various issues of implementation.

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

2196 questions
10
votes
1 answer

Implementing interface from different package golang

I'm having some issues trying to implement an interface, defined in a different package in golang. I have made a minimal recreation of the problem below Interface: package interfaces type Interface interface { do(param int)…
10
votes
2 answers

Where to find Python implementation of Chaikin's corner cutting algorithm?

I am looking for Chaikin's corner cutting algorithm (link1, link2) implemented in Python 2.7.X but can't find it. Maybe someone have it and able share the code?
Comrade Che
  • 619
  • 8
  • 25
10
votes
1 answer

Does myBatis implement JPA?

An easy question I suppose
Boris Pavlović
  • 63,078
  • 28
  • 122
  • 148
10
votes
5 answers

Dynamic Programming Algorithm for Segmented Least Squares

I've been trying to implement this algorithm in Python for a few days now. I keep coming back to it and just giving up and getting frustrated. I don't know whats going on. I don't have anyone to ask or anywhere to go for help so I've come here. PDF…
10
votes
1 answer

Why is ThreadLocalRandom implemented so bizarrely?

This question regards the implementation of ThreadLocalRandom in OpenJDK version 1.8.0. ThreadLocalRandom provides a per-thread random number generator without the synchronization overhead imposed by Random. The most obvious implementation (IMO)…
Reinstate Monica
  • 2,420
  • 14
  • 23
10
votes
2 answers

Why do search engines ignore symbols?

Searching for symbols is a common in programming, especially when you are new to a language. For example, I had a question about the :: operator in Python, and that is not searchable. People looking for things like this or Object [] (array of…
Aillyn
  • 23,354
  • 24
  • 59
  • 84
10
votes
3 answers

How to Master/Slave switch, load balancing in CakePHP

I need to implement master/slave/load balancing into an existing site. Does anyone use these (or other) implementations for master/slave switching? The resources I found on how to implement master/slave into Cake:. (preferable)…
10
votes
3 answers

JAVA: What are the advantages of an InvocationHandler over an implementation of an Interface?

In class today, we were talking about reflection in Java programming. A part of the lesson today was about using InvocationHandlers in Java, rather than just implementing an interface. When I asked the teacher what the advantages were of using an…
KoenVE
  • 301
  • 2
  • 11
10
votes
2 answers

HAT-trie in ANSI C implementation?

I am looking for ANSI C HAT-trie implementation released under some free license. I have not found one. Can you point me to some standalone implementation or a program that uses HAT-tries to get at least slight idea how to implement it the roght…
mjf
  • 101
  • 1
  • 3
10
votes
1 answer

A P2P application with Python

I am trying to implement P2P in my project, but I came across a problem because of misunderstanding of this P2P. Here is how I am implementing it: The client open the program, and sends to the server that he wants to connect it, the server adds the…
user3421416
10
votes
2 answers

Implementation conflicts between protocols

I've stumbled upon an issue, and I can not figure out how am I going to solve it. Let's suppose we have a base class (that may comes from FrameworkA), with a property named subject: public class MyClass { public var subject: String } And we…
BPCorp
  • 780
  • 2
  • 6
  • 16
10
votes
1 answer

how to implement overload method in TypeScript Interface?

i am new to typescript, here is a interface which i'd like to implement; interface IThing{ name:string; age:number; sayHello:{ (name:string):string; (age:number):number; } } sayHello has two signatures which…
paul cheung
  • 748
  • 2
  • 13
  • 32
10
votes
3 answers

Internal Implementation of STL::MAP in C++

I wanted to know , how is the MAP available in C++ , not MultiMap just simple Map , implemented internally . What i could best think of is : For Integer Mapping : A Balanced Binary Search Tree could be used . For String Mapping : Compressed Trie or…
Spandan
  • 2,128
  • 5
  • 25
  • 37
10
votes
2 answers

How is std::advance implemented to change behavior on iterator type?

What we know about std::advance is the following: template void advance (InputIterator& i, Distance n); Purpose Advances the iterator i by n elements. If i is a Random Access Iterator, the function uses once…
Narek
  • 38,779
  • 79
  • 233
  • 389
10
votes
2 answers

Why can't my class implement an interface declared inside it?

I just encountered a behavior I first thought it was a bug in Eclipse. Consider this simple class: public class Foo { public static interface Callback { public void onAction(); } } This is perfectly valid. However, this…
Rafael T
  • 15,401
  • 15
  • 83
  • 144