01-09-2012
Quote:
Originally Posted by
Corona688
I think it needs to be Sum<T>, not Sum, because Sum is also a template
Thanks alot, it worked!
This User Gave Thanks to gabam For This Post:
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hey Everyone,
Does anyone know how - or if it's even possible - for a child perl script to inherit the variables of a parent perl script? In a shell script, you would use "export" for example. I am running Perl 5.8.
Basically, let's say "perl1.pl" calls "perl2.pl" and I want "perl2.pl" to... (2 Replies)
Discussion started by: gsatch
2 Replies
2. Shell Programming and Scripting
Hi,
I have a number of Makefiles, including a couple of files that I include in Makefiles, a few scripts that are executed through Makefiles, and I have problems with environment variables that are not inherited to the scripts properly.
Simplified scenario:
rootdir/Makefile:
all:
... (1 Reply)
Discussion started by: Shompis
1 Replies
3. UNIX for Dummies Questions & Answers
1) I have the below code in concattxnrecords.sh shell script and it is calling the genericVars.sh shell script which is mentioned as below has some code inside it which would intialize some variables in it, now my question is will this shell script would inherit those variable definitions or not... (3 Replies)
Discussion started by: Ariean
3 Replies
4. AIX
Is none of you using WLM? A search gives no matches....
Anyway, I have set up a class with inheritance = yes. In the rules characteristics I have chosen a shell script as an application. This script is caught by the class, but not the child processes, which have the PID of the script as the... (6 Replies)
Discussion started by: firefox111
6 Replies
5. Shell Programming and Scripting
package Inventory_item;
sub new {
my($class) = shift;
bless {
"PART_NUM" => undef,
"QTY_ON_HAND" => undef
}, $class;
}
package main;
$item = Inventory_item->new();
Can any one please help me in brief explaining the line... (5 Replies)
Discussion started by: parthmittal2007
5 Replies
6. Programming
whats the use of inheriting with access specifier as private..?
Please specify the answer with a simple example...
Regards
-- Madhu (5 Replies)
Discussion started by: MadhuM
5 Replies
7. Programming
Hi,
In multi-level inheritance:
class A {
public:
void fun() { cout << "A" << endl; }
};
class B : public A {
public:
void fun() { cout << "A" << endl; }
};
class C : public B { };
int main() {
C c;
c.fun(); // Ans: A
} (1 Reply)
Discussion started by: royalibrahim
1 Replies
8. Red Hat
Hi ,
If i start mysqld or httpd as root user which inturn starts them as "mysql" or "apache" user, will the ulimit of "root" user or ulimit of "mysql/apache" user be set for the mysql/apache processes.
My understanding is that the ulimit of the user who initiates the process(root in this... (2 Replies)
Discussion started by: Hari_Ganesh
2 Replies
9. Programming
I am using python 3.4. Below is the exception I am getting-
Traceback (most recent call last):
File "./oop.py", line 20, in <module>
y = DerivedClass("Manu")
File "./oop.py", line 15, in __init__
super().__init__(self,value)
TypeError: __init__() takes 2 positional arguments but... (2 Replies)
Discussion started by: Tanu
2 Replies
LEARN ABOUT DEBIAN
tk::derived
Derived(3pm) User Contributed Perl Documentation Derived(3pm)
NAME
Tk::Derived - Base class for widgets derived from others
SYNOPSIS
package Tk::MyNewWidget;
use Tk::widgets qw/ BaseWidget, list of Tk widgets /;
use base qw/ Tk::Derived Tk::BaseWidget /;
Construct Tk::Widget 'MyNewWidget';
sub ClassInit {
my( $class, $mw ) = @_;
#... e.g., class bindings here ...
$class->SUPER::ClassInit( $mw );
}
sub Populate {
my( $self, $args ) = @_;
my $flag = delete $args->{-flag};
if( defined $flag ) {
# handle -flag => xxx which can only be done at create
# time the delete above ensures that new() does not try
# and do $self->configure( -flag => xxx );
}
$self->SUPER::Populate( $args );
$self = $self->Component( ... );
$self->Delegates( ... );
$self->ConfigSpecs(
'-cursor' => [ SELF, 'cursor', 'Cursor', undef ],
'-something' => [ METHOD, dbName, dbClass, default ],
'-text' => [ $label, dbName, dbClass, default ],
'-heading' => [ {-text => $head},
heading, Heading, 'My Heading' ],
);
}
sub something {
my( $self, $value) = @_;
if ( @_ > 1 ) {
# set it
}
return # current value
}
DESCRIPTION
Tk::Derived is used with Perl's multiple inheritance to override some methods normally inherited from Tk::Widget.
Tk::Derived should precede any Tk widgets in the class's base class definition.
Tk::Derived's main purpose is to apply wrappers to "configure" and "cget" methods of widgets to allow the derived widget to add to or
modify behaviour of the configure options supported by the base widget.
The derived class should normally override the "Populate" method provided by Tk::Derived and call "ConfigSpecs" to declare configure
options.
The public methods provided by Tk::Derived are as follows:
->ConfigSpecs(-key => [kind, name, Class, default], ...)
SEE ALSO
Tk::ConfigSpecs Tk::mega Tk::composite
perl v5.14.2 2010-05-29 Derived(3pm)