interface

What programming language or components is used with ESET NOD32 v4?

I really like the interface of ESET NOD32 antivirus program and I would like to know with what is this done and what components are used? http://coolmaliya-gifts.comli.com/images/nod32-3-1.jpg ...

Using TCollection with an already-defined class

(Note: This is somewhat related to my last question). I am new to using TCollection in Delphi, and am still wrapping my head around the various ways to handle one-to-many class/property-item relationships. Exploring TCollection and TCollectionItem, I ran into a couple questions: 1) Is it possible to use TCollection or TOwnedCollectio...

How does the HTML5 Web Sockets Interface work?

I heard about the Web Sockets Interface in the HTML file specification from a relevant question here. It sounds very promising! I don't understand how it works does it still use the HTTP protocol and works-around it or does it work something like TCP sockets? ...

Multiple Interface Inheritence without using Interfaces

Yes, the title doesn't make much sense, but here's my situation. I have two interfaces, say IGen and ITrans. Some of my classes implement IGen, some implement ITrans and some implement both ITrans has one method (Translate) and IGen has one method (Generate). For the classes that implement both ITrans and IGen Generate simply calls Tra...

java: How to make defensive copy when you only have an interface

If an object takes a reference to another object, I know it can be a good idea to make a copy of the passed-in object to preserve encapsulation. But, what if all the object knows about the object passed in is that it implements an interface? For example, if I have an object that takes an implementation of FilenameFilter in its construc...

Better to use a list of pairs, or two lists?

I'm writing a method that forms part of the public interface of a Java class. It broadly allows the caller to specify the values to assign to a number of database entities - so they must supply both the IDs of the entities themselves, and the values to assign to them. I'm wavering between implementing this as a List<Pair<Integer, Integ...

Retrieving a Type's leaf interfaces

The System.Type class provides a GetInterfaces() method that "gets all the interfaces implemented or inherited by the current Type". The problem is that "The GetInterfaces method does not return interfaces in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which interfaces are ret...

dynamic_cast of a COM object to a COM interface doesn't bump the reference count, does it?

If I have a C++ class, X, which implements the COM interfaces IY and IZ, and I have a pointer y to the IY interface of an object of type X, and I do this: IZ *z = dynamic_cast<IZ *> ( y ); That doesn't bump the object's reference count, does it? I don't have to do a Release() to account for it, right? If it matters, I'm using ATL/COM...

Delphi, MDI vs Tabs for multi-document interface

I'm developing a multi-document application. Currently it uses MDI which is quite convenient for me (as a developer) as well as for users I believe. However there is one "against" - I haven't found a solution to quickly load many child windows (each time the window is created and maximized to fill the parent's area, there is an 'animatio...

F#: Implementing the same interface at different generic instantiations

In C#, I can implement a generic interface twice on one class, using two different type-parameters: interface IFoo<T> { void Foo(T x); } class Bar : IFoo<int>, IFoo<float> { public void Foo(int x) { } public void Foo(float y) { } } I would like to do the same thing in F#: type IFoo<'a> = abstract member Foo : 'a -> unit typ...

Unmanaged C++ tlh file not updating?

I have an IDL file with some interfaces in it. [ object, uuid(newguid), dual, helpstring("NewInterface Interface"), pointer_default(unique) ] interface INewInterface: IOldInterface { [id(newid), helpstring("method NewMethod")] HRESULT NewMethod([in] BSTR bstrParam ); } But when I compile my code it does not see my ne...

.Net User Control Interface

I have a very basic application that has buttons in a toolstrip. When a button is clicked it adds the appropriate User Control to my List<Control>. I then loop through that list creating either TabPages or mdi forms, with the user controls as children. I created an interface for these user controls so that I can ensure that they contain ...

How can I interface with the Perl debugger API?

Is there a way to interface the Perl debugger API which perl is using to control its debugging programmatically? ...

How to approach a class which implements an interface and has a base class?

Imagine the following code: MyService myService = new MyService(); myService.Start(); myService.DoStuff(); The MyService class looks like this: public class MyService : ClientBase, IMyService { ... } Now I wanted to change the existing code to call this class by using its interface: IMyService myService = GetMyService(); myService...

How do I extend Java interface containing generic methods in Scala?

Suppose we have the following Java interface: // Java public interface Foo { <T> T bar(Class<T> c); } How should I extend it in Scala? Writing // Scala class FooString extends Foo { override def bar(c: Class[String]): String = "hello, world"; } will cause the compiler to throw "class FooString needs to be abstract, since meth...

Get rid of NewApplication in a dynamic way?

Hi, I'm distributing two different versions of one product (like light and pro version). I don't know how to use the same MainMenu.xib if I can not change the placeholder NewApplication in a dynamic way. I would like to use the bundle name instead of "NewApplication". I hope there is an official way to do this without hacking. Thank yo...

Applying Patterns to User Interface design, not only application design

I am a dotnet newbie. After years of procedural coding, my company is moving on to the HOTTEST new trend i.e WINDOWS FORMS :) Our Application is TabbedMDI. Basically we have a menu on the left and clicking an entry opens a new tab for CRUD. I have seen some MVP samples that have a couple of textboxes and it demonstrates moving the code...

Custom autorotation iPhone SDK

Hi! I want to implement my own way of autorotating the interface: Code: // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { NSLog(@"should!"); [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuratio...

Inner Interfaces?

I'm pretty new to Java and I don't understand what is this structure. I know what is an interface and how is defined, but in this case, I really don't know. Could you tell what is about? public interface WebConstants { public interface Framework { String ACTION = "action"; } public interface Look { String LI...

Should I expose iterators and adaptor methods or a whole container in C++?

Consider the piece of code: class Foo { // ... std::vector<Bar> bars; }; Should I expose the whole container, or should I expose typedef'd iterator class and write adaptor methods (begin(), end(), size(), and whatever I need)? If the answer is it depends, how should one make a decision? ...