I have a question about where to document logic in javadocs. For example, I have the following method signature in an interface:
public int getTotalAssociationsAsParent(Long id, Long type);
The method returns associations where the given ID is the parent and the association is of type 'type'. ID is required, but if type passed in is...
I'm writing a set of collection classes for different types of Trees. I'm doing this as a learning exercise and I'm also hoping it turns out to be something useful. I really want to do this the right way and so I've been reading Effective Java and I've also been looking at the way Joshua Bloch implemented the collection classes by lookin...
This should be a simple answer, i believe its going to be a no,
but taken from a larger project, i have an interface and the procedure
iMyUnknown= interface(IInterface)
['..GUID..']
end;
procedure WorkObject(iObj :iMyUnknown);
i know this works
var
MyUnknown : iMyUnknown;
begin
if supports(obj, iMyUnknown, MyUnknown) then
Work...
I want to persist my litte zoo with Hibernate:
@Entity
@Table(name = "zoo")
public class Zoo {
@OneToMany
private Set<Animal> animals = new HashSet<Animal>();
}
// Just a marker interface
public interface Animal {
}
@Entity
@Table(name = "dog")
public class Dog implements Animal {
// ID and other properties
}
@Entity
@Ta...
I am currently learning python in preperation for a class over the summer and have gotten started by implementing different types of heaps and priority based data structures.
I began to write a unit test suite for the project but ran into difficulties into creating a generic unit test that only tests the interface and is oblivious of th...
Hi all.
I thought the reason behind having asynchronous requests is to have it run in the background?
Well, I'm uploading something using NSURLConnection connectionWithRequest, it all works fine. The only thing is, it results in the Beach Ball of Death and the user interface becomes unusable. Of course there's the possibility to run it ...
Is there a way to configure JAXB to so that a generated class implements a specified interface? I'm intending to use JAXB generated classes as DAO's and they should be able implement my DAO interface.
...
I am not sure how to use StructureMap to scan for all repositories in a particular namespace. Most repositories take the form:
namespace CPOP.Infrastructure.Repositories
{
public class PatientRepository : LinqRepository<Patient>, IPatientRepository
{
}
}
namespace CPOP.Infrastructure.Repositories
{
public class LinqRepo...
I have implemented the following interface:
template <typename T>
class Variable
{
public:
Variable (T v) : m_value (v) {}
virtual void Callback () = 0;
private:
T m_value;
};
A proper derived class would be defined like this:
class Derived : public Variable<int>
{
public:
Derived (int v) : Variable<int> (v) {}
void Callbac...
Hi,
From some reason, any time I connect IBOutlets or IBActions in Interface Builder, and build my app, the app crashes.
In the Console Log I get this:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key leftWebView.'
How can ...
In a distributed application that has multiple databases that support it, we're looking for better ways to handle the creation of the database connections. For example, suppose your system has three database behind it:
Business Data (orders, products,
categories, etc)
Metadata (data about
the structure of the business data)
User Data (...
i want measuring tool in project that will be same as measure it in firefox(add-on)
how to do this.
...
Hello,
I have built several classes (A, B, C...) which perform operations on the same BaseClass. Example:
struct BaseClass {
int method1();
int method2();
int method3();
}
struct A { int methodA(BaseClass& bc) { return bc.method1(); } }
struct B { int methodB(BaseClass& bc) { return bc.method2()+bc.method1(); } }
struct C {...
Here's some code from an FTP application I'm working on. The first method comes from an interface which is being triggered by a class which is monitoring server output.
@Override
public void responseReceived(FTPServerResponse event) {
if (event.getFtpResponseCode() == 227) {
try {
setupPassiveConnection(event.get...
Hi,
Nowadays we have screens like 1920x1200 and 1680x1050 in popular use and some even use 2560x1600 resolution while some older systems still rely on a 800x600 resolution. I am writing a software that looks good on a 1680x1050, but too small on a 1920x1200 and too large on a 1024x768. Do you have suggestions how to go for designing an ...
I've stumbled upon this "feature" of C# - the base class that implements interface methods does not have to derive from it.
Example:
public interface IContract
{
void Func();
}
// Note that Base does **not** derive from IContract
public abstract class Base
{
public void Func()
{
Console.WriteLine("Base.Func");
...
Hi all,
what I would like to know if it's possible to build a view and its correspondent xib file.
Then, in a generic controller, load this view programmatically and add as a subview to the current view.
This subview should act as a generic info box which can be loaded by many controller.
thanks
Leonardo
...
Hi
I am a relatively new user of Visual Studio and I am trying "program against interfaces". I can see that when I create a class I can "Extract Interface" from the Refactor menu but you seem to only get one shot at this.
ie. If I add a read only property FullName to my Customer class I would like to be able to right click and update ...
My application is a non-relational database application with a tcl interface to retrieve data. I would like to add SQL programming interface to my application.
Is there any library that converts SQL/PLSQL statements to API calls? It should also support stored procedures.
SQLite(Embedded) has 'virtual table' mechanism that suits my req...
I'm rather new with the whole OSX programming, I wanted to stick a WebView into an empty app. Apparently it isn't as simple as sticking a WebView on a window in interface builder and creating an outlet.
IBOutlet WebView *webView;
It gives me a
expected specifier-qualifier-list before 'WebView'
and when I don't use an outlet, it te...