single dimensional array
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2810
Single Marker Association 2.0
Single Marker Association is a simple tool that calculates the single marker association between individual SNP markers. more>>
Single Marker Association is a simple tool that calculates the single marker association between individual SNP markers and a case/control dichotomy.
Usage:
The tool reads two files as input, the first is a set of case and the second a case of control haplotypes. The format of the files is one line per haplotype, where the SNP data is represented as 0 or 1, separated by white-space.
- The tool outputs a list of statistics for each marker
- The marker number (from left to right in the input data)
- The frequency of the 0 allele for the cases file
- The chi-square contingency table statistics for the marker
- The CDF of the chi-square statistics
- The p-value of the statistics (1-CDF)
Installation:
The SMA tool is written in C++. It should compile on any Unix like system. To install, download the source code and unpack it (tar xzf sma-v.tar.gz, where v is the version number of sma), then run make in the subdirectory sma-v created during unpacking.
Enhancements:
- Support for (unphased) genotype data.
<<lessUsage:
The tool reads two files as input, the first is a set of case and the second a case of control haplotypes. The format of the files is one line per haplotype, where the SNP data is represented as 0 or 1, separated by white-space.
- The tool outputs a list of statistics for each marker
- The marker number (from left to right in the input data)
- The frequency of the 0 allele for the cases file
- The chi-square contingency table statistics for the marker
- The CDF of the chi-square statistics
- The p-value of the statistics (1-CDF)
Installation:
The SMA tool is written in C++. It should compile on any Unix like system. To install, download the source code and unpack it (tar xzf sma-v.tar.gz, where v is the version number of sma), then run make in the subdirectory sma-v created during unpacking.
Enhancements:
- Support for (unphased) genotype data.
Download (0.008MB)
Added: 2006-01-19 License: GPL (GNU General Public License) Price:
1373 downloads
Parallel Three-Dimensional Fast Fourier Transforms 2.1
Parallel Three-Dimensional Fast Fourier Transforms is a library for computational computing in a wide range of sciences. more>>
Parallel Three-Dimensional Fast Fourier Transforms, dubbed P3DFFT, is a library for computational computing in a wide range of sciences, such as physics, climatology, chemistry.
This project was developed at SDSC by Dmitry Pekurovsky as a product of a Strategic Applications Collaborations (SAC) project.
Main features:
- Parallel implementation with 2D data decomposition, overcoming an important limitation to scalability of other 3D FFT libraries implementing 1D, or slab, decomposition.
- Optimized for parallel communication and single-CPU performance.
- Built on top of well-optimized and flexible 1D FFT libraries.
Enhancements:
- Assorted minor bugfixes and code speedups.
<<lessThis project was developed at SDSC by Dmitry Pekurovsky as a product of a Strategic Applications Collaborations (SAC) project.
Main features:
- Parallel implementation with 2D data decomposition, overcoming an important limitation to scalability of other 3D FFT libraries implementing 1D, or slab, decomposition.
- Optimized for parallel communication and single-CPU performance.
- Built on top of well-optimized and flexible 1D FFT libraries.
Enhancements:
- Assorted minor bugfixes and code speedups.
Download (MB)
Added: 2007-06-07 License: GPL (GNU General Public License) Price:
869 downloads
XDCC Parser Single 1.1 Revision 1
XDCC Parser Single 1.1 Revision 1 offers you powerful Parse XDCC lists. XDCC Parser Single will search through the XDCC bots listings more>> <<less
Added: 2009-06-15 License: GPL v3 Price: FREE
15 downloads
Single Source information Server 0.1.9
Single Source information Server provides a set of applets for sharing information from a single source. more>>
Single Source information Server provides a set of applets for sharing information from a single source.
The Single Source Infomation Server is a suite of applets designed to share information from a single source, a set of MySQL tables, with as many other systems as possible, starting with PHP, Palm OS PDAs, LDAP, and WAP.
The first part of this project will create a set of PHP pages to edit the information inside a simple set of tables.
This will be the first bi-directional applet (DONE). Following on from there will the ability to export some of this data into a format that can be used by the file link feature in HotSync (DONE), a bi-directional PDA sync (DONE) and by an LDAP server applet, the ability to print single address labels onto a Dymo / CoStar label printer, print envelopes and create a mail-merge export for letters.
If we can work out or get the spec, we will write a QuickBooks timer export for the datebook, and allow import/export of vCal, iCal and vCards.
Enhancements:
- This release fixes a number of bugs and adds some new functionality, includine LDAP.
- After this release we will be making a major re-write to the coldsync conduits, so the next release will be an alpha release of Version 0.2
<<lessThe Single Source Infomation Server is a suite of applets designed to share information from a single source, a set of MySQL tables, with as many other systems as possible, starting with PHP, Palm OS PDAs, LDAP, and WAP.
The first part of this project will create a set of PHP pages to edit the information inside a simple set of tables.
This will be the first bi-directional applet (DONE). Following on from there will the ability to export some of this data into a format that can be used by the file link feature in HotSync (DONE), a bi-directional PDA sync (DONE) and by an LDAP server applet, the ability to print single address labels onto a Dymo / CoStar label printer, print envelopes and create a mail-merge export for letters.
If we can work out or get the spec, we will write a QuickBooks timer export for the datebook, and allow import/export of vCal, iCal and vCards.
Enhancements:
- This release fixes a number of bugs and adds some new functionality, includine LDAP.
- After this release we will be making a major re-write to the coldsync conduits, so the next release will be an alpha release of Version 0.2
Download (0.12MB)
Added: 2007-01-30 License: GPL (GNU General Public License) Price:
997 downloads
AVL Array 1.2
AVL Array is an STL-like container for C++ that fills the gap between vector. more>>
AVL Array is an STL-like container for C++ that fills the gap between vector (or deque) and list, providing both fast random access and fast insertion/removal, all O(log n).
This is not a map; in an avl_array, the "keys" always range from 0 to size-1, and they automatically change on insertion or removal. As a sequence container, like vector and list, it respects the order of elements.
Enhancements:
- documentation
- source reorganized for readability
- compliance with higher standards
- performance improvements
<<lessThis is not a map; in an avl_array, the "keys" always range from 0 to size-1, and they automatically change on insertion or removal. As a sequence container, like vector and list, it respects the order of elements.
Enhancements:
- documentation
- source reorganized for readability
- compliance with higher standards
- performance improvements
Download (0.070MB)
Added: 2006-11-22 License: MIT/X Consortium License Price:
1069 downloads
single-honeypot 0.2-7
Single-honeypot is a powerfull tool, for security interest about the estudies of techniques of breaking systems. more>>
single-honeypot simulates many services like SMTP, HTTP, POP3, shell, and FTP. It can show manydifferent faces, including those of Windows FTP systems, Windows SMTP systems, different Linux distributions, and some Posix distributions.
I wanted to register every service imaginable with the portmapper, but didnt like the idea of actually running the daemons necessary and relying on the firewall to keep the connections controllled (some dweebs voice in my ear kept saying, "defense in depth.") I was going to bang on the sources to portmapper and hardcode everything from /etc/rpc into there, but after I pulled the tarball down, I started reading and saw that pmap_dump and pmap_set would do it all. Cool. Thanks Wietse.
The fakerpc here is derived from RedHat Linux 7.1, Irix 5.3, and Solaris 8s /etc/rpc files, and then built to include lines for versions 1-4 of each rpc program, via both udp and tcp. Start portmapper as normal, but instead of firingup rpc programs, just execute:
"pmap_set < /usr/local/thp/fakerpc".
Theres a 1:1 chance that this will break your existing legit rpc services. If you are running rpc services on your firewall/hpot, you should go hang out with those non-IDS types above.
Enhancements:
- Changes: Pop3 target added and commands of the SMTP target has been added and modified
<<lessI wanted to register every service imaginable with the portmapper, but didnt like the idea of actually running the daemons necessary and relying on the firewall to keep the connections controllled (some dweebs voice in my ear kept saying, "defense in depth.") I was going to bang on the sources to portmapper and hardcode everything from /etc/rpc into there, but after I pulled the tarball down, I started reading and saw that pmap_dump and pmap_set would do it all. Cool. Thanks Wietse.
The fakerpc here is derived from RedHat Linux 7.1, Irix 5.3, and Solaris 8s /etc/rpc files, and then built to include lines for versions 1-4 of each rpc program, via both udp and tcp. Start portmapper as normal, but instead of firingup rpc programs, just execute:
"pmap_set < /usr/local/thp/fakerpc".
Theres a 1:1 chance that this will break your existing legit rpc services. If you are running rpc services on your firewall/hpot, you should go hang out with those non-IDS types above.
Enhancements:
- Changes: Pop3 target added and commands of the SMTP target has been added and modified
Download (0.018MB)
Added: 2006-07-07 License: GPL (GNU General Public License) Price:
1209 downloads
Numarray 1.4.0
Numerical Python adds a fast array facility to the Python language. more>>
Numarray provides array manipulation and computational capabilities similar to those found in IDL, Matlab, or Octave. Using numarray, it is possible to write many efficient numerical data processing applications directly in Python without using any C, C++ or Fortran code (as well as doing such analysis interactively within Python or PyRAF).
For algorithms that are not well suited for efficient computation using array facilities it is possible to write C functions (and eventually Fortran) that can read and write numarray arrays that can be called from Python.
Numarray is a re-implementation of an older Python array module called Numeric. In general its interface is very similar. It is mostly backward compatible and will be becoming more so in future releases. Numarray offers more capability than Numeric but is still behind Numeric in some areas:
numarray is efficient for large arrays (>20,000 elements) but is slower than Numeric for small arrays by a factor of 2 to 4.
numarray has a smaller selection of addon packages. numarray currently has ports of Numeric packages for linear algebra, random numbers, and fourier transforms. numarray has native packages for convolution and multi-dimensional image processing. Most Numeric extensions (C or Fortran) can be ported to numarray with minimal effort.
numarray is sufficiently developed to be useful for a number of applications, and is being used in the Hubble Space Telescope data processing pipeline (for the Advanced Camera for Surveys) and to develop the Cosmic Origins Spectrograph pipeline. PyFITS is also based on it. Most of STScIs future astronomical data processing applications will be built using its capabilities.
Numarray is being developed as an Open Source project on SourceForge from which the current development source code may be obtained. The Science Software Branch at STScI is leading this development effort.
STScI has settled on the matplotlib plotting package as the recommended 2-d data visualization tool for numarray data. While its support for numarray and Tkinter is now present, we are holding off a bit before recommending its use for all users. If you dont mind possible problems with installation or some holes in functionality it can be used now. We are in the process of improving the installation documentation for use with numarray.
Although matplotlib has its heritage in trying to emulate matlab plotting capabilities from Python, it does not require matlab. Currently the documentation is geared towards those more familiar with matlab, though many users will have no problem generating simple plots with it. It is still undergoing considerable development (by the original author, John Hunter, and with contributions by STScI and others) and we hope to fill the holes in functionality in the coming months. Nevertheless, it is capable of doing many things now.
Enhancements:
ENHANCEMENTS
- Speed improvement for numarray operators. The Python level hook mapping numarray operators onto universal functions has been moved down to C.
- Speed improvement for string-array comparisons, any(), all(). String correlation is ~10x faster.
- Better operation with py2exe to help it automatically detect the core numarray extensions to include in an installer.
- scipy newcore compatible lower case type names (e.g. int32 not Int32)
- scipy newcore dtype keyword and .dtypechar attribute.
BUGS FIXED / CLOSED
- 1323355 Apps fail with import_libnumarray
- 1315212 Infinite loop converting some scalar strings into a list
- 1298916 rank-0 tostring() broken
- 1297948 records.array fails to create empty fields
- 1286291 import sys missing from array_persist.py
- 1286168 Generic sequences in ``strings.array()``
- 1236392 Outdated web link in announcements
- 1235219 LinearAlgebraError not imported in linear_algebra
<<lessFor algorithms that are not well suited for efficient computation using array facilities it is possible to write C functions (and eventually Fortran) that can read and write numarray arrays that can be called from Python.
Numarray is a re-implementation of an older Python array module called Numeric. In general its interface is very similar. It is mostly backward compatible and will be becoming more so in future releases. Numarray offers more capability than Numeric but is still behind Numeric in some areas:
numarray is efficient for large arrays (>20,000 elements) but is slower than Numeric for small arrays by a factor of 2 to 4.
numarray has a smaller selection of addon packages. numarray currently has ports of Numeric packages for linear algebra, random numbers, and fourier transforms. numarray has native packages for convolution and multi-dimensional image processing. Most Numeric extensions (C or Fortran) can be ported to numarray with minimal effort.
numarray is sufficiently developed to be useful for a number of applications, and is being used in the Hubble Space Telescope data processing pipeline (for the Advanced Camera for Surveys) and to develop the Cosmic Origins Spectrograph pipeline. PyFITS is also based on it. Most of STScIs future astronomical data processing applications will be built using its capabilities.
Numarray is being developed as an Open Source project on SourceForge from which the current development source code may be obtained. The Science Software Branch at STScI is leading this development effort.
STScI has settled on the matplotlib plotting package as the recommended 2-d data visualization tool for numarray data. While its support for numarray and Tkinter is now present, we are holding off a bit before recommending its use for all users. If you dont mind possible problems with installation or some holes in functionality it can be used now. We are in the process of improving the installation documentation for use with numarray.
Although matplotlib has its heritage in trying to emulate matlab plotting capabilities from Python, it does not require matlab. Currently the documentation is geared towards those more familiar with matlab, though many users will have no problem generating simple plots with it. It is still undergoing considerable development (by the original author, John Hunter, and with contributions by STScI and others) and we hope to fill the holes in functionality in the coming months. Nevertheless, it is capable of doing many things now.
Enhancements:
ENHANCEMENTS
- Speed improvement for numarray operators. The Python level hook mapping numarray operators onto universal functions has been moved down to C.
- Speed improvement for string-array comparisons, any(), all(). String correlation is ~10x faster.
- Better operation with py2exe to help it automatically detect the core numarray extensions to include in an installer.
- scipy newcore compatible lower case type names (e.g. int32 not Int32)
- scipy newcore dtype keyword and .dtypechar attribute.
BUGS FIXED / CLOSED
- 1323355 Apps fail with import_libnumarray
- 1315212 Infinite loop converting some scalar strings into a list
- 1298916 rank-0 tostring() broken
- 1297948 records.array fails to create empty fields
- 1286291 import sys missing from array_persist.py
- 1286168 Generic sequences in ``strings.array()``
- 1236392 Outdated web link in announcements
- 1235219 LinearAlgebraError not imported in linear_algebra
Download (1.1MB)
Added: 2005-10-27 License: GPL (GNU General Public License) Price:
1459 downloads
Set::Array 0.14
Set::Array Perl module contains arrays as objects with lots of handy methods and support for method chaining. more>>
Set::Array Perl module contains arrays as objects with lots of handy methods (including Set comparisons) and support for method chaining.
SYNOPSIS
my $sao1 = Set::Array->new(1,2,4,"hello",undef);
my $sao2 = Set::Array->new(qw(a b c a b c));
print $sao1->length; # prints 5
$sao2->unique->length->print; # prints 3
Set::Array allows you to create arrays as objects and use OO-style methods on them. Many convenient methods are provided here that appear in the FAQs, the Perl Cookbook or posts from comp.lang.perl.misc. In addition, there are Set methods with corresponding (overloaded) operators for the purpose of Set comparison, i.e. +, ==, etc.
The purpose is to provide built-in methods for operations that people are always asking how to do, and which already exist in languages like Ruby. This should (hopefully) improve code readability and/or maintainability. The other advantage to this module is method-chaining by which any number of methods may be called on a single object in a single statement.
OBJECT BEHAVIOR
The exact behavior of the methods depends largely on the calling context.
Here are the rules:
* If a method is called in void context, the object itself is modified.
* If the method called is not the last method in a chain (i.e. its called in object context), the object itself is modified by that method regardless of the final context or method call.
* If a method is called in list or scalar context, a list or list refererence is returned, respectively. The object itself is NOT modified.
Heres a quick example:
my $sao = Set::Array->new(1,2,3,2,3);
my @uniq = $sao->unique(); # Object unmodified. @uniq contains 3 values.
$sao->unique(); # Object modified, now contains 3 values
Here are the exceptions:
* Methods that report a value, such as boolean methods like exists() or other methods such as at() or as_hash(), never modify the object.
* The methods clear(), delete(), delete_at(), and splice will always modify the object. It seemed much too counterintuitive to call these methods in any context without actually deleting/clearing/substituting the items!
* The methods shift() and pop() will modify the object AND return the value that was shifted or popped from the array. Again, it seemed much too counterintuitive for something like $val = $sao->shift to return a value while leaving the objects list unchanged. If you really want the first or last value without modifying the object, you can always use the first() or last() method, respectively.
* The join() method always returns a string and is really meant for use in conjunction with the print() method.
BOOLEAN METHODS
exists(val) - Returns 1 if val exists within the array, 0 otherwise. If no value (or undef) is passed, then this method will test for the existence of undefined values within the array.
is_empty() - Returns 1 if the array is empty, 0 otherwise. Empty is defined as having a length of 0.
STANDARD METHODS
at(index) - Returns the item at the given index (or undef). A negative index may be used to count from the end of the array. If no value (or undef) is specified, it will look for the first item that is not defined.
clear() - Empties the array (i.e. length becomes 0). You may pass a 1 to this method to set each element of the array to undef rather than truly empty it.
compact() - Removes undefined elements from the array.
count(?val?) - Returns the number of instances of val within the array. If val is not specified (or is undef), the method will return the number of undefined values within the array.
delete(list) - Deletes all items within list from the array that match. This method will crash if list is not defined. If your goal is to delete undefined values from your object, use the compact() method instead.
delete_at(index, ?index?) - Deletes the item at the specified index. If a second index is specified, a range of items is deleted. You may use -1 or the string end to refer to the last element of the array.
duplicates - Returns a list of N-1 elements for each element N in the set. For example, if you have set "X X Y Y Y", this method would return a the list "X Y Y".
fill(val,?start?,?length?) - Sets the selected elements of the array (which may be the entire array) to val. The default value for start is 0. If length is not specified the entire array, however long it may be at the time of the call, will be filled. Alternatively, a quoted integer range may be used.
e.g. $sao->fill(x,3-5);
The array length/size may not be expanded with this call - it is only meant to fill in already-existing elements.
first() - Returns the first element of the array (or undef).
flatten() - Causes a one-dimensional flattening of the array, recursively. That is, for every element that is an array (or hash, or a ref to either an array or hash), extract its elements into the array.
e.g. my $sa = Set::Array->new([1,3,2],{one=>a,two=>b},x,y,z);
$sao->flatten->join(,)->print; # prints "1,3,2,one,a,two,b,x,y,z"
foreach(sub ref) - Iterates over an array, executing the subroutine for each element in the array. If you wish to modify or otherwise act directly on the contents of the array, use $_ within your sub reference.
e.g. To increment all elements in the array by one...
$sao->foreach(sub{ ++$_ });
get - Alias for the indices() method.
index(val) - Returns the index of the first element of the array object that contains val. Returns undef if no value is found.
Note that there is no dereferencing here so if youre looking for an item nested within a ref, use the flatten method first.
indices(val1,?val2?, ?val...?) - Returns an array consisting of the elements at the specified indices or undef if the element is out of range.
A range may also be used. It must be a quoted string in 0..3 format.
join(?char?) - Joins the individual elements of the list into a single string with the elements separated by the value of char. Useful in conjunction with the print() method. If no character is specified, then char defaults to a comma.
e.g. $sao->join(-)->print;
last() - Returns the last element of the array (or undef).
length() - Returns the number of elements within the array.
max() - Returns the maximum value of an array. No effort is made to check for non-numeric data.
pack(template) - Packs the contents of the array into a string (in scalar context) or a single array element (in object or void context).
pop() - Removes the last element from the array. Returns the popped element.
print(?1?) - Prints the contents of the array. If a 1 is provided as an argument, the output will automatically be terminated with a newline.
This also doubles as a contents method, if you just want to make a copy of the array, e.g. my @copy = $sao->print;
Can be called in void or list context, e.g.
$sao->print(); # or... print "Contents of array are: ", $sao->print();
push(list) - Adds list to the end of the array, where list is either a scalar value or a list. Returns an array or array reference in list or scalar context, respectively. Note that it does not return the length in scalar context. Use the length method for that.
reverse() - Reverses the order of the contents of the array.
rindex(val) - Similar to the index() method, except that it returns the index of the last val found within the array.
set(index,value) - Sets the element at index to value, replacing whatever may have already been there.
shift() - Shifts the first element of the array and returns the shifted element.
sort(?coderef?) - Sorts the contents of the array in alphabetical order, or in the order specified by the optional coderef. Use your standard $a and $b variables within your calling program, e.g:
my $sao = Set::Array->new( { name => Berger, salary => 20000 }, { name => Berger, salary => 15000 }, { name => Vera, salary => 25000 }, );
my $subref = sub{ $b->{name} cmp $a->{name} || $b->{salary} $a->{salary} };
$sao14->sort($subref)->flatten->join->print(1);
splice(?offset?,?length?,?list?) - Splice the array starting at position offset up to length elements, and replace them with list. If no list is provided, all elements are deleted. If length is omitted, everything from offset onward is removed.
Returns an array or array ref in list or scalar context, respectively. This method always modifies the object, regardless of context. If your goal was to grab a range of values without modifying the object, use the indices method instead.
unique() - Removes/returns non-unique elements from the list.
unshift(list) - Prepends a scalar or list to array. Note that this method returns an array or array reference in list or scalar context, respectively. It does not return the length of the array in scalar context. Use the length method for that.
ODDBALL METHODS
as_hash() - Returns a hash based on the current array, with each even numbered element (including 0) serving as the key, and each odd element serving as the value. This can be switched by using the key_order option and setting it to odd, in which case the even values serve as the values, and the odd elements serve as the keys. The default is even.
Of course, if you dont care about insertion order, you could just as well do something like, $sao-reverse->as_hash;>
Carp::croaks if the array contains an odd number of elements. This method does not actually modify the object itself in any way. It just returns a plain hash in list context or a hash reference in scalar context. The reference is not blessed, therefore if this method is called as part of a chain, it must be the last method called.
impose(?append/prepend?,string) - Appends or prepends the specified string to each element in the array. Specify the method by using either the keyword append or prepend. The default is append.
randomize() - Randomizes the order of the elements within the array.
rotate(direction) - Moves the last item of the list to the front and shifts all other elements one to the right, or vice-versa, depending on what you pass as the direction - ftol (first to last) or ltof (last to first). The default is ltof.
e.g. my $sao = Set::Array->new(1,2,3);
$sao->rotate(); # order is now 3,1,2
$sao->rotate(ftol); # order is back to 1,2,3
<<lessSYNOPSIS
my $sao1 = Set::Array->new(1,2,4,"hello",undef);
my $sao2 = Set::Array->new(qw(a b c a b c));
print $sao1->length; # prints 5
$sao2->unique->length->print; # prints 3
Set::Array allows you to create arrays as objects and use OO-style methods on them. Many convenient methods are provided here that appear in the FAQs, the Perl Cookbook or posts from comp.lang.perl.misc. In addition, there are Set methods with corresponding (overloaded) operators for the purpose of Set comparison, i.e. +, ==, etc.
The purpose is to provide built-in methods for operations that people are always asking how to do, and which already exist in languages like Ruby. This should (hopefully) improve code readability and/or maintainability. The other advantage to this module is method-chaining by which any number of methods may be called on a single object in a single statement.
OBJECT BEHAVIOR
The exact behavior of the methods depends largely on the calling context.
Here are the rules:
* If a method is called in void context, the object itself is modified.
* If the method called is not the last method in a chain (i.e. its called in object context), the object itself is modified by that method regardless of the final context or method call.
* If a method is called in list or scalar context, a list or list refererence is returned, respectively. The object itself is NOT modified.
Heres a quick example:
my $sao = Set::Array->new(1,2,3,2,3);
my @uniq = $sao->unique(); # Object unmodified. @uniq contains 3 values.
$sao->unique(); # Object modified, now contains 3 values
Here are the exceptions:
* Methods that report a value, such as boolean methods like exists() or other methods such as at() or as_hash(), never modify the object.
* The methods clear(), delete(), delete_at(), and splice will always modify the object. It seemed much too counterintuitive to call these methods in any context without actually deleting/clearing/substituting the items!
* The methods shift() and pop() will modify the object AND return the value that was shifted or popped from the array. Again, it seemed much too counterintuitive for something like $val = $sao->shift to return a value while leaving the objects list unchanged. If you really want the first or last value without modifying the object, you can always use the first() or last() method, respectively.
* The join() method always returns a string and is really meant for use in conjunction with the print() method.
BOOLEAN METHODS
exists(val) - Returns 1 if val exists within the array, 0 otherwise. If no value (or undef) is passed, then this method will test for the existence of undefined values within the array.
is_empty() - Returns 1 if the array is empty, 0 otherwise. Empty is defined as having a length of 0.
STANDARD METHODS
at(index) - Returns the item at the given index (or undef). A negative index may be used to count from the end of the array. If no value (or undef) is specified, it will look for the first item that is not defined.
clear() - Empties the array (i.e. length becomes 0). You may pass a 1 to this method to set each element of the array to undef rather than truly empty it.
compact() - Removes undefined elements from the array.
count(?val?) - Returns the number of instances of val within the array. If val is not specified (or is undef), the method will return the number of undefined values within the array.
delete(list) - Deletes all items within list from the array that match. This method will crash if list is not defined. If your goal is to delete undefined values from your object, use the compact() method instead.
delete_at(index, ?index?) - Deletes the item at the specified index. If a second index is specified, a range of items is deleted. You may use -1 or the string end to refer to the last element of the array.
duplicates - Returns a list of N-1 elements for each element N in the set. For example, if you have set "X X Y Y Y", this method would return a the list "X Y Y".
fill(val,?start?,?length?) - Sets the selected elements of the array (which may be the entire array) to val. The default value for start is 0. If length is not specified the entire array, however long it may be at the time of the call, will be filled. Alternatively, a quoted integer range may be used.
e.g. $sao->fill(x,3-5);
The array length/size may not be expanded with this call - it is only meant to fill in already-existing elements.
first() - Returns the first element of the array (or undef).
flatten() - Causes a one-dimensional flattening of the array, recursively. That is, for every element that is an array (or hash, or a ref to either an array or hash), extract its elements into the array.
e.g. my $sa = Set::Array->new([1,3,2],{one=>a,two=>b},x,y,z);
$sao->flatten->join(,)->print; # prints "1,3,2,one,a,two,b,x,y,z"
foreach(sub ref) - Iterates over an array, executing the subroutine for each element in the array. If you wish to modify or otherwise act directly on the contents of the array, use $_ within your sub reference.
e.g. To increment all elements in the array by one...
$sao->foreach(sub{ ++$_ });
get - Alias for the indices() method.
index(val) - Returns the index of the first element of the array object that contains val. Returns undef if no value is found.
Note that there is no dereferencing here so if youre looking for an item nested within a ref, use the flatten method first.
indices(val1,?val2?, ?val...?) - Returns an array consisting of the elements at the specified indices or undef if the element is out of range.
A range may also be used. It must be a quoted string in 0..3 format.
join(?char?) - Joins the individual elements of the list into a single string with the elements separated by the value of char. Useful in conjunction with the print() method. If no character is specified, then char defaults to a comma.
e.g. $sao->join(-)->print;
last() - Returns the last element of the array (or undef).
length() - Returns the number of elements within the array.
max() - Returns the maximum value of an array. No effort is made to check for non-numeric data.
pack(template) - Packs the contents of the array into a string (in scalar context) or a single array element (in object or void context).
pop() - Removes the last element from the array. Returns the popped element.
print(?1?) - Prints the contents of the array. If a 1 is provided as an argument, the output will automatically be terminated with a newline.
This also doubles as a contents method, if you just want to make a copy of the array, e.g. my @copy = $sao->print;
Can be called in void or list context, e.g.
$sao->print(); # or... print "Contents of array are: ", $sao->print();
push(list) - Adds list to the end of the array, where list is either a scalar value or a list. Returns an array or array reference in list or scalar context, respectively. Note that it does not return the length in scalar context. Use the length method for that.
reverse() - Reverses the order of the contents of the array.
rindex(val) - Similar to the index() method, except that it returns the index of the last val found within the array.
set(index,value) - Sets the element at index to value, replacing whatever may have already been there.
shift() - Shifts the first element of the array and returns the shifted element.
sort(?coderef?) - Sorts the contents of the array in alphabetical order, or in the order specified by the optional coderef. Use your standard $a and $b variables within your calling program, e.g:
my $sao = Set::Array->new( { name => Berger, salary => 20000 }, { name => Berger, salary => 15000 }, { name => Vera, salary => 25000 }, );
my $subref = sub{ $b->{name} cmp $a->{name} || $b->{salary} $a->{salary} };
$sao14->sort($subref)->flatten->join->print(1);
splice(?offset?,?length?,?list?) - Splice the array starting at position offset up to length elements, and replace them with list. If no list is provided, all elements are deleted. If length is omitted, everything from offset onward is removed.
Returns an array or array ref in list or scalar context, respectively. This method always modifies the object, regardless of context. If your goal was to grab a range of values without modifying the object, use the indices method instead.
unique() - Removes/returns non-unique elements from the list.
unshift(list) - Prepends a scalar or list to array. Note that this method returns an array or array reference in list or scalar context, respectively. It does not return the length of the array in scalar context. Use the length method for that.
ODDBALL METHODS
as_hash() - Returns a hash based on the current array, with each even numbered element (including 0) serving as the key, and each odd element serving as the value. This can be switched by using the key_order option and setting it to odd, in which case the even values serve as the values, and the odd elements serve as the keys. The default is even.
Of course, if you dont care about insertion order, you could just as well do something like, $sao-reverse->as_hash;>
Carp::croaks if the array contains an odd number of elements. This method does not actually modify the object itself in any way. It just returns a plain hash in list context or a hash reference in scalar context. The reference is not blessed, therefore if this method is called as part of a chain, it must be the last method called.
impose(?append/prepend?,string) - Appends or prepends the specified string to each element in the array. Specify the method by using either the keyword append or prepend. The default is append.
randomize() - Randomizes the order of the elements within the array.
rotate(direction) - Moves the last item of the list to the front and shifts all other elements one to the right, or vice-versa, depending on what you pass as the direction - ftol (first to last) or ltof (last to first). The default is ltof.
e.g. my $sao = Set::Array->new(1,2,3);
$sao->rotate(); # order is now 3,1,2
$sao->rotate(ftol); # order is back to 1,2,3
Download (0.023MB)
Added: 2007-07-23 License: Perl Artistic License Price:
823 downloads
Variable::Strongly::Typed::Array 1.1.0
Variable::Strongly::Typed::Array is a Perl module for strongly typed array. more>>
Variable::Strongly::Typed::Array is a Perl module for strongly typed array.
SYNOPSIS
This class is utilized by Variable::Strongly::Typed - you dont access this directly
my @array_of_ints :TYPE(int); # Each slot must contain an int
my @array_of_rgb :TYPE(&red_green_blue); # my enumerated type
# ... and later ...
$array_of_ints[23] = 44; # Groovy
$array_of_ints[12] = yah; # croak!
# Return 1 if this val is RED, BLUE, or GREEN
# 0 otherwise
sub red_green_blue {
local $_ = shift;
/A RED z/xms || /A BLUE z/xms || /A GREEN z/xms;
}
$array_of_my_very_own_types[23] = 99; # croak!
$array_of_my_very_own_types[2] = BLUE; # OK!
<<lessSYNOPSIS
This class is utilized by Variable::Strongly::Typed - you dont access this directly
my @array_of_ints :TYPE(int); # Each slot must contain an int
my @array_of_rgb :TYPE(&red_green_blue); # my enumerated type
# ... and later ...
$array_of_ints[23] = 44; # Groovy
$array_of_ints[12] = yah; # croak!
# Return 1 if this val is RED, BLUE, or GREEN
# 0 otherwise
sub red_green_blue {
local $_ = shift;
/A RED z/xms || /A BLUE z/xms || /A GREEN z/xms;
}
$array_of_my_very_own_types[23] = 99; # croak!
$array_of_my_very_own_types[2] = BLUE; # OK!
Download (0.010MB)
Added: 2007-01-18 License: Perl Artistic License Price:
1009 downloads
Tie::OffsetArray 0.01
Tie::OffsetArray can tie one array to another, with index offset. more>>
Tie::OffsetArray can tie one array to another, with index offset.
SYNOPSIS
use Tie::OffsetArray;
tie @a, Tie::OffsetArray, 1, @b; # offset=1; use given array.
tie @c, Tie::OffsetArray, 2; # use anonymous array.
$a[0] = x; # assign to $b[1];
tied(@a)->array->[0] = y; # assign to $b[0].
When tied to this class, an arrays behavior is completely normal. For its internal storage, it uses another array, either one supplied by the caller, or a new anonymous one. Accesses to the tied array are mapped down to the storage array by offsetting the index by some constant amount.
A special method on the tied object returns a reference to the storage array, so that the elements below the offset can be accessed. This is particularly useful if the storage array was not supplied by the caller.
<<lessSYNOPSIS
use Tie::OffsetArray;
tie @a, Tie::OffsetArray, 1, @b; # offset=1; use given array.
tie @c, Tie::OffsetArray, 2; # use anonymous array.
$a[0] = x; # assign to $b[1];
tied(@a)->array->[0] = y; # assign to $b[0].
When tied to this class, an arrays behavior is completely normal. For its internal storage, it uses another array, either one supplied by the caller, or a new anonymous one. Accesses to the tied array are mapped down to the storage array by offsetting the index by some constant amount.
A special method on the tied object returns a reference to the storage array, so that the elements below the offset can be accessed. This is particularly useful if the storage array was not supplied by the caller.
Download (0.008MB)
Added: 2007-08-10 License: Perl Artistic License Price:
805 downloads
Tie::FlatFile::Array 0.03
Tie::FlatFile::Array is a Perl extension which treats a flatfile database as an array of arrays. more>>
Tie::FlatFile::Array is a Perl extension which treats a flatfile database as an array of arrays.
This module allows the programmer to treat a flatfile database as as array of arrays. For example, lets say you have a datafile that has fixed-length records like so:
Field-name Type
URL ASCII characters, length 30
Referals Integer, 4 bytes, binary in network order
If you were going to use pack to create a record like this, youd use a format string of A30N. Since Tie::FlatFile::Array does the packing and unpacking behind the scenes, you would use that pack format string in the call to tie:
tie @flat, Tie::FlatFile::Array, data.file,
O_RDWR | O_CREAT, 0644, { packformat => A30N }
or die("Tie failure: $!");
To insert an item into the data file, you would assign an array reference to one of the arrays elements like so:
$flat[0] = [ www.yahoo.com, 3601 ];
<<lessThis module allows the programmer to treat a flatfile database as as array of arrays. For example, lets say you have a datafile that has fixed-length records like so:
Field-name Type
URL ASCII characters, length 30
Referals Integer, 4 bytes, binary in network order
If you were going to use pack to create a record like this, youd use a format string of A30N. Since Tie::FlatFile::Array does the packing and unpacking behind the scenes, you would use that pack format string in the call to tie:
tie @flat, Tie::FlatFile::Array, data.file,
O_RDWR | O_CREAT, 0644, { packformat => A30N }
or die("Tie failure: $!");
To insert an item into the data file, you would assign an array reference to one of the arrays elements like so:
$flat[0] = [ www.yahoo.com, 3601 ];
Download (0.005MB)
Added: 2007-03-30 License: GPL (GNU General Public License) Price:
938 downloads
mod_limitipconn 0.04
mod_limitipconn is an Apache module which allows web server administrators to limit the number of simultaneous downloads. more>>
mod_limitipconn is an Apache module which allows web server administrators to limit the number of simultaneous downloads permitted from a single IP address.
<<less Download (0.007MB)
Added: 2006-05-11 License: The Apache License 2.0 Price:
1265 downloads
CGI::Enurl 1.07
CGI::Enurl.pm is a Perl module for URL-encoding strings and hashes. more>>
CGI::Enurl.pm is a Perl module for URL-encoding strings and hashes.
SYNOPSIS
use CGI::Enurl;
%hash = (name=>Jenda Krynicky,address=>Nerudova 1016);
print "Location: http://$ENV{SERVER_NAME}/cgi-bin/do.pl?",enurl %hash,"nn";
This is a little module made for CGI scripting. It encodes the parameters to be passed to a CGI. It does nothing more, so its much smaller and loads more quickly.
Functions
enurl STRING
enurl ARRAY
enurl HASH
Encodes the parameter. If the parameter is a single string it encodes it and returns the encoded form.
If it is an array or a reference to an array it encodes all items and returns them joined by &.
If it is a hash it encodes the values and return a querystring in form "key2=encoded_value1&key2=encoded_value2&...".
!!! Please note that a hash in a list context returns a list of all keys and values. This means that if you call enurl(%hash) you will NOT get what you may thing you should. You HAVE to use enurl(%hash) !!!
enURL STRING
Encodes the parameter, this version doesnt encode = and & characters, so you should make sure they are not present in the data.
Notice the difference :
enurl a&b=f o o => a%26b%3Df+o+o
enURL a&b=f o o => a&b=f+o+o
$CGI::Enurl::ParamSeparator
You may specify another character to be used as the parameter separator. Simply set this variable to the character (or string) you want to use.
The default value is &
$CGI::Enurl::KeepUnencoded
This variable contains the characters that should stay unencoded. Please keep in mind that the string will be interpolated into a regexp in a [^...] group!
Any change of this variable will be ignored after the first call to enurl or enURL. (Im using /o switch in the regexp.) So if you want to change the variable you should do it as soon as posible. You may do that even before you "use" the module!
The default value is a-zA-Z 0-9_-@.=
<<lessSYNOPSIS
use CGI::Enurl;
%hash = (name=>Jenda Krynicky,address=>Nerudova 1016);
print "Location: http://$ENV{SERVER_NAME}/cgi-bin/do.pl?",enurl %hash,"nn";
This is a little module made for CGI scripting. It encodes the parameters to be passed to a CGI. It does nothing more, so its much smaller and loads more quickly.
Functions
enurl STRING
enurl ARRAY
enurl HASH
Encodes the parameter. If the parameter is a single string it encodes it and returns the encoded form.
If it is an array or a reference to an array it encodes all items and returns them joined by &.
If it is a hash it encodes the values and return a querystring in form "key2=encoded_value1&key2=encoded_value2&...".
!!! Please note that a hash in a list context returns a list of all keys and values. This means that if you call enurl(%hash) you will NOT get what you may thing you should. You HAVE to use enurl(%hash) !!!
enURL STRING
Encodes the parameter, this version doesnt encode = and & characters, so you should make sure they are not present in the data.
Notice the difference :
enurl a&b=f o o => a%26b%3Df+o+o
enURL a&b=f o o => a&b=f+o+o
$CGI::Enurl::ParamSeparator
You may specify another character to be used as the parameter separator. Simply set this variable to the character (or string) you want to use.
The default value is &
$CGI::Enurl::KeepUnencoded
This variable contains the characters that should stay unencoded. Please keep in mind that the string will be interpolated into a regexp in a [^...] group!
Any change of this variable will be ignored after the first call to enurl or enURL. (Im using /o switch in the regexp.) So if you want to change the variable you should do it as soon as posible. You may do that even before you "use" the module!
The default value is a-zA-Z 0-9_-@.=
Download (0.004MB)
Added: 2007-07-19 License: Perl Artistic License Price:
828 downloads
Tie::Array::PackedC 0.03
Tie::Array::PackedC is a Tie a Perl array to a C-style array (packed; elements of a single, simple data type). more>>
Tie::Array::PackedC is a tie a Perl array to a C-style array (packed; elements of a single, simple data type).
SYNOPSIS
use Tie::Array::PackedC qw(packed_array packed_array_string);
my $ref=packed_array(1,2,3,4);
my $ref2=packed_array_string(my $s,1,2,3,4);
use Tie::Array::PackedC Double=>d;
tie my @array,Tie::Array::PackedC::Double,1..10;
$array[0]=1.141;
Provides a perl array interface into a string containing a C style array. In other words the string is equivelent to the string that would be returned from the equivelent pack command (defaulting to pack type "l!") using a normal array of the same values. Eg:
my @foo=(1..10);
my $string=pack "l!*",@foo;
leaves $string in basically the same condition as
my (@foo,$string);
tie @foo,Tie::Array::PackedC,$string,1..10;
Its only basically the same and not exactly the same because the tie version may be longer due to preallocation.
<<lessSYNOPSIS
use Tie::Array::PackedC qw(packed_array packed_array_string);
my $ref=packed_array(1,2,3,4);
my $ref2=packed_array_string(my $s,1,2,3,4);
use Tie::Array::PackedC Double=>d;
tie my @array,Tie::Array::PackedC::Double,1..10;
$array[0]=1.141;
Provides a perl array interface into a string containing a C style array. In other words the string is equivelent to the string that would be returned from the equivelent pack command (defaulting to pack type "l!") using a normal array of the same values. Eg:
my @foo=(1..10);
my $string=pack "l!*",@foo;
leaves $string in basically the same condition as
my (@foo,$string);
tie @foo,Tie::Array::PackedC,$string,1..10;
Its only basically the same and not exactly the same because the tie version may be longer due to preallocation.
Download (0.006MB)
Added: 2006-06-15 License: Perl Artistic License Price:
1226 downloads
Class::ArrayObjects 1.02
Class::ArrayObjects is a Perl utility class for array based objects. more>>
Class::ArrayObjects is a Perl utility class for array based objects.
SYNOPSIS
package Some::Class;
use Class::ArrayObjects define => {
fields => [qw(_foo_ _bar_ BAZ)],
};
or
package Other::Class;
use base Some::Class;
use Class::ArrayObjects extend => {
class => Some::Class,
with => [qw(_zorg_ _fnord_ BEZ)],
import => 1,
};
This module is little more than a cute way of defining constant subs in your own package. Constant subs are very useful when dealing with array based objects because they allow one to access array slots by name instead of by index.
<<lessSYNOPSIS
package Some::Class;
use Class::ArrayObjects define => {
fields => [qw(_foo_ _bar_ BAZ)],
};
or
package Other::Class;
use base Some::Class;
use Class::ArrayObjects extend => {
class => Some::Class,
with => [qw(_zorg_ _fnord_ BEZ)],
import => 1,
};
This module is little more than a cute way of defining constant subs in your own package. Constant subs are very useful when dealing with array based objects because they allow one to access array slots by name instead of by index.
Download (0.006MB)
Added: 2006-10-06 License: Perl Artistic License Price:
1113 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 single dimensional array 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