list of urls
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 3805
list files 0.2
list files package prints to file list of files in a given directory. more>>
list files package prints to file list of files in a given directory.
Handy if youd like to, say, tell a friend of yours what ebooks you have, and wouldnt feel like typing them all by hand.
Hope you can find it useful.
INSTALLATION
i assume youve got everything in its standard places; otherwise you probably know what to do anyway.
to install for one user
copy listFiles.desktop to ~/.kde/share/apps/konqueror/servicemenus
copy listFiles.sh to /usr/local/bin or elsewhere in the path
to install for all users
copy listFiles.desktop to /usr/share/apps/konqueror/servicemenus
copy listFiles.sh to /usr/local/bin or elsewhere in the path
Enhancements:
- added counting the number of items
- added the possibility to change the place where the listing is written to
- some minor changes to the code
<<lessHandy if youd like to, say, tell a friend of yours what ebooks you have, and wouldnt feel like typing them all by hand.
Hope you can find it useful.
INSTALLATION
i assume youve got everything in its standard places; otherwise you probably know what to do anyway.
to install for one user
copy listFiles.desktop to ~/.kde/share/apps/konqueror/servicemenus
copy listFiles.sh to /usr/local/bin or elsewhere in the path
to install for all users
copy listFiles.desktop to /usr/share/apps/konqueror/servicemenus
copy listFiles.sh to /usr/local/bin or elsewhere in the path
Enhancements:
- added counting the number of items
- added the possibility to change the place where the listing is written to
- some minor changes to the code
Download (0.002MB)
Added: 2007-02-13 License: GPL (GNU General Public License) Price:
581 downloads
List::MoreUtils 0.22
List::MoreUtils is a Perl module that can provide the stuff missing in List::Util. more>>
List::MoreUtils is a Perl module that can provide the stuff missing in List::Util.
SYNOPSIS
use List::MoreUtils qw(any all none notall true false firstidx first_index
lastidx last_index insert_after insert_after_string
apply after after_incl before before_incl indexes
firstval first_value lastval last_value each_array
each_arrayref pairwise natatime mesh zip uniq minmax);
List::MoreUtils provides some trivial but commonly needed functionality on lists which is not going to go into List::Util.
All of the below functions are implementable in only a couple of lines of Perl code. Using the functions from this module however should give slightly better performance as everything is implemented in C. The pure-Perl implementation of these functions only serves as a fallback in case the C portions of this module couldnt be compiled on this machine.
any BLOCK LIST
Returns a true value if any item in LIST meets the criterion given through BLOCK. Sets $_ for each item in LIST in turn:
print "At least one value undefined"
if any { !defined($_) } @list;
Returns false otherwise, or undef if LIST is empty.
all BLOCK LIST
Returns a true value if all items in LIST meet the criterion given through BLOCK. Sets $_ for each item in LIST in turn:
print "All items defined"
if all { defined($_) } @list;
Returns false otherwise, or undef if LIST is empty.
none BLOCK LIST
Logically the negation of any. Returns a true value if no item in LIST meets the criterion given through BLOCK. Sets $_ for each item in LIST in turn:
print "No value defined"
if none { defined($_) } @list;
Returns false otherwise, or undef if LIST is empty.
notall BLOCK LIST
Logically the negation of all. Returns a true value if not all items in LIST meet the criterion given through BLOCK. Sets $_ for each item in LIST in turn:
print "Not all values defined"
if notall { defined($_) } @list;
Returns false otherwise, or undef if LIST is empty.
true BLOCK LIST
Counts the number of elements in LIST for which the criterion in BLOCK is true. Sets $_ for each item in LIST in turn:
printf "%i item(s) are defined", true { defined($_) } @list;
false BLOCK LIST
Counts the number of elements in LIST for which the criterion in BLOCK is false. Sets $_ for each item in LIST in turn:
printf "%i item(s) are not defined", false { defined($_) } @list;
firstidx BLOCK LIST
first_index BLOCK LIST
Returns the index of the first element in LIST for which the criterion in BLOCK is true. Sets $_ for each item in LIST in turn:
my @list = (1, 4, 3, 2, 4, 6);
printf "item with index %i in list is 4", firstidx { $_ == 4 } @list;
__END__
item with index 1 in list is 4
Returns -1 if no such item could be found.
first_index is an alias for firstidx.
<<lessSYNOPSIS
use List::MoreUtils qw(any all none notall true false firstidx first_index
lastidx last_index insert_after insert_after_string
apply after after_incl before before_incl indexes
firstval first_value lastval last_value each_array
each_arrayref pairwise natatime mesh zip uniq minmax);
List::MoreUtils provides some trivial but commonly needed functionality on lists which is not going to go into List::Util.
All of the below functions are implementable in only a couple of lines of Perl code. Using the functions from this module however should give slightly better performance as everything is implemented in C. The pure-Perl implementation of these functions only serves as a fallback in case the C portions of this module couldnt be compiled on this machine.
any BLOCK LIST
Returns a true value if any item in LIST meets the criterion given through BLOCK. Sets $_ for each item in LIST in turn:
print "At least one value undefined"
if any { !defined($_) } @list;
Returns false otherwise, or undef if LIST is empty.
all BLOCK LIST
Returns a true value if all items in LIST meet the criterion given through BLOCK. Sets $_ for each item in LIST in turn:
print "All items defined"
if all { defined($_) } @list;
Returns false otherwise, or undef if LIST is empty.
none BLOCK LIST
Logically the negation of any. Returns a true value if no item in LIST meets the criterion given through BLOCK. Sets $_ for each item in LIST in turn:
print "No value defined"
if none { defined($_) } @list;
Returns false otherwise, or undef if LIST is empty.
notall BLOCK LIST
Logically the negation of all. Returns a true value if not all items in LIST meet the criterion given through BLOCK. Sets $_ for each item in LIST in turn:
print "Not all values defined"
if notall { defined($_) } @list;
Returns false otherwise, or undef if LIST is empty.
true BLOCK LIST
Counts the number of elements in LIST for which the criterion in BLOCK is true. Sets $_ for each item in LIST in turn:
printf "%i item(s) are defined", true { defined($_) } @list;
false BLOCK LIST
Counts the number of elements in LIST for which the criterion in BLOCK is false. Sets $_ for each item in LIST in turn:
printf "%i item(s) are not defined", false { defined($_) } @list;
firstidx BLOCK LIST
first_index BLOCK LIST
Returns the index of the first element in LIST for which the criterion in BLOCK is true. Sets $_ for each item in LIST in turn:
my @list = (1, 4, 3, 2, 4, 6);
printf "item with index %i in list is 4", firstidx { $_ == 4 } @list;
__END__
item with index 1 in list is 4
Returns -1 if no such item could be found.
first_index is an alias for firstidx.
Download (0.022MB)
Added: 2007-07-04 License: Perl Artistic License Price:
846 downloads
Create short URLs 0.1
Create a short URLs is a Firefox extension that allows you to create a short URL from any website. more>>
Create a short URLs is a Firefox extension that allows you to create a short URL from any website.
Are you annoyed with really long URLs like: http://www.succor.co.uk/index.cfm/2006/4/7/wapurlcouk-beta-launch
Then this tag is for you. Just right click on the page and click wapURL and you will be presented with a short URL. This is great if you need to send text messages or emails.
When you use the short URL the key passed is looked up against our database and the user in then redirected to your requested URL.
<<lessAre you annoyed with really long URLs like: http://www.succor.co.uk/index.cfm/2006/4/7/wapurlcouk-beta-launch
Then this tag is for you. Just right click on the page and click wapURL and you will be presented with a short URL. This is great if you need to send text messages or emails.
When you use the short URL the key passed is looked up against our database and the user in then redirected to your requested URL.
Download (0.076MB)
Added: 2007-05-07 License: MPL (Mozilla Public License) Price:
915 downloads
List::Util 1.19
List::Util Perl module contains a selection of general-utility list subroutines. more>>
List::Util Perl module contains a selection of general-utility list subroutines.
SYNOPSIS
use List::Util qw(first max maxstr min minstr reduce shuffle sum);
List::Util contains a selection of subroutines that people have expressed would be nice to have in the perl core, but the usage would not really be high enough to warrant the use of a keyword, and the size so small such that being individual extensions would be wasteful.
By default List::Util does not export any subroutines. The subroutines defined are
first BLOCK LIST
Similar to grep in that it evaluates BLOCK setting $_ to each element of LIST in turn. first returns the first element where the result from BLOCK is a true value. If BLOCK never returns true or LIST was empty then undef is returned.
$foo = first { defined($_) } @list # first defined value in @list
$foo = first { $_ > $value } @list # first value in @list which
# is greater than $value
This function could be implemented using reduce like this
$foo = reduce { defined($a) ? $a : wanted($b) ? $b : undef } undef, @list
for example wanted() could be defined() which would return the first defined value in @list
max LIST
Returns the entry in the list with the highest numerical value. If the list is empty then undef is returned.
$foo = max 1..10 # 10
$foo = max 3,9,12 # 12
$foo = max @bar, @baz # whatever
This function could be implemented using reduce like this
$foo = reduce { $a > $b ? $a : $b } 1..10
maxstr LIST
Similar to max, but treats all the entries in the list as strings and returns the highest string as defined by the gt operator. If the list is empty then undef is returned.
$foo = maxstr A..Z # Z
$foo = maxstr "hello","world" # "world"
$foo = maxstr @bar, @baz # whatever
This function could be implemented using reduce like this
$foo = reduce { $a gt $b ? $a : $b } A..Z
min LIST
Similar to max but returns the entry in the list with the lowest numerical value. If the list is empty then undef is returned.
$foo = min 1..10 # 1
$foo = min 3,9,12 # 3
$foo = min @bar, @baz # whatever
This function could be implemented using reduce like this
$foo = reduce { $a < $b ? $a : $b } 1..10
minstr LIST
Similar to min, but treats all the entries in the list as strings and returns the lowest string as defined by the lt operator. If the list is empty then undef is returned.
$foo = minstr A..Z # A
$foo = minstr "hello","world" # "hello"
$foo = minstr @bar, @baz # whatever
This function could be implemented using reduce like this
$foo = reduce { $a lt $b ? $a : $b } A..Z
reduce BLOCK LIST
Reduces LIST by calling BLOCK, in a scalar context, multiple times, setting $a and $b each time. The first call will be with $a and $b set to the first two elements of the list, subsequent calls will be done by setting $a to the result of the previous call and $b to the next element in the list.
Returns the result of the last call to BLOCK. If LIST is empty then undef is returned. If LIST only contains one element then that element is returned and BLOCK is not executed.
$foo = reduce { $a < $b ? $a : $b } 1..10 # min
$foo = reduce { $a lt $b ? $a : $b } aa..zz # minstr
$foo = reduce { $a + $b } 1 .. 10 # sum
$foo = reduce { $a . $b } @bar # concat
shuffle LIST
Returns the elements of LIST in a random order
@cards = shuffle 0..51 # 0..51 in a random order
sum LIST
Returns the sum of all the elements in LIST. If LIST is empty then undef is returned.
$foo = sum 1..10 # 55
$foo = sum 3,9,12 # 24
$foo = sum @bar, @baz # whatever
This function could be implemented using reduce like this
$foo = reduce { $a + $b } 1..10
<<lessSYNOPSIS
use List::Util qw(first max maxstr min minstr reduce shuffle sum);
List::Util contains a selection of subroutines that people have expressed would be nice to have in the perl core, but the usage would not really be high enough to warrant the use of a keyword, and the size so small such that being individual extensions would be wasteful.
By default List::Util does not export any subroutines. The subroutines defined are
first BLOCK LIST
Similar to grep in that it evaluates BLOCK setting $_ to each element of LIST in turn. first returns the first element where the result from BLOCK is a true value. If BLOCK never returns true or LIST was empty then undef is returned.
$foo = first { defined($_) } @list # first defined value in @list
$foo = first { $_ > $value } @list # first value in @list which
# is greater than $value
This function could be implemented using reduce like this
$foo = reduce { defined($a) ? $a : wanted($b) ? $b : undef } undef, @list
for example wanted() could be defined() which would return the first defined value in @list
max LIST
Returns the entry in the list with the highest numerical value. If the list is empty then undef is returned.
$foo = max 1..10 # 10
$foo = max 3,9,12 # 12
$foo = max @bar, @baz # whatever
This function could be implemented using reduce like this
$foo = reduce { $a > $b ? $a : $b } 1..10
maxstr LIST
Similar to max, but treats all the entries in the list as strings and returns the highest string as defined by the gt operator. If the list is empty then undef is returned.
$foo = maxstr A..Z # Z
$foo = maxstr "hello","world" # "world"
$foo = maxstr @bar, @baz # whatever
This function could be implemented using reduce like this
$foo = reduce { $a gt $b ? $a : $b } A..Z
min LIST
Similar to max but returns the entry in the list with the lowest numerical value. If the list is empty then undef is returned.
$foo = min 1..10 # 1
$foo = min 3,9,12 # 3
$foo = min @bar, @baz # whatever
This function could be implemented using reduce like this
$foo = reduce { $a < $b ? $a : $b } 1..10
minstr LIST
Similar to min, but treats all the entries in the list as strings and returns the lowest string as defined by the lt operator. If the list is empty then undef is returned.
$foo = minstr A..Z # A
$foo = minstr "hello","world" # "hello"
$foo = minstr @bar, @baz # whatever
This function could be implemented using reduce like this
$foo = reduce { $a lt $b ? $a : $b } A..Z
reduce BLOCK LIST
Reduces LIST by calling BLOCK, in a scalar context, multiple times, setting $a and $b each time. The first call will be with $a and $b set to the first two elements of the list, subsequent calls will be done by setting $a to the result of the previous call and $b to the next element in the list.
Returns the result of the last call to BLOCK. If LIST is empty then undef is returned. If LIST only contains one element then that element is returned and BLOCK is not executed.
$foo = reduce { $a < $b ? $a : $b } 1..10 # min
$foo = reduce { $a lt $b ? $a : $b } aa..zz # minstr
$foo = reduce { $a + $b } 1 .. 10 # sum
$foo = reduce { $a . $b } @bar # concat
shuffle LIST
Returns the elements of LIST in a random order
@cards = shuffle 0..51 # 0..51 in a random order
sum LIST
Returns the sum of all the elements in LIST. If LIST is empty then undef is returned.
$foo = sum 1..10 # 55
$foo = sum 3,9,12 # 24
$foo = sum @bar, @baz # whatever
This function could be implemented using reduce like this
$foo = reduce { $a + $b } 1..10
Download (0.043MB)
Added: 2007-06-30 License: Perl Artistic License Price:
848 downloads
clipurl 0.1
clipurl is a tiny app that watches the X11 clipboard for URLs. more>>
clipurl is a tiny app that watches the X11 clipboard for URLs and launches a Web browser for each one seen.
Installation
To install:
$ xmkmf && make
Copy the binary wherever you want it, there are no other files required.
<<lessInstallation
To install:
$ xmkmf && make
Copy the binary wherever you want it, there are no other files required.
Download (0.002MB)
Added: 2005-04-26 License: Freeware Price:
1641 downloads
DNS List 0.2
DNS List is a BIND zone file -to- HTML script written in PHP which enables drilling down on particular hosts to view CNAME. more>>
DNS List is a BIND zone file -to- HTML script written in PHP which enables drilling down on particular hosts to view CNAME records (if any).
In order to display an easily readable list of entries hosted on my DNS servers, I wrote this PHP script to parse A and CNAME records out of my BIND zone files, and generate an expandable/collapsable table containing the information.
This script expects to find the zonefile in a zonefile subdirectory of the directory in which the script currently resides. Again this is easy to change, but it was written for my purposes and Im providing it here should it be useful to others. There is a lot of hard-coding within the script for "kw.zone" and "test.zone" - so modify this to suit your needs. The script can parse fairly simple zone files easily, but hasnt been tested with more complex zones. Your milage will vary.
<<lessIn order to display an easily readable list of entries hosted on my DNS servers, I wrote this PHP script to parse A and CNAME records out of my BIND zone files, and generate an expandable/collapsable table containing the information.
This script expects to find the zonefile in a zonefile subdirectory of the directory in which the script currently resides. Again this is easy to change, but it was written for my purposes and Im providing it here should it be useful to others. There is a lot of hard-coding within the script for "kw.zone" and "test.zone" - so modify this to suit your needs. The script can parse fairly simple zone files easily, but hasnt been tested with more complex zones. Your milage will vary.
Download (0.004MB)
Added: 2007-03-12 License: GPL (GNU General Public License) Price:
566 downloads
Dir::List 1.4
Dir::List is a Perl module, that provides you with various information about a specified directory. more>>
Dir::List is a Perl module, that provides you with various information about a specified directory. For example, it can obtain the user and group of files, the sizes of sub-directories, the filetype, and accessibility. Caching functionality is available.
Enhancements:
- The unmaintained Changes has been removed.
- Some missing requirements have been added.
- This release deletes $self->{list} at the beginning of dirinfo, in order to not return old results (this is especially a problem in mod_perl where you only instantiate one Dir::List).
<<lessEnhancements:
- The unmaintained Changes has been removed.
- Some missing requirements have been added.
- This release deletes $self->{list} at the beginning of dirinfo, in order to not return old results (this is especially a problem in mod_perl where you only instantiate one Dir::List).
Download (0.006MB)
Added: 2006-08-18 License: Perl Artistic License Price:
1164 downloads
List::Compare 0.33
List::Compare is a Perl module to compare elements of two or more lists. more>>
List::Compare is a Perl module to compare elements of two or more lists.
SYNOPSIS
The bare essentials:
@Llist = qw(abel abel baker camera delta edward fargo golfer);
@Rlist = qw(baker camera delta delta edward fargo golfer hilton);
$lc = List::Compare->new(@Llist, @Rlist);
@intersection = $lc->get_intersection;
@union = $lc->get_union;
General Comments
List::Compare is an object-oriented implementation of very common Perl code (see "History, References and Development" below) used to determine interesting relationships between two or more lists at a time. A List::Compare object is created and automatically computes the values needed to supply List::Compare methods with appropriate results. In the current implementation List::Compare methods will return new lists containing the items found in any designated list alone (unique), any list other than a designated list (complement), the intersection and union of all lists and so forth. List::Compare also has (a) methods to return Boolean values indicating whether one list is a subset of another and whether any two lists are equivalent to each other (b) methods to pretty-print very simple charts displaying the subset and equivalence relationships among lists.
Except for List::Compares get_bag() method, multiple instances of an element in a given list count only once with respect to computing the intersection, union, etc. of the two lists. In particular, List::Compare considers two lists as equivalent if each element of the first list can be found in the second list and vice versa. Equivalence in this usage takes no note of the frequency with which elements occur in either list or their order within the lists. List::Compare asks the question: Did I see this item in this list at all? Only when you use List::Compare::get_bag() to compute a bag holding the two lists do you ask the question: How many times did this item occur in this list?
<<lessSYNOPSIS
The bare essentials:
@Llist = qw(abel abel baker camera delta edward fargo golfer);
@Rlist = qw(baker camera delta delta edward fargo golfer hilton);
$lc = List::Compare->new(@Llist, @Rlist);
@intersection = $lc->get_intersection;
@union = $lc->get_union;
General Comments
List::Compare is an object-oriented implementation of very common Perl code (see "History, References and Development" below) used to determine interesting relationships between two or more lists at a time. A List::Compare object is created and automatically computes the values needed to supply List::Compare methods with appropriate results. In the current implementation List::Compare methods will return new lists containing the items found in any designated list alone (unique), any list other than a designated list (complement), the intersection and union of all lists and so forth. List::Compare also has (a) methods to return Boolean values indicating whether one list is a subset of another and whether any two lists are equivalent to each other (b) methods to pretty-print very simple charts displaying the subset and equivalence relationships among lists.
Except for List::Compares get_bag() method, multiple instances of an element in a given list count only once with respect to computing the intersection, union, etc. of the two lists. In particular, List::Compare considers two lists as equivalent if each element of the first list can be found in the second list and vice versa. Equivalence in this usage takes no note of the frequency with which elements occur in either list or their order within the lists. List::Compare asks the question: Did I see this item in this list at all? Only when you use List::Compare::get_bag() to compute a bag holding the two lists do you ask the question: How many times did this item occur in this list?
Download (0.18MB)
Added: 2007-01-23 License: Perl Artistic License Price:
1007 downloads
Hotlist 0.2.6
Hotlist is a simple URL manager that handles bookmarks in an HTML file. more>>
Hotlist is a very simple URL manager written in C. The reason I wrote it is because I often find URLs that I want to view, but I always forget them when I get the chance to get online. The URLs are saved in HTML, so that you can set the file as your homepage and view it whenever you start browsing.
At this stage, the program is very simple, all it does is allow you to add and remove URLs from the list. If you want it, download the source below and have fun. I make no warranties.
The program is made as a learning experience. The installation is easy, just untar the sources, change the definitions in `filenames.h if you want, then type make and copy the `hotlist executable to wherever you want it.
Enhancements:
- Now supports a description associated with a URL [ac].
<<lessAt this stage, the program is very simple, all it does is allow you to add and remove URLs from the list. If you want it, download the source below and have fun. I make no warranties.
The program is made as a learning experience. The installation is easy, just untar the sources, change the definitions in `filenames.h if you want, then type make and copy the `hotlist executable to wherever you want it.
Enhancements:
- Now supports a description associated with a URL [ac].
Download (0.026MB)
Added: 2006-06-24 License: GPL (GNU General Public License) Price:
1217 downloads
Notes List 0.1
Notes List is a simple and easy way to take Notes. more>>
Notes List is a simple and easy way to take Notes.
- Change SIZE (width and height)
- tun on/off the background image
- Auto save notes
<<less- Change SIZE (width and height)
- tun on/off the background image
- Auto save notes
Download (0.020MB)
Added: 2006-06-28 License: GPL (GNU General Public License) Price:
1219 downloads
List::Pairwise 0.23
List::Pairwise is a Perl module with map/grep arrays and hashes pairwise. more>>
List::Pairwise is a Perl module with map/grep arrays and hashes pairwise.
SYNOPSIS
use List::Pairwise qw(:all);
my %a = (
snoogy1 => 4,
snoogy2 => 2,
NOT => 4,
snoogy3 => 5,
hehe => 12,
);
# keys/values emulation (only slower)
my @keys = mapp {$a} %a;
my @values = mapp {$b} %a;
# reverse hash (does not work in-place)
my %reverse_a = mapp {$b, $a} %a;
# reverse array pairs in-place
my @a = %a;
mapp { ($a, $b) = ($b, $a) } @a;
# modify values in-place
mapp {$b++} %a;
# modify keys (does not work in-place)
my %b = mapp {lc($a) => $b} %a;
# grep hash subset
my %subset1 = grepp {$a =~ /snoogy/} %a;
my %subset2 = grepp {$b < 5} %a;
# grep some specific values
my @snoog_values = mapp {$b} grepp {$a =~ /snoogy/} %a;
# This does not work:
# values grepp {$a =~ /snoogy/} %a; # values() expects a real hash
<<lessSYNOPSIS
use List::Pairwise qw(:all);
my %a = (
snoogy1 => 4,
snoogy2 => 2,
NOT => 4,
snoogy3 => 5,
hehe => 12,
);
# keys/values emulation (only slower)
my @keys = mapp {$a} %a;
my @values = mapp {$b} %a;
# reverse hash (does not work in-place)
my %reverse_a = mapp {$b, $a} %a;
# reverse array pairs in-place
my @a = %a;
mapp { ($a, $b) = ($b, $a) } @a;
# modify values in-place
mapp {$b++} %a;
# modify keys (does not work in-place)
my %b = mapp {lc($a) => $b} %a;
# grep hash subset
my %subset1 = grepp {$a =~ /snoogy/} %a;
my %subset2 = grepp {$b < 5} %a;
# grep some specific values
my @snoog_values = mapp {$b} grepp {$a =~ /snoogy/} %a;
# This does not work:
# values grepp {$a =~ /snoogy/} %a; # values() expects a real hash
Download (0.020MB)
Added: 2007-05-18 License: Perl Artistic License Price:
889 downloads
List::MRU 0.04
List::MRU is a Perl module that implements a simple fixed-size MRU-ordered list. more>>
List::MRU is a Perl module that implements a simple fixed-size MRU-ordered list.
SYNOPSIS
use List::MRU;
# Constructor
$lm = List::MRU->new(max => 20);
# Constructor with explicit eq subroutine for obj equality tests
$lm = List::MRU->new(max => 20, eq => sub {
$_[0]->stringify eq $_[1]->stringify
});
# Constructor using explicit UUIDs
$lm - List::MRU->new(max => 5, uuid => 1);
# Add item, moving to head of list if already exists
$lm->add($item);
# Add item, moving to head of list if $uuid matches or object already exists
$lm->add($item, $uuid);
# Iterate in most-recently-added order
for $item ($lm->list) {
print "$itemn";
}
# each-style iteration
while (($item, $uuid) = $lm->each) {
print "$item, $uuidn";
}
# Item deletion
$lm->delete($item);
$lm->delete(uuid => $uuid);
# Accessors
$max = $lm->max; # max items in list
$count = $lm->count; # current items in list
Perl module implementing a simple fixed-size most-recently-used- (MRU)-ordered list of values/objects. Well, really its a most- recently-added list - items added to the list are just promoted to the front of the list if they already exist, otherwise they are added there.
Works fine with with non-scalar items, but you will need to supply an explicit eq subroutine to the constructor to handle testing for the same object (or alternatively have overloaded the eq operator for your object).
List::MRU also supports having explicit UUIDs attached to items, allowing List::MRU items to be modified, instead of a change just creating a new entry.
<<lessSYNOPSIS
use List::MRU;
# Constructor
$lm = List::MRU->new(max => 20);
# Constructor with explicit eq subroutine for obj equality tests
$lm = List::MRU->new(max => 20, eq => sub {
$_[0]->stringify eq $_[1]->stringify
});
# Constructor using explicit UUIDs
$lm - List::MRU->new(max => 5, uuid => 1);
# Add item, moving to head of list if already exists
$lm->add($item);
# Add item, moving to head of list if $uuid matches or object already exists
$lm->add($item, $uuid);
# Iterate in most-recently-added order
for $item ($lm->list) {
print "$itemn";
}
# each-style iteration
while (($item, $uuid) = $lm->each) {
print "$item, $uuidn";
}
# Item deletion
$lm->delete($item);
$lm->delete(uuid => $uuid);
# Accessors
$max = $lm->max; # max items in list
$count = $lm->count; # current items in list
Perl module implementing a simple fixed-size most-recently-used- (MRU)-ordered list of values/objects. Well, really its a most- recently-added list - items added to the list are just promoted to the front of the list if they already exist, otherwise they are added there.
Works fine with with non-scalar items, but you will need to supply an explicit eq subroutine to the constructor to handle testing for the same object (or alternatively have overloaded the eq operator for your object).
List::MRU also supports having explicit UUIDs attached to items, allowing List::MRU items to be modified, instead of a change just creating a new entry.
Download (0.004MB)
Added: 2007-05-18 License: Perl Artistic License Price:
889 downloads
List::Comprehensions 0.13
List::Comprehensions is a Perl module that allows for list comprehensions in Perl. more>>
List::Comprehensions is a Perl module that allows for list comprehensions in Perl.
SYNOPSIS
use List::Comprehensions;
use warnings;
my @res = ();
@res = comp1 { [ @_ ] } [0..4], [0..4], [0..4];
no warnings once;
@res = comp2 { [$i, $j, $k] }
i => [0..4],
j => [0..4],
k => [0..4];
# if strict vars is on, use lexicals. eg:
use strict vars;
my ($i, $j, $k);
@res = comp2 { [$i, $j, $k] }
i => [0..4],
j => [0..4],
k => [0..4];
# each being less efficient but equivelant to
@res = ();
for $i ( 0..4 ) {
for $j ( 0..4 ) {
for $k ( 0..4 ) {
push @res, [$i, $j, $k];
}
}
}
<<lessSYNOPSIS
use List::Comprehensions;
use warnings;
my @res = ();
@res = comp1 { [ @_ ] } [0..4], [0..4], [0..4];
no warnings once;
@res = comp2 { [$i, $j, $k] }
i => [0..4],
j => [0..4],
k => [0..4];
# if strict vars is on, use lexicals. eg:
use strict vars;
my ($i, $j, $k);
@res = comp2 { [$i, $j, $k] }
i => [0..4],
j => [0..4],
k => [0..4];
# each being less efficient but equivelant to
@res = ();
for $i ( 0..4 ) {
for $j ( 0..4 ) {
for $k ( 0..4 ) {
push @res, [$i, $j, $k];
}
}
}
Download (0.003MB)
Added: 2007-05-18 License: Perl Artistic License Price:
889 downloads
List::Part 0.03
List::Part is a Perl module that allows you to partition one array into several. more>>
List::Part is a Perl module that allows you to partition one array into several.
SYNOPSIS
use List::Part;
($good, $bad)=part { !/substring/ } @array; #store arrayrefs into $good and $bad
(*good, *bad)=part { !/substring/ } @array; #store into @good and @bad
ABSTRACT
List::Part implements the part function, allowing one array to be "partitioned" into several based on the results of a code reference.
There are many applications in which the items of a list need to be categorized. For example, lets say you want to categorize lines in a log file:
my($success, $failure)=part { /^ERR/ } ;
Or, suppose you have a list of employees, and you need to determine their fate:
my($lay_off, $give_raise, $keep)=part {
$_->is_talented ? 0
: $_->is_executive ? 1
: 2
} @employees;
Actually, the second one is better suited to parts alternate form, parta:
my($lay_off, $give_raise, $keep)=parta
[ sub { $_->talented }, sub { $_->is_executive }, qr// ] =>
@employees;
Or maybe you just want yet another way to write the traditional Perl signoff:
perl -MList::Part -e"print map{@$_}part{$i++%5}split,JAercunrlkso ettPHr hea,"
List::Part can help you do those sorts of things.
<<lessSYNOPSIS
use List::Part;
($good, $bad)=part { !/substring/ } @array; #store arrayrefs into $good and $bad
(*good, *bad)=part { !/substring/ } @array; #store into @good and @bad
ABSTRACT
List::Part implements the part function, allowing one array to be "partitioned" into several based on the results of a code reference.
There are many applications in which the items of a list need to be categorized. For example, lets say you want to categorize lines in a log file:
my($success, $failure)=part { /^ERR/ } ;
Or, suppose you have a list of employees, and you need to determine their fate:
my($lay_off, $give_raise, $keep)=part {
$_->is_talented ? 0
: $_->is_executive ? 1
: 2
} @employees;
Actually, the second one is better suited to parts alternate form, parta:
my($lay_off, $give_raise, $keep)=parta
[ sub { $_->talented }, sub { $_->is_executive }, qr// ] =>
@employees;
Or maybe you just want yet another way to write the traditional Perl signoff:
perl -MList::Part -e"print map{@$_}part{$i++%5}split,JAercunrlkso ettPHr hea,"
List::Part can help you do those sorts of things.
Download (0.004MB)
Added: 2007-05-18 License: Perl Artistic License Price:
889 downloads
List::RewriteElements 0.09
List::RewriteElements is a Perl module that can create a new list by rewriting elements of a first list. more>>
List::RewriteElements is a Perl module that can create a new list by rewriting elements of a first list.
SYNOPSIS
use List::RewriteElements;
Constructor
Simplest case: Input from array, output to STDOUT.
$lre = List::RewriteElements->new( {
list => @source,
body_rule => sub {
my $record = shift;
$record .= q{additional field};
},
} );
Input from file, output to STDOUT:
$lre = List::RewriteElements->new( {
file => "/path/to/source/file",
body_rule => sub {
my $record = shift;
$record .= q{,additional field};
},
} );
Provide a different rule for the first element in the list:
$lre = List::RewriteElements->new( {
file => "/path/to/source/file",
header_rule => sub {
my $record = shift;
$record .= q{,ADDITIONAL HEADER};
},
body_rule => sub {
my $record = shift;
$record .= q{,additional field};
},
} );
Input from file, output to file:
$lre = List::RewriteElements->new( {
file => "/path/to/source/file",
body_rule => sub {
my $record = shift;
$record .= q{additional field};
},
output_file => "/path/to/output/file",
} );
To name output file, just provide a suffix to filename:
$lre = List::RewriteElements->new( {
file => "/path/to/source/file",
body_rule => sub {
my $record = shift;
$record .= q{additional field};
},
output_suffix => .out,
} );
Provide criteria to suppress output of header or individual record.
$lre = List::RewriteElements->new( {
file => "/path/to/source/file",
header_suppress => sub {
my $record = shift;
return if $record =~ /$somepattern/;
},
body_suppress => sub {
my $record = shift;
return if $record ne somestring;
},
body_rule => sub {
my $record = shift;
$record .= q{additional field};
},
} );
Generate Output
$lre->generate_output();
Report Output Information
$path_to_output_file = $lre->get_output_path();
$output_file_basename = $lre->get_output_basename();
$output_row_count = $lre->get_total_rows();
$output_record_count = $lre->get_total_records();
$records_changed = $lre->get_records_changed();
$records_unchanged = $lre->get_records_unchanged();
$records_deleted = $lre->get_records_deleted();
$header_status = $lre->get_header_status();
It is common in many situations for you to receive a flat data file from someone else and have to generate a new file in which each row or record in the incoming file must either (a) be transformed according to some rule before being printing to the new file; or (b) if it meets certain criteria, not output to the new file at all.
List::RewriteElements enables you to write such rules and criteria, generate the file of transformed data records, and get back some basic statistics about the transformation.
List::RewriteElements is useful when the number of records in the incoming file may be large and you do not want to hold the entire list in memory. Similarly, the newly generated records are not held in memory but are immediately printed to STDOUT or to file.
On the other hand, if for some reason you already have an array of records in memory, you can use List::RewriteElements to apply rules and criteria to each element of the array and then print the transformed records (again, without holding the output in memory).
<<lessSYNOPSIS
use List::RewriteElements;
Constructor
Simplest case: Input from array, output to STDOUT.
$lre = List::RewriteElements->new( {
list => @source,
body_rule => sub {
my $record = shift;
$record .= q{additional field};
},
} );
Input from file, output to STDOUT:
$lre = List::RewriteElements->new( {
file => "/path/to/source/file",
body_rule => sub {
my $record = shift;
$record .= q{,additional field};
},
} );
Provide a different rule for the first element in the list:
$lre = List::RewriteElements->new( {
file => "/path/to/source/file",
header_rule => sub {
my $record = shift;
$record .= q{,ADDITIONAL HEADER};
},
body_rule => sub {
my $record = shift;
$record .= q{,additional field};
},
} );
Input from file, output to file:
$lre = List::RewriteElements->new( {
file => "/path/to/source/file",
body_rule => sub {
my $record = shift;
$record .= q{additional field};
},
output_file => "/path/to/output/file",
} );
To name output file, just provide a suffix to filename:
$lre = List::RewriteElements->new( {
file => "/path/to/source/file",
body_rule => sub {
my $record = shift;
$record .= q{additional field};
},
output_suffix => .out,
} );
Provide criteria to suppress output of header or individual record.
$lre = List::RewriteElements->new( {
file => "/path/to/source/file",
header_suppress => sub {
my $record = shift;
return if $record =~ /$somepattern/;
},
body_suppress => sub {
my $record = shift;
return if $record ne somestring;
},
body_rule => sub {
my $record = shift;
$record .= q{additional field};
},
} );
Generate Output
$lre->generate_output();
Report Output Information
$path_to_output_file = $lre->get_output_path();
$output_file_basename = $lre->get_output_basename();
$output_row_count = $lre->get_total_rows();
$output_record_count = $lre->get_total_records();
$records_changed = $lre->get_records_changed();
$records_unchanged = $lre->get_records_unchanged();
$records_deleted = $lre->get_records_deleted();
$header_status = $lre->get_header_status();
It is common in many situations for you to receive a flat data file from someone else and have to generate a new file in which each row or record in the incoming file must either (a) be transformed according to some rule before being printing to the new file; or (b) if it meets certain criteria, not output to the new file at all.
List::RewriteElements enables you to write such rules and criteria, generate the file of transformed data records, and get back some basic statistics about the transformation.
List::RewriteElements is useful when the number of records in the incoming file may be large and you do not want to hold the entire list in memory. Similarly, the newly generated records are not held in memory but are immediately printed to STDOUT or to file.
On the other hand, if for some reason you already have an array of records in memory, you can use List::RewriteElements to apply rules and criteria to each element of the array and then print the transformed records (again, without holding the output in memory).
Download (0.026MB)
Added: 2007-07-10 License: Perl Artistic License Price:
837 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 list of urls 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