1
голосов
1ответов
959 просмотров

How do I control what images Facebook attaches to the feed story when my website is shared?

Possible Duplicate: How does Facebook Sharer select Images? When I add a Facebook link to my website, it picks up randomly large images from the site, and not quite attached to the story. How can I control what images are picked up by Facebook?

2
голосов
4ответов
135 просмотров

Interfaced function returning type of implementing class

I am looking to implement an interface which has a function which will return the type of the base class without using a generic interface. Is this possible? class MyClass : MyInterface<MyClass> // Would rather use one below class MyClass : MyInterface // Functions already know to use M...

1
голосов
5ответов
174 просмотров

Does typing to interface increase performance?

If I have an object with 50 getters/setters, where every 10 of them is defined under a new interface, and I type the object as one of those interfaces, will it increase performance? Not sure how method/variable lookups work, but it seems that if you type the object to something that has fewer me...

3
голосов
3ответов
6039 просмотров

IUnknown interface -for COM \COM + objects?

I am bit unclear in using IUnknown interface. Is IUnknown interface only meant to work with COM /COM + Objects and some unmanaged codes like Win APIs?

1
голосов
1ответов
244 просмотров

Linq Expression in nHibernate

I have an interface, called IRepository. One of the methods in this interface is: IEnumerable<T> FindByQuery(Expression<Func<T, bool>> predicate); I then have (for example) an IUserRepository, that implements IRepository. In my implementation of IUserRepository, currently ca...

0
голосов
3ответов
175 просмотров

Software Applications Designs

Is strict OOD/Interface-based design/Aspect oriented design is desirable in case of a software application development? Or, is it desirable to mix all of them for the ease of coding? Are all successful and highly maintainable software applications strictly Object oriented, or, strictly Interfac...

2
голосов
1ответов
863 просмотров

