triple sec
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 130
Tripoli 0.3.1
Tripoli project is a Python triplespace implementation. more>>
Tripoli project is a Python triplespace implementation.
Tripoli is a Python implementation of a "triple space": that is, a triple store with tuple space semantics. It supports the synchronization of concurrent processes via a shared data structure.
Processes can add triples to the store, and read or take triples from the store using pattern matching.
If a triple matching a pattern is not yet in the store, a query will block until a suitable triple is added by some other process.
Many synchronization patterns can be expressed using these primitives.
Tripoli extends the semantics of tuple spaces with two additional operations, copy_graph and copy_collect_graph.
These copy or move the graph of all triples that are connected to a given subject to a new triple space, and can be used together with the other pattern matching operations to express procedural queries over triple data.
<<lessTripoli is a Python implementation of a "triple space": that is, a triple store with tuple space semantics. It supports the synchronization of concurrent processes via a shared data structure.
Processes can add triples to the store, and read or take triples from the store using pattern matching.
If a triple matching a pattern is not yet in the store, a query will block until a suitable triple is added by some other process.
Many synchronization patterns can be expressed using these primitives.
Tripoli extends the semantics of tuple spaces with two additional operations, copy_graph and copy_collect_graph.
These copy or move the graph of all triples that are connected to a given subject to a new triple space, and can be used together with the other pattern matching operations to express procedural queries over triple data.
Download (0.009MB)
Added: 2007-02-16 License: GPL (GNU General Public License) Price:
982 downloads
Triple Triad Silver 0.1b4
Triple Triad Silver is a remake of the famous game Triple Triad from Final Fantasy VIII. more>>
Triple Triad Silver is a remake of the famous game Triple Triad from Final Fantasy VIII
Triple Triad Silver is a cardgame, the goal is to flip more cards than your enemy. Triple Triad Silver beta version does not include all functions yet.
<<lessTriple Triad Silver is a cardgame, the goal is to flip more cards than your enemy. Triple Triad Silver beta version does not include all functions yet.
Download (1.1MB)
Added: 2007-08-01 License: Freeware Price:
818 downloads
GD::Simple 2.35
GD::Simple module is a simplified interface to GD library. more>>
GD::Simple module is a simplified interface to GD library.
SYNOPSIS
use GD::Simple;
# create a new image
$img = GD::Simple->new(400,250);
# draw a red rectangle with blue borders
$img->bgcolor(red);
$img->fgcolor(blue);
$img->rectangle(10,10,50,50);
# draw an empty rectangle with green borders
$img->bgcolor(undef);
$img->fgcolor(green);
$img->rectangle(30,30,100,100);
# move to (80,80) and draw a green line to (100,190)
$img->moveTo(80,80);
$img->lineTo(100,190);
# draw a solid orange ellipse
$img->moveTo(110,100);
$img->bgcolor(orange);
$img->fgcolor(orange);
$img->ellipse(40,40);
# draw a black filled arc
$img->moveTo(150,150);
$img->fgcolor(black);
$img->arc(50,50,0,100,gdNoFill|gdEdged);
# draw a string at (10,180) using the default
# built-in font
$img->moveTo(10,180);
$img->string(This is very simple);
# draw a string at (280,210) using 20 point
# times italic, angled upward 90 degrees
$img->moveTo(280,210);
$img->font(Times:italic);
$img->fontsize(20);
$img->angle(-90);
$img->string(This is very fancy);
# some turtle graphics
$img->moveTo(300,100);
$img->penSize(3,3);
$img->angle(0);
$img->line(20); # 20 pixels going to the right
$img->turn(30); # set turning angle to 30 degrees
$img->line(20); # 20 pixel line
$img->line(20);
$img->line(20);
$img->turn(-90); # set turning angle to -90 degrees
$img->line(50); # 50 pixel line
# draw a cyan polygon edged in blue
my $poly = new GD::Polygon;
$poly->addPt(150,100);
$poly->addPt(199,199);
$poly->addPt(100,199);
$img->bgcolor(cyan);
$img->fgcolor(blue);
$img->penSize(1,1);
$img->polygon($poly);
# convert into png data
print $img->png;
GD::Simple is a subclass of the GD library that shortens many of the long GD method calls by storing information about the pen color, size and position in the GD object itself. It also adds a small number of "turtle graphics" style calls for those who prefer to work in polar coordinates. In addition, the library allows you to use symbolic names for colors, such as "chartreuse", and will manage the colors for you.
The Pen
GD::Simple maintains a "pen" whose settings are used for line- and shape-drawing operations. The pen has the following properties:
fgcolor
The pen foreground color is the color of lines and the borders of filled and unfilled shapes.
bgcolor
The pen background color is the color of the contents of filled shapes.
pensize
The pen size is the width of the pen. Larger sizes draw thicker lines.
position
The pen position is its current position on the canvas in (X,Y) coordinates.
angle
When drawing in turtle mode, the pen angle determines the current direction of lines of relative length.
turn
When drawing in turtle mode, the turn determines the clockwise or counterclockwise angle that the pen will turn before drawing the next line.
font
The font to use when drawing text. Both built-in bitmapped fonts and TrueType fonts are supported.
fontsize
The size of the font to use when drawing with TrueType fonts.
One sets the position and properties of the pen and then draws. As the drawing progresses, the position of the pen is updated.
Methods
GD::Simple introduces a number of new methods, a few of which have the same name as GD::Image methods, and hence change their behavior. In addition to these new methods, GD::Simple objects support all of the GD::Image methods. If you make a method call that isnt directly supported by GD::Simple, it refers the request to the underlying GD::Image object. Hence one can load a JPEG image into GD::Simple and declare it to be TrueColor by using this call, which is effectively inherited from GD::Image:
my $img = GD::Simple->newFromJpeg(./myimage.jpg,1);
The rest of this section describes GD::Simple-specific methods.
$img->moveTo($x,$y)
This call changes the position of the pen without drawing. It moves the pen to position ($x,$y) on the drawing canvas.
$img->move($dx,$dy)
$img->move($dr)
This call changes the position of the pen without drawing. When called with two arguments it moves the pen $dx pixels to the right and $dy pixels downward. When called with one argument it moves the pen $dr pixels along the vector described by the current pen angle.
$img->lineTo($x,$y)
The lineTo() call simultaneously draws and moves the pen. It draws a line from the current pen position to the position defined by ($x,$y) using the current pen size and color. After drawing, the position of the pen is updated to the new position.
$img->line($dx,$dy)
$img->line($dr)
The line() call simultaneously draws and moves the pen. When called with two arguments it draws a line from the current position of the pen to the position $dx pixels to the right and $dy pixels down. When called with one argument, it draws a line $dr pixels long along the angle defined by the current pen angle.
$img->clear
This method clears the canvas by painting over it with the current background color.
$img->rectangle($x1,$y1,$x2,$y2)
This method draws the rectangle defined by corners ($x1,$y1), ($x2,$y2). The rectangles edges are drawn in the foreground color and its contents are filled with the background color. To draw a solid rectangle set bgcolor equal to fgcolor. To draw an unfilled rectangle (transparent inside), set bgcolor to undef.
$img->ellipse($width,$height)
This method draws the ellipse centered at the current location with width $width and height $height. The ellipses border is drawn in the foreground color and its contents are filled with the background color. To draw a solid ellipse set bgcolor equal to fgcolor. To draw an unfilled ellipse (transparent inside), set bgcolor to undef.
$img->arc($cx,$cy,$width,$height,$start,$end [,$style])
This method draws filled and unfilled arcs. See GD for a description of the arguments. To draw a solid arc (such as a pie wedge) set bgcolor equal to fgcolor. To draw an unfilled arc, set bgcolor to undef.
$img->polygon($poly)
This method draws filled and unfilled polygon using the current settings of fgcolor for the polygon border and bgcolor for the polygon fill color. See GD for a description of creating polygons. To draw a solid polygon set bgcolor equal to fgcolor. To draw an unfilled polygon, set bgcolor to undef.
$img->polyline($poly)
This method draws polygons without closing the first and last vertices (similar to GD::Image->unclosedPolygon()). It uses the fgcolor to draw the line.
$img->string($string)
This method draws the indicated string starting at the current position of the pen. The pen is moved to the end of the drawn string. Depending on the font selected with the font() method, this will use either a bitmapped GD font or a TrueType font. The angle of the pen will be consulted when drawing the text. For TrueType fonts, any angle is accepted. For GD bitmapped fonts, the angle can be either 0 (draw horizontal) or -90 (draw upwards).
For consistency between the TrueType and GD font behavior, the string is always drawn so that the current position of the pen corresponds to the bottom left of the first character of the text. This is different from the GD behavior, in which the first character of bitmapped fonts hangs down from the pen point.
This method returns a polygon indicating the bounding box of the rendered text. If an error occurred (such as invalid font specification) it returns undef and an error message in $@.
$metrics = $img->fontMetrics
($metrics,$width,$height) = GD::Simple->fontMetrics($font,$fontsize,$string)
This method returns information about the current font, most commonly a TrueType font. It can be invoked as an instance method (on a previously-created GD::Simple object) or as a class method (on the GD::Simple class).
When called as an instance method, fontMetrics() takes no arguments and returns a single hash reference containing the metrics that describe the currently selected font and size. The hash reference contains the following information:
xheight the base height of the font from the bottom to the top of
a lowercase m
ascent the length of the upper stem of the lowercase d
descent the length of the lower step of the lowercase j
lineheight the distance from the bottom of the j to the top of
the d
leading the distance between two adjacent lines
($delta_x,$delta_y)= $img->stringBounds($string)
This method indicates the X and Y offsets (which may be negative) that will occur when the given string is drawn using the current font, fontsize and angle. When the string is drawn horizontally, it gives the width and height of the strings bounding box.
$delta_x = $img->stringWidth($string)
This method indicates the width of the string given the current font, fontsize and angle. It is the same as ($img->stringBounds($string))[0]
($x,$y) = $img->curPos
Return the current position of the pen. Set the current position using moveTo().
$font = $img->font([$newfont] [,$newsize])
Get or set the current font. Fonts can be GD::Font objects, TrueType font file paths, or fontconfig font patterns like "Times:italic" (see fontconfig). The latter feature requires that you have the fontconfig library installed and are using libgd version 2.0.33 or higher.
As a shortcut, you may pass two arguments to set the font and the fontsize simultaneously. The fontsize is only valid when drawing with TrueType fonts.
$size = $img->fontsize([$newfontsize])
Get or set the current font size. This is only valid for TrueType fonts.
$size = $img->penSize([$newpensize])
Get or set the current pen width for use during line drawing operations.
$angle = $img->angle([$newangle])
Set the current angle for use when calling line() or move() with a single argument.
Here is an example of using turn() and angle() together to draw an octagon. The first line drawn is the downward-slanting top right edge. The last line drawn is the horizontal top of the octagon.
$img->moveTo(200,50);
$img->angle(0);
$img->turn(360/8);
for (1..8) { $img->line(50) }
$angle = $img->turn([$newangle])
Get or set the current angle to turn prior to drawing lines. This value is only used when calling line() or move() with a single argument. The turning angle will be applied to each call to line() or move() just before the actual drawing occurs.
Angles are in degrees. Positive values turn the angle clockwise.
$color = $img->fgcolor([$newcolor])
Get or set the pens foreground color. The current pen color can be set by (1) using an (r,g,b) triple; (2) using a previously-allocated color from the GD palette; or (3) by using a symbolic color name such as "chartreuse." The list of color names can be obtained using color_names().
$color = $img->bgcolor([$newcolor])
Get or set the pens background color. The current pen color can be set by (1) using an (r,g,b) triple; (2) using a previously-allocated color from the GD palette; or (3) by using a symbolic color name such as "chartreuse." The list of color names can be obtained using color_names().
$index = $img->translate_color(@args)
Translates a color into a GD palette or TrueColor index. You may pass either an (r,g,b) triple or a symbolic color name. If you pass a previously-allocated index, the method will return it unchanged.
$index = $img->alphaColor(@args,$alpha)
Creates an alpha color. You may pass either an (r,g,b) triple or a symbolic color name, followed by an integer indicating its opacity. The opacity value ranges from 0 (fully opaque) to 127 (fully transparent).
@names = GD::Simple->color_names
$translate_table = GD::Simple->color_names
Called in a list context, color_names() returns the list of symbolic color names recognized by this module. Called in a scalar context, the method returns a hash reference in which the keys are the color names and the values are array references containing [r,g,b] triples.
$gd = $img->gd
Return the internal GD::Image object. Usually you will not need to call this since all GD methods are automatically referred to this object.
($red,$green,$blue) = GD::Simple->HSVtoRGB($hue,$saturation,$value)
Convert a Hue/Saturation/Value (HSV) color into an RGB triple. The hue, saturation and value are integers from 0 to 255.
($hue,$saturation,$value) = GD::Simple->RGBtoHSV($hue,$saturation,$value)
Convert a Red/Green/Blue (RGB) value into a Hue/Saturation/Value (HSV) triple. The hue, saturation and value are integers from 0 to 255.
COLORS
This script will create an image showing all the symbolic colors.
#!/usr/bin/perl
use strict;
use GD::Simple;
my @color_names = GD::Simple->color_names;
my $cols = int(sqrt(@color_names));
my $rows = int(@color_names/$cols)+1;
my $cell_width = 100;
my $cell_height = 50;
my $legend_height = 16;
my $width = $cols * $cell_width;
my $height = $rows * $cell_height;
my $img = GD::Simple->new($width,$height);
$img->font(gdSmallFont);
for (my $c=0; $cfgcolor($color);
$img->rectangle(@topleft,@botright);
$img->moveTo($topleft[0]+2,$botright[1]+$legend_height-2);
$img->fgcolor(black);
$img->string($color);
}
}
print $img->png;
<<lessSYNOPSIS
use GD::Simple;
# create a new image
$img = GD::Simple->new(400,250);
# draw a red rectangle with blue borders
$img->bgcolor(red);
$img->fgcolor(blue);
$img->rectangle(10,10,50,50);
# draw an empty rectangle with green borders
$img->bgcolor(undef);
$img->fgcolor(green);
$img->rectangle(30,30,100,100);
# move to (80,80) and draw a green line to (100,190)
$img->moveTo(80,80);
$img->lineTo(100,190);
# draw a solid orange ellipse
$img->moveTo(110,100);
$img->bgcolor(orange);
$img->fgcolor(orange);
$img->ellipse(40,40);
# draw a black filled arc
$img->moveTo(150,150);
$img->fgcolor(black);
$img->arc(50,50,0,100,gdNoFill|gdEdged);
# draw a string at (10,180) using the default
# built-in font
$img->moveTo(10,180);
$img->string(This is very simple);
# draw a string at (280,210) using 20 point
# times italic, angled upward 90 degrees
$img->moveTo(280,210);
$img->font(Times:italic);
$img->fontsize(20);
$img->angle(-90);
$img->string(This is very fancy);
# some turtle graphics
$img->moveTo(300,100);
$img->penSize(3,3);
$img->angle(0);
$img->line(20); # 20 pixels going to the right
$img->turn(30); # set turning angle to 30 degrees
$img->line(20); # 20 pixel line
$img->line(20);
$img->line(20);
$img->turn(-90); # set turning angle to -90 degrees
$img->line(50); # 50 pixel line
# draw a cyan polygon edged in blue
my $poly = new GD::Polygon;
$poly->addPt(150,100);
$poly->addPt(199,199);
$poly->addPt(100,199);
$img->bgcolor(cyan);
$img->fgcolor(blue);
$img->penSize(1,1);
$img->polygon($poly);
# convert into png data
print $img->png;
GD::Simple is a subclass of the GD library that shortens many of the long GD method calls by storing information about the pen color, size and position in the GD object itself. It also adds a small number of "turtle graphics" style calls for those who prefer to work in polar coordinates. In addition, the library allows you to use symbolic names for colors, such as "chartreuse", and will manage the colors for you.
The Pen
GD::Simple maintains a "pen" whose settings are used for line- and shape-drawing operations. The pen has the following properties:
fgcolor
The pen foreground color is the color of lines and the borders of filled and unfilled shapes.
bgcolor
The pen background color is the color of the contents of filled shapes.
pensize
The pen size is the width of the pen. Larger sizes draw thicker lines.
position
The pen position is its current position on the canvas in (X,Y) coordinates.
angle
When drawing in turtle mode, the pen angle determines the current direction of lines of relative length.
turn
When drawing in turtle mode, the turn determines the clockwise or counterclockwise angle that the pen will turn before drawing the next line.
font
The font to use when drawing text. Both built-in bitmapped fonts and TrueType fonts are supported.
fontsize
The size of the font to use when drawing with TrueType fonts.
One sets the position and properties of the pen and then draws. As the drawing progresses, the position of the pen is updated.
Methods
GD::Simple introduces a number of new methods, a few of which have the same name as GD::Image methods, and hence change their behavior. In addition to these new methods, GD::Simple objects support all of the GD::Image methods. If you make a method call that isnt directly supported by GD::Simple, it refers the request to the underlying GD::Image object. Hence one can load a JPEG image into GD::Simple and declare it to be TrueColor by using this call, which is effectively inherited from GD::Image:
my $img = GD::Simple->newFromJpeg(./myimage.jpg,1);
The rest of this section describes GD::Simple-specific methods.
$img->moveTo($x,$y)
This call changes the position of the pen without drawing. It moves the pen to position ($x,$y) on the drawing canvas.
$img->move($dx,$dy)
$img->move($dr)
This call changes the position of the pen without drawing. When called with two arguments it moves the pen $dx pixels to the right and $dy pixels downward. When called with one argument it moves the pen $dr pixels along the vector described by the current pen angle.
$img->lineTo($x,$y)
The lineTo() call simultaneously draws and moves the pen. It draws a line from the current pen position to the position defined by ($x,$y) using the current pen size and color. After drawing, the position of the pen is updated to the new position.
$img->line($dx,$dy)
$img->line($dr)
The line() call simultaneously draws and moves the pen. When called with two arguments it draws a line from the current position of the pen to the position $dx pixels to the right and $dy pixels down. When called with one argument, it draws a line $dr pixels long along the angle defined by the current pen angle.
$img->clear
This method clears the canvas by painting over it with the current background color.
$img->rectangle($x1,$y1,$x2,$y2)
This method draws the rectangle defined by corners ($x1,$y1), ($x2,$y2). The rectangles edges are drawn in the foreground color and its contents are filled with the background color. To draw a solid rectangle set bgcolor equal to fgcolor. To draw an unfilled rectangle (transparent inside), set bgcolor to undef.
$img->ellipse($width,$height)
This method draws the ellipse centered at the current location with width $width and height $height. The ellipses border is drawn in the foreground color and its contents are filled with the background color. To draw a solid ellipse set bgcolor equal to fgcolor. To draw an unfilled ellipse (transparent inside), set bgcolor to undef.
$img->arc($cx,$cy,$width,$height,$start,$end [,$style])
This method draws filled and unfilled arcs. See GD for a description of the arguments. To draw a solid arc (such as a pie wedge) set bgcolor equal to fgcolor. To draw an unfilled arc, set bgcolor to undef.
$img->polygon($poly)
This method draws filled and unfilled polygon using the current settings of fgcolor for the polygon border and bgcolor for the polygon fill color. See GD for a description of creating polygons. To draw a solid polygon set bgcolor equal to fgcolor. To draw an unfilled polygon, set bgcolor to undef.
$img->polyline($poly)
This method draws polygons without closing the first and last vertices (similar to GD::Image->unclosedPolygon()). It uses the fgcolor to draw the line.
$img->string($string)
This method draws the indicated string starting at the current position of the pen. The pen is moved to the end of the drawn string. Depending on the font selected with the font() method, this will use either a bitmapped GD font or a TrueType font. The angle of the pen will be consulted when drawing the text. For TrueType fonts, any angle is accepted. For GD bitmapped fonts, the angle can be either 0 (draw horizontal) or -90 (draw upwards).
For consistency between the TrueType and GD font behavior, the string is always drawn so that the current position of the pen corresponds to the bottom left of the first character of the text. This is different from the GD behavior, in which the first character of bitmapped fonts hangs down from the pen point.
This method returns a polygon indicating the bounding box of the rendered text. If an error occurred (such as invalid font specification) it returns undef and an error message in $@.
$metrics = $img->fontMetrics
($metrics,$width,$height) = GD::Simple->fontMetrics($font,$fontsize,$string)
This method returns information about the current font, most commonly a TrueType font. It can be invoked as an instance method (on a previously-created GD::Simple object) or as a class method (on the GD::Simple class).
When called as an instance method, fontMetrics() takes no arguments and returns a single hash reference containing the metrics that describe the currently selected font and size. The hash reference contains the following information:
xheight the base height of the font from the bottom to the top of
a lowercase m
ascent the length of the upper stem of the lowercase d
descent the length of the lower step of the lowercase j
lineheight the distance from the bottom of the j to the top of
the d
leading the distance between two adjacent lines
($delta_x,$delta_y)= $img->stringBounds($string)
This method indicates the X and Y offsets (which may be negative) that will occur when the given string is drawn using the current font, fontsize and angle. When the string is drawn horizontally, it gives the width and height of the strings bounding box.
$delta_x = $img->stringWidth($string)
This method indicates the width of the string given the current font, fontsize and angle. It is the same as ($img->stringBounds($string))[0]
($x,$y) = $img->curPos
Return the current position of the pen. Set the current position using moveTo().
$font = $img->font([$newfont] [,$newsize])
Get or set the current font. Fonts can be GD::Font objects, TrueType font file paths, or fontconfig font patterns like "Times:italic" (see fontconfig). The latter feature requires that you have the fontconfig library installed and are using libgd version 2.0.33 or higher.
As a shortcut, you may pass two arguments to set the font and the fontsize simultaneously. The fontsize is only valid when drawing with TrueType fonts.
$size = $img->fontsize([$newfontsize])
Get or set the current font size. This is only valid for TrueType fonts.
$size = $img->penSize([$newpensize])
Get or set the current pen width for use during line drawing operations.
$angle = $img->angle([$newangle])
Set the current angle for use when calling line() or move() with a single argument.
Here is an example of using turn() and angle() together to draw an octagon. The first line drawn is the downward-slanting top right edge. The last line drawn is the horizontal top of the octagon.
$img->moveTo(200,50);
$img->angle(0);
$img->turn(360/8);
for (1..8) { $img->line(50) }
$angle = $img->turn([$newangle])
Get or set the current angle to turn prior to drawing lines. This value is only used when calling line() or move() with a single argument. The turning angle will be applied to each call to line() or move() just before the actual drawing occurs.
Angles are in degrees. Positive values turn the angle clockwise.
$color = $img->fgcolor([$newcolor])
Get or set the pens foreground color. The current pen color can be set by (1) using an (r,g,b) triple; (2) using a previously-allocated color from the GD palette; or (3) by using a symbolic color name such as "chartreuse." The list of color names can be obtained using color_names().
$color = $img->bgcolor([$newcolor])
Get or set the pens background color. The current pen color can be set by (1) using an (r,g,b) triple; (2) using a previously-allocated color from the GD palette; or (3) by using a symbolic color name such as "chartreuse." The list of color names can be obtained using color_names().
$index = $img->translate_color(@args)
Translates a color into a GD palette or TrueColor index. You may pass either an (r,g,b) triple or a symbolic color name. If you pass a previously-allocated index, the method will return it unchanged.
$index = $img->alphaColor(@args,$alpha)
Creates an alpha color. You may pass either an (r,g,b) triple or a symbolic color name, followed by an integer indicating its opacity. The opacity value ranges from 0 (fully opaque) to 127 (fully transparent).
@names = GD::Simple->color_names
$translate_table = GD::Simple->color_names
Called in a list context, color_names() returns the list of symbolic color names recognized by this module. Called in a scalar context, the method returns a hash reference in which the keys are the color names and the values are array references containing [r,g,b] triples.
$gd = $img->gd
Return the internal GD::Image object. Usually you will not need to call this since all GD methods are automatically referred to this object.
($red,$green,$blue) = GD::Simple->HSVtoRGB($hue,$saturation,$value)
Convert a Hue/Saturation/Value (HSV) color into an RGB triple. The hue, saturation and value are integers from 0 to 255.
($hue,$saturation,$value) = GD::Simple->RGBtoHSV($hue,$saturation,$value)
Convert a Red/Green/Blue (RGB) value into a Hue/Saturation/Value (HSV) triple. The hue, saturation and value are integers from 0 to 255.
COLORS
This script will create an image showing all the symbolic colors.
#!/usr/bin/perl
use strict;
use GD::Simple;
my @color_names = GD::Simple->color_names;
my $cols = int(sqrt(@color_names));
my $rows = int(@color_names/$cols)+1;
my $cell_width = 100;
my $cell_height = 50;
my $legend_height = 16;
my $width = $cols * $cell_width;
my $height = $rows * $cell_height;
my $img = GD::Simple->new($width,$height);
$img->font(gdSmallFont);
for (my $c=0; $cfgcolor($color);
$img->rectangle(@topleft,@botright);
$img->moveTo($topleft[0]+2,$botright[1]+$legend_height-2);
$img->fgcolor(black);
$img->string($color);
}
}
print $img->png;
Download (0.25MB)
Added: 2007-07-23 License: Perl Artistic License Price:
825 downloads
Simple Multitrack 0.6.5
Simple Multitrack contains a set of programs that allows the simultaneous recording of an audio track. more>>
Simple Multitrack contains a set of programs that allows the simultaneous recording of an audio track while listening to a monitor mix of other tracks.
This software uses the OSS audio drivers found in the Linux kernel or the
CoreAudio API on Mac OS X. It has been tested on
Linux 2.4.20 on a Pentium III 1.4GHz with a SBLive soundcard, and
Linux 2.4.20 on a Pentium I 120MHz laptop with a Crystal soundcard.
Mac OS 10.3.3 on a PowerBook G4.
Both Linux machines are running Slackware, so please tell me about your successes or problems on other distros.
Please read the BUGS section of this document. If you have bug reports, bug fixes, questions, comments, criticism, improvements, or documentation corrections please e-mail me.
OVERVIEW:
./build
cd bin;
source shellsetup;
This will compile the programs and put them in your path.
It will also make your shell prompt shorter, so you have room.
It will also define a little function that is explained below.
to record initial track:
srp < /dev/zero > my_file
to listen to a track:
mix 2 1 1 1 my_file | srp > /dev/null
to listen to one track while recording a new track:
mix 2 1 1 1 file_1 | srp > file_2
to listen to two tracks while recording a new track:
mix 2 1 .5 .5 file_1 .5 .5 file_2 | srp > file_3
Simple Multitrack is basically two programs. They were designed to be used together, but they might be useful on their own. I will describe each program separately before discussing them together.
mix is a command line program. It mixes one or more monophonic audio files into a single output stream. The output stream can have any number of channels: mono, stereo, quad, whatever you like. The output stream is written to standard out.
The input files are specified as command line arguments, as are the gain settings for each input. Invocation goes like this (in stereo mode):
mix nocs mgain l_gain_1 r_gain_1 file_1 l_gain_2 r_gain_2 file_2 ...
where nocs is the number of output channels, and mgain is the master gain.
Command line arguments to mix after the nocs and mgain arguments are the channels. For N output channels, you will have N gain arguments and then the name of the file. Therefore, the arguments after nocs and mgain must appear in (nocs+1)-tuples.
mix will continue to pump out an endless stream of silence after the end of the input files is reached. This behavior is different from most UNIX command line programs, which exit at the end of their input data, which closes their stdout.
mix can be exited with the keyboard interrupt, ctrl-c. The input files must be 16-bit 44100 samples/sec monophonic raw signed word files. The output stream is in 16-bit 44100 samples/sec stereo raw signed word format. (Thank God, its in word format!) The program sox can be used to convert from most audio formats to and from most other audio formats.
EXAMPLES:
mix 2 1 0 1 my_file
This pans my_file completely to the right.
mix 2 1 1 1 my_file
This centers my_file.
mix 2 .5 1 0 flute 0 1 viola
This puts the flute completely to the left and viola completely to the right.
The master_gain is set to .5 to reduce the overall level of the mix by 3dB.
mix 2 .5 1 .3 flute .2 .9 viola
This is similar but gentler.
mix 2 .5 2 .6 flute .2 .9 viola
This is the same but the flute is louder.
mix 2 1 2 .6 flute .2 .9 viola .3 .3 violin
The violin is added in the center.
Note: If you get clipping errors when using mix, you can lower the mgain factor instead of adjusting all of the individual channel gains, although that works too.
srp is a command line program. It enables simultaneous recording and playback of audio using a sound card. It will only work if your sound card and its driver support full-duplex operation correctly.
srp reads a stream of stereo 16-bit 44100 samples/sec raw signed word data on standard in and plays that stream out on the soundcard. Meanwhile, it reads from the left channel of the soundcard and writes a mono 16-bit 44100 samp/sec stream on standard out.
<<lessThis software uses the OSS audio drivers found in the Linux kernel or the
CoreAudio API on Mac OS X. It has been tested on
Linux 2.4.20 on a Pentium III 1.4GHz with a SBLive soundcard, and
Linux 2.4.20 on a Pentium I 120MHz laptop with a Crystal soundcard.
Mac OS 10.3.3 on a PowerBook G4.
Both Linux machines are running Slackware, so please tell me about your successes or problems on other distros.
Please read the BUGS section of this document. If you have bug reports, bug fixes, questions, comments, criticism, improvements, or documentation corrections please e-mail me.
OVERVIEW:
./build
cd bin;
source shellsetup;
This will compile the programs and put them in your path.
It will also make your shell prompt shorter, so you have room.
It will also define a little function that is explained below.
to record initial track:
srp < /dev/zero > my_file
to listen to a track:
mix 2 1 1 1 my_file | srp > /dev/null
to listen to one track while recording a new track:
mix 2 1 1 1 file_1 | srp > file_2
to listen to two tracks while recording a new track:
mix 2 1 .5 .5 file_1 .5 .5 file_2 | srp > file_3
Simple Multitrack is basically two programs. They were designed to be used together, but they might be useful on their own. I will describe each program separately before discussing them together.
mix is a command line program. It mixes one or more monophonic audio files into a single output stream. The output stream can have any number of channels: mono, stereo, quad, whatever you like. The output stream is written to standard out.
The input files are specified as command line arguments, as are the gain settings for each input. Invocation goes like this (in stereo mode):
mix nocs mgain l_gain_1 r_gain_1 file_1 l_gain_2 r_gain_2 file_2 ...
where nocs is the number of output channels, and mgain is the master gain.
Command line arguments to mix after the nocs and mgain arguments are the channels. For N output channels, you will have N gain arguments and then the name of the file. Therefore, the arguments after nocs and mgain must appear in (nocs+1)-tuples.
mix will continue to pump out an endless stream of silence after the end of the input files is reached. This behavior is different from most UNIX command line programs, which exit at the end of their input data, which closes their stdout.
mix can be exited with the keyboard interrupt, ctrl-c. The input files must be 16-bit 44100 samples/sec monophonic raw signed word files. The output stream is in 16-bit 44100 samples/sec stereo raw signed word format. (Thank God, its in word format!) The program sox can be used to convert from most audio formats to and from most other audio formats.
EXAMPLES:
mix 2 1 0 1 my_file
This pans my_file completely to the right.
mix 2 1 1 1 my_file
This centers my_file.
mix 2 .5 1 0 flute 0 1 viola
This puts the flute completely to the left and viola completely to the right.
The master_gain is set to .5 to reduce the overall level of the mix by 3dB.
mix 2 .5 1 .3 flute .2 .9 viola
This is similar but gentler.
mix 2 .5 2 .6 flute .2 .9 viola
This is the same but the flute is louder.
mix 2 1 2 .6 flute .2 .9 viola .3 .3 violin
The violin is added in the center.
Note: If you get clipping errors when using mix, you can lower the mgain factor instead of adjusting all of the individual channel gains, although that works too.
srp is a command line program. It enables simultaneous recording and playback of audio using a sound card. It will only work if your sound card and its driver support full-duplex operation correctly.
srp reads a stream of stereo 16-bit 44100 samples/sec raw signed word data on standard in and plays that stream out on the soundcard. Meanwhile, it reads from the left channel of the soundcard and writes a mono 16-bit 44100 samp/sec stream on standard out.
Download (0.029MB)
Added: 2006-12-20 License: GPL (GNU General Public License) Price:
1040 downloads
Lustre 1.4.9
Lustre is a scalable, secure, robust, highly-available cluster file system. more>>
Lustre is a scalable, secure, robust, highly-available cluster file system. The project is designed, developed and maintained by Cluster File Systems, Inc.
The central goal is the development of a next-generation cluster file system which can serve clusters with 10,000s of nodes, petabytes of storage, move 100s of GB/sec with state of the art security and management infrastructure.
Lustre runs today on many of the largest Linux clusters in the world, and is included by CFSs partners as a core component of their cluster offering (examples include HP StorageWorks SFS, and the Cray XT3 and XD1 supercomputers). Todays users have also demonstrated that Lustre scales down as well as it scales up, and run in production on clusters as small as 4 and as large as 15,000 nodes.
Enhancements:
- The kernel patches were updated to 2.6.16.21-0.8 (SLES10), 2.6.9-42.0.3EL (RHEL 4), 2.6.5-7.276 (SLES 9), 2.4.21-47.0.1.EL (RHEL 3), and 2.6.12.6 vanilla (kernel.org).
- Zero-copy sockets were added without kernel patches. Numerous bugfixes were made.
<<lessThe central goal is the development of a next-generation cluster file system which can serve clusters with 10,000s of nodes, petabytes of storage, move 100s of GB/sec with state of the art security and management infrastructure.
Lustre runs today on many of the largest Linux clusters in the world, and is included by CFSs partners as a core component of their cluster offering (examples include HP StorageWorks SFS, and the Cray XT3 and XD1 supercomputers). Todays users have also demonstrated that Lustre scales down as well as it scales up, and run in production on clusters as small as 4 and as large as 15,000 nodes.
Enhancements:
- The kernel patches were updated to 2.6.16.21-0.8 (SLES10), 2.6.9-42.0.3EL (RHEL 4), 2.6.5-7.276 (SLES 9), 2.4.21-47.0.1.EL (RHEL 3), and 2.6.12.6 vanilla (kernel.org).
- Zero-copy sockets were added without kernel patches. Numerous bugfixes were made.
Download (MB)
Added: 2007-02-21 License: GPL (GNU General Public License) Price:
975 downloads
File::NFSLock 1.20
File::NFSLock is a Perl module to do NFS (or not) locking. more>>
File::NFSLock is a Perl module to do NFS (or not) locking.
SYNOPSIS
use File::NFSLock qw(uncache);
use Fcntl qw(LOCK_EX LOCK_NB);
my $file = "somefile";
### set up a lock - lasts until object looses scope
if (my $lock = new File::NFSLock {
file => $file,
lock_type => LOCK_EX|LOCK_NB,
blocking_timeout => 10, # 10 sec
stale_lock_timeout => 30 * 60, # 30 min
}) {
### OR
### my $lock = File::NFSLock->new($file,LOCK_EX|LOCK_NB,10,30*60);
### do write protected stuff on $file
### at this point $file is uncached from NFS (most recent)
open(FILE, "+<<less
SYNOPSIS
use File::NFSLock qw(uncache);
use Fcntl qw(LOCK_EX LOCK_NB);
my $file = "somefile";
### set up a lock - lasts until object looses scope
if (my $lock = new File::NFSLock {
file => $file,
lock_type => LOCK_EX|LOCK_NB,
blocking_timeout => 10, # 10 sec
stale_lock_timeout => 30 * 60, # 30 min
}) {
### OR
### my $lock = File::NFSLock->new($file,LOCK_EX|LOCK_NB,10,30*60);
### do write protected stuff on $file
### at this point $file is uncached from NFS (most recent)
open(FILE, "+<<less
Download (0.018MB)
Added: 2007-04-27 License: Perl Artistic License Price:
912 downloads
OpenSC 0.11.3
OpenSC consists of tools and libraries and a PKCS#11 module to use smart cards and initialize blank smart cards. more>>
OpenSC consists of tools and libraries and a PKCS#11 module to use smart cards and initialize blank smart cards.
OpenSC project supports many commercial smart cards with filesystems, many national ID cards (read only), and some Java Card cards with specific Java Card applets. OpenSC implements the PKCS#15 standard.
Cards initialized with OpenSC can be used (read-only) with other software implementing PKCS#15 standard and vice versa.
National ID Cards
Finnish ID Card FINEID
Swedish Posten eID
Estonian ID Card EstEID
Italian Infocamere
Italian Postecert
Belgian eID
Spanish Ceres
German ID Cards, eHBA, eGK
Taiwan
Smart Cards
Schlumberger/Axalto Cryptoflex
Schlumberger/Axalto Cyberflex
Gemplus GPK
EMV
Siemens CardOS M4
IBM JCOP
Micardo
Oberthur
OpenPGP
Setec Setcos
Giesecke & Devrient Starcos
TCOS based cards (NetKey E4, SignTrust, Smartkey)
USB Tokens
Aladdin eToken Pro
Eutron CryptoIdendity IT-SEC
Schlumberger/Axalto e-gate
Rainbow iKey 3000
Enhancements:
- The wiki export script was updated.
- The configure script now looks for ncurses and termcap.
- Lots of internal functions and variables were made static.
- 0 vs NULL issues were fixed in many places.
- ANSI C style (void) was fixed.
- Variable names used also as glibc functions (such as random) were fixed.
- New code was provided for deleting objects.
- A special hack was added for Firefox.
- Support for Athena APCOS cards was added.
- The piv driver now supports bigger RSA keys too.
<<lessOpenSC project supports many commercial smart cards with filesystems, many national ID cards (read only), and some Java Card cards with specific Java Card applets. OpenSC implements the PKCS#15 standard.
Cards initialized with OpenSC can be used (read-only) with other software implementing PKCS#15 standard and vice versa.
National ID Cards
Finnish ID Card FINEID
Swedish Posten eID
Estonian ID Card EstEID
Italian Infocamere
Italian Postecert
Belgian eID
Spanish Ceres
German ID Cards, eHBA, eGK
Taiwan
Smart Cards
Schlumberger/Axalto Cryptoflex
Schlumberger/Axalto Cyberflex
Gemplus GPK
EMV
Siemens CardOS M4
IBM JCOP
Micardo
Oberthur
OpenPGP
Setec Setcos
Giesecke & Devrient Starcos
TCOS based cards (NetKey E4, SignTrust, Smartkey)
USB Tokens
Aladdin eToken Pro
Eutron CryptoIdendity IT-SEC
Schlumberger/Axalto e-gate
Rainbow iKey 3000
Enhancements:
- The wiki export script was updated.
- The configure script now looks for ncurses and termcap.
- Lots of internal functions and variables were made static.
- 0 vs NULL issues were fixed in many places.
- ANSI C style (void) was fixed.
- Variable names used also as glibc functions (such as random) were fixed.
- New code was provided for deleting objects.
- A special hack was added for Firefox.
- Support for Athena APCOS cards was added.
- The piv driver now supports bigger RSA keys too.
Download (1.2MB)
Added: 2007-07-17 License: LGPL (GNU Lesser General Public License) Price:
851 downloads
TrueCrypt 4.3a
TrueCrypt is free open-source disk encryption software. more>>
TrueCrypt is free open-source disk encryption software.
Main features:
- It can create a virtual encrypted disk within a file and mount it as a real disk.
- It can encrypt an entire hard disk partition or a device, such as USB memory stick, floppy disk, etc.
- Provides two levels of plausible deniability, in case an adversary forces you to reveal the password:
- 1) Hidden volume (more information may be found here).
- 2) No TrueCrypt volume can be identified (TrueCrypt volumes cannot be distinguished from random data).
- Encryption algorithms: AES-256, Blowfish (448-bit key), CAST5, Serpent (256-bit key), Triple DES, and Twofish (256-bit key). Supports cascading (e.g., AES-Twofish-Serpent).
- Based on Encryption for the Masses (E4M) 2.02a, which was conceived in 1997.
Enhancements:
- Access rights are now elevated using sudo.
- Volumes can be dismounted only by the user who mounted it or by root.
- Support for writing data to file-hosted volumes located on devices that use a sector size other than 512 bytes (e.g. new HDD types, DVD-RAM, some flash drives) was added.
- A TrueCrypt volume is now automatically dismounted if its host device is inadvertently removed.
- The maximum allowed size of FAT32 volumes was increased to 2 TB.
- Support for big-endian platforms was improved. 64-bit block ciphers are being phased out; such volumes can still be mounted, but not created.
<<lessMain features:
- It can create a virtual encrypted disk within a file and mount it as a real disk.
- It can encrypt an entire hard disk partition or a device, such as USB memory stick, floppy disk, etc.
- Provides two levels of plausible deniability, in case an adversary forces you to reveal the password:
- 1) Hidden volume (more information may be found here).
- 2) No TrueCrypt volume can be identified (TrueCrypt volumes cannot be distinguished from random data).
- Encryption algorithms: AES-256, Blowfish (448-bit key), CAST5, Serpent (256-bit key), Triple DES, and Twofish (256-bit key). Supports cascading (e.g., AES-Twofish-Serpent).
- Based on Encryption for the Masses (E4M) 2.02a, which was conceived in 1997.
Enhancements:
- Access rights are now elevated using sudo.
- Volumes can be dismounted only by the user who mounted it or by root.
- Support for writing data to file-hosted volumes located on devices that use a sector size other than 512 bytes (e.g. new HDD types, DVD-RAM, some flash drives) was added.
- A TrueCrypt volume is now automatically dismounted if its host device is inadvertently removed.
- The maximum allowed size of FAT32 volumes was increased to 2 TB.
- Support for big-endian platforms was improved. 64-bit block ciphers are being phased out; such volumes can still be mounted, but not created.
Download (1.0MB)
Added: 2007-05-09 License: Other/Proprietary License Price:
909 downloads
Script::Toolbox 0.19
Script::Toolbox is a Perl framework for the daily business scripts. more>>
Script::Toolbox is a Perl framework for the daily business scripts.
SYNOPSIS
use Script::Toolbox qw(:all);
or
use Script::Toolbox qw(Open Log Exit Table Usage Dir File System)
$e = Script::Toolbox->new();
#
# logging
#
Log( "log message" ); # log to STDERR
Log( "log message", STDERR ); # log to STDERR
Log( "log message", STDOUT ); # log to STDOUT
Log( "log message", /tmp/x ); # log to /tmp/x
Log( "log message", new IO::File "/tmp/XXX" ); # log to /tmp/XXX
Script::Toolbox->new({logdir=>{mod=>=s,desc=>Log directory,
mand=>1,default=>/var/log}});
Log( "log message" ); # log to /var/log/ .log
Log( "log message",syslog,severity,tag ); # log via syslogd
#
# print formatted tables like:
# print join "n", @{$t};
$t = $e->Table( [ "1;2;3","44;55;66","7.77;8.88;9.99" ] );
$t = $e->Table( [ "1|2|3","44|55|66","7.77|8.88|9.99" ], |);
$t = $e->Table( [ This is the title,
[ --H1--, --H2--,--H3--],
[ 11:11:11, 33.456, cc ],
[ 12:23:00, 2222222, 3 ],
[ 11:11, 222, 3333333333333333 ]);
$t = $e->Table({ title => Hash example,
head => [Col1, Col2, Col3],
data => [[ 11:11:11, 33.456, cc ],
[ 12:23:00, 2222222, 3 ],
[ 11:11, 222, 3333333333333333 ]]});
$t = $e->Table({ title => Hash with automatic column heads (F1,F2,F3),
data =>[{F1=>aaaa,F2=>bbb,F3=>c},
{F1=>dd ,F2=>ee ,F3=>f}]});
#
# command line options
#
$tb=Script::Toolbox->new({file=>{mod=>=s,desc=>Description,
mand=>1,default=>/bin/cat}});
$file = tb->GetOpt(file); # depricated, use the following
$file = tb->{file};
$old = tb->SetOpt(newFile);
Usage(); # print a usage message for all options
# if available print also the POD
Usage(This is additional text for the usage);
#
# Directory handling
#
$arrRef = Dir(/tmp ); # all except . and ..
$arrRef = Dir(/tmp, .*patt ); # all matching patt
$arrRef = Dir(/tmp, !.*patt ); # all not matching patt
#
# File handling
#
$arrRef = File(path/to/file); # read file into array
$arrRef = File("/bin/ps |"); # read comand STDOUT into array
File( "> path/to/file", override the old content );
File( "path/to/file", append this to the file );
File( "path/to/file", $arrRef ); # append array elements
File( "path/to/file", $arrRef, $recSep ); # append array elements
File( "path/to/file", $hashRef, $recSep, $fieldSep); # append as key value lines
File( "| /bin/cat", "Hello world.n" );
$fileHandle = TmpFile(); # open new temporary file
$arrRef = TmpFile($fileHandle) # read temp whole file
#
# Miscelleanous
#
Exit( 1, "Exit message" ); # exit with returncode 1,
# write exit message via Log()
$fh = Open( "> /tmp/xx" ); # return an IO::File object with
# /tmp/xx opened for write
# die with logfile entry if failed
$fh = Open( "/bin/ps |" ); # return an IO::File object
# die with logfile entry if failed
$rc = System("/bin/ls") # execute a system command and
# report its output into the
# logfile.
$now = Now();
printf "Day:%d Mon:%d Year:%d Wday:%d Yday:%d IsDST:%d Sec:%d Min:%d Hour:%d",
$now->{mday},
$now->{mon},
$now->{year},
$now->{wday},
$now->{yday},
$now->{isdst},
$now->{sec},
$now->{min},
$now->{hour};
$now = Now("%A, %B %d, %Y"); # Monday, October 10, 2005
=head1 ABSTRACT
This module should be a "swiss army knife" for the daily tasks. The main goals are command line processing, automatic usage messages, signal catching (with logging), simple logging, simple data formatting, simple directory and file processing.
<<lessSYNOPSIS
use Script::Toolbox qw(:all);
or
use Script::Toolbox qw(Open Log Exit Table Usage Dir File System)
$e = Script::Toolbox->new();
#
# logging
#
Log( "log message" ); # log to STDERR
Log( "log message", STDERR ); # log to STDERR
Log( "log message", STDOUT ); # log to STDOUT
Log( "log message", /tmp/x ); # log to /tmp/x
Log( "log message", new IO::File "/tmp/XXX" ); # log to /tmp/XXX
Script::Toolbox->new({logdir=>{mod=>=s,desc=>Log directory,
mand=>1,default=>/var/log}});
Log( "log message" ); # log to /var/log/ .log
Log( "log message",syslog,severity,tag ); # log via syslogd
#
# print formatted tables like:
# print join "n", @{$t};
$t = $e->Table( [ "1;2;3","44;55;66","7.77;8.88;9.99" ] );
$t = $e->Table( [ "1|2|3","44|55|66","7.77|8.88|9.99" ], |);
$t = $e->Table( [ This is the title,
[ --H1--, --H2--,--H3--],
[ 11:11:11, 33.456, cc ],
[ 12:23:00, 2222222, 3 ],
[ 11:11, 222, 3333333333333333 ]);
$t = $e->Table({ title => Hash example,
head => [Col1, Col2, Col3],
data => [[ 11:11:11, 33.456, cc ],
[ 12:23:00, 2222222, 3 ],
[ 11:11, 222, 3333333333333333 ]]});
$t = $e->Table({ title => Hash with automatic column heads (F1,F2,F3),
data =>[{F1=>aaaa,F2=>bbb,F3=>c},
{F1=>dd ,F2=>ee ,F3=>f}]});
#
# command line options
#
$tb=Script::Toolbox->new({file=>{mod=>=s,desc=>Description,
mand=>1,default=>/bin/cat}});
$file = tb->GetOpt(file); # depricated, use the following
$file = tb->{file};
$old = tb->SetOpt(newFile);
Usage(); # print a usage message for all options
# if available print also the POD
Usage(This is additional text for the usage);
#
# Directory handling
#
$arrRef = Dir(/tmp ); # all except . and ..
$arrRef = Dir(/tmp, .*patt ); # all matching patt
$arrRef = Dir(/tmp, !.*patt ); # all not matching patt
#
# File handling
#
$arrRef = File(path/to/file); # read file into array
$arrRef = File("/bin/ps |"); # read comand STDOUT into array
File( "> path/to/file", override the old content );
File( "path/to/file", append this to the file );
File( "path/to/file", $arrRef ); # append array elements
File( "path/to/file", $arrRef, $recSep ); # append array elements
File( "path/to/file", $hashRef, $recSep, $fieldSep); # append as key value lines
File( "| /bin/cat", "Hello world.n" );
$fileHandle = TmpFile(); # open new temporary file
$arrRef = TmpFile($fileHandle) # read temp whole file
#
# Miscelleanous
#
Exit( 1, "Exit message" ); # exit with returncode 1,
# write exit message via Log()
$fh = Open( "> /tmp/xx" ); # return an IO::File object with
# /tmp/xx opened for write
# die with logfile entry if failed
$fh = Open( "/bin/ps |" ); # return an IO::File object
# die with logfile entry if failed
$rc = System("/bin/ls") # execute a system command and
# report its output into the
# logfile.
$now = Now();
printf "Day:%d Mon:%d Year:%d Wday:%d Yday:%d IsDST:%d Sec:%d Min:%d Hour:%d",
$now->{mday},
$now->{mon},
$now->{year},
$now->{wday},
$now->{yday},
$now->{isdst},
$now->{sec},
$now->{min},
$now->{hour};
$now = Now("%A, %B %d, %Y"); # Monday, October 10, 2005
=head1 ABSTRACT
This module should be a "swiss army knife" for the daily tasks. The main goals are command line processing, automatic usage messages, signal catching (with logging), simple logging, simple data formatting, simple directory and file processing.
Download (0.018MB)
Added: 2007-04-11 License: Perl Artistic License Price:
927 downloads
Throughput 0.1
Throughput monitor is a log analyzer. more>>
Throughput monitor is a log analyzer. In general notation it is a event counter per timeframe - in short frquency monitor. If it detects too high event rate, utility notifies about it. If rate drops below predefined value, also notify with statistics gathered meanwhile. It can analyze past logs or realtime logs.
Throughput monitor can analyze every single-line log (1 event per line). Good examples are of this kind of log producers are syslog and apache. Log lines are filtered through regex. Log can contain random crap, except on line we are interested in. Usually most of log is useless. The interesting lines must be somewhat consistent and regex must be able to detect:
timestamp in format: Day Mon dd hh:mm:ss yyyy
observerion object like username or hostname, etc
Output can be only hwm or lwm line. If amount of events per timeframe rises above hwm, then hwm line is generated. The format of hwm line is following:
Day Mon dd hh:mm:ss yyyy hwm obj
Day Mon dd hh:mm:ss yyyy - timestamp
hwm - fixed string
obj - can be username or hostname or whatever users regex matches as observation object
Similarly lwm line is generated when rate drops below lwm. Also additional statistics is included. The format of lwm line is following:
Day Mon dd hh:mm:ss yyyy lwm obj max=zz count=xx duration=sec/hh:mm:ss interval=hh:mm:ss
Day Mon dd hh:mm:ss yyyy - timestamp
lwm - fixed string
obj - can be username or hostname or whatever users regex matches as observation object
max=zz - the peak amount (zz) of event in timeframe
count=xx - count of events while rate is over hwm. May be smaller than max. Because when rate crosses hwm line, count is initalized to 1, but max at the same moment is hwm.
duration=sec/hh:mm:ss - how long object were in hwm state. Duration is given in both forms: seconds for automation and hhmmss for humans.
interval=hh:mm:ss - average delay between events. Equals to duration/count.
One may ask, why do i need lwm output when detecting spam? Because statistics included gives feedback about parameters to tune and also we get quick info about incident.
Know that the utility may complain about timetravel when log is not linear. In the other words, every next matched log entry must have timestamp, which is greater or equal then previous one of the same object. Unfortunately this is too common problem with logs in general.
<<lessThroughput monitor can analyze every single-line log (1 event per line). Good examples are of this kind of log producers are syslog and apache. Log lines are filtered through regex. Log can contain random crap, except on line we are interested in. Usually most of log is useless. The interesting lines must be somewhat consistent and regex must be able to detect:
timestamp in format: Day Mon dd hh:mm:ss yyyy
observerion object like username or hostname, etc
Output can be only hwm or lwm line. If amount of events per timeframe rises above hwm, then hwm line is generated. The format of hwm line is following:
Day Mon dd hh:mm:ss yyyy hwm obj
Day Mon dd hh:mm:ss yyyy - timestamp
hwm - fixed string
obj - can be username or hostname or whatever users regex matches as observation object
Similarly lwm line is generated when rate drops below lwm. Also additional statistics is included. The format of lwm line is following:
Day Mon dd hh:mm:ss yyyy lwm obj max=zz count=xx duration=sec/hh:mm:ss interval=hh:mm:ss
Day Mon dd hh:mm:ss yyyy - timestamp
lwm - fixed string
obj - can be username or hostname or whatever users regex matches as observation object
max=zz - the peak amount (zz) of event in timeframe
count=xx - count of events while rate is over hwm. May be smaller than max. Because when rate crosses hwm line, count is initalized to 1, but max at the same moment is hwm.
duration=sec/hh:mm:ss - how long object were in hwm state. Duration is given in both forms: seconds for automation and hhmmss for humans.
interval=hh:mm:ss - average delay between events. Equals to duration/count.
One may ask, why do i need lwm output when detecting spam? Because statistics included gives feedback about parameters to tune and also we get quick info about incident.
Know that the utility may complain about timetravel when log is not linear. In the other words, every next matched log entry must have timestamp, which is greater or equal then previous one of the same object. Unfortunately this is too common problem with logs in general.
Download (0.012MB)
Added: 2006-07-08 License: GPL (GNU General Public License) Price:
1209 downloads
Hash::Type 1.05
Hash::Type module contains pseudo-hashes as arrays tied to a type (list of fields). more>>
Hash::Type module contains pseudo-hashes as arrays tied to a "type" (list of fields).
SYNOPSIS
use Hash::Type;
# create a Hash::Type
my $personType = new Hash::Type(qw(firstname lastname city));
# create and populate some hashes tied to $personType
tie %wolfgang, $personType, "wolfgang amadeus", "mozart", "salzburg";
$ludwig = new $personType ("ludwig", "van beethoven", "vienna");
$jsb = new $personType;
$jsb->{city} = "leipzig";
@{$jsb}{qw(firstname lastname)} = ("johann sebastian", "bach");
# add fields dynamically
$personType->add("birth", "death") or die "fields not added";
$wolfgang{birth} = 1750;
# More complete example : read a flat file with headers on first line
my ($headerline, @datalines) = map {chomp; $_} ;
my $ht = new Hash::Type(split /t/, $headerline);
foreach my $line (@datalines) {
my $data = new $ht(split /t/, $line);
work_with($data->{someField}, $data->{someOtherField});
}
# an alternative to Time::gmtime and Time::localtime
my $timeType = new Hash::Type qw(sec min hour mday mon year wday yday);
my $localtime = new $timeType (localtime);
my $gmtime = new $timeType (gmtime);
print $localtime->{hour} - $gmtime->{hour}, " hours difference to GMT";
# comparison functions
my $byAge = $personType->cmp("birth : -num, lastname, firstname");
my $byNameLength = $personType->cmp(lastname => {length($b) length($a)},
lastname => alpha,
firstname => alpha);
showPerson($_) foreach (sort $byAge @people);
showPerson($_) foreach (sort $byNameLength @people);
# special comparisons : dates
my $US_DateCmp = $myHashType->cmp("someDateField : m/d/y");
my $FR_InverseDateCmp = $myHashType->cmp("someDateField : -d.m.y");
<<lessSYNOPSIS
use Hash::Type;
# create a Hash::Type
my $personType = new Hash::Type(qw(firstname lastname city));
# create and populate some hashes tied to $personType
tie %wolfgang, $personType, "wolfgang amadeus", "mozart", "salzburg";
$ludwig = new $personType ("ludwig", "van beethoven", "vienna");
$jsb = new $personType;
$jsb->{city} = "leipzig";
@{$jsb}{qw(firstname lastname)} = ("johann sebastian", "bach");
# add fields dynamically
$personType->add("birth", "death") or die "fields not added";
$wolfgang{birth} = 1750;
# More complete example : read a flat file with headers on first line
my ($headerline, @datalines) = map {chomp; $_} ;
my $ht = new Hash::Type(split /t/, $headerline);
foreach my $line (@datalines) {
my $data = new $ht(split /t/, $line);
work_with($data->{someField}, $data->{someOtherField});
}
# an alternative to Time::gmtime and Time::localtime
my $timeType = new Hash::Type qw(sec min hour mday mon year wday yday);
my $localtime = new $timeType (localtime);
my $gmtime = new $timeType (gmtime);
print $localtime->{hour} - $gmtime->{hour}, " hours difference to GMT";
# comparison functions
my $byAge = $personType->cmp("birth : -num, lastname, firstname");
my $byNameLength = $personType->cmp(lastname => {length($b) length($a)},
lastname => alpha,
firstname => alpha);
showPerson($_) foreach (sort $byAge @people);
showPerson($_) foreach (sort $byNameLength @people);
# special comparisons : dates
my $US_DateCmp = $myHashType->cmp("someDateField : m/d/y");
my $FR_InverseDateCmp = $myHashType->cmp("someDateField : -d.m.y");
Download (0.008MB)
Added: 2007-08-06 License: Perl Artistic License Price:
813 downloads
Areca 5.3
Areca is an Open Source file backup software developped in Java. more>>
Areca is an Open Source file backup software developped in Java.
Main features:
- Archives Compression (Zip format)
- Archives Encryption (Triple DES encryption algorithm)
- Source file filters (by extension, subdirectory or regular expression)
- Incremental / Full backup support
- Archives content explorer
- Archive description : A manifest is associated to each archive, which contains various informations such as author, title, date, description, and some technical data.
- File history explorer : Areca keeps track of your files history (creation / modifications / deletion) over your archives.
- Backup simulation : useful to check wether a backup is necessary
- Archives merges / deletion : You can merge contiguous archives in one single archive or safely delete your latest archives.
- As of date recovery : Areca allows you to recover your archives (or single files) as of a specific date.
- Transaction mechanism : All critical processes (such as backups or merges) support a transaction mechanism (with commit / rollback management) which guarantees your backups integrity.
- Users actions history : Areca keeps an history of all users actions (archives deletion, merges, backups, recoveries).
- Archives indicators : Areca computes a lot of indicators for you, which will help you in the everyday management of your archives.
<<lessMain features:
- Archives Compression (Zip format)
- Archives Encryption (Triple DES encryption algorithm)
- Source file filters (by extension, subdirectory or regular expression)
- Incremental / Full backup support
- Archives content explorer
- Archive description : A manifest is associated to each archive, which contains various informations such as author, title, date, description, and some technical data.
- File history explorer : Areca keeps track of your files history (creation / modifications / deletion) over your archives.
- Backup simulation : useful to check wether a backup is necessary
- Archives merges / deletion : You can merge contiguous archives in one single archive or safely delete your latest archives.
- As of date recovery : Areca allows you to recover your archives (or single files) as of a specific date.
- Transaction mechanism : All critical processes (such as backups or merges) support a transaction mechanism (with commit / rollback management) which guarantees your backups integrity.
- Users actions history : Areca keeps an history of all users actions (archives deletion, merges, backups, recoveries).
- Archives indicators : Areca computes a lot of indicators for you, which will help you in the everyday management of your archives.
Download (3.7MB)
Added: 2007-08-16 License: GPL (GNU General Public License) Price:
800 downloads
Date::Manip 5.44
Date::Manip is a date manipulation routines. more>>
Date::Manip is a date manipulation routines.
SYNOPSIS
use Date::Manip;
$version = DateManipVersion;
$date = ParseDate(@args);
$date = ParseDate($string);
$date = ParseDate($string);
@date = UnixDate($date,@format);
$date = UnixDate($date,@format);
$delta = ParseDateDelta(@args);
$delta = ParseDateDelta($string);
$delta = ParseDateDelta($string);
@str = Delta_Format($delta,$dec,@format);
$str = Delta_Format($delta,$dec,@format);
$recur = ParseRecur($string,$base,$date0,$date1,$flags);
@dates = ParseRecur($string,$base,$date0,$date1,$flags);
$flag = Date_Cmp($date1,$date2);
$d = DateCalc($d1,$d2 [,$errref] [,$del]);
$date = Date_SetTime($date,$hr,$min,$sec);
$date = Date_SetTime($date,$time);
$date = Date_SetDateField($date,$field,$val [,$nocheck]);
$date = Date_GetPrev($date,$dow,$today,$hr,$min,$sec);
$date = Date_GetPrev($date,$dow,$today,$time);
$date = Date_GetNext($date,$dow,$today,$hr,$min,$sec);
$date = Date_GetNext($date,$dow,$today,$time);
$name = Date_IsHoliday($date);
$listref = Events_List($date);
$listref = Events_List($date0,$date1);
$date = Date_ConvTZ($date);
$date = Date_ConvTZ($date,$from);
$date = Date_ConvTZ($date,"",$to);
$date = Date_ConvTZ($date,$from,$to);
$flag = Date_IsWorkDay($date [,$flag]);
$date = Date_NextWorkDay($date,$off [,$time]);
$date = Date_PrevWorkDay($date,$off [,$time]);
$date = Date_NearestWorkDay($date [,$tomorrowfirst]);
&Date_Init();
&Date_Init("VAR=VAL","VAR=VAL",...);
@list = Date_Init();
@list = Date_Init("VAR=VAL","VAR=VAL",...);
The above routines all check to make sure that Date_Init is called. If it hasnt been, they will call it automatically. As a result, there is usually no need to call Date_Init explicitely unless you want to change some of the config variables (described below). They also do error checking on the input.
The routines listed below are intended primarily for internal use by other Date::Manip routines. They do little or no error checking, and do not explicitely call Date_Init. Those functions are all done in the main Date::Manip routines above.
Because they are significantly faster than the full Date::Manip routines, they are available for use with a few caveats. Since little or no error checking is done, it is the responsibility of the programmer to ensure that valid data (AND valid dates) are passed to them. Passing invalid data (such as a non-numeric month) or invalid dates (Feb 31) will fail in unpredictable ways (possibly returning erroneous results). Also, since Date_Init is not called by these, it must be called explicitely by the programmer before using these routines.
In the following routines, $y may be entered as either a 2 or 4 digit year (it will be converted to a 4 digit year based on the variable YYtoYYYY described below). Month and day should be numeric in all cases. Most (if not all) of the information below can be gotten from UnixDate which is really the way I intended it to be gotten, but there are reasons to use these (these are significantly faster).
$day = Date_DayOfWeek($m,$d,$y);
$secs = Date_SecsSince1970($m,$d,$y,$h,$mn,$s);
$secs = Date_SecsSince1970GMT($m,$d,$y,$h,$mn,$s);
$days = Date_DaysSince1BC($m,$d,$y);
$day = Date_DayOfYear($m,$d,$y);
($y,$m,$d,$h,$mn,$s) = Date_NthDayOfYear($y,$n);
$days = Date_DaysInYear($y);
$days = Date_DaysInMonth($m,$y);
$wkno = Date_WeekOfYear($m,$d,$y,$first);
$flag = Date_LeapYear($y);
$day = Date_DaySuffix($d);
$tz = Date_TimeZone();
<<lessSYNOPSIS
use Date::Manip;
$version = DateManipVersion;
$date = ParseDate(@args);
$date = ParseDate($string);
$date = ParseDate($string);
@date = UnixDate($date,@format);
$date = UnixDate($date,@format);
$delta = ParseDateDelta(@args);
$delta = ParseDateDelta($string);
$delta = ParseDateDelta($string);
@str = Delta_Format($delta,$dec,@format);
$str = Delta_Format($delta,$dec,@format);
$recur = ParseRecur($string,$base,$date0,$date1,$flags);
@dates = ParseRecur($string,$base,$date0,$date1,$flags);
$flag = Date_Cmp($date1,$date2);
$d = DateCalc($d1,$d2 [,$errref] [,$del]);
$date = Date_SetTime($date,$hr,$min,$sec);
$date = Date_SetTime($date,$time);
$date = Date_SetDateField($date,$field,$val [,$nocheck]);
$date = Date_GetPrev($date,$dow,$today,$hr,$min,$sec);
$date = Date_GetPrev($date,$dow,$today,$time);
$date = Date_GetNext($date,$dow,$today,$hr,$min,$sec);
$date = Date_GetNext($date,$dow,$today,$time);
$name = Date_IsHoliday($date);
$listref = Events_List($date);
$listref = Events_List($date0,$date1);
$date = Date_ConvTZ($date);
$date = Date_ConvTZ($date,$from);
$date = Date_ConvTZ($date,"",$to);
$date = Date_ConvTZ($date,$from,$to);
$flag = Date_IsWorkDay($date [,$flag]);
$date = Date_NextWorkDay($date,$off [,$time]);
$date = Date_PrevWorkDay($date,$off [,$time]);
$date = Date_NearestWorkDay($date [,$tomorrowfirst]);
&Date_Init();
&Date_Init("VAR=VAL","VAR=VAL",...);
@list = Date_Init();
@list = Date_Init("VAR=VAL","VAR=VAL",...);
The above routines all check to make sure that Date_Init is called. If it hasnt been, they will call it automatically. As a result, there is usually no need to call Date_Init explicitely unless you want to change some of the config variables (described below). They also do error checking on the input.
The routines listed below are intended primarily for internal use by other Date::Manip routines. They do little or no error checking, and do not explicitely call Date_Init. Those functions are all done in the main Date::Manip routines above.
Because they are significantly faster than the full Date::Manip routines, they are available for use with a few caveats. Since little or no error checking is done, it is the responsibility of the programmer to ensure that valid data (AND valid dates) are passed to them. Passing invalid data (such as a non-numeric month) or invalid dates (Feb 31) will fail in unpredictable ways (possibly returning erroneous results). Also, since Date_Init is not called by these, it must be called explicitely by the programmer before using these routines.
In the following routines, $y may be entered as either a 2 or 4 digit year (it will be converted to a 4 digit year based on the variable YYtoYYYY described below). Month and day should be numeric in all cases. Most (if not all) of the information below can be gotten from UnixDate which is really the way I intended it to be gotten, but there are reasons to use these (these are significantly faster).
$day = Date_DayOfWeek($m,$d,$y);
$secs = Date_SecsSince1970($m,$d,$y,$h,$mn,$s);
$secs = Date_SecsSince1970GMT($m,$d,$y,$h,$mn,$s);
$days = Date_DaysSince1BC($m,$d,$y);
$day = Date_DayOfYear($m,$d,$y);
($y,$m,$d,$h,$mn,$s) = Date_NthDayOfYear($y,$n);
$days = Date_DaysInYear($y);
$days = Date_DaysInMonth($m,$y);
$wkno = Date_WeekOfYear($m,$d,$y,$first);
$flag = Date_LeapYear($y);
$day = Date_DaySuffix($d);
$tz = Date_TimeZone();
Download (0.14MB)
Added: 2006-06-14 License: Perl Artistic License Price:
1240 downloads
Xtemp 0.85
Xtemp shows temperatures of 3 sensors in your motherboard. more>>
Xtemp is a SuperKaramba theme that shows temperatures of 3 sensors in your motherboard.
This theme is configured for MSI k7n2 (Nforce2), if your motherboard is not Nforce2 edit the theme files and change the sensors.
**Remember**
**This theme needs lm_sensors installed and correctly configured.
**Install the fonts they are in Xtemp/fonts .
Wait 4 sec after open to full reload
The style is based in aSensors http://kde-look.org/content/show.php?content=15756
The background of thermometer is based in acpimon http://kde-look.org/content/show.php?content=9059
<<lessThis theme is configured for MSI k7n2 (Nforce2), if your motherboard is not Nforce2 edit the theme files and change the sensors.
**Remember**
**This theme needs lm_sensors installed and correctly configured.
**Install the fonts they are in Xtemp/fonts .
Wait 4 sec after open to full reload
The style is based in aSensors http://kde-look.org/content/show.php?content=15756
The background of thermometer is based in acpimon http://kde-look.org/content/show.php?content=9059
Download (0.053MB)
Added: 2006-07-11 License: GPL (GNU General Public License) Price:
1201 downloads
TFTP 1.0b3
TFTP is a TFTP Client class. more>>
TFTP is a TFTP Client class.
SYNOPSIS
use TFTP;
$tftp = new TFTP("some.host.name");
$tftp->get("that.file");
$tftp->octet;
$tftp->put("this.file");
$tftp->quit;
TFTP is a class implementing a simple TFTP client in Perl as described in RFC783.
OVERVIEW
TFTP stands for Trivial File Transfer Protocol.
CONSTRUCTOR
new (HOST [,OPTIONS])
This is the constructor for a new TFTP object. HOST is the name of the remote host to which a TFTP connection is required.
OPTIONS are passed in a hash like fashion, using key and value pairs. Possible options are:
Port - The port number to connect to on the remote machine for the TFTP connection
Mode - Set the transfer mode [NETASCII, OCTET] (defaults to NETASCII)
Timeout - Set the timeout value before retry (defaults to 2 sec)
MaxTimeout - Set the maximum timeout value before retry (defaults to 8 sec)
Retries - Set the number of retries (defaults to 3 with arithmetic backoff)
METHODS
mode (TYPE)
This method will set the mode to be used with the remote TFTP server to specify the type of data transfer. The return value is the previous value.
netascii, ascii, octet, binary
Synonyms for mode with the first argument set accordingly
get ( REMOTE_FILE [, LOCAL_FILE ] )
Get REMOTE_FILE from the server and store locally. LOCAL_FILE may be a filename or a filehandle. If not specified the the file will be stored in the current directory with the same leafname as the remote file.
Returns LOCAL_FILE, or the generated local file name if LOCAL_FILE is not given.
put ( LOCAL_FILE [, REMOTE_FILE ] )
Put a file on the remote server. LOCAL_FILE may be a name or a filehandle. If LOCAL_FILE is a filehandle then REMOTE_FILE must be specified. If REMOTE_FILE is not specified then the file will be stored in the current directory with the same leafname as LOCAL_FILE.
Returns REMOTE_FILE, or the generated remote filename if REMOTE_FILE is not given.
quit
Close the current socket and release any resources. A more complete way to release resources is to call undef $tftp; on the session object.
<<lessSYNOPSIS
use TFTP;
$tftp = new TFTP("some.host.name");
$tftp->get("that.file");
$tftp->octet;
$tftp->put("this.file");
$tftp->quit;
TFTP is a class implementing a simple TFTP client in Perl as described in RFC783.
OVERVIEW
TFTP stands for Trivial File Transfer Protocol.
CONSTRUCTOR
new (HOST [,OPTIONS])
This is the constructor for a new TFTP object. HOST is the name of the remote host to which a TFTP connection is required.
OPTIONS are passed in a hash like fashion, using key and value pairs. Possible options are:
Port - The port number to connect to on the remote machine for the TFTP connection
Mode - Set the transfer mode [NETASCII, OCTET] (defaults to NETASCII)
Timeout - Set the timeout value before retry (defaults to 2 sec)
MaxTimeout - Set the maximum timeout value before retry (defaults to 8 sec)
Retries - Set the number of retries (defaults to 3 with arithmetic backoff)
METHODS
mode (TYPE)
This method will set the mode to be used with the remote TFTP server to specify the type of data transfer. The return value is the previous value.
netascii, ascii, octet, binary
Synonyms for mode with the first argument set accordingly
get ( REMOTE_FILE [, LOCAL_FILE ] )
Get REMOTE_FILE from the server and store locally. LOCAL_FILE may be a filename or a filehandle. If not specified the the file will be stored in the current directory with the same leafname as the remote file.
Returns LOCAL_FILE, or the generated local file name if LOCAL_FILE is not given.
put ( LOCAL_FILE [, REMOTE_FILE ] )
Put a file on the remote server. LOCAL_FILE may be a name or a filehandle. If LOCAL_FILE is a filehandle then REMOTE_FILE must be specified. If REMOTE_FILE is not specified then the file will be stored in the current directory with the same leafname as LOCAL_FILE.
Returns REMOTE_FILE, or the generated remote filename if REMOTE_FILE is not given.
quit
Close the current socket and release any resources. A more complete way to release resources is to call undef $tftp; on the session object.
Download (0.005MB)
Added: 2007-05-10 License: Perl Artistic License Price:
897 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 triple sec 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