Questions for class


9956

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?
2884
8502

copyWithZone being called

So i have 2 Objects.
5911

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!
1803

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
6222

Extending abstract class in Android: A LocationProvider

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

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:
1393

Java Class.forName() from distant directory

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

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...
7629

Django infer a field from other fields

I am currently having a model:
8447

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.
6132

how to declare static variables in objective c

Hey I am new to objective c development.
2526

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
3341

C++: tall class hierarchies

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

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

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

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.
4118

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.
2075

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.
2196

How to add nth-item classes with jQuery

http://jsfiddle.net/JamesKyle/y7hBQ/ I'm making a simple jquery counting function that adds the following classes: First & Last Even & Odd nth-item-# (counts in order)
9993

Delete operator segfaults when the constructor throws an exception

Best to start with code to get an understanding of this
1332

Making a button toggle a div's class

I'm making some basic site with Twitter Bootstrap
7475

Possible class function in C#

I have a class created:
1440

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
8863

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.
2178

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...
3671

AS3: Access button from class

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

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?
8975

Overhead of creating a new class

If I have a class defined as such:
4843

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...
3019

Weird behaviour of if(x instanceof X)

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

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.
8117

vector read specific lines

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

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.
2087

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?
7217

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.
3226

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?
6241

Multiple class inheritance?

Based on the figure below, I wrote my code.
6770

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.
199

c++ beginner - class and passing

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

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++):
2690

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...
4099

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...
2539

A list of multiple data types?

I have two classes as such:
7515

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...
6811

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 ...
6746

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

Is something like the following possible in PHP?
9835

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.