A TreeNode class has
Text Name Tag
I need to assign more values to a TreeNode class like float1, float2, ... float6.
How can I do this??? pls help.
Thx,
Caslav
there are two classes
public class Account
{
public Acconut()
{
//constructor
}
}
public class SavingsAccount extends Account
{
}
while doing the inheritance i have got an error message "cannont find symbol Symbol: constructor Account()" what might be the error in my code...??
pthread_t thread1;
pthread_create(&thread1,NULL,.......,NULL);
// Here I want to attach a thread to a member function of class
How can I pass the member function of a class in the above code.
Is there way for a class to 'remove' methods that it has inherited?
eg. If I don't want my class to have a ToString() method can I do something so that it is no longer available?
Hi ,
Am not worked on extream level of oops in my projects ,
So i have little doubts ,
In which situation should i use abstract method or classes ,
Basically i know about abstract class definition and flow,
I got details from this URL
Doubt is which situation should i use abstract class and methods ,
<area shape="poly" coords="63,10,64,38,89,37,91,10" class={"strokeColor:'0000ff',strokeWidth:5, fillColor:'ff0000',fillOpacity:0.6}" href="#" id="x1">
There is a imagemap in my html and I want to dynamicly add a new configuration "alwaysOn:true" to the classattribute.
$("#x1").click(function(){alert(8);})
I am newbea I can add click listener to it but cannot figure out how to add config option
How can I do that with jquery?
Hi,
I want to exclude a particular method of a class from java compilation.
For eg:
class Test {
public void printdouble(){}
public void printint(){}
}
Depending upon some properties, I want to exclude printdouble method during compilation.
NOTE: I'm using ant script for java compilation
Thanks in Advance
Soman
Given the Thread class with it current method.
Now inside a test, I want to do this:
def test_alter_current_thread
Thread.current = a_stubbed_method
# do something that involve the work of Thread.current
Thread.current = default_thread_current
end
Basically, I want to alter the method of a class inside a test method and recover it after that.
I know it sound complex for another language, like Java & C# (in Java, only powerful mock framework can do it). But it's ruby and I hope such nasty stuff would be available
Welcome,
It it possible to select all checkboxes / uncheck all checkboxes what have class "xxx" ?
I can't use "name" and "ID" because there are generated dynamical via PHP and i don't know their name.
So maybye i can add class "xxx" for these what i wan't control ?
Is is possible ?
Or, if not possible.
Maybye i can select all / unselect what are inside table with id "selectall" ?
Regards
Rails: url_for to be available in a isolated class that must be instanced:
class ProfilePresenter < ActionController::Base
attr_reader :profile
def initialize(profile)
super
@a = url_for(:controller => 'profiles', :action => 'view', :profile_url => 'dd')
@a
@profile = profile
end
end
How to make the url_for work?
i tried to extend the ActionController::Base and the ActionView::Base and i cant :s
I follow this rule but some of my colleagues disagree with it and argue that if a class is smaller it can be left in the same file with other class(es).
Another argument I hear all the time is "Even Microsoft don't do this, so why should we?"
What's the general consensus on this? Are there cases where this should be avoided?
I want to have each instance of some class have a unique integer identifier based on the order that I create them, starting with (say) 0. In Java, I could do this with a static class variable. I know I can emulate the same sort of behavior with Python, but what would be the most 'Pythonic' way to do this?
Thanks
Hello, I have task to get static method using reflection like this :
myType.GetMethod("MyMethod",BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod);
In case if class contains MyMethod all works correctly, but in case if parent class contains MyMethod I receive null :(. How can I call static method from the parent using reflection like code that I describe above?
Thanks.
I am going to have different classes for a character that a user play. Like "Mage, Warrior" etc.
I am thinking of a method like have some CharacterBase class (abstract?) and then I have a child class which is like WarriorClass or something like that.
I think the approach is called Factory pattern or something like that. Anyone got a clue of what I'm trying to achieve here, and are there perhaps any better way to do this?
I'm using VisualAssistX for some refactoring tasks in VC++2008.
When I autorename a class, I want the filename to also be updated automatically. Any addon that does that?
(Yes, I do only put one class per cpp/h pair)
After I clean a project in eclipse I don't see the class files generated in the output folder "bin" although there's no build error, what can I do to make it regenerate the class files?
thanks
When i export WebProject (Struts Portlet) as war from RAD 7.5 it creates war, but that war file does not have my Class files. ie. Action Classes, Actionforms, validations, etc. none of the .java files class added in war. what is the issue. urgent
I am storing an object in session state (using local session state server), class def is:
[Serializable]
public class ExtendedOAuth2Parameters : OAuth2Parameters
but the service is still reporting:
Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted.
[SerializationException: Type 'Google.GData.Client.OAuth2Parameters' in Assembly 'Google.GData.Client, Version=2.1.0.0, Culture=neutral, PublicKeyToken=04a59ca9b0273830' is not marked as serializable.]
How to get around it?
Here's what I' trying to do:
Currently I am using this to create an array of all elements matching the class name of '.cookie'. Right now I am getting the text value of that element, which is not what I need:
var getAllCookies = $('.cookie').text();
var cookiesArray = jQuery.makeArray(getAllCookies);
alert(cookiesArray[0]);
What I need is to find all elements of a certain class (.cookie), get that elements ID value and store that ID value inside of array.
Is it possible in Visual Studio 2008, either with or without Resharper, to re-order methods in a class file to match the order of methods in an associated interface file? What about the opposite (re-ordering the interface to match the implementing class)?
Lets say there is a base class pointer which is pointing to a base class object:
baseclass *bptr;
bptr= new baseclass;
now if i do
bptr= new derived;
what is the problem here?
I use dumpdata to output all my apps's classes. One of my app has one class that never get's outputted and I don't know where to start looking to know what's wrong. The class is used regularly, every other classes in the app are dumped fine and dumpdata doesn't throw any error.
Any cue ?
I am trying to determine which assembly contains a particular class. I do NOT want to create an instance of a type in that assembly, but want something like this
namespace SomeAssembly
{
class SomeClass
{
}
}
..and In client code I want:
Assembly containingAssembly = GetContainingAssembly(SomeClass)
Currently I am doing the profiling to a piece of code. During the profiling, I discovered that this very method call,
Class<T>.isAssignableFrom(Class<?> cls)
takes up to quite amount of the entire time.
Because this is a method from reflection, it takes a lot of time compared to normal keywords or method calls. I am wondering if there are some good alternatives for this method calls?
I have the following class in C++:
class a {
const int b[2];
// other stuff follows
// and here's the constructor
a(void);
}
The question is, how do I initialize b in the initialization list, given that I can't initialize it inside the body of the function of the constructor, because b is const?
This doesn't work:
a::a(void) :
b([2,3])
{
// other initialization stuff
}
Edit: The case in point is when I can have different values for b for different instances, but the values are known to be constant for the lifetime of the instance.