0.166 inches
FZoom 1.0.1
FZoom is a fancy zoom. more>>
I was surfing the net on my machine at home (equipped with a 14 inch monitor) and some of the icons were just too small to be interpreted into something recognizable by my strained eyes and thus FancyZoom was born.
dimnum 1.16
dimnum is a C++ template library for dimensional numbers. more>>
The dimnum C++ library provides templated classes for storage of dimensional numbers, like lengths, masses, and so on. The classes are templated over the storage data type, and the base unit.
Output as well as input (with automatic recognition of the base unit) through standard C++ streams is supported. The dimension information is handled completely at compile time, so no additional memory is required for storage.
In both dimnum and SIunits, numbers are represented in a given base (ie. you can for instance declare a length object which is expressed in meters). In SIunits this base unit ("one meter") is fixed at compile time (ie. all values are represented in meters), while in dimnum it is a template parameter. In dimnum you can have (in one program) both values expressed in the SI basis and in, for instance, the British foot/inch/... basis, while in SIunits you have to make a choice.
Dimnum uses a different treatment of models in which dimensions merge (for instance the high energy physics model, in which the speed of light and Plancks constant are put equal to one). In dimnum models can be mixed, in SIunits you have to choose one.
Treatment of I/O differs (dimnums method uses more static data where SIunits uses dynamical switches); a bit hard to explain in one or two lines.
Dimnums actual code (i.e. excluding the constant lists and the dimensionful number declarations) is also a bit smaller.
KXStitch 0.8
KXStitch can be used to create cross stitch patterns. more>>
KXStitch will be developed for Linux using KDE/QT.
Main features:
- Creation of new patterns
- User defined size
- Selection of material type
- Selection of material colour
- Importing of various picture formats
- Importing images from a scanner
- Importing options will allow
- Limiting colours to a specific palette
- Limiting the number of colours
- Setting of the finished size
- Cropping of the image
- Support for transparancy in images
- Use of an image background for tracing
- Editing of existing patterns
- Editing tools will include
- Open and filled recangles
- Open and filled ellipses
- Filled polylines
- Lines
- Erasing stitches and backstitches
- Colour selection from existing stitch
- Swap colours
- Replace colour
- Cut, copy and paste of rectangular regions
- Stitch type and colour masks can be used to limit the selection
- Undo, Redo
- Mirroring
- Rotation
- Scaling
- Resizing of the canvas
- Extending canvas left, top, right, bottom
- Cropping canvas to the pattern
- Cropping canvas to selection
- Inserting rows and columns
- Centering current pattern on the canvas
- Conversion between floss schemes
- Display scales in Stitches,CM and inches
- Use of various floss palettes, DMC, Anchor, Madeira
- Creation of custom palettes
- Creation of new colours
- Use of standard stitches
- Creation of custom stitches
- Free use of backstitching
- Printing of patterns and floss keys
- (implemented, but needs to be enhanced)
- Mapping of symbols to flosses
- Calibration of floss colours
- Adding notes to patterns
- Full previews with layout tools
- Pattern library
Enhancements:
- Added a new palette manager to replace add floss and remove flosses dialogs
- New palette manager allows allocation of strands for stitches and backstitches
- New palette manager allows allocation of symbols for flosses
- Import / Export of library patterns
- Undo / Redo partially implemented
- Faster rendering speed
- Mouse tracking display in the status bar
- Selection tool and drawing tools scroll the editor screen
- Bug fix for using background images not on the local file system
- Bug fix for filenames used on the command line
- Bug fix page page wrapping
GNU barcode 0.98 Beta
GNU Barcode is a tool to convert text strings to printed bars. more>>
Main features:
- Available as both a library and an executable program
- Supports UPC, EAN, ISBN, CODE39 and other encoding standards
- Postscript and Encapsulated Postscript output
- Accepts sizes and positions as inches, centimeters, millimeters
- Can create tables of barcodes (to print labels on sticker pages)
Math::NumberCruncher 5.00
Math::NumberCruncher Perl module contains a collection of useful math-related functions. more>>
SYNOPSIS
It should be noted that as of v4.0, there is now an OO interface to Math::NumberCruncher. For backwards compatibility, however, the previous, functional style will always be supported.
# OO Style
use Math::NumberCruncher;
$ref = Math::NumberCruncher->new();
# From this point on, all of the subroutines shown below will be available # through $ref (i.e., ( $high,$low ) = $ref->Range( @array )). For the sake # of brevity, consult the functional documentation (below) for the use # of specific functions.
# Functional Style
use Math::NumberCruncher;
($high, $low) = Math::NumberCruncher::Range(@array);
$mean = Math::NumberCruncher::Mean(@array);
$median = Math::NumberCruncher::Median(@array [, $decimal_places]);
$odd_median = Math::NumberCruncher::OddMedian(@array);
$mode = Math::NumberCruncher::Mode(@array);
$covariance = Math::NumberCruncher::Covariance(@array1, @array2);
$correlation = Math::NumberCruncher::Correlation(@array1, @array2);
($slope, $y_intercept) = Math::NumberCruncher::BestFit(@array1, @array2 [, $decimal_places]);
$distance = Math::NumberCruncher::Distance($x1,$y1,$z1,$x2,$y2,$z2 [, $decimal_places]);
$distance = Math::NumberCruncher::Distance($x1,$y1,$x1,$x2 [, $decimal_places]);
$distance = Math::NumberCruncher::ManhattanDistance($x1,$y1,$x2,$y2);
$probAll = Math::NumberCruncher::AllOf(0.3,0.25,0.91,0.002);
$probNone = Math::NumberCruncher::NoneOf(0.4,0.5772,0.212);
$probSome = Math::NumberCruncher::SomeOf(0.11,0.56,0.3275);
$factorial = Math::NumberCruncher::Factorial($some_number);
$permutations = Math::NumberCruncher::Permutation($n);
$permutations = Math::NumberCruncher::Permutation($n,$k);
$roll = Math::NumberCruncher::Dice(3,12,4);
$randInt = Math::NumberCruncher::RandInt(10,50);
$randomElement = Math::NumberCruncher::RandomElement(@array);
Math::NumberCruncher::ShuffleArray(@array);
@unique = Math::NumberCruncher::Unique(@array);
@a_only = Math::NumberCruncher::Compare(@a,@b);
@union = Math::NumberCruncher::Union(@a,@b);
@intersection = Math::NumberCruncher::Intersection(@a,@b);
@difference = Math::NumberCruncher::Difference(@a,@b);
$gaussianRand = Math::NumberCruncher::GaussianRand();
$ways = Math::NumberCruncher::Choose($n,$k);
$binomial = Math::NumberCruncher::Binomial($attempts,$successes,$probability);
$gaussianDist = Math::NumberCruncher::GaussianDist($x,$mean,$variance);
$StdDev = Math::NumberCruncher::StandardDeviation(@array [, $decimal_places]);
$variance = Math::NumberCruncher::Variance(@array [, $decimal_places]);
@scores = Math::NumberCruncher::StandardScores(@array [, $decimal_places]);
$confidence = Math::NumberCruncher::SignSignificance($trials,$hits,$probability);
$e = Math::Numbercruncher::EMC2( "m512", "miles" [, $decimal_places] );
$m = Math::NumberCruncher::EMC2( "e987432" "km" [, $decimal_places] );
$force = Math::NumberCruncher::FMA( "m12", "a73.5" [, $decimal_places] );
$mass = Math::NumberCruncher::FMA( "a43", "f1324" [, $decimal_places] );
$acceleration = Math::NumberCruncher::FMA( "f53512", "m356" [, $decimal_places] );
$predicted_value = Math::NubmerCruncher::Predict( $slope, $y_intercept, $proposed_x [, $decimal_places] );
$area = Math::NumberCruncher::TriangleHeron( $a, $b, $c [, $decimal_places] );
$area = Math::NumberCruncher::TriangleHeron( 1,3, 5,7, 8,2 [, $decimal_places] );
$perimeter = Math::NumberCruncher::PolygonPerimeter( $x0,$y0, $x1,$y1, $x2,$y2, ... [, p$decimal_places]);
$direction = Math::NumberCruncher::Clockwise( $x0,$y0, $x1,$y1, $x2,$y2 );
$collision = Math::NumberCruncher::InPolygon( $x, $y, @xy );
@points = Math::NumberCruncher::BoundingBox_Points( $d, @p );
$in_triangle = Math::NumberCruncher::InTriangle( $x,$y, $x0,$y0, $x1,$y1, $x2,$y2 );
$area = Math::NumberCruncher::PolygonArea( 0, 1, 1, 0, 2, 0, 3, 2, 2, 3 [, p$decimal_places] );
$area = Math::NumberCruncher::CircleArea( $diameter [, $decimal_places] );
$circumference = Math::NumberCruncher::Circumference( $diameter [, $decimal_places] );
$volume = Math::NumberCruncher::SphereVolume( $radius [, $decimal_places] );
$surface_area = Math::NumberCruncher::SphereSurface( $radius [, $decimal_places] );
$years = Math::NumberCruncher::RuleOf72( $interest_rate [, $decimal_places] );
$volume = Math::NumberCruncher::CylinderVolume( $radius, $height [, $decimal_places] );
$volume = Math::NumberCruncher::ConeVolume( $lowerBaseArea, $height [, $decimal_places] );
$radians = Math::NumberCruncher::deg2rad( $degrees [, $decimal_places] );
$degrees = Math::NumberCruncher::rad2deg( $radians [, $decimal_places] );
$Fahrenheit = Math::NumberCruncher::C2F( $Celsius [, $decimal_places] );
$Celsius = Math::NumberCruncher::F2C( $Fahrenheit [, $decimal_places] );
$cm = Math::NumberCruncher::in2cm( $inches [, $decimal_places] );
$inches = Math::NumberCruncher::cm2in( $cm [, $decimal_places] );
$ft = Math::NumberCruncher::m2ft( $m [, $decimal_places] );
$m = Math::NumberCruncher::ft2m( $ft [, $decimal_places] );
$miles = Math::NumberCruncher::km2miles( $km [, $decimal_places] );
$km = Math::NumberCruncher::miles2km( $miles [, $decimal_places] );
$lb = Math::NumberCruncher::kg2lb( $kg [, $decimal_places] );
$kg = Math::NumberCruncher::lb2kg( $lb [, $decimal_places] );
$RelativeStride = Math::NumberCruncher::RelativeStride( $stride_length, $leg_length [, $decimal_places] );
$RelativeStride = Math::NumberCruncher::RelativeStride_2( $DimensionlessSpeed [, $decimal_places] );
$DimensionlessSpeed = Math::NumberCruncher::DimensionlessSpeed( $RelativeStride [, $decimal_places] );
$DimensionlessSpeed = Math::NumberCruncher::DimensionlessSpeed_2( $ActualSpeed, $leg_length [, $decimal_places]);
$ActualSpeed = Math::NumberCruncher::ActualSpeed( $leg_length, $DimensionlessSpeed [, $decimal_places] );
$eccentricity = Math::NumberCruncher::Eccentricity( $half_major_axis, $half_minor_axis [, $decimal_places] );
$LatusRectum = Math::NumberCruncher::LatusRectum( $half_major_axis, $half_minor_axis [, $decimal_places] );
$EllipseArea = Math::NumberCruncher::EllipseArea( $half_major_axis, $half_minor_axis [, $decimal_places] );
$OrbitalVelocity = Math::NumberCruncher::OrbitalVelocity( $r, $a, $M [, $decimal_places] );
$sine = Math::NumberCruncher::sin( $x [, $decimal_places] );
$cosine = Math::NumberCruncher::cos( $x [, $decimal_places] );
$tangent = Math::NumberCruncher::tan( $x [, $decimal_places] );
$arcsin = Math::NumberCruncher::asin( $x [, $decimal_places] );
$arccos = Math::NumberCruncher::acos( $x [, $decimal_places] );
$arctan = Math::NumberCruncher::atan( $x [, $decimal_places] );
$cotangent = Math::NumberCruncher::cot( $x [, $decimal_places] );
$arccot = Math::NumberCruncher::acot( $x [, $decimal_places] );
$secant = Math::NumberCruncher::sec( $x [, $decimal_places] );
$arcsec = Math::NumberCruncher::asec( $x [, $decimal_places] );
$cosecant = Math::NumberCruncher::csc( $x [, $decimal_places] );
$arccosecant = Math::NumberCruncher::acsc( $x [, $decimal_places] );
$exsecant = Math::NumberCruncher::exsec( $x [, $decimal_places] );
$versine = Math::NumberCruncher::vers( $x [, $decimal_places] );
$coversine = Math::NumberCruncher::covers( $x [, $decimal_places] );
$haversine = Math::NumberCruncher::hav( $x [, $decimal_places] );
$grouped = Math::NumberCruncher::Commas( $number );
$SqrRoot = Math::NumberCruncher::SqrRoot( $number [, $decimal_places] );
$square_root = Math::NumberCruncher::sqrt( $x [, $decimal_places] );
$root = Math::NumberCruncher::Root( 55, 3 [, $decimal_places] );
$root = Math::NumberCruncher::Root2( 55, 3 [, $decimal_places] );
$log = Math::NumberCruncher::Ln( 100 [, $decimal_places] );
$log = Math::NumberCruncher::log( $num [, $decimal_places] );
$num = Math::NumberCruncher::Exp( 0.111 [, $decimal_places] );
$num = Math::NumberCruncher::exp( $log [, $decimal_places] );
$Pi = Math::NumberCruncher::PICONST( $decimal_places );
$E = Math::NumberCruncher::ECONST( $decimal_places );
( $A, $B, $C ) = Math::NumberCruncher::PythagTriples( $x, $y [, $decimal_places] );
$z = Math::NumberCruncher::PythagTriplesSeq( $x, $y [, $decimal_places] );
@nums = Math::NumberCruncher::SIS( [$start, $numbers, $increment] );
$inverse = Math::NumberCruncher::Inverse( $number [, $decimal_places] );
@constants = Math::NumberCruncher::CONSTANTS( all [, $decimal_places] );
$bernoulli = Math::NumberCruncher::Bernoulli( $num [, $decimal_places] );
@bernoulli = Math::NumberCruncher::Bernoulli( $num );
L2P 1.1
L2P creates PNG images from LaTeX math expressions. more>>
Download l2p here, or read the documentation. L2P depends on other software: latex, dvips, and convert. The last one is from the ImageMagick graphics toolset.
If you already work with LaTeX on a modern Unix or Linux system, you probably already have all of that installed.
EXAMPLES:
* l2p -i $4x^2-7=cos{2 pi x}$ -o eqn4.png
Produce a PNG image, named eqn4.png, of the equation described by the LaTeX expression $4x^2 - 7 = cos{2 pi x}$.
* l2p -o big_equation.png big_hairy_equation
Produce a PNG image, called big_equation.png, from the LaTeX expression contained in the file big_hairy_equation (specifically, it contains $x=2$.) Note that this file is NOT a full LaTeX document - see the -F option for that.
* l2p -d 250 -i $
abla cdot mathbf{D} =
ho$
Produce a PNG image from the LaTeX code given with the -i argument (which happens to be one of Maxwells equations), at 250 dots per inch. Since we did not specify an output file name with the -o option, the image will be eqn.png (the default).
* l2p -p amssymb -i $mho$ -o mho.png
Produce a PNG image of the Mho symbol (an upside-down capital omega), saving the image in the file mho.png. We include the amssymb package, which defines that symbol.
OPTIONS:
-i "$latex$"
Argument is an equation/expression in (La)TeX format. In most cases, you will want to enclose the argument in quotes to protect it from shell expansion.
-b "rrggbb"
Background color. There are several ways to specify the color. See the section "COLORS", below, for details.
-d dpi
Pixel density at which the equation is rendered, in dots per inch (default 300).
An image with a DPI of 600 will have twice as many pixels in each of the x and y directions than an image with a DPI of 300. The effect is different in the normal context of printing, where a higher DPI will leave the text with the same physical size, but with a finer resolution. This is because the physical size of a pixel is not really variable; so to have double the resolution, a symbol in an image must be double the size.
-f "rrggbb"
Foreground color. There are several ways to specify the color. See the section "COLORS", below, for details.
-h Show a help summary.
-o output.png
Name of output file. Default is eqn.png
-p packagename[,packagename2[,...]]]
Use additional LaTeX/TeX packages. You can specify several, separated by commas.
-C Suppress automatic removal (cleanup) of temporary files. This will be useful if something goes wrong, or if you want to use the intermediate DVI or Postscript renditions. l2p will tell you which directory contains these files.
-F Supplied expression is a full LaTeX document, rather than just an expression fragment. Negates the -f, -b, -p and -T options.
Note: l2p currently only converts full LaTeX documents that are relatively simple: only one page in length, and with no external dependencies (such as included graphics). If you need to convert a more complex document, you can generate a DVI file with latex like normal, then convert the DVI into a series of PNG images using convert from the ImageMagick distribution. See convert(1), or < http://imagemagick.org/script/convert.php > for more information.
-T Create an image with a transparent background.
-V Show version information.
Geo::Distance 0.11
Geo::Distance is a Perl module that can calculate distances and closest locations. more>>
SYNOPSIS
use Geo::Distance;
my $geo = new Geo::Distance;
$geo->formula(hsin);
$geo->reg_unit( toad_hop, 200120 );
$geo->reg_unit( frog_hop => 6 => toad_hop );
my $distance = $geo->distance( unit_type, $lon1,$lat1 => $lon2,$lat2 );
my $locations = $geo->closest(
dbh => $dbh,
table => $table,
lon => $lon,
lat => $lat,
unit => $unit_type,
distance => $dist_in_unit
);
This perl library aims to provide as many tools to make it as simple as possible to calculate distances between geographic points, and anything that can be derived from that. Currently there is support for finding the closest locations within a specified distance, to find the closest number of points to a specified point, and to do basic point-to-point distance calculations.
METHODS
new
my $geo = new Geo::Distance;
my $geo = new Geo::Distance( no_units=>1 );
Returns a blessed Geo::Distance object. The new constructor accepts one optional argument.
no_units - Whether or not to load the default units. Defaults to 0 (false).
kilometer, kilometre, meter, metre, centimeter, centimetre, millimeter,
millimetre, yard, foot, inch, light second, mile, nautical mile,
poppy seed, barleycorn, rod, pole, perch, chain, furlong, league,
fathom
formula
if($geo->formula eq hsin){ ... }
$geo->formula(cos);
Allows you to retrieve and set the formula that is currently being used to calculate distances. The availabel formulas are hsin, polar, cos, and mt. hsin is the default and mt/cos are depreciated in favor of hsin. polar should be used when calculating coordinates near the poles.
reg_unit
$geo->reg_unit( $radius, $key );
$geo->reg_unit( $key1 => $key2 );
$geo->reg_unit( $count1, $key1 => $key2 );
$geo->reg_unit( $key1 => $count2, $key2 );
$geo->reg_unit( $count1, $key1 => $count2, $key2 );
This method is used to create custom unit types. There are several ways of calling it, depending on if you are defining the unit from scratch, or if you are basing it off of an existing unit (such as saying 12 inches = 1 foot ). When defining a unit from scratch you pass the name and rho (radius of the earth in that unit) value.
So, if you wanted to do your calculations in human adult steps you would have to have an average human adult walk from the crust of the earth to the core (ignore the fact that this is impossible). So, assuming we did this and we came up with 43,200 steps, youd do something like the following.
# Define adult step unit.
$geo->reg_unit( 43200, adult step );
# This can be read as "It takes 43,200 adult_steps to walk the radius of the earth".
Now, if you also wanted to do distances in baby steps you might think "well, now I gotta get a baby to walk to the center of the earth". But, you dont have to! If you do some research youll find (no research was actually conducted) that there are, on average, 4.7 baby steps in each adult step.
# Define baby step unit.
$geo->reg_unit( 4.7, baby step => adult step );
# This can be read as "4.7 baby steps is the same as one adult step".
And if we were doing this in reverse and already had the baby step unit but not the adult step, you would still use the exact same syntax as above.
distance
my $distance = $geo->distance( unit_type, $lon1,$lat1 => $lon2,$lat2 );
Calculates the distance between two lon/lat points.
closest
my $locations = $geo->closest(
dbh => $dbh,
table => $table,
lon => $lon,
lat => $lat,
unit => $unit_type,
distance => $dist_in_unit
);
This method finds the closest locations within a certain distance and returns an array reference with a hash for each location matched.
The closest method requires the following arguments:
dbh - a DBI database handle
table - a table within dbh that contains the locations to search
lon - the longitude of the center point
lat - the latitude of the center point
unit - the unit of measurement to use, such as "meter"
distance - the distance, in units, from the center point to find locations
The following arguments are optional:
lon_field - the name of the field in the table that contains the longitude, defaults to "lon"
lat_field - the name of the field in the table that contains the latitude, defaults to "lat"
fields - an array reference of extra field names that you would like returned with each location
where - additional rules for the where clause of the sql
bind - an array reference of bind variables to go with the placeholders in where
sort - whether to sort the locations by their distance, making the closest location the first returned
count - return at most these number of locations (implies sort => 1)
This method uses some very simplistic calculations to SQL select out of the dbh. This means that the SQL should work fine on almost any database (only tested on MySQL and SQLite so far) and this also means that it is fast. Once this sub set of locations has been retrieved then more precise calculations are made to narrow down the result set. Remember, though, that the farther out your distance is, and the more locations in the table, the slower your searches will be.
JImage-Analyst 1.0
JImage-Analyst is a JAVA based library for extracting meta information from various image file formats. more>>
Main features:
- Supported Image formats: BMP, CUR, GIF, ICO, IFF, JPEG, PCX, PNG, PNM (PBM, PGM, PPM), PSD, RAS, SWF, TGA, TIFF, XCF
- The following information are available:
- The format
- The mime type
- Dimension (width / height)
- Physical width and height (in DPI and inch)
- Bits per pixel
- Whether the image is progressive
- Comments from the image (such as in JPEG files)
- Number of images (such as with animated GIFs)
- High speed and low memory consumption
- No dependencies on 3rd party libraries
- No dependencies on AWT classes
- An architecture that allows to ass further formats very easily
Examples:
File file = new File("test.gif");
JImageAnalyst analyst = JImageAnalystFactory.getDefaultInstance();
ImageInfo imageInfo = analyst.analyze(file);
System.out.println("Format: " + imageInfo.getFormat());
System.out.println("MIME-Type: " + imageInfo.getMimeType());
System.out.println("Width: " + imageInfo.getWidth());
System.out.println("Height: " + imageInfo.getHeight());
System.out.println("BitsPerPixel: " + imageInfo.getBitsPerPixel());
// ... more information is available in imageInfo ...
DonateBot - Linux 1.0
Donate to charity for free simply by running a small program in the background. In exchange for your unused CPU processing power, you will give to the charity of your choice. This application contains NO POPUPS, NO SPYWARE, NO ADWARE. more>>
DonateBot - Linux 1.0 is a professional and easy-to-use tool which can donate to charity for free simply by running a small program in the background. In exchange for your unused CPU processing power, you will give to the charity of your choice. This application contains no popups, no spyware,no adware. You can donate more than 1000 grains of wheat, 1000 ounces of water, 1000 minutes of education or 1000 square inches of rain forest everyday simply by leaving your computer on.
DonateBot contains absolutely no spyware and no adware. You will not be harassed with nasty popup ads when using this application. Most likely, you won't even know that its running! However, the donations to charity that you make are still very real. To select the charity you want to donate to, simply click on one of the four images. You can donate ounces of water (Charity:water), grains of wheat (CARE), minutes of education (Oaktree Foundation) and square inches of rain forest (The Nature Conservancy).
Many computers sit idle for hours or days at a time. DonateBot lets you share this unused processing power with organizations that need to solve complicated problems, such as analyzing the galaxies or performing mathematical calculations.
Your day-to-day computer operations, like browsing the internet, writing a document or listening to music will not be affected by DonateBot. You can manually change the CPU usage in the program if you are concerned about computer performance. The Windows version can automatically boost CPU usage when you haven't used your computer for a few minutes, maximizing your donations.
DonateBot is 100% safe. The distributed computing system runs in a secure Java sandbox that has no access to your files
Major Features:
- Donate to charity for free simply by running a small program in the background
- Let you share this unused processing power with organizations that need to solve complicated problems, such as analyzing the galaxies or performing mathematical calculations.
- Manually change the CPU usage in the program if you are concerned about computer performance.
Requirements: Java SE6
Text::Typography 0.01
Text::Typography can markup ASCII text with correct typography for HTML. more>>
SYNOPSIS
use Text::Typography qw(typography);
print typography($text);
This module is a thin wrapper for John Grubers SmartyPants plugin for various CMSs.
SmartyPants is a web publishing utility that translates plain ASCII punctuation characters into "smart" typographic punctuation HTML entities. SmartyPants can perform the following transformations:
Straight quotes ( " and ) into "curly" quote HTML entities
Backticks-style quotes (``like this) into "curly" quote HTML entities
Dashes (-- and ---) into en- and em-dash entities
Three consecutive dots (...) into an ellipsis entity
SmartyPants does not modify characters within < pre >, < code >, < kbd >, < script >, or < math > tag blocks. Typically, these tags are used to display text where smart quotes and other "smart punctuation" would not be appropriate, such as source code or example markup.
typography($text[, $attributes])
Returns a string marked up with the proper HTML entities for proper typography.
For fine grain control over what gets converted, use the $attributes option. The default value is 3.
The following numeric values set a group of options:
0 : do nothing
1 : set all
2 : set all, using old school en- and em- dash shortcuts (-- and ---)
3 : set all, using inverted old school en- and em- dash shortcuts (--- and --)
For even finer control, specify a string of one or more of the following characters:
q : quotes
b : backtick quotes (``double only)
B : backtick quotes (``double and `single)
d : dashes
D : old school dashes
i : inverted old school dashes
e : ellipses
w : convert " entities to " for Dreamweaver users
Backslash Escapes
If you need to use literal straight quotes (or plain hyphens and periods), SmartyPants accepts the following backslash escape sequences to force non-smart punctuation. It does so by transforming the escape sequence into a decimal-encoded HTML entity:
Escape Value Character
------ ----- ---------
\
" " "
. . .
- - -
` ` `
This is useful, for example, when you want to use straight quotes as foot and inch marks: 62" tall; a 17" iMac.
Algorithmic Shortcomings
One situation in which quotes will get curled the wrong way is when apostrophes are used at the start of leading contractions. For example:
Twas the night before Christmas.
In the case above, SmartyPants will turn the apostrophe into an opening single-quote, when in fact it should be a closing one. I dont think this problem can be solved in the general case -- every word processor Ive tried gets this wrong as well. In such cases, its best to use the proper HTML entity for closing single-quotes (’) by hand.
jpeg2ps 1.9
jpeg2ps is a utility for converting JPEG images to compressed PostScript Level 2 or 3 files (without uncompressing the images). more>>
The JPEG data is simply >wrapped< with PostScript which yields considerably smaller PS files. This project is a simple command line utility and can be used on DOS, Windows and Unix machines.
Usage: jpeg2ps [options] jpegfile > epsfile
-a auto rotate: produce landscape output if width > height
-b binary mode: output 8 bit data (default: 7 bit with ASCII85)
-h hex mode: output 7 bit data in ASCIIHex encoding
-o < name > output file name
-p < size > page size name. Known names are:
a0, a1, a2, a3, a4, a5, a6, b5, letter, legal, ledger, p11x17
-q quiet mode: suppress all informational messages
-r < dpi > resolution value (dots per inch)
0 means use value given in file, if any (disables autorotate)
ImageInfo 1.9
ImageInfo is a free Java class to retrieve properties from image files. more>>
The following file formats are currently supported: JPEG, PNG, GIF, BMP, PCX, IFF, RAS, PBM, PGM, PPM and PSD (read why TIFF is not included). ImageInfo can recognize these formats, and in addition determine image width, height and color depth (bits per pixel).
Also check out ffident, my file format (group) and MIME type identification library. It extracts less information than ImageInfo (it only recognizes the format, no metadata), but it supports more formats and new formats can be added by editing a text file. Similar to file(1) / magic(5).
Using ImageInfo from within a Java application or applet
The image file can be any InputStream object or an instance of a class implementing DataInput (like RandomAccessFile). Here is some sample code on how to use the class:
ImageInfo ii = new ImageInfo();
// in can be InputStream or RandomAccessFile (or DataInput)
ii.setInput(in);
/* if you want to know how many images there are in a file,
uncomment the following line; will slow down ImageInfo
with animated GIFs */
//ii.setDetermineImageNumber(true);
// check does the actual work, you wont get results before
// you have called it
if (!ii.check())
{
System.err.println("Not a supported image file format.");
}
else
{
System.out.println(
ii.getFormatName() + ", " +
ii.getMimeType() + ", " +
ii.getWidth() + " x " + ii.getHeight() + " pixels, " +
ii.getBitsPerPixel() + " bits per pixel, " +
ii.getNumberOfImages() + " image(s).");
// there are other properties, check out the API documentation
}
Using ImageInfo as a command line program
ImageInfo also has a main method that makes it a command line tool. Assuming that ImageInfo.class is in your classpath, giving the class to java with some file names as arguments will be sufficient. Here is an example call including output:
$ java ImageInfo test.jpg
test.jpg
File format: JPEG
MIME type: image/jpeg
Width (pixels): 1556
Height (pixels): 2048
Bits per pixel: 24
Progressive: false
Number of images: 1
Physical width (dpi): 300
Physical height (dpi): 300
Physical width (inches): 5.1866665
Physical height (inches): 6.826667
CSS::SAC::LexicalUnit 0.06
CSS::SAC::LexicalUnit is a Perl module that contains SAC units. more>>
SYNOPSIS
use CSS::SAC::LexicalUnit qw(:constants);
foo if $lu->is_type(LU_TYPE_CONSTANT);
In the SAC spec, LexicalUnit is a linked list, that is, you only ever hold one LexicalUnit, and you ask for the next of for the previous one when you want to move on.
Such a model seems awkward, though Im sure it makes sense somehow in Java, likely for a Java-specific reason.
In the Perl implementation, I have changed this. A LexicalUnit is an object that stands on its own and has no next/previous objects. Instead, the $handler->property callback gets called with a LexicalUnitList, which is in fact just an array ref of LexicalUnits.
We also dont differentiate between IntegerValue, FloatValue, and StringValue, its always Value in Perl. This also applies to Parameters and SubValues. Both are called as Value and return an array ref of LexicalUnits.
I added the is_type() method, see CSS::SAC::Condition for advantages of that approach.
CONSTANTS
- ATTR
- CENTIMETER
- COUNTER_FUNCTION
- COUNTERS_FUNCTION
- DEGREE
- DIMENSION
- EM
- EX
- FUNCTION
- GRADIAN
- HERTZ
- IDENT
- INCH
- INHERIT
- INTEGER
- KILOHERTZ
- MILLIMETER
- MILLISECOND
- OPERATOR_COMMA
- OPERATOR_EXP
- OPERATOR_GE
- OPERATOR_GT
- OPERATOR_LE
- OPERATOR_LT
- OPERATOR_MINUS
- OPERATOR_MOD
- OPERATOR_MULTIPLY
- OPERATOR_PLUS
- OPERATOR_SLASH
- OPERATOR_TILDE
- PERCENTAGE
- PICA
- PIXEL
- POINT
- RADIAN
- REAL
- RECT_FUNCTION
- RGBCOLOR
- SECOND
- STRING_VALUE
- SUB_EXPRESSION
- UNICODERANGE
- URI
METHODS
CSS::SAC::LexicalUnit->new($type,$text,$value) or $lu->new($type,$text,$value)
Creates a new unit. The $type must be one of the type constants, the text depends on the type of unit (unit text, func name, etc...), and the value is the content of the lu.
$lu->DimensionUnitText([$dut]) or getDimensionUnitText
get/set the text of the dimension unit (eg cm, px, etc...)
$lu->FunctionName([$fn]) or getFunctionName
get/set the name of the function (eg attr, uri, etc...)
$lu->Value([$value]) or getValue
get/set the value of the lu (which may be another lu, or a lu list)
$lu->LexicalUnitType([$type]) or getLexicalUnitType
get/set the type of the lu
$lu->is_type($lu_constant)
returns true is this lu is of type $lu_constant
Class::DBI::Plugin::HTML 0.9
Class::DBI::Plugin::HTML is Perl module to generate HTML Tables and Forms in conjunction with Class::DBI. more>>
SYNOPSIS
# Inside of your sub-class of Class::DBI add these lines:
use Class::DBI::Plugin::HTML;
use Class::DBI::Pager;
use Class::DBI::AbstractSearch;
use Class::DBI::Plugin::AbstractCount;
use Class::DBI::Plugin::RetrieveAll;
.....
# Inside your script you will be able to use this modules
# methods on your table class or object as needed.
use ClassDBIBaseClass;
use URI::Escape;
use CGI;
my $cgi = CGI->new();
my $cdbi_plugin_html = Baseball::Master->html();
$cdbi_plugin_html->data_table->addRow(Last Name,First Name,Bats , Throws ,
Height (ft),(inches),
Weight,Birth Year );
my %params;
map { $params{$_} =
uri_unescape($cgi->param("$_"))
} $cgi->param();
$cdbi_plugin_html->params( %params );
$cdbi_plugin_html->exclude_from_url([ page ]);
# attribute style
# created based on params and exclude values from above
# auto sets the query_string value
$cdbi_plugin_html->url_query();
# set the page name (script)
$cdbi_plugin_html->page_name(cdbitest.pl);
# indicate which columns to display
$cdbi_plugin_html->display_columns( [ lastname,firstname,
bats ,throws,
ht_ft ,ht_in,
wt ,birthyear ]
);
# indicate which columns to exclude, inverse of display above
$cdbi_plugin_html->exclude_columns();
# indicate the base class to work with, this is optional,
# if you should create you object via a call to
# Class::DBI::Plugin::HTML vs. a Class::DBI sub class
# this assures the correct sub class is used for data collection
$cdbi_plugin_html->cdbi_class( Baseball::Master );
# indicate the style of navigation to provide
$cdbi_plugin_html->navigation_style( both );
print qq~ Filter by First Letter of Last Name ~;
print $cdbi_plugin_html->string_filter_navigation(
-column => lastname,
-position => begins,
);
print qq~ ~;
$cdbi_html->only(firstname);
print $cdbi_plugin_html->build_table();
my $nav = $cdbi_plugin_html->html_table_navigation();
print qq!
$cdbi_plugin_html->add_bottom_span($nav);
print $cdbi_plugin_html->data_table;
UPGRADE WARNING
As of the .8 release there have been changes to the methods and how they work. It is likely that scripts built with older versions WILL break. Please read below to find specific changes that may negatively impact scripts built using the the releases prior to .8. The .9 release contains some minor modifications that could in some chases break your scripts, test carefully before upgrading in a production environment.
ConvertAll 0.4.0
ConvertAll is a unit conversion program. more>>
Or from meter-pounds. Or from cubic nautical miles. The units dont have to make sense to anyone else.
ConvertAll is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either Version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the LICENSE file provided with this program for more information.
As a special exception, the author gives permission to link and distribute this program with the Qt Non-Commercial Edition without including the source code for Qt.
Main features:
- The base units for conversion may be either typed (with auto-completion) or selected from a list.
- Units may be selected using either an abbreviation or a full name.
- Units may be combined with the "*" and "/" operators.
- Units may be raised to powers with the "^" operator.
- Units with non-linear scales, such as temperature, can also be converted.
- A unit list may be filtered and searched
- Numbers may be entered on either the "From" or the "To" units side, for conversions in both directions.
- Basic mathematical expressions may be entered in place of numbers.
- Options control the formatting of numerical results.
- The unit data includes over 400 units.
- The format of the unit data file makes it easy to add additional units.
- Page: 1 of 2
- 1
- 2