I've got 2 applications (lets call them AppA and AppB) communicating with each other.
AppA is sending objects to AppB.
There could be different objects and AppB does not support every object.
An object could be a Model (think of a game, where models are vehicles, houses, persons etc).
There could be different AppBs. Each supporting anoth...
Hello all,
I got a C++ object oriented program that was working right. I have decided to modify it by adding some polimorpysm definining a class hierarchy with virtual methods. When I call the virtual method it produces an fault segmentation error, likely because I have trash in the object.
This is the call and the warming up
GPU...
Is there any advantage if i check if the object already exists in an language like php?
/**
* User object
* @var My_Model_User
*/
protected $user = null;
/**
* Setup
*/
public function __construct()
{
if ($this->user === null) {
$this->user = new stdClass();
}
...
Is it ok to use a container to create the objects that are going to be tested? Or should I build them manually?
...
I have done some really serious refactoring of my text editor. Now there is much less code, and it is much easier to extend the component. I made rather heavy use of OO design, such as abstract classes and interfaces. However, I have noticed a few losses when it comes to performance. The issue is about reading a very large array of recor...
I have a very simple GUI that accepts two parameters and then calls three other classes whose names are DigitalFilter(), BeatByBeatVariables(), and GetSummaryOfWholeTest(). This is my first time writing up classes, and I need help with the syntax.
Specifically, can you help me with inheritance? I want the GUI's class MainWindow(wx.Fra...
Hi guys
I was wondering what these terms are in php...I looked up google but couldn't find any good answers. I would appreciate if someone here can help me about it. Thanks a lot.!!!
...
I know that is a beginner's question. I'm new to java and and also to programming in general.
Say I got a class that has only static data, example:
class Foo {
private static int x; }
I want to use the class without instantiating any object. So I want to be able to do:
Foo.setX(5);
Foo.getX();
What is the best way to implement th...
I'm pretty new to Javascript, as my SO profile will attest.
I've just been reading up on a few tutorials and come across something I don't totally understand in regards to Object Orientation and Encapsulation when applied with Javascript.
The tutorial stated that Javascript objects can be declared like this:
var myCustomObject = new O...
Say I got an Employee class that has a hire date data member. This member only get set one time only and it is constant too. So it'll get initialised when the object is created.
If I want the class to have a method that returns the hire date, what's better:
getHireDate();
Or just:
hireDate();
Am I thinking too much :D ?
...
Hi!
There is task to implement some triangle class with interface like this
public interface Triangle {
void moveApex(Point from, Point to);
List<Point> getApexes();
void rotate(double angle);
void setLocation(Point p);
Point getLocation();
void setSize(Dimension d);
Dimension getSize();
}
Where Point and ...
The static modifier means that the type cannot be instantiated or a member cannot be associated with an instance. But whats the benefit of this restriction on instantiation and under what use case scenario should types/members be declared static ?
...
I'm a confused newbie. I read in a tutorial that you create a javascript object like so:
function myObject() {
this.myProperty = "a string";
this.myMethod = function () {
//Method code
}
}
Then I read somewhere else that you create an object like so:
var myObject = {
myProperty: "a string",
myMethod : fun...
Possible Duplicate:
How will I know when to create an interface?
I'm wondering about the point of using an Interface.
Do you use Interfaces? If so, when do you decide to use them and when do you decide NOT to use them?
I've currently got interfaces defined for my service layers and my repository layers, but I'm wondering i...
I have an object called $object formed as follows:
stdClass Object ( [PLAYER_ID] => 141 [STATUS_ID] => 16 [LOGIN_NAME] => mikemo21 [EMAIL] => [email protected] [PT_BALANCE] => 13775 )
I'd like to add a parameter to this, perhaps so it appears as follows:
stdClass Object ( [PLAYER_ID] => 141 [STATUS_ID] => 16 [LOGIN_NAME] => mikem...
I have a class called 'Inventory' that has two subclasses, 'Drink' and 'Condiment'. They are a part of a software system being developed for use in a hot drinks vending machine. Note that this isn't really going to be implemented, rather it is a piece of coursework for my Software Engineering class. Anyway, I'm having trouble deciding wh...
Hi,
For a Ruby on Rails app, I'm having this Movie object which has several attributes. Pretty much every page needs to compare some movies to a full list of these movies sorted by ratings, so I used to cache this big sorted list. It was useful, because I could directly use this list of Movies and all their attributes without any other ...
Hi,
I can't figure this one out:
I have a function, e.g.
function test () {
this.rating = 0;
$j('#star_rating a').click(function() {
alert(this.rating);
});
}
var foo = new test();
On click it alerts "undefined". What is wrong? Please help.
...
I'm try out a few game mechanics and I tried to mimic WoW's periodic events such as "x damage every z seconds". I've used Timers so far to schedule periodic tasks in this case where I'm trying to regenerate health but is it really necessary to pass "this" in order to modify the instance variable, _mana? Do I really need a separate TimerT...
Possible Duplicate:
What does DateTime? mean in C#?
Hi All,
I recently came across with some code in C# where float? is used as return type. I want to know what is the concept behind using this and in which scenario we need to use it against normal float return type.
Thanks
...