Hello eveyone... In my app, I have deal with several different "parameters", which derive from IParameter interface, and also ParamBase abstract base class. I currently have two different parameter types, call them FooParameter and BarParameter, which both derive from ParamBase. Obviously, I can treat them both as IParameters when I ne...
New to json data and struggling i guess the answer is real easy but been bugging me for the last hour..
Sample data
{
"data":
{
"userid": "17",
"dates": {
"timestame": "1275528578",
},
"username": "harino54",
}
}
Ok I can pull userid or username easy enoug...
Does it affect the time in loading the application?
or any other issues in doing so?
...
Hi,
I have a small script we're using to read in a CSV file containing employees, and perform some basic manipulations on that data.
We read in the data (import_gd_dump), and create an Employees object, containing a list of Employee objects (maybe I should think of a better naming convention...lol). We then call clean_all_phone_numbers...
I'm having difficulties with some general OOP & Java approach. There are various ways to let classes/objects communicate with each other. To give a simple example:
I need object A to perform action X.
Object A needs P, Q and R to perform this action X.
Will then Object A retrieve P, Q and R by itself (within action X), or must these ...
Possible Duplicate:
Interface vs Base class
A class implementing an interface has to implement all the methods of the interface, but if that class is implementing an abstract class is it necessary to implement all abstract methods?
If not, can we create the object of that class which is implementing the Abstract class???
...
Hi I have a class called User and a method called insertUser().
function insertUser($first_name, $last_name, $user_name, $password, $email_address, $group_house_id)
{
$first_name = mysql_real_escape_string($first_name);
$last_name = mysql_real_escape_string($last_name);
$user_name = mysql_real_escape_string($user_name);
...
Stackoverflow users,
How do you keep yourself from creating large classes with large bodied methods. When deadlines are tight, you end up trying to hack things together and it ends up being a mess which would need to be refactored.
For me, the one way was to start with test driven development and that lends itself to good class design a...
I want to develope and big project but I really don't know what is the best way to model my project. do I even need to model my project?
What are the most practical OOP software modeling methods in real world projects? what are the bests one and most useful ones?
please guide on this.
...
Is there a way in PHP5 to only allow a certain class or set of classes to call a particular function? For example, let's say I have three classes ("Foo", "Bar", and "Baz"), all with similarly-named methods, and I want Bar to be able to call Foo::foo() but deny Baz the ability to make that call:
class Foo {
static function foo() { pr...
If I have a class:
class A {
public A() { }
}
and another
class B extends A {
public B() { }
}
is there any way to get B.B() not to call A.A()?
...
Hi there,
For a program I am developing I have to create a grid of nodes. For instance a grid of 10x10 = 100 nodes. A node can contain several variables. I am having problems visualizing this in a Object Oriented way. My idea is that I let the program automatically create an object for every node, as I have made a class "Node".
My quest...
How can I dynamically pass "items" to class function?
For example here it is a piece of some class and its function where I declare an element of object (items) as $b:
//..........
public function __add2SomeObj($b) {
$namespc = $this -> __someObj(); // __someObj() returns object
$namespc -> cats = $b;
...
var objs = new Array();
function Foo(a) {
this.a = a
$("#test").append($("<button></button>").html("click").click(this.bar));
}
Foo.prototype.bar = function () {
alert(this.a);
}
$(document).ready(function () {
for (var i = 0; i < 5; i++) {
objs.push(new Foo(i));
}
});
is it possible to make it so that ...
Please tell me situation where interface is better than abstract class in Java
...
Please tell me a real time situation to compare String, StringBuffer, and StringBuilder?
...
Hello Everyone,
I am used to doing dynamic Binding in PHP this way
function ($className)
{
$obj = new $className();
.
.
.
}
here $className is a String parameter and based on name of the class an object of that class is created. So when I need to add more functionality I just add another class and everything get sorted out automa...
I have recently experienced and understood the importance of "Design Patterns and Principles" implemented in our project. I was just wondering if you all would share the importance of Design patterns and principles, of how using them in your source code the project was enhanced, so that we can learn out of your vast programming experienc...
Can an interface be declared as final in Java?
...
Hi I'm new to OOP with PHP. I'm wondering how OO comes into play when selecting data from a table. i.e. i have a users table and a user profile page. So I have a User class. Do I select the user data from the table then create a new object of class User and define the properties?
Thanks for anyone that can clear this up for me!
Regards...