function set
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 7007
Getopt::Function 0.017
Getopt::Function is a Perl module to provide mixed options with help information. more>>
Getopt::Function is a Perl module to provide mixed options with help information.
SYNOPSIS
use Getopt::Function qw(maketrue makevalue);
$::opthandler = new Getopt::Function
[ ], { => [ , ,
] }
$result = GetOptions (...option-descriptions...);
$::opthandler->std_opts;
$::opthandler->check_opts;
The aim of this module is to make it easy to provide sophisticated and complex interfaces to commands in a simple to use and clear manner with proper help facilities.
It is designed to do this by making it possible to write the options, with documentation and subroutines to implement them, directly into a hash and then call the appropriate ones as options detected on the command line.
<<lessSYNOPSIS
use Getopt::Function qw(maketrue makevalue);
$::opthandler = new Getopt::Function
[ ], { => [ , ,
] }
$result = GetOptions (...option-descriptions...);
$::opthandler->std_opts;
$::opthandler->check_opts;
The aim of this module is to make it easy to provide sophisticated and complex interfaces to commands in a simple to use and clear manner with proper help facilities.
It is designed to do this by making it possible to write the options, with documentation and subroutines to implement them, directly into a hash and then call the appropriate ones as options detected on the command line.
Download (0.013MB)
Added: 2006-10-30 License: Perl Artistic License Price:
1089 downloads
Folder Color Icon Set 1.0
Folder Color icon set is a must-have for any computer user who has lots of folders and would like to organize them for faster search and quick retrieval. These 36 color coded folder icons is the way to tackle the too-many-same-looking-folders problem. To change color of a folder: Right click the folder > select Properties > click Customize tab > click Change Icon... > select an icon from this icon set > click OK > click Apply > OK... more>> <<less
Download (446.2Kb)
Added: 2007-07-15 License: Free Price: Free
12 downloads
FuncPlotter 2.0
FuncPlotter is a combined Java application and applet for displaying two-dimensional plots. more>>
FuncPlotter is a combined Java application and applet for displaying two-dimensional plots of explicit functions in one variable (i.e., functions of the form y = f(x), where f(x) is an arbitrary function composed from a set of common mathematical operators).
Up to 20 functions can be plotted simultaneously, and sets of functions can be loaded and saved.
Enhancements:
Modifications:
- The function-list UI component has been modified so that the position of a function in the list can now be changed by dragging the function up or down the list with the left mouse button.
- Configuration parameters have been added to allow the FuncPlotter applet to display specified functions when it starts up.
<<lessUp to 20 functions can be plotted simultaneously, and sets of functions can be loaded and saved.
Enhancements:
Modifications:
- The function-list UI component has been modified so that the position of a function in the list can now be changed by dragging the function up or down the list with the left mouse button.
- Configuration parameters have been added to allow the FuncPlotter applet to display specified functions when it starts up.
Download (0.23MB)
Added: 2007-08-08 License: GPL (GNU General Public License) Price:
808 downloads
MicroAkismet 1.2
MicroAkismet package contains a straightforward set of functions for talking to the Akismet blog-spam protection system. more>>
MicroAkismet package contains a straightforward set of functions for talking to the Akismet blog-spam protection system. This is intended as a simple and compact method for adding Akismet protection to any user-submitted content.
Installation
1. To begin using the functions, download the latest version and unzip the script.
2. Place the akismet.inc.php file somewhere in your web root, and load the functions using include(), or better still, include_once():
include_once( "akismet.inc.php" );
?>
3. Obtain a valid WordPress API key, if you do not already have one, from:
http://wordpress.com/
If you dont have an account you will need to create one. Once you have an account, your API key can be found at the bottom of this page:
http://wordpress.com/profile
4. In the "User editable data" section, at the top of the code, put in your WordPress API key and the home page of the blog being protected. The User Agent can be changed to suit your application. If it is not a blog that is being protected, change the home page to the comments page or forum page that is being protected.
Usage
There are three static functions for talking to Akismet:
aksimet_check( $vars )
Check if a comment is spam or not
aksimet_spam( $vars )
Re-classify a comment as spam
aksimet_ham( $vars )
Re-classify a comment as ham (not spam)
Each function takes one argument, $vars, which is a list of information about the comment that is being checked. $vars *must* contain at least this information
$vars["user_ip"]
The IP address of the person that posted the comment
$vars["user_agent"]
The User-Agent of the person that posted the comment
The "blog" value (the homepage of the blog that this post came from) is added automatically by the code. The following extra information can also be added, to help Akismet classify the message more accurately:
$vars["comment_content"]
The body of the comment itself, the content that was submitted
$vars["referrer"]
The content of the HTTP_REFERER header (note the spelling)
$vars["permalink"]
Permalink to the comment
$vars["comment_type"]
May be blank, comment, trackback, pingback, etc
$vars["comment_author"]
Submitted name with the comment
$vars["comment_author_email"]
Submitted email address
$vars["comment_author_url"]
Commenter URL
In PHP, you can also add the contents of the $_SERVER array to this list, which gives extra information to Akismet, and further increases the accuracy of their system.
Enhancements:
- A class version and a static function version have been created.
- They are the same code, but one is wrapped in a PHP5 compatible class, giving more flexibility.
<<lessInstallation
1. To begin using the functions, download the latest version and unzip the script.
2. Place the akismet.inc.php file somewhere in your web root, and load the functions using include(), or better still, include_once():
include_once( "akismet.inc.php" );
?>
3. Obtain a valid WordPress API key, if you do not already have one, from:
http://wordpress.com/
If you dont have an account you will need to create one. Once you have an account, your API key can be found at the bottom of this page:
http://wordpress.com/profile
4. In the "User editable data" section, at the top of the code, put in your WordPress API key and the home page of the blog being protected. The User Agent can be changed to suit your application. If it is not a blog that is being protected, change the home page to the comments page or forum page that is being protected.
Usage
There are three static functions for talking to Akismet:
aksimet_check( $vars )
Check if a comment is spam or not
aksimet_spam( $vars )
Re-classify a comment as spam
aksimet_ham( $vars )
Re-classify a comment as ham (not spam)
Each function takes one argument, $vars, which is a list of information about the comment that is being checked. $vars *must* contain at least this information
$vars["user_ip"]
The IP address of the person that posted the comment
$vars["user_agent"]
The User-Agent of the person that posted the comment
The "blog" value (the homepage of the blog that this post came from) is added automatically by the code. The following extra information can also be added, to help Akismet classify the message more accurately:
$vars["comment_content"]
The body of the comment itself, the content that was submitted
$vars["referrer"]
The content of the HTTP_REFERER header (note the spelling)
$vars["permalink"]
Permalink to the comment
$vars["comment_type"]
May be blank, comment, trackback, pingback, etc
$vars["comment_author"]
Submitted name with the comment
$vars["comment_author_email"]
Submitted email address
$vars["comment_author_url"]
Commenter URL
In PHP, you can also add the contents of the $_SERVER array to this list, which gives extra information to Akismet, and further increases the accuracy of their system.
Enhancements:
- A class version and a static function version have been created.
- They are the same code, but one is wrapped in a PHP5 compatible class, giving more flexibility.
Download (0.008MB)
Added: 2007-01-30 License: BSD License Price:
997 downloads
CoreLinux++ Function Load Library 0.1.1
libclfll++ takes advantage of the abstract Library Load framework in the CoreLinux libclfw++ library. more>>
CoreLinux++ Function Load Library (libclfll++) takes advantage of the abstract Library Load framework in the CoreLinux libclfw++ library by providing management of loading Linux shared libraries.
Application developers define function objects as wrappers and can then dynamically load the functions. It is very useful for implementing a framework for plug-ins.
Main features:
- Enlist members ( for requirements, analysis, design, and development )
- Formalize conventions for Object Oriented Analysis (OOA) and Design (OOD).
- Formalize standards and conventions for C++ code style.
- Gather requirements. Perform OOA and OOD using UML as the modeling language.
- Implement designs and example drivers.
- Develop utilities and applications for Linux that are CoreLinux++ certified
- Showcase CoreLinux++ certified applications by others
<<lessApplication developers define function objects as wrappers and can then dynamically load the functions. It is very useful for implementing a framework for plug-ins.
Main features:
- Enlist members ( for requirements, analysis, design, and development )
- Formalize conventions for Object Oriented Analysis (OOA) and Design (OOD).
- Formalize standards and conventions for C++ code style.
- Gather requirements. Perform OOA and OOD using UML as the modeling language.
- Implement designs and example drivers.
- Develop utilities and applications for Linux that are CoreLinux++ certified
- Showcase CoreLinux++ certified applications by others
Download (0.091MB)
Added: 2006-05-31 License: LGPL (GNU Lesser General Public License) Price:
1247 downloads
Fuzzy sets for Ada 4.2
Fuzzy sets for Ada is a library providing implementations of confidence factors. more>>
Fuzzy sets for Ada is a library providing implementations of confidence factors with the operations not, and, or, xor, +, and *, classical fuzzy sets with the set-theoretic operations and the operations of the possibility theory, intuitionistic fuzzy sets with the operations on them, fuzzy logic based on the intuitionistic fuzzy sets and the possibility theory; fuzzy numbers, both integer and floating-point with conventional arithmetical operations, and linguistic variables and sets of linguistic variables with operations on them. Fuzzy sets for Ada has support for string-oriented I/O.
Main features:
- Confidence factors with the operations not, and, or, xor, +, *;
- Classical fuzzy sets with the set-theoretic operations and the operations of the possibility theory;
- Intuitionistic fuzzy sets with the operations on them;
- Fuzzy logic based on the intuitionistic fuzzy sets and the possibility theory;
- Fuzzy numbers both integer and floating-point ones with conventional arithmetical operations;
- Dimensioned fuzzy numbers;
- Linguistic variables and sets of linguistic variables with operations on them;
- String-oriented I/O is supported.
Enhancements:
- The code was tested with GNAT Ada 2005 (GCC 4.0.2 20051125).
- A bug was fixed in Fuzzy.Linguistics.Sets.Defuzzify, which led to incorrect defuzzification with a descending membership function.
<<lessMain features:
- Confidence factors with the operations not, and, or, xor, +, *;
- Classical fuzzy sets with the set-theoretic operations and the operations of the possibility theory;
- Intuitionistic fuzzy sets with the operations on them;
- Fuzzy logic based on the intuitionistic fuzzy sets and the possibility theory;
- Fuzzy numbers both integer and floating-point ones with conventional arithmetical operations;
- Dimensioned fuzzy numbers;
- Linguistic variables and sets of linguistic variables with operations on them;
- String-oriented I/O is supported.
Enhancements:
- The code was tested with GNAT Ada 2005 (GCC 4.0.2 20051125).
- A bug was fixed in Fuzzy.Linguistics.Sets.Defuzzify, which led to incorrect defuzzification with a descending membership function.
Download (1.0MB)
Added: 2006-05-25 License: LGPL (GNU Lesser General Public License) Price:
1263 downloads
Timos Rescue CD Set 0.9.12r2
Timos Rescue CD Set is a kit for creating bootable rescue CDs. more>>
Timos rescue CD set provides an easy way to generate bootable CDROMs with a ready-to-use rescue system on them. The system is designed to be fully customizable and easy to build.
The rescue system includes reiserfs, parted, partimage, nmap, w3m, bash, sshd, telnetd, ftpd, and nfsd. It is based on Debians "Sarge" release. LILO, syslinux, isolinux, and GRUB are supported.
The project is evolving more and more into a "Debian on CD" project, which means that its use is not limited to a rescue CD; it is also possible to install a whole Debian system on CD.
Enhancements:
- the cdrecord script was buggy - fixed
<<lessThe rescue system includes reiserfs, parted, partimage, nmap, w3m, bash, sshd, telnetd, ftpd, and nfsd. It is based on Debians "Sarge" release. LILO, syslinux, isolinux, and GRUB are supported.
The project is evolving more and more into a "Debian on CD" project, which means that its use is not limited to a rescue CD; it is also possible to install a whole Debian system on CD.
Enhancements:
- the cdrecord script was buggy - fixed
Download (80MB)
Added: 2005-04-11 License: GPL (GNU General Public License) Price:
1659 downloads
Set::Partition 0.03
Set::Partition is a Perl module that can enumerate all arrangements of a set in fixed subsets. more>>
Set::Partition is a Perl module that can enumerate all arrangements of a set in fixed subsets.
SYNOPSIS
use Set::Partition;
my $s = Set::Partition->new(
list => [qw(a b c d e)],
partition => [2, 3],
);
while (my $p = $s->next) {
print join( , map { "(@$_)" } @$p ), $/;
}
# produces
(a b) (c d e)
(a c) (b d e)
(a d) (b c e)
(a e) (b c d)
(b c) (a d e)
(b d) (a c e)
(b e) (a c d)
(c d) (a b e)
(c e) (a b d)
(d e) (a b c)
# or with a hash
my $s = Set::Partition->new(
list => { b => bat, c => cat, d => dog },
partition => [2, 1],
);
while (my $p = $s->next) {
...
}
Set::Partition takes a list or hash of elements and a list numbers that represent the sizes of the partitions into which the list of elements should be arranged.
The resulting object can then be used as an iterator which returns a reference to an array of lists, that represents the original list arranged according to the given partitioning. All possible arrangements are returned, and the object returns undef when the entire combination space has been exhausted.
<<lessSYNOPSIS
use Set::Partition;
my $s = Set::Partition->new(
list => [qw(a b c d e)],
partition => [2, 3],
);
while (my $p = $s->next) {
print join( , map { "(@$_)" } @$p ), $/;
}
# produces
(a b) (c d e)
(a c) (b d e)
(a d) (b c e)
(a e) (b c d)
(b c) (a d e)
(b d) (a c e)
(b e) (a c d)
(c d) (a b e)
(c e) (a b d)
(d e) (a b c)
# or with a hash
my $s = Set::Partition->new(
list => { b => bat, c => cat, d => dog },
partition => [2, 1],
);
while (my $p = $s->next) {
...
}
Set::Partition takes a list or hash of elements and a list numbers that represent the sizes of the partitions into which the list of elements should be arranged.
The resulting object can then be used as an iterator which returns a reference to an array of lists, that represents the original list arranged according to the given partitioning. All possible arrangements are returned, and the object returns undef when the entire combination space has been exhausted.
Download (0.007MB)
Added: 2007-07-04 License: Perl Artistic License Price:
842 downloads
B::Utils 0.30
B::Utils is a helper functions for op tree manipulation. more>>
B::Utils is a helper functions for op tree manipulation.
SYNOPSIS
use B::Utils;
These functions make it easier to manipulate the op tree.
FUNCTIONS
all_starts
all_roots
Returns a hash of all of the starting ops or root ops of optrees, keyed to subroutine name; the optree for main program is simply keyed to __MAIN__.
Note: Certain "dangerous" stashes are not scanned for subroutines: the list of such stashes can be found in @B::Utils::bad_stashes. Feel free to examine and/or modify this to suit your needs. The intention is that a simple program which uses no modules other than B and B::Utils would show no addition symbols.
This does not return the details of ops in anonymous subroutines compiled at compile time. For instance, given
$a = sub { ... };
the subroutine will not appear in the hash. This is just as well, since theyre anonymous... If you want to get at them, use...
anon_subs()
This returns an array of hash references. Each element has the keys "start" and "root". These are the starting and root ops of all of the anonymous subroutines in the program.
$op->oldname
Returns the name of the op, even if it is currently optimized to null. This helps you understand the stucture of the op tree.
$op->kids
Returns an array of all this ops non-null children, in order.
$op->first
$op->last
$op->other
Normally if you call first, last or other on anything which is not an UNOP, BINOP or LOGOP respectivly it will die. This leads to lots of code like:
$op->first if $op->can(first);
B::Utils provides every op with first, last and other methods which will simply return nothing if it isnt relevent.
$op->parent
Returns the parent node in the op tree, if possible. Currently "possible" means "if the tree has already been optimized"; that is, if were during a CHECK block. (and hence, if we have valid next pointers.)
In the future, it may be possible to search for the parent before we have the next pointers in place, but itll take me a while to figure out how to do that.
$op->previous
Like $op->next, but not quite.
walkoptree_simple($op, &callback, [$data])
The B module provides various functions to walk the op tree, but theyre all rather difficult to use, requiring you to inject methods into the B::OP class. This is a very simple op tree walker with more expected semantics.
The &callback is called at each op with the op itself passed in as the first argument and any additional $data as the second.
All the walk functions set $B::Utils::file and $B::Utils::line to the appropriate values of file and line number in the program being examined. Since only COPs contain this information it may be unavailable in the first few callback calls.
walkoptree_filtered($op, &filter, &callback, [$data])
This is much the same as walkoptree_simple, but will only call the callback if the filter returns true. The filter is passed the op in question as a parameter; the opgrep function is fantastic for building your own filters.
walkallops_simple(&callback, [$data])
This combines walkoptree_simple with all_roots and anon_subs to examine every op in the program. $B::Utils::sub is set to the subroutine name if youre in a subroutine, __MAIN__ if youre in the main program and __ANON__ if youre in an anonymous subroutine.
walkallops_filtered(&filter, &callback, [$data])
Same as above, but filtered.
<<lessSYNOPSIS
use B::Utils;
These functions make it easier to manipulate the op tree.
FUNCTIONS
all_starts
all_roots
Returns a hash of all of the starting ops or root ops of optrees, keyed to subroutine name; the optree for main program is simply keyed to __MAIN__.
Note: Certain "dangerous" stashes are not scanned for subroutines: the list of such stashes can be found in @B::Utils::bad_stashes. Feel free to examine and/or modify this to suit your needs. The intention is that a simple program which uses no modules other than B and B::Utils would show no addition symbols.
This does not return the details of ops in anonymous subroutines compiled at compile time. For instance, given
$a = sub { ... };
the subroutine will not appear in the hash. This is just as well, since theyre anonymous... If you want to get at them, use...
anon_subs()
This returns an array of hash references. Each element has the keys "start" and "root". These are the starting and root ops of all of the anonymous subroutines in the program.
$op->oldname
Returns the name of the op, even if it is currently optimized to null. This helps you understand the stucture of the op tree.
$op->kids
Returns an array of all this ops non-null children, in order.
$op->first
$op->last
$op->other
Normally if you call first, last or other on anything which is not an UNOP, BINOP or LOGOP respectivly it will die. This leads to lots of code like:
$op->first if $op->can(first);
B::Utils provides every op with first, last and other methods which will simply return nothing if it isnt relevent.
$op->parent
Returns the parent node in the op tree, if possible. Currently "possible" means "if the tree has already been optimized"; that is, if were during a CHECK block. (and hence, if we have valid next pointers.)
In the future, it may be possible to search for the parent before we have the next pointers in place, but itll take me a while to figure out how to do that.
$op->previous
Like $op->next, but not quite.
walkoptree_simple($op, &callback, [$data])
The B module provides various functions to walk the op tree, but theyre all rather difficult to use, requiring you to inject methods into the B::OP class. This is a very simple op tree walker with more expected semantics.
The &callback is called at each op with the op itself passed in as the first argument and any additional $data as the second.
All the walk functions set $B::Utils::file and $B::Utils::line to the appropriate values of file and line number in the program being examined. Since only COPs contain this information it may be unavailable in the first few callback calls.
walkoptree_filtered($op, &filter, &callback, [$data])
This is much the same as walkoptree_simple, but will only call the callback if the filter returns true. The filter is passed the op in question as a parameter; the opgrep function is fantastic for building your own filters.
walkallops_simple(&callback, [$data])
This combines walkoptree_simple with all_roots and anon_subs to examine every op in the program. $B::Utils::sub is set to the subroutine name if youre in a subroutine, __MAIN__ if youre in the main program and __ANON__ if youre in an anonymous subroutine.
walkallops_filtered(&filter, &callback, [$data])
Same as above, but filtered.
Download (0.043MB)
Added: 2006-07-04 License: Perl Artistic License Price:
1207 downloads
Bio::NEXUS::SetsBlock 0.67
Bio::NEXUS::SetsBlock is a Perl module that represents SETS block of a NEXUS file. more>>
Bio::NEXUS::SetsBlock is a Perl module that represents SETS block of a NEXUS file.
SYNOPSIS
$block_object = new Bio::NEXUS::SetsBlock($block_type, $block, $verbose);
Parses Sets block of NEXUS file and stores Sets data.
METHODS
new
Title : new
Usage : $block_object = new Bio::NEXUS::SetsBlock($block_type, $commands, $verbose)
Function: Creates a new Bio::NEXUS::SetsBlock object
Returns : Bio::NEXUS::SetsBlock object
Args : type (string), the commands/comments to parse (array ref), and a verbose flag (0 or 1)
set_taxsets
Title : set_taxsets
Usage : $block->set_taxsets($taxsets);
Function: Set the taxsets hash
Returns : none
Args : hash of set name keys and element arrays
add_taxsets
Title : add_taxsets
Usage : $block->add_taxsets($taxsets);
Function: add taxa sets
Returns : none
Args : a reference to a hash of taxa sets
get_taxsets
Title : get_taxsets
Usage : $block->get_taxsets();
Function: Returns a hash of taxa sets
Returns : taxa sets
Args : none
get_taxset
Title : get_taxset
Usage : $block->get_taxset($setname);
Function: Returns a list of OTUs
Returns : OTUs
Args : none
get_taxset_names
Title : get_taxset_names
Usage : $block->get_taxset_names()
Function: gets the names of all sets
Returns : array of names
Args : none
print_all_taxsets
Title : print_all_taxsets
Usage : $block->print_all_taxsets($outfile)
Function: prints set names and elements
Returns : none
Args : filename or filehandle
delete_taxsets
Title : delete_taxsets
Usage : $block->delete_taxsets($set1 [$set2 $set3 ...])
Function: Removes the named sets from the Sets block
Returns : none
Args : Names of sets to be deleted
exclude_otus
Title : exclude_otus
Usage : $block->exclude_otus($otu_array_ref)
Function: Finds and deletes each of the given otus from any sets they appear in
Returns : none
Args : Names of otus to be removed
select_otus
Title : select_otus
Usage : $block->select_otus($otu_array_ref)
Function: Finds the given otus and removes all others from any sets they appear in
Returns : none
Args : Names of otus to be removed
rename_otus
Title : rename_otus
Usage : $block->rename_otus($names);
Function: rename all OTUs
Returns : none
Args : hash of OTU names
rename_taxsets
Title : rename_taxsets
Usage : $block->rename_taxsets($oldsetname1, $newsetname1, ...)
Function: Renames sets
Returns : none
Args : Oldname, newname pairs
equals
Name : equals
Usage : $setsblock->equals($another);
Function: compare if two Bio::NEXUS::SetsBlock objects are equal
Returns : boolean
Args : a Bio::NEXUS::SetsBlock object
<<lessSYNOPSIS
$block_object = new Bio::NEXUS::SetsBlock($block_type, $block, $verbose);
Parses Sets block of NEXUS file and stores Sets data.
METHODS
new
Title : new
Usage : $block_object = new Bio::NEXUS::SetsBlock($block_type, $commands, $verbose)
Function: Creates a new Bio::NEXUS::SetsBlock object
Returns : Bio::NEXUS::SetsBlock object
Args : type (string), the commands/comments to parse (array ref), and a verbose flag (0 or 1)
set_taxsets
Title : set_taxsets
Usage : $block->set_taxsets($taxsets);
Function: Set the taxsets hash
Returns : none
Args : hash of set name keys and element arrays
add_taxsets
Title : add_taxsets
Usage : $block->add_taxsets($taxsets);
Function: add taxa sets
Returns : none
Args : a reference to a hash of taxa sets
get_taxsets
Title : get_taxsets
Usage : $block->get_taxsets();
Function: Returns a hash of taxa sets
Returns : taxa sets
Args : none
get_taxset
Title : get_taxset
Usage : $block->get_taxset($setname);
Function: Returns a list of OTUs
Returns : OTUs
Args : none
get_taxset_names
Title : get_taxset_names
Usage : $block->get_taxset_names()
Function: gets the names of all sets
Returns : array of names
Args : none
print_all_taxsets
Title : print_all_taxsets
Usage : $block->print_all_taxsets($outfile)
Function: prints set names and elements
Returns : none
Args : filename or filehandle
delete_taxsets
Title : delete_taxsets
Usage : $block->delete_taxsets($set1 [$set2 $set3 ...])
Function: Removes the named sets from the Sets block
Returns : none
Args : Names of sets to be deleted
exclude_otus
Title : exclude_otus
Usage : $block->exclude_otus($otu_array_ref)
Function: Finds and deletes each of the given otus from any sets they appear in
Returns : none
Args : Names of otus to be removed
select_otus
Title : select_otus
Usage : $block->select_otus($otu_array_ref)
Function: Finds the given otus and removes all others from any sets they appear in
Returns : none
Args : Names of otus to be removed
rename_otus
Title : rename_otus
Usage : $block->rename_otus($names);
Function: rename all OTUs
Returns : none
Args : hash of OTU names
rename_taxsets
Title : rename_taxsets
Usage : $block->rename_taxsets($oldsetname1, $newsetname1, ...)
Function: Renames sets
Returns : none
Args : Oldname, newname pairs
equals
Name : equals
Usage : $setsblock->equals($another);
Function: compare if two Bio::NEXUS::SetsBlock objects are equal
Returns : boolean
Args : a Bio::NEXUS::SetsBlock object
Download (0.15MB)
Added: 2006-12-20 License: Perl Artistic License Price:
1038 downloads
Bio::NEXUS::WeightSet 0.67
Bio::NEXUS::WeightSet is a Perl module that represents column weights in alignment ( for each character). more>>
Bio::NEXUS::WeightSet is a Perl module that represents column weights in alignment ( for each character).
SYNOPSIS
new Bio::NEXUS::WeightSet($name, @weights, $iswt);
A module representing column weights in alignment (for each character)
METHODS
new
Title : new
Usage : $node = new Bio::NEXUS::WeightSet($name, @weights);
Function: Creates a new Bio::NEXUS::WeightSet object
Returns : Bio::NEXUS::WeightSet object
Args : none
set_weights
Title : set_weights
Usage : $weight->set_weights(@weights);
Function: stores it in the list weights
Returns : none
Args : list of weights
get_weights
Title : get_weights
Usage : @wts=@{$weightset->get_weights()};
Function: Returns the weights array
Returns : reference to array containing weights
Args : none
select_weights
Title : select_weights
Usage : $set->select_weights($columns);
Function: select a subset of characters
Returns : new self with subset of weights
Args : column numbers
is_wt
Title : is_wt
Usage : croak unless $weight->is_wt();
Function: Returns if object has weights (1 yes, 0 no)
Returns : weight existence (integer)
Args : none
set_name
Title : set_name
Usage : $weight->set_name($name);
Function: Sets the name of the weightset
Returns : none
Args : name (string)
get_name
Title : get_name
Usage : $name=$weight->get_name();
Function: Returns the name of the weightset
Returns : name (string)
Args : none
equals
Name : equals
Usage : $set->equals($another);
Function: compare if two WeightSet objects are equal
Returns : boolean
Args : an WeightSet object
<<lessSYNOPSIS
new Bio::NEXUS::WeightSet($name, @weights, $iswt);
A module representing column weights in alignment (for each character)
METHODS
new
Title : new
Usage : $node = new Bio::NEXUS::WeightSet($name, @weights);
Function: Creates a new Bio::NEXUS::WeightSet object
Returns : Bio::NEXUS::WeightSet object
Args : none
set_weights
Title : set_weights
Usage : $weight->set_weights(@weights);
Function: stores it in the list weights
Returns : none
Args : list of weights
get_weights
Title : get_weights
Usage : @wts=@{$weightset->get_weights()};
Function: Returns the weights array
Returns : reference to array containing weights
Args : none
select_weights
Title : select_weights
Usage : $set->select_weights($columns);
Function: select a subset of characters
Returns : new self with subset of weights
Args : column numbers
is_wt
Title : is_wt
Usage : croak unless $weight->is_wt();
Function: Returns if object has weights (1 yes, 0 no)
Returns : weight existence (integer)
Args : none
set_name
Title : set_name
Usage : $weight->set_name($name);
Function: Sets the name of the weightset
Returns : none
Args : name (string)
get_name
Title : get_name
Usage : $name=$weight->get_name();
Function: Returns the name of the weightset
Returns : name (string)
Args : none
equals
Name : equals
Usage : $set->equals($another);
Function: compare if two WeightSet objects are equal
Returns : boolean
Args : an WeightSet object
Download (0.15MB)
Added: 2006-12-19 License: Perl Artistic License Price:
1039 downloads
Convert::Recode 1.04
Convert::Recode is a Perl module to make mapping functions between character sets. more>>
Convert::Recode is a Perl module to make mapping functions between character sets.
SYNOPSIS
use Convert::Recode qw(ebcdic_to_ascii);
while () {
print ebcdic_to_ascii($_);
}
The Convert::Recode module can provide mapping functions between character sets on demand. It depends on GNU recode to provide the raw mapping data, i.e. GNU recode must be installed first. The name of the mapping function is constructed by taking the names of the two charsets and joining them with the string "_to_". For example, if you want to convert between the "mac" and the "latin1" charsets, just import the mac_to_latin1() function.
If you prefix the function name with "strict_", any characters that cannot be mapped are removed during transformation. For instance, the strict_mac_to_latin1() function converts a string to latin1 and removes all mac characters that do not have a corresponding latin1 character.
Running the command recode -l should give you the list of available character sets.
<<lessSYNOPSIS
use Convert::Recode qw(ebcdic_to_ascii);
while () {
print ebcdic_to_ascii($_);
}
The Convert::Recode module can provide mapping functions between character sets on demand. It depends on GNU recode to provide the raw mapping data, i.e. GNU recode must be installed first. The name of the mapping function is constructed by taking the names of the two charsets and joining them with the string "_to_". For example, if you want to convert between the "mac" and the "latin1" charsets, just import the mac_to_latin1() function.
If you prefix the function name with "strict_", any characters that cannot be mapped are removed during transformation. For instance, the strict_mac_to_latin1() function converts a string to latin1 and removes all mac characters that do not have a corresponding latin1 character.
Running the command recode -l should give you the list of available character sets.
Download (0.003MB)
Added: 2006-08-12 License: Perl Artistic License Price:
1168 downloads
DBIx::Recordset 0.26
DBIx::Recordset is a Perl extension for DBI recordsets. more>>
DBIx::Recordset is a Perl extension for DBI recordsets.
SYNOPSIS
use DBIx::Recordset;
# Setup a new object and select some recods...
*set = DBIx::Recordset -> Search ({!DataSource => dbi:Oracle:....,
!Table => users,
$where => name = ? and age > ?,
$values => [richter, 25] }) ;
# Get the values of field foo ...
print "First Records value of foo is $set[0]{foo}n" ;
print "Second Records value of foo is $set[1]{foo}n" ;
# Get the value of the field age of the current record ...
print "Age is $set{age}n" ;
# Do another select with the already created object...
$set -> Search ({name => bar}) ;
# Show the result...
print "All users with name bar:n" ;
while ($rec = $set -> Next)
{
print $rec -> {age} ;
}
# Setup another object and insert a new record
*set2 = DBIx::Recordset -> Insert ({!DataSource => dbi:Oracle:....,
!Table => users,
name => foo,
age => 25 }) ;
# Update this record (change age from 25 to 99)...
$set -> Update ({age => 99}, {name => foo}) ;
DBIx::Recordset is a perl module for abstraction and simplification of database access.
The goal is to make standard database access (select/insert/update/delete) easier to handle and independend of the underlying DBMS. Special attention is made on web applications to make it possible to handle the state-less access and to process the posted data of formfields, but DBIx::Recordset is not limited to web applications.
DBIx::Recordset uses the DBI API to access the database, so it should work with every database for which a DBD driver is available (see also DBIx::Compat).
Most public functions take a hash reference as parameter, which makes it simple to supply various different arguments to the same function. The parameter hash can also be taken from a hash containing posted formfields like those available with CGI.pm, mod_perl, HTML::Embperl and others.
Before using a recordset it is necessary to setup an object. Of course the setup step can be made with the same function call as the first database access, but it can also be handled separately.
Most functions which set up an object return a typglob. A typglob in Perl is an object which holds pointers to all datatypes with the same name. Therefore a typglob must always have a name and cant be declared with my. You can only use it as global variable or declare it with local. The trick for using a typglob is that setup functions can return a reference to an object, an array and a hash at the same time.
The object is used to access the objects methods, the array is used to access the records currently selected in the recordset and the hash is used to access the current record.
If you dont like the idea of using typglobs you can also set up the object, array and hash separately, or just set the ones you need.
<<lessSYNOPSIS
use DBIx::Recordset;
# Setup a new object and select some recods...
*set = DBIx::Recordset -> Search ({!DataSource => dbi:Oracle:....,
!Table => users,
$where => name = ? and age > ?,
$values => [richter, 25] }) ;
# Get the values of field foo ...
print "First Records value of foo is $set[0]{foo}n" ;
print "Second Records value of foo is $set[1]{foo}n" ;
# Get the value of the field age of the current record ...
print "Age is $set{age}n" ;
# Do another select with the already created object...
$set -> Search ({name => bar}) ;
# Show the result...
print "All users with name bar:n" ;
while ($rec = $set -> Next)
{
print $rec -> {age} ;
}
# Setup another object and insert a new record
*set2 = DBIx::Recordset -> Insert ({!DataSource => dbi:Oracle:....,
!Table => users,
name => foo,
age => 25 }) ;
# Update this record (change age from 25 to 99)...
$set -> Update ({age => 99}, {name => foo}) ;
DBIx::Recordset is a perl module for abstraction and simplification of database access.
The goal is to make standard database access (select/insert/update/delete) easier to handle and independend of the underlying DBMS. Special attention is made on web applications to make it possible to handle the state-less access and to process the posted data of formfields, but DBIx::Recordset is not limited to web applications.
DBIx::Recordset uses the DBI API to access the database, so it should work with every database for which a DBD driver is available (see also DBIx::Compat).
Most public functions take a hash reference as parameter, which makes it simple to supply various different arguments to the same function. The parameter hash can also be taken from a hash containing posted formfields like those available with CGI.pm, mod_perl, HTML::Embperl and others.
Before using a recordset it is necessary to setup an object. Of course the setup step can be made with the same function call as the first database access, but it can also be handled separately.
Most functions which set up an object return a typglob. A typglob in Perl is an object which holds pointers to all datatypes with the same name. Therefore a typglob must always have a name and cant be declared with my. You can only use it as global variable or declare it with local. The trick for using a typglob is that setup functions can return a reference to an object, an array and a hash at the same time.
The object is used to access the objects methods, the array is used to access the records currently selected in the recordset and the hash is used to access the current record.
If you dont like the idea of using typglobs you can also set up the object, array and hash separately, or just set the ones you need.
Download (0.092MB)
Added: 2007-07-02 License: Perl Artistic License Price:
844 downloads
Alarm::Concurrent 1.0
Alarm::Concurrent is a Perl module that allows multiple, concurrent alarms. more>>
Alarm::Concurrent is a Perl module that allows multiple, concurrent alarms.
This module is an attempt to enhance Perls built-in alarm/$SIG{ALRM} functionality.
This function, and its associated signal handler, allow you to arrange for your program to receive a SIGALRM signal, which you can then catch and deal with appropriately.
Unfortunately, due to the nature of the design of these signals (at the OS level), you can only have one alarm and handler active at any given time. Thats where this module comes in.
This module allows you to define multiple alarms, each with an associated handler. These alarms are sequenced (in a queue) but concurrent, which means that their order is preserved but they always go off as their set time expires, regardless of the state of the other alarms. (If youd like to have the alarms only go off in the order you set them, see Alarm::Queued.)
To set an alarm, call the setalarm() function with the set time of the alarm and a reference to the subroutine to be called when the alarm goes off. You can then go on with your program and the alarm will be called after the set time has passed.
It is also possible to set an alarm that does not have a handler associated with it using Alarm::Concurrent::alarm(). (This function can also be imported into your namespace, in which case it will replace Perls built-in alarm for your package only.)
If an alarm that does not have a handler associated with it goes off, the default handler, pointed to by $Alarm::Concurrent::DEFAULT_HANLDER, is called. You can change the default handler by assigning to this variable.
The default $Alarm::Concurrent::DEFAULT_HANDLER simply dies with the message "Alarm clock!n".
IMPORT/EXPORT
No methods are exported by default but you can import any of the functions in the FUNCTIONS section.
You can also import the special tag :ALL which will import all the functions in the FUNCTIONS section (except Alarm::Concurrent::restore()).
OVERRIDE
If you import the special tag :OVERRIDE, this module will override Perls built-in alarm function for every namespace and it will take over Perls magic %SIG variable, changing any attempts to read or write $SIG{ALRM} into calls to gethandler() and sethandler(), respectively (reading and writing to other keys in %SIG is unaffected).
This can be useful when you are calling code that tries to set its own alarm "the old fashioned way." It can also, however, be dangerous. Overriding alarm is documented and should be stable but taking over %SIG is more risky (see CAVEATS).
Note that if you do not override alarm and %SIG, any code you use that sets "legacy alarms" will disable all of your concurrent alarms. You can call Alarm::Concurrent::restore() to reinstall the Alarm::Concurrent handler. This function can not be imported.
<<lessThis module is an attempt to enhance Perls built-in alarm/$SIG{ALRM} functionality.
This function, and its associated signal handler, allow you to arrange for your program to receive a SIGALRM signal, which you can then catch and deal with appropriately.
Unfortunately, due to the nature of the design of these signals (at the OS level), you can only have one alarm and handler active at any given time. Thats where this module comes in.
This module allows you to define multiple alarms, each with an associated handler. These alarms are sequenced (in a queue) but concurrent, which means that their order is preserved but they always go off as their set time expires, regardless of the state of the other alarms. (If youd like to have the alarms only go off in the order you set them, see Alarm::Queued.)
To set an alarm, call the setalarm() function with the set time of the alarm and a reference to the subroutine to be called when the alarm goes off. You can then go on with your program and the alarm will be called after the set time has passed.
It is also possible to set an alarm that does not have a handler associated with it using Alarm::Concurrent::alarm(). (This function can also be imported into your namespace, in which case it will replace Perls built-in alarm for your package only.)
If an alarm that does not have a handler associated with it goes off, the default handler, pointed to by $Alarm::Concurrent::DEFAULT_HANLDER, is called. You can change the default handler by assigning to this variable.
The default $Alarm::Concurrent::DEFAULT_HANDLER simply dies with the message "Alarm clock!n".
IMPORT/EXPORT
No methods are exported by default but you can import any of the functions in the FUNCTIONS section.
You can also import the special tag :ALL which will import all the functions in the FUNCTIONS section (except Alarm::Concurrent::restore()).
OVERRIDE
If you import the special tag :OVERRIDE, this module will override Perls built-in alarm function for every namespace and it will take over Perls magic %SIG variable, changing any attempts to read or write $SIG{ALRM} into calls to gethandler() and sethandler(), respectively (reading and writing to other keys in %SIG is unaffected).
This can be useful when you are calling code that tries to set its own alarm "the old fashioned way." It can also, however, be dangerous. Overriding alarm is documented and should be stable but taking over %SIG is more risky (see CAVEATS).
Note that if you do not override alarm and %SIG, any code you use that sets "legacy alarms" will disable all of your concurrent alarms. You can call Alarm::Concurrent::restore() to reinstall the Alarm::Concurrent handler. This function can not be imported.
Download (0.007MB)
Added: 2007-04-30 License: Perl Artistic License Price:
907 downloads
Devel::TraceFuncs 0.1
Devel::TraceFuncs is a Perl module with trace function calls as they happen. more>>
Devel::TraceFuncs is a Perl module with trace function calls as they happen.
SYNOPSIS
Usage:
require Devel::TraceFuncs;
max_trace_depth 5;
trace_file "foo.out";
trace_file $file_handle;
sub foo {
IN(my $f, "a message");
DEBUG "hellooo!";
}
Devel::TraceFuncs provides utilities to trace the execution of a program. It can print traces that look something like:
+-> global: 0
| +-> main::fo(4, 5) (in ./t.pm:32): now then
| | +-> main::fp(4, 5) (in ./t.pm:19)
| | | +-> main::fq() (in ./t.pm:13)
| | | | que pee doll (in ./t.pm:8)
| | | +-< main::fq() (in ./t.pm:13)
| | | cee dee (in ./t.pm:14)
| | +-< main::fp(4, 5) (in ./t.pm:19)
| | ha
| | hs (in ./t.pm:20)
| +-< main::fo(4, 5) (in ./t.pm:32): now then
| done (in ./t.pm:34)
+-< global: 0
IN
A trace begins when a function calls IN. A myd variable is passed in, such that when that function exits, the destructor for the variable is called. If this trace is to be printed, the opening line of the trace in printed at this time. Any other parameters are concatenated together, and printed on both the opening and closing lines of the trace.
I wish the syntax could be a little nicer here, but I couldnt find anything in perl that resembles Tcls uplevel or upvar commands. If I was one of the perl gods, I could have figured out a way to do something like perl5db.pl:
sub sub {
# create a new subroutine, with a myd TraceFunc object
}
DEBUG
Print some text to the trace file, at the correct depth in the trace. If the last parameter ends in "!", the arguments are printed, regardless of current depth.
trace_file
trace_file takes one argument, which is either a file name or an open file handle. All trace output will go to this file.
max_trace_depth
To avoid lots of nesting, particularly from recursive function calls, you can set the maximum depth to be traced. If this is -1 (the default), all levels of functions are traced. If it is 0, no trace output occurs, except for DEBUG statements that end in "!".
<<lessSYNOPSIS
Usage:
require Devel::TraceFuncs;
max_trace_depth 5;
trace_file "foo.out";
trace_file $file_handle;
sub foo {
IN(my $f, "a message");
DEBUG "hellooo!";
}
Devel::TraceFuncs provides utilities to trace the execution of a program. It can print traces that look something like:
+-> global: 0
| +-> main::fo(4, 5) (in ./t.pm:32): now then
| | +-> main::fp(4, 5) (in ./t.pm:19)
| | | +-> main::fq() (in ./t.pm:13)
| | | | que pee doll (in ./t.pm:8)
| | | +-< main::fq() (in ./t.pm:13)
| | | cee dee (in ./t.pm:14)
| | +-< main::fp(4, 5) (in ./t.pm:19)
| | ha
| | hs (in ./t.pm:20)
| +-< main::fo(4, 5) (in ./t.pm:32): now then
| done (in ./t.pm:34)
+-< global: 0
IN
A trace begins when a function calls IN. A myd variable is passed in, such that when that function exits, the destructor for the variable is called. If this trace is to be printed, the opening line of the trace in printed at this time. Any other parameters are concatenated together, and printed on both the opening and closing lines of the trace.
I wish the syntax could be a little nicer here, but I couldnt find anything in perl that resembles Tcls uplevel or upvar commands. If I was one of the perl gods, I could have figured out a way to do something like perl5db.pl:
sub sub {
# create a new subroutine, with a myd TraceFunc object
}
DEBUG
Print some text to the trace file, at the correct depth in the trace. If the last parameter ends in "!", the arguments are printed, regardless of current depth.
trace_file
trace_file takes one argument, which is either a file name or an open file handle. All trace output will go to this file.
max_trace_depth
To avoid lots of nesting, particularly from recursive function calls, you can set the maximum depth to be traced. If this is -1 (the default), all levels of functions are traced. If it is 0, no trace output occurs, except for DEBUG statements that end in "!".
Download (0.004MB)
Added: 2007-05-02 License: Perl Artistic License Price:
905 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above function set search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed