eq augments
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 165
User::grent 5.8.8
User::grent is an interface to Perls built-in getgr*() functions. more>>
User::grent is an interface to Perls built-in getgr*() functions.
SYNOPSIS
use User::grent;
$gr = getgrgid(0) or die "No group zero";
if ( $gr->name eq wheel && @{$gr->members} > 1 ) {
print "gid zero name wheel, with other members";
}
use User::grent qw(:FIELDS);
getgrgid(0) or die "No group zero";
if ( $gr_name eq wheel && @gr_members > 1 ) {
print "gid zero name wheel, with other members";
}
$gr = getgr($whoever);
This modules default exports override the core getgrent(), getgruid(), and getgrnam() functions, replacing them with versions that return "User::grent" objects. This object has methods that return the similarly named structure field name from the Cs passwd structure from grp.h; namely name, passwd, gid, and members (not mem). The first three return scalars, the last an array reference.
You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that this still overrides your core functions.) Access these fields as variables named with a preceding gr_. Thus, $group_obj->gid() corresponds to $gr_gid if you import the fields. Array references are available as regular array variables, so @{ $group_obj->members() } would be simply @gr_members.
The getpw() function is a simple front-end that forwards a numeric argument to getpwuid() and the rest to getpwnam().
To access this functionality without the core overrides, pass the use an empty import list, and then access function functions with their full qualified names. On the other hand, the built-ins are still available via the CORE:: pseudo-package.
<<lessSYNOPSIS
use User::grent;
$gr = getgrgid(0) or die "No group zero";
if ( $gr->name eq wheel && @{$gr->members} > 1 ) {
print "gid zero name wheel, with other members";
}
use User::grent qw(:FIELDS);
getgrgid(0) or die "No group zero";
if ( $gr_name eq wheel && @gr_members > 1 ) {
print "gid zero name wheel, with other members";
}
$gr = getgr($whoever);
This modules default exports override the core getgrent(), getgruid(), and getgrnam() functions, replacing them with versions that return "User::grent" objects. This object has methods that return the similarly named structure field name from the Cs passwd structure from grp.h; namely name, passwd, gid, and members (not mem). The first three return scalars, the last an array reference.
You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that this still overrides your core functions.) Access these fields as variables named with a preceding gr_. Thus, $group_obj->gid() corresponds to $gr_gid if you import the fields. Array references are available as regular array variables, so @{ $group_obj->members() } would be simply @gr_members.
The getpw() function is a simple front-end that forwards a numeric argument to getpwuid() and the rest to getpwnam().
To access this functionality without the core overrides, pass the use an empty import list, and then access function functions with their full qualified names. On the other hand, the built-ins are still available via the CORE:: pseudo-package.
Download (12.2MB)
Added: 2007-04-10 License: Perl Artistic License Price:
927 downloads
Net::Akismet 0.02
Net::Akismet is a Perl interface to Akismet - comment and trackback spam fighter. more>>
Net::Akismet is a Perl interface to Akismet - comment and trackback spam fighter.
SYNOPSIS
my $akismet = Net::Akismet->new(
KEY => secret-baba-API-key,
URL => http://example.blog.net/,
) or die(Key verification failure!);
my $verdict = $akismet->check(
USER_IP => 10.10.10.11,
COMMENT_CONTENT => Run, Lola, Run, the spam will catch you!,
COMMENT_AUTHOR => dosser,
COMENT_AUTHOR_EMAIL => dosser@subway.de,
REFERRER => http://lola.home/,
) or die(Is the server here?);
if (true eq $verdict) {
print "I found spam. I am a spam-founder!n";
}
<<lessSYNOPSIS
my $akismet = Net::Akismet->new(
KEY => secret-baba-API-key,
URL => http://example.blog.net/,
) or die(Key verification failure!);
my $verdict = $akismet->check(
USER_IP => 10.10.10.11,
COMMENT_CONTENT => Run, Lola, Run, the spam will catch you!,
COMMENT_AUTHOR => dosser,
COMENT_AUTHOR_EMAIL => dosser@subway.de,
REFERRER => http://lola.home/,
) or die(Is the server here?);
if (true eq $verdict) {
print "I found spam. I am a spam-founder!n";
}
Download (0.004MB)
Added: 2007-03-23 License: Perl Artistic License Price:
945 downloads
Term::ANSIMenu 0.02
Term::ANSIMenu is an infrastructure for creating menus in ANSI capable terminals. more>>
Term::ANSIMenu is an infrastructure for creating menus in ANSI capable terminals.
SYNOPSIS
use Term::ANSIMenu;
my $menu = Term::ANSIMenu->new(
width => 40,
help => [[, &standard_help],
[hint 1, &help_item],
[ undef, &standard_help],
[hint 3, undef]
],
title => title,
items => [[1, First menu item, &exec_item],
[2, This string is just too long
to fit in a normal terminal
and thus it will be clipped.],
[3, , sub { system "man man" }]
],
status => status,
prompt => prompt: );
$menu->print_menu();
while (my $key = $menu->read_key()) {
last unless defined $menu->do_key($key);
$menu->update_status() if $key eq S;
$menu->update_status(New status) if $key eq s;
$menu->update_prompt() if $key eq P;
$menu->update_prompt(New prompt: ) if $key eq p;
}
$menu->pos($menu->line_after_menu() + 1, 1);
I wrote this mainly to make live easy on those staff members to whom I delegate tasks. Most of them prefer to use a menu instead of having to type complicated commands. To them its a faster and safer way of working (we all know about typos dont we...).
By using this module you can create menus with only a few lines of code and still have a shipload of features. Need context-sensitive help or a statusbar? Like to use hotkeys? Want flashy colors and styles? Its all there. Just fill in the attributes and youre good to go.
<<lessSYNOPSIS
use Term::ANSIMenu;
my $menu = Term::ANSIMenu->new(
width => 40,
help => [[, &standard_help],
[hint 1, &help_item],
[ undef, &standard_help],
[hint 3, undef]
],
title => title,
items => [[1, First menu item, &exec_item],
[2, This string is just too long
to fit in a normal terminal
and thus it will be clipped.],
[3, , sub { system "man man" }]
],
status => status,
prompt => prompt: );
$menu->print_menu();
while (my $key = $menu->read_key()) {
last unless defined $menu->do_key($key);
$menu->update_status() if $key eq S;
$menu->update_status(New status) if $key eq s;
$menu->update_prompt() if $key eq P;
$menu->update_prompt(New prompt: ) if $key eq p;
}
$menu->pos($menu->line_after_menu() + 1, 1);
I wrote this mainly to make live easy on those staff members to whom I delegate tasks. Most of them prefer to use a menu instead of having to type complicated commands. To them its a faster and safer way of working (we all know about typos dont we...).
By using this module you can create menus with only a few lines of code and still have a shipload of features. Need context-sensitive help or a statusbar? Like to use hotkeys? Want flashy colors and styles? Its all there. Just fill in the attributes and youre good to go.
Download (0.020MB)
Added: 2006-11-04 License: Perl Artistic License Price:
1084 downloads
Gnome2::VFS 1.061
Gnome2::VFS is a Perl interface to the 2.x series of the GNOME VFS library. more>>
Gnome2::VFS is a Perl interface to the 2.x series of the GNOME VFS library.
SYNOPSIS
use Gnome2::VFS;
sub die_already {
my ($action) = @_;
die("An error occured while $action.n");
}
die_already("initializing GNOME VFS") unless (Gnome2::VFS -> init());
my $source = "http://www.perldoc.com/about.html";
my ($result, $handle, $info);
# Open a connection to Perldoc.
($result, $handle) = Gnome2::VFS -> open($source, "read");
die_already("opening connection to $source")
unless ($result eq "ok");
# Get the file information.
($result, $info) = $handle -> get_file_info("default");
die_already("retrieving information about $source")
unless ($result eq "ok");
# Read the content.
my $bytes = $info -> { size };
my $bytes_read = 0;
my $buffer = "";
do {
my ($tmp_buffer, $tmp_bytes_read);
($result, $tmp_bytes_read, $tmp_buffer) =
$handle -> read($bytes - $bytes_read);
$buffer .= $tmp_buffer;
$bytes_read += $tmp_bytes_read;
} while ($result eq "ok" and $bytes_read < $bytes);
die_already("reading $bytes bytes from $source")
unless ($result eq "ok" && $bytes_read == $bytes);
# Close the connection.
$result = $handle -> close();
die_already("closing connection to $source")
unless ($result eq "ok");
# Create and open the target.
my $target = "/tmp/" . $info -> { name };
my $uri = Gnome2::VFS::URI -> new($target);
($result, $handle) = $uri -> create("write", 1, 0644);
die_already("creating $target") unless ($result eq "ok");
# Write to it.
my $bytes_written;
($result, $bytes_written) = $handle -> write($buffer, $bytes);
die_already("writing $bytes bytes to $target")
unless ($result eq "ok" && $bytes_written == $bytes);
# Close the target.
$result = $handle -> close();
die_already("closing $target") unless ($result eq "ok");
Gnome2::VFS -> shutdown();
<<lessSYNOPSIS
use Gnome2::VFS;
sub die_already {
my ($action) = @_;
die("An error occured while $action.n");
}
die_already("initializing GNOME VFS") unless (Gnome2::VFS -> init());
my $source = "http://www.perldoc.com/about.html";
my ($result, $handle, $info);
# Open a connection to Perldoc.
($result, $handle) = Gnome2::VFS -> open($source, "read");
die_already("opening connection to $source")
unless ($result eq "ok");
# Get the file information.
($result, $info) = $handle -> get_file_info("default");
die_already("retrieving information about $source")
unless ($result eq "ok");
# Read the content.
my $bytes = $info -> { size };
my $bytes_read = 0;
my $buffer = "";
do {
my ($tmp_buffer, $tmp_bytes_read);
($result, $tmp_bytes_read, $tmp_buffer) =
$handle -> read($bytes - $bytes_read);
$buffer .= $tmp_buffer;
$bytes_read += $tmp_bytes_read;
} while ($result eq "ok" and $bytes_read < $bytes);
die_already("reading $bytes bytes from $source")
unless ($result eq "ok" && $bytes_read == $bytes);
# Close the connection.
$result = $handle -> close();
die_already("closing connection to $source")
unless ($result eq "ok");
# Create and open the target.
my $target = "/tmp/" . $info -> { name };
my $uri = Gnome2::VFS::URI -> new($target);
($result, $handle) = $uri -> create("write", 1, 0644);
die_already("creating $target") unless ($result eq "ok");
# Write to it.
my $bytes_written;
($result, $bytes_written) = $handle -> write($buffer, $bytes);
die_already("writing $bytes bytes to $target")
unless ($result eq "ok" && $bytes_written == $bytes);
# Close the target.
$result = $handle -> close();
die_already("closing $target") unless ($result eq "ok");
Gnome2::VFS -> shutdown();
Download (0.057MB)
Added: 2007-04-27 License: Perl Artistic License Price:
910 downloads
Lingua::Phonology::Segment 0.32
Lingua::Phonology::Segment is a module to represent a segment as a bundle of feature values. more>>
Lingua::Phonology::Segment is a module to represent a segment as a bundle of feature values.
SYNOPSIS
use Lingua::Phonology;
$phono = new Lingua::Phonology;
# Define a feature set
$features = $phono->features;
$features->loadfile;
# Make a segment
$segment = $phono->segment;
# Set some values
$segment->labial(1);
$segment->continuant(0);
$segment->voice(1);
# Segment is now voiced labial stop, i.e. [b]
# Reset the segment
$segment->clear;
A Lingua::Phonology::Segment object provides a programmatic representation of a linguistic segment. Such a segment is associated with a Lingua::Phonology::Features object that lists the available features and the relationships between them. The segment itself is a list of the values for those features.
This module provides methods for returning and setting these feature values. A segment may also be associated with a Lingua::Phonology::Symbols object, which allows the segment to return the symbol that it best matches.
OVERLOADING
As of Lingua::Phonology v0.32 (Lingua::Phonology::Segment v0.4), string conversion of segments is overloaded. When you use a Lingua::Phonology::Segment in string context, the spell() method is automatically called, and the representation of the segment from the current symbolset is returned. String comparison operators (cmp eq ne lt le gt ge) are also overloaded. Therefore, the following work correctly, assuming that you have a Lingua::Phonology object correctly set up in $phono.
my ($b, $k) = $phono->symbols->segment(b, k);
print "Segments: $b, $kn"; # Prints "Segments: b, k";
print "$b is greater than $kn" if $b gt $k; # Wont print
print "$b is less than $kn" if $b lt $k; # Prints b is less than k;
print "$b is equal to $kn" if $b eq $k; # Wont print
my $b2 = $b->duplicate;
print "$b is equal to $b2n" if $b eq $b2 # Prints b is equal to b;
Note that stringification is not overloaded if the symbolset is not properly set. However, it turns on as soon as a symbolset is available:
my $b = Lingua::Phonology::Segment->new($features);
$b->voice(1);
$b->labial(1);
print "$bn"; # Prints Lingua::Phonology::Segment=HASH(0x88af598)
# or something similar, because there is no symbolset
# defined for spelling the segment.
$b->symbolset($symbols);
print "$bn"; # Prints b
Number conversion is not overloaded.
<<lessSYNOPSIS
use Lingua::Phonology;
$phono = new Lingua::Phonology;
# Define a feature set
$features = $phono->features;
$features->loadfile;
# Make a segment
$segment = $phono->segment;
# Set some values
$segment->labial(1);
$segment->continuant(0);
$segment->voice(1);
# Segment is now voiced labial stop, i.e. [b]
# Reset the segment
$segment->clear;
A Lingua::Phonology::Segment object provides a programmatic representation of a linguistic segment. Such a segment is associated with a Lingua::Phonology::Features object that lists the available features and the relationships between them. The segment itself is a list of the values for those features.
This module provides methods for returning and setting these feature values. A segment may also be associated with a Lingua::Phonology::Symbols object, which allows the segment to return the symbol that it best matches.
OVERLOADING
As of Lingua::Phonology v0.32 (Lingua::Phonology::Segment v0.4), string conversion of segments is overloaded. When you use a Lingua::Phonology::Segment in string context, the spell() method is automatically called, and the representation of the segment from the current symbolset is returned. String comparison operators (cmp eq ne lt le gt ge) are also overloaded. Therefore, the following work correctly, assuming that you have a Lingua::Phonology object correctly set up in $phono.
my ($b, $k) = $phono->symbols->segment(b, k);
print "Segments: $b, $kn"; # Prints "Segments: b, k";
print "$b is greater than $kn" if $b gt $k; # Wont print
print "$b is less than $kn" if $b lt $k; # Prints b is less than k;
print "$b is equal to $kn" if $b eq $k; # Wont print
my $b2 = $b->duplicate;
print "$b is equal to $b2n" if $b eq $b2 # Prints b is equal to b;
Note that stringification is not overloaded if the symbolset is not properly set. However, it turns on as soon as a symbolset is available:
my $b = Lingua::Phonology::Segment->new($features);
$b->voice(1);
$b->labial(1);
print "$bn"; # Prints Lingua::Phonology::Segment=HASH(0x88af598)
# or something similar, because there is no symbolset
# defined for spelling the segment.
$b->symbolset($symbols);
print "$bn"; # Prints b
Number conversion is not overloaded.
Download (0.098MB)
Added: 2006-06-02 License: Perl Artistic License Price:
1239 downloads
POE::Component::Server::IRC 1.05
POE::Component::Server::IRC is a fully event-driven networkable IRC server daemon module. more>>
POE::Component::Server::IRC is a fully event-driven networkable IRC server daemon module.
SYNOPSIS
# A fairly simple example:
use strict;
use warnings;
use POE qw(Component::Server::IRC);
my %config = (
servername => simple.poco.server.irc,
nicklen => 15,
network => SimpleNET
);
my $pocosi = POE::Component::Server::IRC->spawn( config => %config );
POE::Session->create(
package_states => [
main => [qw(_start _default)],
],
heap => { ircd => $pocosi },
);
$poe_kernel->run();
exit 0;
sub _start {
my ($kernel,$heap) = @_[KERNEL,HEAP];
$heap->{ircd}->yield( register );
# Anyone connecting from the loopback gets spoofed hostname
$heap->{ircd}->add_auth( mask => *@localhost, spoof => m33p.com, no_tilde => 1 );
# We have to add an auth as we have specified one above.
$heap->{ircd}->add_auth( mask => *@* );
# Start a listener on the standard IRC port.
$heap->{ircd}->add_listener( port => 6667 );
# Add an operator who can connect from localhost
$heap->{ircd}->add_operator( { username => moo, password => fishdont } );
undef;
}
sub _default {
my ( $event, $args ) = @_[ ARG0 .. $#_ ];
print STDOUT "$event: ";
foreach (@$args) {
SWITCH: {
if ( ref($_) eq ARRAY ) {
print STDOUT "[", join ( ", ", @$_ ), "] ";
last SWITCH;
}
if ( ref($_) eq HASH ) {
print STDOUT "{", join ( ", ", %$_ ), "} ";
last SWITCH;
}
print STDOUT "$_ ";
}
}
print STDOUT "n";
return 0; # Dont handle signals.
}
POE::Component::Server::IRC is a POE component which implements an IRC server ( also referred to as an IRC daemon or IRCd ). It should be compliant with the pertient IRC RFCs and is based on reverse engineering Hybrid IRCd behaviour with regards to interactions with IRC clients and other IRC servers.
Yes, thats right. POE::Component::Server::IRC is capable of linking to form IRC networks. It supports the TS5 server to server protocol and has been tested with linking to Hybrid-7 based networks. It should in theory work with any TS5-based IRC network.
POE::Component::Server::IRC also has a services API, which enables one to extend the IRCd to create IRC Services. This is fully event-driven ( of course =] ). There is also a Plugin system, similar to that sported by POE::Component::IRC.
<<lessSYNOPSIS
# A fairly simple example:
use strict;
use warnings;
use POE qw(Component::Server::IRC);
my %config = (
servername => simple.poco.server.irc,
nicklen => 15,
network => SimpleNET
);
my $pocosi = POE::Component::Server::IRC->spawn( config => %config );
POE::Session->create(
package_states => [
main => [qw(_start _default)],
],
heap => { ircd => $pocosi },
);
$poe_kernel->run();
exit 0;
sub _start {
my ($kernel,$heap) = @_[KERNEL,HEAP];
$heap->{ircd}->yield( register );
# Anyone connecting from the loopback gets spoofed hostname
$heap->{ircd}->add_auth( mask => *@localhost, spoof => m33p.com, no_tilde => 1 );
# We have to add an auth as we have specified one above.
$heap->{ircd}->add_auth( mask => *@* );
# Start a listener on the standard IRC port.
$heap->{ircd}->add_listener( port => 6667 );
# Add an operator who can connect from localhost
$heap->{ircd}->add_operator( { username => moo, password => fishdont } );
undef;
}
sub _default {
my ( $event, $args ) = @_[ ARG0 .. $#_ ];
print STDOUT "$event: ";
foreach (@$args) {
SWITCH: {
if ( ref($_) eq ARRAY ) {
print STDOUT "[", join ( ", ", @$_ ), "] ";
last SWITCH;
}
if ( ref($_) eq HASH ) {
print STDOUT "{", join ( ", ", %$_ ), "} ";
last SWITCH;
}
print STDOUT "$_ ";
}
}
print STDOUT "n";
return 0; # Dont handle signals.
}
POE::Component::Server::IRC is a POE component which implements an IRC server ( also referred to as an IRC daemon or IRCd ). It should be compliant with the pertient IRC RFCs and is based on reverse engineering Hybrid IRCd behaviour with regards to interactions with IRC clients and other IRC servers.
Yes, thats right. POE::Component::Server::IRC is capable of linking to form IRC networks. It supports the TS5 server to server protocol and has been tested with linking to Hybrid-7 based networks. It should in theory work with any TS5-based IRC network.
POE::Component::Server::IRC also has a services API, which enables one to extend the IRCd to create IRC Services. This is fully event-driven ( of course =] ). There is also a Plugin system, similar to that sported by POE::Component::IRC.
Download (0.084MB)
Added: 2006-11-28 License: Perl Artistic License Price:
1062 downloads
SVG::Metadata 0.28
SVG::Metadata is a Perl module to capture metadata info about an SVG file. more>>
SVG::Metadata is a Perl module to capture metadata info about an SVG file.
SYNOPSIS
use SVG::Metadata;
my $svgmeta = new SVG::Metadata;
$svgmeta->parse($filename)
or die "Could not parse $filename: " . $svgmeta->errormsg();
$svgmeta2->parse($filename2)
or die "Could not parse $filename: " . $svgmeta->errormsg();
# Do the files have the same metadata (author, title, license)?
if (! $svgmeta->compare($svgmeta2) ) {
print "$filename is different than $filename2n";
}
if ($svgmeta->title() eq ) {
$svgmeta->title(Unknown);
}
if ($svgmeta->author() eq ) {
$svgmeta->author(Unknown);
}
if ($svgmeta->license() eq ) {
$svgmeta->license(Unknown);
}
if (! $svgmeta->keywords()) {
$svgmeta->addKeyword(unsorted);
} elsif ($svgmeta->hasKeyword(unsorted) && $svgmeta->keywords()>1) {
$svgmeta->removeKeyword(unsorted);
}
print $svgmeta->to_text();
This module provides a way of extracting, browsing and using RDF metadata embedded in an SVG file.
The SVG spec itself does not provide any particular mechanisms for handling metadata, but instead relies on embedded, namespaced RDF sections, as per XML philosophy. Unfortunately, many SVG tools dont support the concept of RDF metadata; indeed many dont support the idea of embedded XML "islands" at all. Some will even ignore and drop the rdf data entirely when encountered.
The motivation for this module is twofold. First, it provides a mechanism for accessing this metadata from the SVG files. Second, it provides a means of validating SVG files to detect if they have the metadata.
The motivation for this script is primarily for the Open Clip Art Library (http://www.openclipart.org), as a way of filtering out submissions that lack metadata from being included in the official distributions. A secondary motivation is to serve as a testing tool for SVG editors like Inkscape (http://www.inkscape.org).
<<lessSYNOPSIS
use SVG::Metadata;
my $svgmeta = new SVG::Metadata;
$svgmeta->parse($filename)
or die "Could not parse $filename: " . $svgmeta->errormsg();
$svgmeta2->parse($filename2)
or die "Could not parse $filename: " . $svgmeta->errormsg();
# Do the files have the same metadata (author, title, license)?
if (! $svgmeta->compare($svgmeta2) ) {
print "$filename is different than $filename2n";
}
if ($svgmeta->title() eq ) {
$svgmeta->title(Unknown);
}
if ($svgmeta->author() eq ) {
$svgmeta->author(Unknown);
}
if ($svgmeta->license() eq ) {
$svgmeta->license(Unknown);
}
if (! $svgmeta->keywords()) {
$svgmeta->addKeyword(unsorted);
} elsif ($svgmeta->hasKeyword(unsorted) && $svgmeta->keywords()>1) {
$svgmeta->removeKeyword(unsorted);
}
print $svgmeta->to_text();
This module provides a way of extracting, browsing and using RDF metadata embedded in an SVG file.
The SVG spec itself does not provide any particular mechanisms for handling metadata, but instead relies on embedded, namespaced RDF sections, as per XML philosophy. Unfortunately, many SVG tools dont support the concept of RDF metadata; indeed many dont support the idea of embedded XML "islands" at all. Some will even ignore and drop the rdf data entirely when encountered.
The motivation for this module is twofold. First, it provides a mechanism for accessing this metadata from the SVG files. Second, it provides a means of validating SVG files to detect if they have the metadata.
The motivation for this script is primarily for the Open Clip Art Library (http://www.openclipart.org), as a way of filtering out submissions that lack metadata from being included in the official distributions. A secondary motivation is to serve as a testing tool for SVG editors like Inkscape (http://www.inkscape.org).
Download (0.025MB)
Added: 2007-04-23 License: Perl Artistic License Price:
914 downloads
MPG123-eq 4
MPG123-eq is a mpg123 with a 16 channel graphical EQ. more>>
MPG123-eq is a mpg123 with a 16 channel graphical EQ. VU meters, 3 equalizer presets, complete rewrite since version 3.
<<less Download (0.16MB)
Added: 2006-10-20 License: GPL (GNU General Public License) Price:
1103 downloads
eq2png 0.01
eq2png is a simple Perl script to make it painless to produce Portable Network Graphic (PNG) images for OpenOffice Impress. more>>
eq2png is a simple Perl script to make it painless to produce Portable Network Graphic (PNG) images for OpenOffice Impress presentations (or for any other purpose I cant imagine).
Suppose you had a LaTeX snippet in a file named example-equation.tex: To produce the PNG image of this with black foreground and transparent background (the default), youd type:
eq2png example-equation.tex
INSTALLATION:
Youll need ImageMagick, dvips, and Perl.
Just copy the script somewhere into your path, and create a config file if you dont
like the default behavior.
EXAMPLE USAGE:
1) Produce an image of a equation at the command line:
eq2png int{a + b} = c -o intergral.png
If you dont specify an output file, it will default to eq.png
If you add the -b flag, it will make your equation bold (or try to). This is nice for presentations (where sometimes
thin lines dissapear).
2) Produce an image of .tex file snippet. The .tex file should only contain LaTeX code
code you want rendered (not preamble or other such stuff, which gets wrapped around your snippet).
For example, a file equation.tex might include one line, sum_{a}^b = x!.
You can then produce an image of this in the following way:
eq2png equation.tex #defaults to producing a png file with the same name, i.e., equation.png
or,
eq2png equation.tex -o outputfile.png #produce a png file with the name outputfile.png
NOTE: eq2png will only assume a filename is a .tex snippet if it ends in ".tex". So,
eq2png equation.eq
will produce a png image of the string equation.eq (probably not what you want).
To specify that the string is a filename, use the -f flag, e.g.,
eq2png -f equation.eq -o outputfile.png
NOTE: if you want to include LaTeX macros in your equations, just place a file named macros.tex (or symlink)
in your working directory. It will be included in the .tex code generated to produce your png file.
NOTE: if you need to include special LaTeX packages, see the config file stuff below.
<<lessSuppose you had a LaTeX snippet in a file named example-equation.tex: To produce the PNG image of this with black foreground and transparent background (the default), youd type:
eq2png example-equation.tex
INSTALLATION:
Youll need ImageMagick, dvips, and Perl.
Just copy the script somewhere into your path, and create a config file if you dont
like the default behavior.
EXAMPLE USAGE:
1) Produce an image of a equation at the command line:
eq2png int{a + b} = c -o intergral.png
If you dont specify an output file, it will default to eq.png
If you add the -b flag, it will make your equation bold (or try to). This is nice for presentations (where sometimes
thin lines dissapear).
2) Produce an image of .tex file snippet. The .tex file should only contain LaTeX code
code you want rendered (not preamble or other such stuff, which gets wrapped around your snippet).
For example, a file equation.tex might include one line, sum_{a}^b = x!.
You can then produce an image of this in the following way:
eq2png equation.tex #defaults to producing a png file with the same name, i.e., equation.png
or,
eq2png equation.tex -o outputfile.png #produce a png file with the name outputfile.png
NOTE: eq2png will only assume a filename is a .tex snippet if it ends in ".tex". So,
eq2png equation.eq
will produce a png image of the string equation.eq (probably not what you want).
To specify that the string is a filename, use the -f flag, e.g.,
eq2png -f equation.eq -o outputfile.png
NOTE: if you want to include LaTeX macros in your equations, just place a file named macros.tex (or symlink)
in your working directory. It will be included in the .tex code generated to produce your png file.
NOTE: if you need to include special LaTeX packages, see the config file stuff below.
Download (0.20MB)
Added: 2005-11-18 License: GPL (GNU General Public License) Price:
1435 downloads
gxmms 0.3.0
gxmms is a simple GNOME panel applet that lets you control the basic functions of XMMS or Beep Media Player. more>>
gxmms is a simple GNOME panel applet that lets you control the basic functions of XMMS or Beep Media Player.
Main features:
- Scrollable track time progress bar
- Volume control with mouse scrollwheel
- Buttons: Previous track - Play / Pause - Stop - Next track - Eject
- Real-time tooltips with track title and time
- Control repeat and shuffle properties
- Show/Hide main window, playlist editor, graphical eq and more
- Internazionalization (i18n)
<<lessMain features:
- Scrollable track time progress bar
- Volume control with mouse scrollwheel
- Buttons: Previous track - Play / Pause - Stop - Next track - Eject
- Real-time tooltips with track title and time
- Control repeat and shuffle properties
- Show/Hide main window, playlist editor, graphical eq and more
- Internazionalization (i18n)
Download (0.14MB)
Added: 2005-07-19 License: GPL (GNU General Public License) Price:
1557 downloads
Embperl::Syntax::RTF 2.2.0
Embperl::Syntax::RTF is a Perl class derived from Embperl::Syntax to define the syntax for RTF files. more>>
Embperl::Syntax::RTF is a Perl class derived from Embperl::Syntax to define the syntax for RTF files. RTF files can be read and written by various word processing programms. This allows you to create dynamic wordprocessing documents or let process serial letters thru Embperl.
Currently Embperl regocnices the fields DOCVARIABLE, MERGEFIELD and NEXT. Variablenames are resolved as hash keys to $param[0] e.g. foo.bar referes to $param[0]{foo}{bar}, the @param Array can by set via the param parameter of the Execute function. NEXT moves to the next element of the @param array. If the end of the document is reached, Embperl repeats the document until all element of @param are processed. This can for example be use to tie a database table to @param and generate a serial letter.
SYNOPSIS
my $x = $Embperl::req -> component -> code ;
my ($op, $cmp, $a, $b) = XML::Embperl::DOM::Node::iChildsText (%$q%,%$x%,1) =~ /:([=])+s*"(.*?)"(?:s*"(.*?)"s*"(.*?)")?/ ;
if ($op eq =) { $op = eq }
elsif ($op eq ) { $op = gt }
elsif ($op eq >=) { $op = ge }
elsif ($op eq<<less
Currently Embperl regocnices the fields DOCVARIABLE, MERGEFIELD and NEXT. Variablenames are resolved as hash keys to $param[0] e.g. foo.bar referes to $param[0]{foo}{bar}, the @param Array can by set via the param parameter of the Execute function. NEXT moves to the next element of the @param array. If the end of the document is reached, Embperl repeats the document until all element of @param are processed. This can for example be use to tie a database table to @param and generate a serial letter.
SYNOPSIS
my $x = $Embperl::req -> component -> code ;
my ($op, $cmp, $a, $b) = XML::Embperl::DOM::Node::iChildsText (%$q%,%$x%,1) =~ /:([=])+s*"(.*?)"(?:s*"(.*?)"s*"(.*?)")?/ ;
if ($op eq =) { $op = eq }
elsif ($op eq ) { $op = gt }
elsif ($op eq >=) { $op = ge }
elsif ($op eq<<less
Download (0.65MB)
Added: 2007-07-25 License: Perl Artistic License Price:
821 downloads
Games::Othello 0.01
Games::Othello is a Perl extension for modelling a game of Othello. more>>
Games::Othello is a Perl extension for modelling a game of Othello.
SYNOPSIS
use Games::Othello;
my $game = Games::Othello->new();
while( !game->over ) {
printf "It is presently %ss move",
($game->whos_move eq b) ? black, white;
my @possible_moves = values $game->possible_moves();
if ( ! @possible_moves ) {
print "You have no moves available, you must pass.
$game->pass_to_opponent;
} else {
foreach ( my $move ) @possible_moves ) {
printf
"You will take %d of your opponents chips if you place your chip on %d,%d",
scalar @{ $move->{chips} }, $move->{x}, $move->{y};
}
my ($locx, $locy) = get_move();
my $flipped = $game->place_chip( $locx, $locy );
}
my $layout = $game->chip_layout();
foreach my $row ( @$layout ) {
foreach my $pos ( @$row ) {
printf %3s,
($pos eq b) ? B # Black occupied square.
: ($pos eq w) ? W # White occupied square.
: # Un-occupied square.
}
print "nn";
}
}
my ($black_score, $white_score) = $game->score;
<<lessSYNOPSIS
use Games::Othello;
my $game = Games::Othello->new();
while( !game->over ) {
printf "It is presently %ss move",
($game->whos_move eq b) ? black, white;
my @possible_moves = values $game->possible_moves();
if ( ! @possible_moves ) {
print "You have no moves available, you must pass.
$game->pass_to_opponent;
} else {
foreach ( my $move ) @possible_moves ) {
printf
"You will take %d of your opponents chips if you place your chip on %d,%d",
scalar @{ $move->{chips} }, $move->{x}, $move->{y};
}
my ($locx, $locy) = get_move();
my $flipped = $game->place_chip( $locx, $locy );
}
my $layout = $game->chip_layout();
foreach my $row ( @$layout ) {
foreach my $pos ( @$row ) {
printf %3s,
($pos eq b) ? B # Black occupied square.
: ($pos eq w) ? W # White occupied square.
: # Un-occupied square.
}
print "nn";
}
}
my ($black_score, $white_score) = $game->score;
Download (0.005MB)
Added: 2006-12-28 License: Perl Artistic License Price:
1041 downloads
Bio::Factory::SequenceFactoryI 1.4
Bio::Factory::SequenceFactoryI is a Perl interface that allows for generic building of sequences in factories. more>>
Bio::Factory::SequenceFactoryI is a Perl interface that allows for generic building of sequences in factories which create sequences (like SeqIO).
SYNOPSIS
# do not use this object directly it is an interface # get a Bio::Factory::SequenceFactoryI object like
use Bio::Seq::SeqFactory;
my $seqbuilder = new Bio::Seq::SeqFactory(type => Bio::PrimarySeq);
my $seq = $seqbuilder->create(-seq => ACTGAT,
-display_id => exampleseq);
print "seq is a ", ref($seq), "n";
A generic way to build Sequence objects via a pluggable factory. This reduces the amount of code that looks like
if( $type eq Bio::PrimarySeq ) { ... }
elsif( $type eq Bio::Seq::RichSeq ) { ... }
<<lessSYNOPSIS
# do not use this object directly it is an interface # get a Bio::Factory::SequenceFactoryI object like
use Bio::Seq::SeqFactory;
my $seqbuilder = new Bio::Seq::SeqFactory(type => Bio::PrimarySeq);
my $seq = $seqbuilder->create(-seq => ACTGAT,
-display_id => exampleseq);
print "seq is a ", ref($seq), "n";
A generic way to build Sequence objects via a pluggable factory. This reduces the amount of code that looks like
if( $type eq Bio::PrimarySeq ) { ... }
elsif( $type eq Bio::Seq::RichSeq ) { ... }
Download (4.7MB)
Added: 2006-09-02 License: Perl Artistic License Price:
1147 downloads
File::Basename::Object 0.01
File::Basename::Object is a Perl module with object-oriented syntax sugar for File::Basename. more>>
File::Basename::Object is a Perl module with object-oriented syntax sugar for File::Basename.
SYNOPSIS
my $file = File::Basename::Object->new("/path/to/a/file.html", ".htm", ".html");
if(open(my $fh, basename, "n";
...
}
if($file == "/another/path/to/file.htm") {
print "$file shares its base name with /another/path/to/file.htmn";
}
File::Basename::Object is an object-oriented wrapper around File::Basename. The goal is to allow pathnames to be presented and manipulated easily.
A File::Basename::Object stringifies to its full canonical pathname, so it can be used in open(), etc. without any trouble. When compared as a string (cmp, ne, eq, etc), its full canonical pathname is compared. When compared using numeric operators (==, !=, etc), the files base name is compared instead. Some methods are also provided:
<<lessSYNOPSIS
my $file = File::Basename::Object->new("/path/to/a/file.html", ".htm", ".html");
if(open(my $fh, basename, "n";
...
}
if($file == "/another/path/to/file.htm") {
print "$file shares its base name with /another/path/to/file.htmn";
}
File::Basename::Object is an object-oriented wrapper around File::Basename. The goal is to allow pathnames to be presented and manipulated easily.
A File::Basename::Object stringifies to its full canonical pathname, so it can be used in open(), etc. without any trouble. When compared as a string (cmp, ne, eq, etc), its full canonical pathname is compared. When compared using numeric operators (==, !=, etc), the files base name is compared instead. Some methods are also provided:
Download (0.004MB)
Added: 2007-04-25 License: Perl Artistic License Price:
915 downloads
Chess::Game::MoveList 0.6.0
Chess::Game::MoveList is a specialized list class for recording the moves of a Chess::Game. more>>
Chess::Game::MoveList is a specialized list class for recording the moves of a Chess::Game.
SYNOPSIS
$movelist = Chess::Game::MoveList->new("white", "black");
$wpawn = Chess::Game::Pawn->new("e2", "white");
$entry = $movelist->add_move($wpawn, "e2", "e4");
$true = $entry->get_piece() eq $entry;
$bpawn = Chess::Game::Pawn->new("e7", "black");
$entry = $movelist->add_move($bpawn, "e7", "e6");
$entry = $movelist->add_move($wpawn, "e4", "e5");
@del_entries = $movelist->delete_move(1, "white"); # delete the list
$true = $entries[0]->get_piece() eq $wpawn;
$true = $entries[0]->get_dest_square() eq "e4";
$true = $entries[1]->get_piece() eq $bpawn;
$true = $entries[1]->get_dest_square() eq "e6";
The Chess module provides a framework for writing chess programs with Perl. This class forms part of that framework, recording a log of all moves during a Chess::Game in such a fashion that the list can be used to undo moves that have been made.
<<lessSYNOPSIS
$movelist = Chess::Game::MoveList->new("white", "black");
$wpawn = Chess::Game::Pawn->new("e2", "white");
$entry = $movelist->add_move($wpawn, "e2", "e4");
$true = $entry->get_piece() eq $entry;
$bpawn = Chess::Game::Pawn->new("e7", "black");
$entry = $movelist->add_move($bpawn, "e7", "e6");
$entry = $movelist->add_move($wpawn, "e4", "e5");
@del_entries = $movelist->delete_move(1, "white"); # delete the list
$true = $entries[0]->get_piece() eq $wpawn;
$true = $entries[0]->get_dest_square() eq "e4";
$true = $entries[1]->get_piece() eq $bpawn;
$true = $entries[1]->get_dest_square() eq "e6";
The Chess module provides a framework for writing chess programs with Perl. This class forms part of that framework, recording a log of all moves during a Chess::Game in such a fashion that the list can be used to undo moves that have been made.
Download (0.021MB)
Added: 2007-01-02 License: Perl Artistic License Price:
1025 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 eq augments 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