I have three classes (class A, class B, and class C).
Class A calls an instance of B and runs start().
Class B extends Thread, so when start() is called, anything in the run() method is executed.
In the run() thread, there is an instance of class C.
Is there anyway to allow a method in Class C to call a method in Class A, without ins...
Sorry for another vague example...but I have a single class where I'm starting a new thread instance. However, if I add a new thread instance, it interrupts (destroys?) the first.
But, if I run two instances of the class (separately, after I turn them into jar files) where each instance only opens up a single thread, they both run concu...
Hello,
I (now more than ever) see developers write huge amounts of layers such as:
implementation PresentationLayer ->
interface IMyDTO ->
implementation MyDTO ->
interface IMyService ->
implementation MyService ->
interface IMyDomainRepository ->
i...
Hello everyone,
I'm working on a small free Cocoa app that involves some SFTP functionality, specifically working with uploads. The app is nearing completion however I've run into a pretty bad issue with regards to uploading folders that contain a lot of files.
I'm using ConnectionKit to handle the uploads:
CKTransferRecord * record;...
I'm looking for some sample code demonstrating how to index PDF documents using Lucene.Net and C#. Google turned up a few, but none that I could find helpful.
...
Is something like this possible in Actionscript?
Java:
URLFetcherFactory.setCreator(
new IURLFetcherCreator() {
public IURLFetcher create() {
return new URLFetcher();
}
}
);
Actionscript:
?
I've been wondering about this and have been unable to find anything that indicates it's possible. Figured if it was ...
I have the convenient object factory template that creates objects by their type id names. The implementation is pretty obvious: ObjectFactory contains the map from std::string to object creator function. Then all objects to be created shall be registered in this factory.
I use the following macro to do that:
#define REGISTER_CLASS(cla...
What practices should developers avoid when implementing libraries?
For example, libraries should not use the following (or default usage should be disabled):
System.err
System.out
exception.printStackTrace
System.exit
The developer of an application needs full control over the text that is presented to the user (language being one r...
Let's say there is a function like
void SendToTheWorld(const Foo& f);
and I need to preprocess Foo object before sending
X PreprocessFoo(const Foo& f)
{
if (something)
{
// create new object (very expensive).
return Foo();
}
// return original object (cannot be copied)
return f;
}
Usage
Foo foo;
SendToT...
I am planning to do an implementation project as my one year MTech thesis, can you help me find some places to find any good work to be implemented ? I already looked into Tor, nmap and some other opensource projects involved in GSOC. Can you please direct me to other opensource work going on in networking where I may find some work to b...
Dealing with Java - which the option you prefer in the most cases - reference impl. of some technology or another one, provided by any other vendor?
Some examples - there is Glassfish server, which is basically official reference implementation of the JEE.
However, i really seldom see people use that.
Jboss, some free Apache projects re...
Some time ago, people here helped me very well with code. Now I'm tasked with adding a small function:
I really like to count the winning numbers which are defined in picks.
Can somebody explain/edit the code for adding a extra column behind the last column with the total of green/winning numbers?
Here is the website: http://www.cold...
I need to implement extract min for heap(in c++ if possible), could not get this method from STL heap.
...
I've experienced first hand the extent of the horror and foot-shooting that the ugliness of PHP can cause. I'm onto my next project (you may be wondering why I'm not just switching languages but that's not why I'm here) and I've decided to try doing it right, or at least better, this time.
I've got some models defined, and I've started ...
Are there any good resources to develop a good understanding of ERP implementation process. (may be websites,books or case studies)
By the way I have gone through some Harvard case studies and referred to some ERP books but I am not satisfied.
Thanks
...
I'm concerned about best practices that help reflecting the design of the software system in the implementation. Simple example may be naming: The names of the structures and identifiers should be equal. Do you have any advices o this?
...
Hi!
In advance: sorry for the noob question but I'm learning Cocoa & Objective-C and I have this problem on which I've been searching for a complete hour. It'll be very nice if someone could find the problem!
Here's my two files:
Driver.m
#import "Driver.h"
@implementation Driver
- (int)go:(BOOL)distance {
if (distance) {
return ...
Any recommendations for a C/C++ kd-tree?
I'm looking for an existing implementation which the poster hopefully has worked with or has heard good things about. Also, I need to use this kd-tree to do a 1/2-NN search.
...
I'm looking for a Common Lisp implementation I ran across once, sometime in the past year or two. I only remember a few things, and I don't know how to search for it based on these facts, so maybe somebody here can help.
it was open-source, but wasn't one of the big ones (SBCL, CMUCL, MCL, etc.)
it was likely incomplete; it looked alm...
I keep hearing the statement on most programming related sites:
Program to an interface and not to an
Implementation
However I don't understand the implications?
Examples would help.
EDIT: I have received a lot of good answers even so could you'll supplement it with some snippets of code for a better understanding of the sub...