Questions for class


Passing a variable to a method in a class

I'm new to using classes and I'm trying to pass a variable to one of the methods inside of my class. How do I do it?

copyWithZone being called

So i have 2 Objects.

PHP--> Created a class, but assigning values to the properties fail

I'm creating a class and attempting to use it. However, the values I set are not being retained. Please advise!

VB.NET - Provide predefined creation settings in a class

I'm writing a theming class called FormTheme for a VB.NET form application. It contains colour scheme information that can be applied at runtime to form controls. Currently there are three ways to

Extending abstract class in Android: A LocationProvider

This is probably a simple/dumb problem. I can't find any documentation on it.

Defining a variable through a subclass

I'm using Java and I'd like an attribute of a class to be of any class derived from the class Service. I tried to write this:

Java Class.forName() from distant directory

I am currently loading Java classes using Class.forName() to load it.

How to extend and use members of a superclass in c++?

I'm trying to code a class to handle joystick input (irrelevant), and being rusty on inheritance and new to c++ I'm having some confusion while trying to create a subclass of my joystick class. Her...

Django infer a field from other fields

I am currently having a model:

using findviewbyid in a class that does NOT extend Activity in android

I have a class that is currently extending Activity and I have methods like findViewById, ArrayAdapter etc.

how to declare static variables in objective c

Hey I am new to objective c development.

How to design a class which has a list of boolean variables?

I have a Ruby class called Category which has various boolean values like

C++: tall class hierarchies

What are the run time disadvantages of having a tall class hierarchy?

Distinction between ClassObject.getClass,ClassName.class and Class.forName(“ClassName”)

I wish to understand if both Class.forName("ClassName") and ClassObject.getClass

C++ - calling a method from a class template

I'm currently having a problem with a class template in C++. I'm currently making a hash table.

class not found in zend services folder

I make services folder in my Zend project and i create new php file in that folder. My folder structure is there.

JQuery hide Class if other class is visible or shown

Found similar questions but nothing that covers exactly what I need. I kept it simple in my example and I want to use JQuery.

How to add nth-item classes with jQuery I'm making a simple jquery counting function that adds the following classes: First & Last Even & Odd nth-item-# (counts in order)

Delete operator segfaults when the constructor throws an exception

Best to start with code to get an understanding of this

Making a button toggle a div's class

I'm making some basic site with Twitter Bootstrap

Possible class function in C#

I have a class created:

I need some help in Undo function in Java

I write a Text Editor with Java , and I want to add Undo function to it

C++ Binary Scope Resolution Operator and Classes

Is there a way to use "block" class scope resolution in C++ so that I don't have to write the same boilerplate code for every function in my class' implementation file.

ClassNotFound Error when compiling multiple object classes

I have a Store class which is an array of Person; I have a Person, Date, Student, Undergraduate and Postgraduate classes. Everything runs in Eclipse, and I have to run this from the Command Line. I...

AS3: Access button from class

So im quite new to AS3 but have worked with AS2 a lot before.

Access 3rd Party Class That May Not Be Available

I need to access third-party classes that may or may not be available. How can we handle a situation like this?

Overhead of creating a new class

If I have a class defined as such:

implementing a spinner type object in a class as a subprocess

I'm a total beginner and only started doing classes today, and im trying to make a sort of 'spinner' object i can call something like this: One of the things im confused about is whether to use 'th...

Weird behaviour of if(x instanceof X)

I have a class PartA and a class PartB which is a derived class of PartA.

TinyMCE: Plug-In for applying multiple classes to a textblock

The question whether it is possible to apply multiple classes/styles to an element in TinyMCE has already been asked and properly answered.

vector read specific lines

I have a text file that contains names of shows and people who starred in them.

jQuery include variable as class name

Running into some weird issue, can't quite figure out what's wrong. No errors popping up on my console.

Is there any data structure in Ruby which is similar to Pascal records?

Is there any data structure in Ruby which is similar to Pascal records?

PHP trying to create dynamic variables in classes

I need to construct a class with alot of variables directly from the Database, For simplicity we'll name them 'userX', I've looked into ORM just a little, but its way over my head.

Printing all instances of a class

With a class in Python, how do I define a function to print every single instance of the class in a format defined in the function?

Multiple class inheritance?

Based on the figure below, I wrote my code.

How to Properly Structure my Android App, Classes, Views, Databases, Made Simple?

I'm having a hell of time grasping the best way to "package" my Android app into logical components, my objective is to make an app that is easy to update and add new features to.

c++ beginner - class and passing

I am trying to print these polynomials but I can not seem to print what I want.

Variable with same class name?

What are the reasons behind that we can not declare and define a variable(property) inside a class with the same name of the class itself? For example this code is not right(at least in MS VC++):

Where is the best location for this function? C++

Is it alright to have a function that is not a part of any specific class when using an object-oriented approach. In my case, I would like to have a check_collision() function that takes two SDL_Re...

Why is using a class as a struct bad practice in Java?

We recently had a code review . One of my classes was used so that I could return/pass more than one type of data from/to methods . The only methods that the class had were getters/setters . One of...

A list of multiple data types?

I have two classes as such:

Can you have protected nested classes in C++?

I have a class that only really ever needed by classes in a certain class hierarchy. I wanted to know if it is possible to nest the class in the highest class's protected section and have all the o...

C++ Issues with Struct array in class definition

I'm currently having a lot of issues in trying to create a struct in a class header file. In the public accessors & mutators its saying that the variables are 'undeclared identifiers', as well ...

Variable variable class extensions in PHP--is it possible?

Is something like the following possible in PHP?

How do you deal with multiple Python classes in the same module depending on each other?

I'm using an ODM library and I'm defining documents as classes within the same module, when they are related. I've hit a circular dependency problem and because I haven't come across this before in

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.