I know there are a billion questions regarding what books are best and I'm sorry for posting another, but all of them see to have an orientation to a language I am not familiar with.
My problem is I learned to program before OO became big, then I stopped programming for a few years, moved into web design, moved into coldFusion, and now ...
Hi dudes, and dudetts!
So I need to call some instance methods from class methods in objecitve-c...
Example :
+(id)barWithFoo:(NSFoo *) {
[self foo]; //Raises compiler warning.
}
-(void)foo {
//cool stuff
}
So my question; StackOverFlow is how do you do such things in Objective-C, I'm new kinda to OOP, so am I mad, or is there a ...
I've had trouble with the examples in the PHP manual, so I'd like to ask this here...
I have an array of objects.. Is there a way to sort it based on the contents of the object?
For example, my array is:
Array
(
[0] => stdClass Object
(
[id] => 123
[alias] => mike
)
[1] => stdClass Obje...
There are many debates on whether Object Oriented Programming is good or not. But, using OOP in Php is slower. Would it be a good trade to use procedural programming and faster speed and OOP with slower speed (since classes have to be initiated every time a page loads and big websites will start to become slow).
More importantly, would ...
Hi All
I've done a bit of Linq programming with TDD ASP.Net MVC and loved it. Digressing, I'm now learning webforms against stored procs and cannot use linq. I would like to retain some of the loose coupling and testability enjoyed with MVC.
I didn't have the time to learn and setup a dependency injection infrastructure so instead ...
I'm currently building a library to allow a wide variety of different minority games to be simulated. This involves agents choosing between two choices, say, A and B so the primary functionality of an agent is to choose. An agent wins a point for a turn in the game if it ends up in the minority group after all agents have chosen.
There ...
public interface IInterface
{
void show();
}
public class MyClass : IInterface
{
#region IInterface Members
public void show()
{
Console.WriteLine("Hello World!");
}
#endregion
}
How do I implement Python equivalent of this C# code ?
class IInterface(object):
def __init__(self):
pass
...
Please help :/
In Java you can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces?
Cheers!
...
Is there something similar to Java/.NET serialization for C++?
...
suppose i have a class engin and i inherit a class car from engin class
class engin
{
public:
engin(int nobofcylinders);
void start();
};
class car:private engin
{
public:
car():e(8){}
void start()
{
e.start();
}
private:
engin e;
};
now the same can be do...
I have been reading and practicing C# / ASP.Net 2008 for the past 6 weeks. But I still dont have the confidence to hit the ground running on a job. Are there any tutorial websites that show practical object oriented programming that I can use to work with in order to gain confidence? The second part of my question is that embedding javas...
So I have a simple Javascript Object:
function Vector(x, y){
this.x = x;
this.y = y;
this.magnitude = function(){};
this.add = function(vector){};
this.minus = function(vector){};
this.normalise = function(){};
this.dot = function(vector){}
//...
}
I would like to perform the following ope...
I am developing a web application with PHP and MySQL. I have an entity named, User, that has many one-to-many relationships (with other objects) within it (list of Addresses, list of Emails, list of PhoneNumbers, etc). These many addresses, emails, phone numbers are supplied to the user via junction tables in the database (user_link_addr...
I made a module prototype with the aim of building complex timer schedules in python. The class prototypes emulate Timer objects, each with their waiting times, Repeat objects that group Timer and other Repeat objects, and a Schedule class, just for holding a whole construction or Timers and Repeat instances. The construction can be as c...
Dear Sir!
as we know that the trees are recursive data structures, We use recurrsion in writing the procedures of tree like delete method of BST etc.
the advantage of recurrsion is, our procedures becomes very small (for example the code of inorder traversal is of only 4 or 5 lines) rather than a non recurrsive procedure which would be...
I have a problem that involves a relatively large object hierarchy as follows:
game has one community manager
community manager has one network
network has many players
network has many friendships
player has one strategy manager
player has one memory
player has one neighbourhood
neighbourhood has many players
strategy manager has many...
I'm working with the following code, and when run I get nothing displayed on the screen.
class ModelBase
{
public $db_server;
public $db_user;
public $db_password;
static $db_conn;
public static $DBSERVER="localhost";
public static $DBUSER="user";
public static $DBPASSWORD="password";
public static $...
What's point of declaring an interface as abstract? Same thing for an interface method. Is there a point to it?
eg.
public abstract interface Presenter {
public abstract void go(final HasWidgets container);
}
...
So I've been working on some Flash stuff for a client, and we're recently moving everything into a svn repo, so I need to get all of the class files to be included in the repo.
The issue I'm having is that I usually am the only one working on flash stuff, and this project is a little old, so I'm not absolutely sure which class files are...
What are some alternatives to inheritance?
...