Resolving interface as UIElement (Unity, PRISM, C#)

when using PRISM the normal way to hookup things with unity is to define an interface and register an implementation with this interface. Now, I have a problem regarding views. The scenario is simple: Assume a custom video control which allows to set a Play command. This control is defined by a ...

1
голосов
3ответов
4209 просмотров

Overwrite variable or force usage?

I want to force a class to define a certain variable from the class it implements. e.g. class Fruit{ String name; // Cause each fruit has a name } //Apple wants to get an error if it does not use the name variable class Apple implements Fruit { String name = "Apple"; } Is there a wa...

0
голосов
7ответов
556 просмотров

Interfaces - Is This Overkill?

This is a pretty basic OO question but I'm curious if I've been going overboard. Let's assume the following hierarchy, which is an example along the lines of what I would typically create: IVehicle - IFlyable - IPlane - Plane - IHelicopter - Helicopter - IDri...

0
голосов
1ответов
37 просмотров

Alternate name for BackingStoreException

I'm about to undertake the task of abstracting out all SQLExceptions from an ORM's public interfaces with something more generic - that is declaring a generic exception which would in most cases wrap say an SQLException), and I'm wondering about naming. I'm thinking of something along the lines ...

3
голосов
2ответов
1325 просмотров

Translating a MethodInfo object obtained from an interface type, to the corresponding MethodInfo object on an implementing type in C#?

The question I have is this: If I have the MethodInfo object, for a method, obtained from an interface type, and I also have the Type object for a class that implements this interface, but it implements the said method with an explicit implementation, how do I correctly obtain the corresponding M...

11
голосов
11ответов
636 просмотров

Should I still code to the interface even if I am ONLY EVER going to have ONE implementation?

I think the title speaks for itself guys - why should I write an interface and then implement a concrete class if there is only ever going to be 1 concrete implementation of that interface?

100
голосов
7ответов
93786 просмотров

Why are all fields in an interface implicitly static and final?

I am just trying to understand why all fields defined in an Interface are implicitly static and final. The idea of keeping fields static makes sense to me as you can't have objects of an interface but why they are final (implicitly)? Any one knows why Java designers went with making the fields i...

1
голосов
3ответов
1589 просмотров

How to get the last key pressed without stopping the C program?

Writing an application with command line interface and I would like to know at any time if F1 or ESC or an arrow key is pressed. What is the simplest way of doing this? I would like to avoid using a readline type library. This is a Linux specific question; the program is not multithreaded.

0
голосов
3ответов
211 просмотров

Code using classes and interfaces

I'm new to Java, but I understand the basics. I know that interfaces are abstract classes and they're used for emulating multiple inheritance (kind of - I know that in Java this is not allowed). I have this code; would you explain it to me? Here is part of a method that iterates over a list of c...

3
голосов
4ответов
520 просмотров

How to use java interfaces with multiple implementing classes

public interface Foo { } public class SpecificFoo implements Foo { } public interface SomeInterface { void thisMethod(Foo someKindOfFoo); } public class SomeClass implements SomeInterface { public void thisMethod(Foo someKindOfFoo) { // calling code goes into this function ...

3
голосов
4ответов
1632 просмотров

Probable overuse of java interfaces in my implementation of Ms. Pac-Man

I have been a Java programmer for the last 6 years, and since the beginning of this year I got interested in game programming. So, I thought it was a good idea to start with a popular game and I implemented the game Ms. Pac-Man in Java. I can say that my implementation looks about 90% similar to ...

15
голосов
4ответов
5252 просмотров

javac complains: cannot find symbol on enum implementing interface

I have three java types as defined below: Main.java: import java.util.Arrays; import java.util.List; public class Main { private Object callFunction() { OperationDefinitions func = OperationDefinitions.CONCATENATE; List<Object> values = Arrays.asList(new Object[...

3
голосов
2ответов
4418 просмотров

Is there an HTML5 RIA toolkit available?

I think that HTML5 is the way of the future for the development of Ria application due to the reduction of the ammount of javascript need for basic animation, video, etc. So what are the tools available NOW to develop html5 interfaces? EDIT: It's been a year since this question has been asked....

1
голосов
1ответов
344 просмотров

ATL/COM: Defining a COM interface that won't be available outside of the DLL?

I have an ATL/COM-based DLL, made using VC++ 6.0. It's used for various executables built using VB6. I want to add some COM interfaces that will not be accessible via VB6, for the internal use of the DLL only. I want them to be COM interfaces rather than just C++ interfaces due to the fact tha...

1
голосов
2ответов
374 просмотров

Can I force certain settings by user in SQL Server?

I have a bunch of users making ad-hoc queries into a database running SQL Server. Occasionally someone will run a query that locks up the system for a long period of time as they retrieve 10MM rows. Is it possible to set some options when a specific login connects? e.g.: transaction isolation ...

1
голосов
3ответов
684 просмотров

Flex workflow and best practice

While reviewing the tutorials and example Flex projects, they seem to focus mainly on form elements and data grids, rather than delivering content in a more visual way. Which is what I will need for this upcoming project. As a result, I have a gap in my comfort level that I'm hoping that a season...

6
голосов
1ответов
1624 просмотров

Does an abstract class work with StructureMap like an interface does?

I am a big fan of StructureMap and use it in just about everything I do. I have only ever used it with interfaces though. I was wondering if anyone had any experience using with abstract classes? or...does it not support that type of wiring? If you got this to work can you post an example? T...

11
голосов
5ответов
27007 просмотров

How can a singleton class use an interface?

I read at many places that singletons can use interfaces. Some how I am unable to comprehend this.

1
голосов
2ответов
3516 просмотров

How to pass an Interface object to a WebMethod?

I have a .Net web service with web method which take a Interface object as parameter, whenever I try to access the method I get exception saying : Cannot serialize member Product IProduct because it is an interface. Any suggestions to solve the problem ?? [WebMethod] Public double CalculateTot...

0
голосов
1ответов
1126 просмотров

How to add SOAP headers in Silverlight?

I'm trying to secure a data service used by my Silverlight, and am looking at using a custom SOAP header obfuscated into the SL and HTTPSed. I've found any number of examples showing how to do this using IClientMessageInspector, IEndpointBehavior, and a few other things. Okay... it all looks st...

0
голосов
2ответов
522 просмотров

Database Structure to store multiple inheritance classes

I have two distinct (no inheritance) interfaces: IInvestable and IPricable and two classes: IndexClass and FundClass that are stored in seperate tables in my DB. IndexClass is IPriceable FundClass is IPriceable and IInvestable. I need a table to store prices against an IndexClass and a FundCl...

5
голосов
10ответов
3435 просмотров

In Java, when should I use an abstract method in an interface?

I have the following interface in Java public interface IFoo { public abstract void foo(); public void bar(); } What is the difference between foo() and bar()? When should I use abstract? Both seem to accomplish what I want unless I'm missing something subtle? Update Duplicate of Why...

4
голосов
2ответов
594 просмотров

Interface Segregation in Qt

I always try to apply the S.O.L.I.D principles and I really like the Qt toolkit but I find myself stuggeling all the time with the single inheritance rule. If you are using multiple inheritance, moc assumes that the first inherited class is a subclass of QObject. Also, be sure that only...

1
голосов
2ответов
374 просмотров

Recursive mocking with Rhino-Mocks

I'm trying to unittest several MVP implementations and can't quite figure out the best way to mock the view. I'll try to boil it down. The view IView consists e.g. of a property of type IControl. interface IView { IControl Control1 { get; } IControl Control2 { get; } } interface IContr...