implementation

Creating a Folder using Program

Hi, I want to create a directory by using program in android sdk. Is it possible to listen the folder action like open folder and close folder etc. Please help me to do this? Thanks Deepak ...

Prim's MST algorithm in O(|V|^2)

Time complexity of Prim's MST algorithm is O(|V|^2) if you use adjacency matrix representation. I am trying to implement Prim's algorithm using adjacency matrix. I am using this as a reference. V = {1,2...,n} U = {1} T = NULL while V != U: /* Now this implementation means that I find lowest cost edge in O(n)....

class_getClassMethod often returns nil (seems to work only with class level Methods)

Hi all, Im currently trying to use some generated code from http://sudzc.com/ This code is not perfectly adapted to my web services, so I tried to add Categories to some of the generated classes and to exchange their implementations with the original ones using method_exchangeImplementations from "objc/runtime.h". (I could modify the ge...

How are coroutines implemented?

I have a question about coroutine implementation. I saw coroutine first on Lua and stackless-python. I could understand the concept of it, and how to use yield keyword, but I cannot figure out how it is implemented. Can I get some explanation about them? ...

Ability to specify more than one class declarations and definitions in objective-c interface and implementation sections respectively

I was just wondering if I have the option to specify more than one set of class declarations and definitions in the same file, without breaking it up into multiple files. I'm guessing this is just the sign to break it up, but I was just wondering out of curiosity. Also, bonus, when including, what is the difference between #include and...

Which are the Java JAXP XPath implementations available?

Which are the Java JAXP XPath implementations available? The default implementation, Xalan (shipped with the JVM), is very slow to evaluate XPath expressions, so, I'm looking for a faster implementation. ...

definition/implementation question in c#

Hello all, I am trying create such a plugin architecture that; IPlugin: an interface that all plugins must implement. NormalPlugin: a normal plugin. ComplexPlugin: a plugin which, beside implementing the base methods, has some custom methods. HostApp: an app that knows what an IPlugin is. currently the host app will have ComplexPlugin a...

How to suppress Objective-C warning "incomplete implementation of class 'SomeClass'"?

I have a class which routing many messages into inner component instance. So the class have only method definition, but no implementation. How can I suppress these warnings for those dynamic methods? -- edited -- My code sample: @interface SomeClass : NSObject { } - (void)mssageA:(id)value1 additionalOption:(id)value2; - (void)mssageB...

Design and Test Approach for given scenario

Hi All, This is not an homework. But an practice to understand what are the best practices to design , implement and unit test a particular scenario and so discussion explaining why a particular approach was taken as compared to other would be really helpful from understanding point of view to gain better understanding of how to approa...

What is the difference between various implementations of dc?

dc is the Unix standard desktop calculator. AFAIK, there are different implementations (like Solaris or GNU for instance). What is the exact difference between these implementations and what is the minimal subset of operations you can be sure a dc implementation has? ...

Which existing language features are the most difficult to implement and why?

Looking at some language features I sometimes wonder how on earth would someone implement a functionality like this. So my question is, which of the numerous existing language features are the hardest to implement? An explanation why is it so is most welcome (maybe even required?). To maintain order, please only one feature per post. ...

Concrete implementation of generic base class and extension method

The end goal for this post is to override the ToString() method of a concrete implementation of a generic base class while still being able to search the implementation using Linq flattening technique. So if you read this and see a better way let me know. I'm using Telerik controls for Silverlight and they won't change their api to allow...

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) gamephase.net/posts/view/master-slave-datasource-behavior-cakephp bakery.cakephp.org/articles/view/master-...

How is the square root function implemented?

How is the square root function implemented? ...

Java word game query

Hi Im coding a small app more or less like a word game. There is a requirement to validate a word that the user may create to check if it is a valid english word or not. I have thought of some ways to implement this -- 1) Have a hashmap with every english word as a key and a boolean as value. this way i could search for the key at the ...

Resources on IPSec and IKE

I have been asked to conduct a study on IPSec and IKE . Can anyone suggest to me good resources to start with . The basics , plus implementations . I do not want to just mug up the protocols . If there are some books or sites which let you make implementations or applications which uses these protocols , it would be helpful. ...

How are constructors and destructors implemented in C++?

I have 2 classes Base and Derived (derived publically from Base). When I write - Derived * d1 = new Derived; delete d1; Compiler sees that d1 is a Derived type object. So it calls the derived class constructor (which calls the base class constructor). I have 2 questions here - 1) Why do we follow this order? 2) How do these constru...

Damas-Hindley-Milner type inference algorithm implementation

I'm looking for information about the well-known Damas-Hindley-Milner algorithm to do type inference for functional languages, especially information about implementation. I already know how to do the W-algorithm, but I heard about recent new algorithms based on constraint generator/solver rather than usual unification. However, I can't...

Java N-Tuple implementation

I just made a Java n-tuple which is type safe.I'm using some unconventional methods to achieve type safety(I just made it for fun).I just sharing the code in-case someone can give some inputs on improving it or point out some flaw's. public class Tuple{ private Object[] arr; private int size; private static boolean TypeLock=false; priva...

vb.net implimenting IAsyncResult.AsyncState

I can easily do this in C#...but I need the equivolent in VB.Net. I need to be able to implement various IAsyncResult properties in VB.Net. IN C# Works like a champ... public object AsyncState { get; set; } IN VB.NET - THIS FAILS This fails because you cannot overload a property in VB.Net Public ReadOnly Property AsyncState() As ...