Result:
found more than 660 distributions - search limited to the first 2001 files matching your query ( run in 3.690 )


Geography-NationalGrid-TW

 view release on metacpan or  search on metacpan

lib/Geography/NationalGrid/TW.pm  view on Meta::CPAN


Returns the item from the Userdata hash whose key is the PARAMETER_NAME.

=item transform( PROJECTION )

Transform the point to the new projection, i.e. TWD67 to TWD97 or reverse. Return the point after transformation and keep original point intact. Uses the formula proposed by John Hsieh which is supposed to provide 2 meter accuracy conversions.

=back

=head1 ACCURACY AND PRECISION

 view all matches for this distribution


Geometry-Formula

 view release on metacpan or  search on metacpan

lib/Geometry/Formula.pm  view on Meta::CPAN


sub circle {
    my ( $self, %param, $x ) = @_;
    _param_check( 'circle', %param );

    if ( $param{'formula'} eq 'area' ) {
        $x = $PI * $self->_squared( $param{'radius'} );
    }
    elsif ( $param{'formula'} eq 'circumference' ) {
        $x = ( 2 * $PI ) * $param{'radius'};
    }
    else {
        $x = $param{'radius'} * 2;
    }

lib/Geometry/Formula.pm  view on Meta::CPAN


sub cube {
    my ( $self, %param, $x ) = @_;
    _param_check( 'cube', %param );

    if ( $param{'formula'} eq 'surface_area' ) {
        $x = 6 * ( $param{'a'} * 2 );
    }
    else {
        $x = $self->_cubed( $param{'a'} );
    }

lib/Geometry/Formula.pm  view on Meta::CPAN


sub ellipse {
    my ( $self, %param, $x ) = @_;
    _param_check( 'ellipse', %param );

    if ( $param{'formula'} eq 'area' ) {
        $x = $PI * ( $param{'a'} * $param{'b'} );
    }
    else {
        $x = 2 * $PI *
          sqrt( ( $self->_squared( $param{'a'} ) + $self->_squared( $param{'b'} ) ) / 2 );

lib/Geometry/Formula.pm  view on Meta::CPAN


sub frustum_of_right_circular_cone {
    my ( $self, %param, $x ) = @_;
    _param_check( 'frustum_of_right_circular_cone', %param );

    if ( $param{'formula'} eq 'lateral_surface_area' ) {
        $x =
          $PI *
          ( $param{'large_radius'} + $param{'small_radius'} ) *
          sqrt( $self->_squared( $param{'large_radius'} - $param{'small_radius'} ) +
              $self->_squared( $param{'slant_height'} ) );
    }
    elsif ( $param{'formula'} eq 'total_surface_area' ) {
        my $slant_height =
          sqrt( $self->_squared( $param{'large_radius'} - $param{'small_radius'} ) +
              $self->_squared( $param{'height'} ) );

        $x =

lib/Geometry/Formula.pm  view on Meta::CPAN


sub parallelogram {
    my ( $self, %param, $x ) = @_;
    _param_check( 'parallelogram', %param );

    if ( $param{'formula'} eq 'area' ) {
        $x = $param{'base'} * $param{'height'};
    }
    else {
        $x = ( 2 * $param{'a'} ) + ( 2 * $param{'b'} );
    }

lib/Geometry/Formula.pm  view on Meta::CPAN


sub rectangle {
    my ( $self, %param, $x ) = @_;
    _param_check( 'rectangle', %param );

    if ( $param{'formula'} eq 'area' ) {
        $x = $param{'length'} * $param{'width'};
    }
    else {
        $x = ( 2 * $param{'length'} ) + ( 2 * $param{'width'} );
    }

lib/Geometry/Formula.pm  view on Meta::CPAN


sub rectangular_solid {
    my ( $self, %param, $x ) = @_;
    _param_check( 'rectangular_solid', %param );

    if ( $param{'formula'} eq 'volume' ) {
        $x = $param{'length'} * $param{'width'} * $param{'height'};
    }
    else {
        $x =
          2 *

lib/Geometry/Formula.pm  view on Meta::CPAN


sub right_circular_cone {
    my ( $self, %param, $x ) = @_;
    _param_check( 'right_circular_cone', %param );

    if ( $param{'formula'} eq 'lateral_surface_area' ) {
        $x =
          $PI *
          $param{'radius'} *
          ( sqrt( $self->_squared( $param{'radius'} ) + $self->_squared( $param{'height'} ) ) );
    }

lib/Geometry/Formula.pm  view on Meta::CPAN


sub right_circular_cylinder {
    my ( $self, %param, $x ) = @_;
    _param_check( 'right_circular_cylinder', %param );

    if ( $param{'formula'} eq 'lateral_surface_area' ) {
        $x = 2 * $PI * $param{'radius'} * $param{'height'};
    }
    elsif ( $param{'formula'} eq 'total_surface_area' ) {
        $x =
          2 * $PI * $param{'radius'} * ( $param{'radius'} + $param{'height'} );
    }
    else {
        $x = $PI * ( $self->_squared( $param{'radius'} ) * $param{'height'} );

lib/Geometry/Formula.pm  view on Meta::CPAN


sub sphere {
    my ( $self, %param, $x ) = @_;
    _param_check( 'sphere', %param );

    if ( $param{'formula'} eq 'surface_area' ) {
        $x = 4 * $PI * $self->_squared( $param{'radius'} );
    }
    else {
        $x = ( 4 / 3 ) * $PI * $self->_cubed( $param{'radius'} );
    }

lib/Geometry/Formula.pm  view on Meta::CPAN


sub square {
    my ( $self, %param, $x ) = @_;
    _param_check( 'square', %param );

    if ( $param{'formula'} eq 'area' ) {
        $x = $self->_squared( $param{'side'} );
    }
    else {
        $x = $param{'side'} * 4;
    }

lib/Geometry/Formula.pm  view on Meta::CPAN


sub torus {
    my ( $self, %param, $x ) = @_;
    _param_check( 'torus', %param );

    if ( $param{'formula'} eq 'surface_area' ) {
        $x = 4 * $self->_squared($PI) * $param{'a'} * $param{'b'};
    }
    else {
        $x = 2 * $self->_squared($PI) * $self->_squared( $param{'a'} ) * $param{'b'};
    }

lib/Geometry/Formula.pm  view on Meta::CPAN


sub trapezoid {
    my ( $self, %param, $x ) = @_;
    _param_check( 'trapezoid', %param );

    if ( $param{'formula'} eq 'area' ) {
        $x = ( ( $param{'a'} + $param{'b'} ) / 2 ) * $param{'height'};
    }
    else {
        $x = $param{'a'} + $param{'b'} + $param{'c'} + $param{'d'};
    }

lib/Geometry/Formula.pm  view on Meta::CPAN


sub triangle {
    my ( $self, %param, $x ) = @_;
    _param_check( 'triangle', %param );

    if ( $param{'formula'} eq 'area' ) {
        $x = .5 * $param{'base'} * $param{'height'};
    }
    else {
        $x = $param{'a'} + $param{'b'} + $param{'c'};
    }

lib/Geometry/Formula.pm  view on Meta::CPAN

            perimeter => [ 'a',    'b', 'c' ]
        },
    );

    # validate that parameter values are defined and numeric
    foreach ( @{ $valid_params{$method}{ $param{'formula'} } } ) {
        croak "required parameter '$_' not defined"
          if !$param{$_};

        croak "parameter '$_' requires a numeric value"
          if $param{$_} !~ m/^\d+$/;
    }

    # validate parameter is a valid constructor/component of formula
    foreach my $param ( keys %param ) {
        next if $param eq 'formula';

        my @constructors = @{ $valid_params{$method}{ $param{'formula'} } };

        if ( !@constructors ) {
            croak "invalid formula name: $param{'formula'} specified";
        }

        if ( grep { $_ eq $param } @constructors ) {
            next;
        }

lib/Geometry/Formula.pm  view on Meta::CPAN


=pod

=head1 NAME

Geometry::Formula - methods to calculate common geometry formulas.

=head1 VERSION

    Version 0.01

lib/Geometry/Formula.pm  view on Meta::CPAN

    my $x = Geometry::Formula->new;

=head1 DESCRIPTION

This package provides users with the ability to calculate simple geometric
problems using the most common geometry formulas. This module was primarily
written for education and practical purposes.  

=head1 CONSTRUCTOR

=over

=item C<< new() >>

Returns a reference to a new formula object. No arguments currently needed
or required.

=back

=head1 SUBROUTINES/METHODS

The following methods are used to calculate our geometry formulas. Keep in
mind each formula has a unique set of constructors/parameters that are used
and must be provided accordingly. All attempts have been made to prevent a
user from providing invalid data to the method.

Methods are named after the 2d and 3d shapes one would expect to find while
using geometric formulas such as square or cube. Please see the individual
method items for the specific parameters one must use. In the example below
you can see how we make usage of Geometry::Formula:

    use Geometry::Formula;

    my $x   = Geometry::Formula->new;
    my $sqr = $x->square{ formula => 'area', side => 5 };

    print $sqr;
    ---
    25

=over

=item C<< annulus() >>

The annulus method provides an area formula. 

required: inner_radius, outer_radius

    $x->annulus{
        formula      => 'area',
        inner_radius => int,
        outer_radius => int
    };

Note: the inner_radius cannot be larger then the outer_radius.

=item C<< circle() >>

The circle method provides an area, circumference, and diameter formula.

required: radius

    $x->circle(
        formula => 'area',
        radius  => int
    );

    $x->circle(
        formula => 'circumference',
        radius  => int
    );

    $x->circle(
        formula => 'diameter',
        radius  => int
    );

=item C<< cone() >>

The cone method provides a volume formula.

required: base, height

    $x->cone(
        formula => 'volume',
        base    => int,
        height  => int
    );

=item C<< cube() >>

The cube method provides a surface area and volume formula.

required: a

    $x->cube(
        formula => 'surface_area',
        a       => int
    );

    $x->cube(
        formula => 'volume',
        a       => int
    );

=item C<< ellipse() >>

The ellipse method provides an area and perimeter formula.

required: a, b

    $x->ellipse(
        formula => 'area',
        a       => int,
        b       => int
    );

    $x->ellipse(
        formula => 'perimeter',
        a       => int,
        b       => int
    );

Note: a and b represent radii

=item C<< ellipsoid() >>

The ellipsoid method provides a volume formula.

required: a, b, c

    x->ellipsoid(
        formula => 'volume',
        a       => int,
        b       => int,
        c       => int,
    );

Note: a, b, and c represent radii

=item C<< equilateral_triangle() >>

The equalateral_triangle method provides an area formula.

required: side

    x->equilateral_triangle(
        formula => 'area',
        side    => int,
    );

=item C<< frustum_of_right_circular_cone() >>

The frustum_of_right_circular_cone method provides a lateral_surface_area,
total_surface_area, and volume formula.

required: slant_height, large_radius, small_radius

    x->frustum_of_right_circular_cone(
        formula      => 'lateral_surface_area',
        slant_height => int,
        large_radius => int,
        small_radius => int
    );

required: height, large_radius, small_radius

    x->frustum_of_right_circular_cone(
        formula      => 'total_surface_area',
        height       => int,
        large_radius => int,
        small_radius => int

    );

    x->frustum_of_right_circular_cone(
        formula      => 'volume',
        height       => int,
        large_radius => int,
        small_radius => int
    );

=item C<< parallelogram() >>

The parallelogram method provides an area and perimeter formula.

required: base, height

    x->parallelgram(
        formula => 'area',
        base    => int,
        height  => int
    );

required: a, b

    x->parallelgram(
        formula => 'perimeter',
        a       => int,
        b       => int
    );

Note: a and b are sides

=item C<< rectangle() >>

The rectangle method provides an area and perimeter formula.

required: length, width

    x->rectangle(
        formula => 'area',
        length  => int,
        width   => int
    );

    x->rectangle(
        formula => 'perimeter',
        length  => int,
        width   => int
    );

=item C<< rectangular_solid() >>

The rectangular_solid method provides an and perimeter formula.

required: length, width, height

    x->rectangular_solid(
        formula => 'surface_area',
        length  => int,
        width   => int,
        height  => int
    );

    x->rectangular_solid(
        formula => 'volume',
        length  => int,
        width   => int,
        height  => int
    );

=item C<< rhombus() >>

The rhombus method provides an area formula.

required: a, b

    x->rhombus(
        formula => 'area',
        a       => int,
        b       => int
    );

Note: a and b represent diagonal lines (sides)

=item C<< right_circular_cone() >>

The right_circular_cone method provides a lateral surface area formula.

required: height, radius

    $x->right_circular_cone(
        formula => 'lateral_surface_area', 
        height  => int,
        radius  => int
    );

=item C<< right_circular_cylinder() >>

The right_circular_cylinder method provides a side surface area,
total surface area, and volume formula. 

required: height, radius

    $x->right_circular_cylinder(
        formula => 'lateral_surface_area', 
        height  => int,
        radius  => int
    );

    $x->right_circular_cylinder(
        formula => 'total_surface_area', 
        height  => int,
        radius  => int
    );

    $x->right_circular_cylinder(
        formula => 'volume', 
        height  => int,
        radius  => int
    );

=item C<< sector_of_circle() >>

The sector_of_circle method provides an area formula.

required: theta

    $x->sector_of_circle(
        formula => 'area', 
        theta   => int
    );

Note: theta value should not be greater then 360 (degrees).

=item C<< sphere() >>

The sphere method provides a surface area and volume formula.

required: radius

    $x->sphere(
        formula => 'surface_area', 
        radius  => int
    );

    $x->sphere(
        formula => 'volume', 
        radius  => int
    );

=item C<< square() >>

The square method provides an area and perimeter formula.

required: side

    $x->square(
        formula => 'area', 
        side    => int
    );

    $x->square(
        formula => 'perimeter', 
        side    => int
    );

=item C<< torus() >>

The torus method provides a surface area and volume formula.

    $x->torus(
        formula => 'surface_area', 
        a       => int,
        b       => int
    );

    $x->torus(
        formula => 'volume', 
        a  => int,
        b  => int
    );

Note: a and b represent radii

=item C<< trapezoid() >>

The trapezoid method provides an area and perimeter formula.

required: a, b, and height

    $x->trapezoid(
        formula => 'area', 
        a       => int,
        b       => int,
        height  => int
    );

required a, b, c, and d

    $x->trapezoid(
        formula => 'perimeter', 
        a       => int,
        b       => int,
        c       => int,
        d       => int
    );

=item C<< triangle() >>

The triangle method provides an area and perimeter formula.

    $x->triangle(
        formula => 'area', 
        base    => int,
        height  => int
    );

    $x->triangle(
        formula => 'perimeter', 
        a  => int,
        b  => int,
        c  => int
    );

lib/Geometry/Formula.pm  view on Meta::CPAN


numeric values passed to this fucntion get$self->_cubed and returned

=item C<< _param_check( $name_of_method, %param ) >> 

this method validates the parameters being passed into our formula methods
are properly constructed. 

=back

=head1 DIAGNOSTICS 

 view all matches for this distribution


Git-Raw

 view release on metacpan or  search on metacpan

deps/libgit2/README.md  view on Meta::CPAN

an application in C - then you may be able use an existing binary.
There are packages for the
[vcpkg](https://github.com/Microsoft/vcpkg) and
[conan](https://conan.io/center/libgit2)
package managers.  And libgit2 is available in 
[Homebrew](https://formulae.brew.sh/formula/libgit2) and most Linux
distributions.

However, these versions _may_ be outdated and we recommend using the
latest version if possible.  Thankfully libgit2 is not hard to compile.

 view all matches for this distribution


Git-XS

 view release on metacpan or  search on metacpan

xs/libgit2/deps/zlib/adler32.c  view on Meta::CPAN

{
    unsigned long sum1;
    unsigned long sum2;
    unsigned rem;

    /* the derivation of this formula is left as an exercise for the reader */
    rem = (unsigned)(len2 % BASE);
    sum1 = adler1 & 0xffff;
    sum2 = rem * sum1;
    MOD(sum2);
    sum1 += (adler2 & 0xffff) + BASE - 1;

 view all matches for this distribution


Google-RestApi

 view release on metacpan or  search on metacpan

lib/Google/RestApi/Request.pm  view on Meta::CPAN

A Request is a lightweight base class that provides generic batch
request queuing and response infrastructure. It is used by both
Google Sheets (via SheetsApi4::Request) and Google Docs (via
DocsApi1::Document) to collect requests and distribute responses.

Batch requests are formulated and queued up to be submitted later
via 'submit_requests'. Derived classes must override submit_requests
to implement the actual API call.

The default merge_request returns false (no merging). Sheets overrides
this with its own merge logic for combining compatible requests.

 view all matches for this distribution


Graph-Graph6

 view release on metacpan or  search on metacpan

lib/Graph/Graph6.pm  view on Meta::CPAN

self-loops but no multi-edges.

=cut

# GP-DEFINE  graph6_size_bits_by_sum(n) = sum(j=1,n-1, sum(i=0, j-1, 1));
# GP-DEFINE  graph6_size_bits_formula(n) = n*(n-1)/2;
# GP-Test  vector(100,n, graph6_size_bits_formula(n)) == \
# GP-Test  vector(100,n, graph6_size_bits_by_sum(n))

# GP-DEFINE  graph6_size_bits_formula(n) = n^2/2 - n/2;
# GP-Test  vector(100,n, graph6_size_bits_formula(n)) == \
# GP-Test  vector(100,n, graph6_size_bits_by_sum(n))

=pod

This module reads and writes in a "native" way as integer vertex numbers 0

 view all matches for this distribution


Graph-Maker-Other

 view release on metacpan or  search on metacpan

devel/Hanoi-equal-shortest.pl  view on Meta::CPAN


# GP-DEFINE  read("OEIS-data.gp");
# GP-DEFINE  read("OEIS-data-wip.gp");
# GP-DEFINE  OEIS_check_verbose = 1;

# GP-DEFINE  A107839_formula(n) = \
# GP-DEFINE    polcoeff(lift(Mod('x,'x^2-5*'x+2)^(n+1)),1);
# GP-DEFINE  A107839(n) = {
# GP-DEFINE    n>=0 || error("A107839() is for n>=0");
# GP-DEFINE    A107839_formula(n);
# GP-DEFINE  }
# GP-Test  OEIS_check_func("A107839")
# OEIS_check_func("A107839",'bfile)

# GP-DEFINE  A052984_formula(n) = vecsum(Vec(lift(Mod('x,'x^2-5*'x+2)^(n+1))));
# GP-DEFINE  A052984(n) = {
# GP-DEFINE    n>=0 || error("A052984() is for n>=0");
# GP-DEFINE    A052984_formula(n);
# GP-DEFINE  }
# GP-Test  OEIS_check_func("A052984")
# OEIS_check_func("A052984",,'bfile)

# my(v=OEIS_data("A052984")); \

devel/Hanoi-equal-shortest.pl  view on Meta::CPAN

# not in OEIS: 0.438447187191
# GP-Test  PM_poly(M) == 0
# GP-Test  P*M == 2

#---
# GP-DEFINE  \\ powers formula by Hinz et al, x_n for n+1 discs
# GP-DEFINE  xx(n) = {
# GP-DEFINE    simplify(
# GP-DEFINE    3/(4*sqrt17)
# GP-DEFINE    * ((sqrt17+1)*P^(n+1) - 2*3^(n+1)*sqrt17 + (sqrt17-1)*M^(n+1))
# GP-DEFINE    );
# GP-DEFINE  }
# GP-Test  /* in x_n, A107839 across one pair n within n+1 */ \
# GP-Test  vector(10,n,n--; (xx(n+1) - 3*xx(n))/6) == \
# GP-Test  vector(10,n,n--; A107839(n))
#
# GP-DEFINE  a_formula(n) = xx(n-1);
# GP-DEFINE  a(n) = {
# GP-DEFINE    n>=1 || error("a() is for n>=1");
# GP-DEFINE    xx(n-1);
# GP-DEFINE  }
# GP-Test  vector(4,n, a(n)) == [0, 6, 48, 282]

devel/Hanoi-equal-shortest.pl  view on Meta::CPAN

# GP-Test  /* subgraphs using A107839 = num between subgraphs */ \
# GP-Test  vector(100,n,n++; a(n)) == \
# GP-Test  vector(100,n,n++; 3*a(n-1) + 6*A107839(n-2))
#
# GP-Test  my(n=1); a(n)                   == 0
# GP-Test  my(n=1); 6*A107839_formula(n-2) == 0
# GP-Test  my(n=0); a_formula(n)           == 0
# GP-Test  my(n=0); 6*A107839_formula(n-2) == -3
# GP-Test  my(n=-1); a_formula(n)          == 1
# GP-Test  /* including reversing back earlier */ \
# GP-Test  vector(100,n,n-=20; a_formula(n)) == \
# GP-Test  vector(100,n,n-=20; 3*a_formula(n-1) + 6*A107839_formula(n-2))
# GP-Test  my(n=3); A107839_formula(n-2) == 5  /* my n=3 example */
#
# GP-Test  /* recurrence 8, -17, 6
# GP-Test  vector(100,n,n+=2; a(n)) == \
# GP-Test  vector(100,n,n+=2; 8*a(n-1) - 17*a(n-2) + 6*a(n-3))
# GP-Test  vector(100,n,n-=20; a_formula(n)) == \
# GP-Test  vector(100,n,n-=20; \
# GP-Test          8*a_formula(n-1) - 17*a_formula(n-2) + 6*a_formula(n-3))
#
# GP-Test  /* using A052984 for the Lucas sequence part */ \
# GP-Test  vector(100,n, a(n)) == \
# GP-Test  vector(100,n, (A052984(n) - 3^n)*3/2 )

devel/Hanoi-equal-shortest.pl  view on Meta::CPAN


# GP-DEFINE  \\ compact polmod
# GP-DEFINE  my(p=Mod('x, 'x^2-5*'x+2)); a_compact(n) = (vecsum(Vec(lift(p^(n+1)))) - 3^n)*3/2;
# GP-Test  vector(100,n, a(n)) == \
# GP-Test  vector(100,n, a_compact(n))
# GP-Test  vector(100,n,n-=20; a_formula(n)) == \
# GP-Test  vector(100,n,n-=20; a_compact(n))

# GP-Test  6*5 + 6*3*1 == 48

# GP-Test  /* A107839 across one pair n when making n+1 */ \

 view all matches for this distribution


Graphics-ColorNames-Pantone

 view release on metacpan or  search on metacpan

lib/Graphics/ColorNames/PantoneReport.pm  view on Meta::CPAN

mistaken for the colors of the palette created by Pantone for Designers,
which can be accessed via L<Graphics::ColorNames::Pantone>. I choose
TPX (TPG) over TCX values since ladder are specific to the textile industry
and I assume usage of this module is monitor related. However, when no
TPX (TPG) available we took TCX, since I dont have the exact conversion
formula.

All names are lower case and do not contain space or apostrophes or other
none ASCII characters - the originally named C<"Potter's Clay"> is
here C<"pottersclay"> and C<'Crème de Peche'> => C<'cremedepeche'>.
But you can actually access them as "Potters_Clay" and 'Creme de Peche'

 view all matches for this distribution


Graphics-Framebuffer

 view release on metacpan or  search on metacpan

lib/Graphics/Framebuffer.pm  view on Meta::CPAN


=head2 monochrome

Removes all color information from an image, and leaves everything in greyscale.

It applies the following formula to calculate greyscale:

 grey_color = (red * 0.2126) + (green * 0.7155) + (blue * 0.0722)

=over 4

 view all matches for this distribution


Graphics-MNG

 view release on metacpan or  search on metacpan

include/libmng.h  view on Meta::CPAN

MNG_EXT mng_retcode MNG_DECL mng_set_srgbimplicit    (mng_handle        hHandle);
#endif

/* Gamma settings */
/* only used if you #define MNG_FULL_CMS or #define MNG_GAMMA_ONLY */
/* ... blabla (explain gamma processing a little; eg. formula & stuff) ... */
MNG_EXT mng_retcode MNG_DECL mng_set_viewgamma       (mng_handle        hHandle,
                                                      mng_float         dGamma);
MNG_EXT mng_retcode MNG_DECL mng_set_displaygamma    (mng_handle        hHandle,
                                                      mng_float         dGamma);
MNG_EXT mng_retcode MNG_DECL mng_set_dfltimggamma    (mng_handle        hHandle,

 view all matches for this distribution


Graphics-Penplotter-GcodeXY

 view release on metacpan or  search on metacpan

t/16-ana.t  view on Meta::CPAN

    ok abs($cfg{phi_fwd} - $PI) < 1e-9,    'build_config: phi_fwd=pi for default obs';

    # ang_rad: 2*asin(1/5)*0.9 ~ 2*0.20136*0.9 ~ 0.36245
    my $expected_ang = 2.0 * atan2(0.2, sqrt(1-0.04)) * 0.90;
    ok abs($cfg{ang_rad} - $expected_ang) < 1e-6,
                                            'build_config: default ang_rad matches formula';

    # beta0 = atan2(H, D) = atan2(5,5) = pi/4
    ok abs($cfg{beta0} - $PI/4) < 1e-9,    'build_config: beta0=pi/4 for H=D';

    # elev_rad = beta0 * 0.8

 view all matches for this distribution


Graphics-Toolkit-Color

 view release on metacpan or  search on metacpan

lib/Graphics/Toolkit/Color.pm  view on Meta::CPAN

For instance if you want to know only the difference in brightness between
two colors, you type C<< select => 'lightness' >> or C<< select => 'l' >>.
This naturally works only if you did also choose I<HSL> as a color space
or something similar that has a C<lightness> axis like I<LAB> or I<OKLAB>.
The C<select> argument accepts a string or an ARRAY with several axis names,
which can also repeat. For instance there is a formula to compute distances
in RGB that weights the squared value delta's:
C<< $distance =  sqrt( 3 * delta_red**2 + 4 * delta_green**2 + 2 * delta_blue**2) >>.
You can recreate that formula by typing C<< select => [qw/ r r r g g g g b b/] >>

The last argument is named L</range>, which can change the result drasticly.

    my $d = $blue->distance( 'lapisblue' );                 # how close is blue to lapis?
    $d = $blue->distance( to => 'airyblue', select => 'b'); # have they the same amount of blue?

 view all matches for this distribution


Grid-Request

 view release on metacpan or  search on metacpan

lib/Grid/Request.pm  view on Meta::CPAN


    # Iterate over them...
    my $command_count = 1;

    eval { require Grid::Request::JobFormulator };
    my $formulator = Grid::Request::JobFormulator->new();

    foreach my $com_obj (@command_objs) {
        print "Command #" . $command_count . "\n"; 
        my $exe = $com_obj->command();
        my $block_size = $com_obj->block_size();

lib/Grid/Request.pm  view on Meta::CPAN

        foreach my $param_obj (@params) {
            my $param_str = $param_obj->to_string();
            push (@param_strings, $param_str);
        }

        my @invocations = $formulator->formulate($block_size, $exe, @param_strings);
        foreach my $invocations (@invocations) {
            my @cli = @$invocations;
            my @esc_cli = _esc_chars(@cli);
            print join(" ", @esc_cli) . "\n";
        }

 view all matches for this distribution


Groonga-HTTP

 view release on metacpan or  search on metacpan

docs/assets/stylesheets/bootstrap/_glyphicons.scss  view on Meta::CPAN

.glyphicon-king                   { &:before { content: "\e211"; } }
.glyphicon-queen                  { &:before { content: "\e212"; } }
.glyphicon-pawn                   { &:before { content: "\e213"; } }
.glyphicon-bishop                 { &:before { content: "\e214"; } }
.glyphicon-knight                 { &:before { content: "\e215"; } }
.glyphicon-baby-formula           { &:before { content: "\e216"; } }
.glyphicon-tent                   { &:before { content: "\26fa"; } }
.glyphicon-blackboard             { &:before { content: "\e218"; } }
.glyphicon-bed                    { &:before { content: "\e219"; } }
.glyphicon-apple                  { &:before { content: "\f8ff"; } }
.glyphicon-erase                  { &:before { content: "\e221"; } }

 view all matches for this distribution


Gtk2-Ex-GroupBy

 view release on metacpan or  search on metacpan

examples/group-by.pl  view on Meta::CPAN

		],
		[
			'State', 'Country'
		],
	],
	'formula'  => [
		[
			{ field => 'Revenue', formula => 'SUM of'},
			{ field => 'Expenses', formula => 'SUM of'},
			{ field => 'Margin', formula => 'AVG of'},
			{ field => 'Sales', formula => 'SUM of'},
		],
		[
			{ field => 'Costs', formula => 'SUM of'},
			{ field => 'Price', formula => 'AVG of'},
		],
	]
});
$groupby->signal_connect( 'changed' => 
	sub {

examples/group-by.pl  view on Meta::CPAN


sub _make_sql {
	my ($model, $table) = @_;
	print Dumper $model;
	my @group;
	my @formula;
	foreach my $x (@{$model->{'groupby'}->[0]}) {
		push @group, $x;
	}
	foreach my $x (@{$model->{'formula'}->[0]}) {
		my $f = $x->{'formula'};
		$f =~ s/ of$//;
		push @formula, $f.'('.$x->{'field'}.')';
	}
	my $groupstr = join ',', @group;
	my $formulastr = join ',', @formula;
	print Dumper \@group;
	print Dumper \@formula;
	my $query = "select $groupstr,$formulastr from $table group by $groupstr"
		if $groupstr;
	print Dumper $query;
}

 view all matches for this distribution


Gtk2-GoBoard

 view release on metacpan or  search on metacpan

GoBoard.pm  view on Meta::CPAN

   my $w2      = $w - $borderw * 2;
   my $h2      = $h - $borderh * 2;
   my $edge    = ceil $w2 / ($size + 1);
   my $ofs     = $edge * 0.5;

   # we need a certain minimum size, and just fudge some formula here
   return if $w < $size * 5 + 2 + $borderw
          || $h < $size * 6 + 2 + $borderh;

   my @kx = map int ($w2 * $_ / ($size+1) + $borderw + 0.5), 0 .. $size; $self->{kx} = \@kx;
   my @ky = map int ($h2 * $_ / ($size+1) + $borderh + 0.5), 0 .. $size; $self->{ky} = \@ky;

 view all matches for this distribution


Gtk3-ImageView

 view release on metacpan or  search on metacpan

t/4_select.t  view on Meta::CPAN

$event->set_always( 'x', 93 );
$event->set_always( 'y', 67 );
$view->get_tool->button_released($event);

SKIP: {
    skip "I can't figure out the correct formula here which works with HiDPI", 1
      if $view->get('scale-factor') > 1;
    cmp_deeply(
        $view->get_selection,
        {
            x      => num(32),

 view all matches for this distribution


HOI-Comprehensions

 view release on metacpan or  search on metacpan

lib/HOI/Comprehensions.pm  view on Meta::CPAN


=head1 FUNCTIONS

=head2 comp($@)->(@)

For creating a list comprehension object. The formula for computing the elements of
the list is given as a subroutine, following by the generators, in form of name => arrayref, 
name => subroutine or name => comprehension. Comp returns a function which takes all guards 
in form of subroutines. Guard parameters can be left empty if there is no guard.

The variable names for naming the ganerators could be used directly in the computation sub and
all guard subs without strict vars enabled. They have local scope as if they were declared with
keyword 'local' in Perl.

A hashref which holds generator variables as its keys and value of those variables as
its values is passed to the formula subroutine. However, it is recommended to use such
variables directly instead of dereference the hashref.

Generators can be arrayrefs, subroutines or list comprehensions. A subroutine generator should 
return a pair ( elt, done ), where elt is the next element and done is a flag telling whether
the iteration is over, or return a single element.

 view all matches for this distribution


HON-Http-UrlChecker-Service

 view release on metacpan or  search on metacpan

t/resources/t-gone/symptoms.html  view on Meta::CPAN

href="http://national-paranormal-society.org/psychotic-disorders-generalized/" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://national-paranormal-society.org/psychotic-disorders-generalized/', 'psychotic');">psychotic</a> or schizo...
href="http://www.ncbi.nlm.nih.gov/pubmed/23948178" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://www.ncbi.nlm.nih.gov/pubmed/23948178', '10% to 15%');">10% to 15%</a> of the overall population. Tinnitus is not commonly limited to ...
href="http://www.medicinenet.com/brain_tumor/article.htm" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://www.medicinenet.com/brain_tumor/article.htm', 'a cranial tumor');">a cranial tumor</a>, or epilepsy.</p><p>&nbsp;</p><p>Sympto...
href="http://www.webmd.com/a-to-z-guides/understanding-tinnitus-symptoms" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://www.webmd.com/a-to-z-guides/understanding-tinnitus-symptoms', 'be a sign of Meniere’s disease');">be a sign ...
href="http://www.mayoclinic.org/diseases-conditions/tinnitus/basics/risk-factors/con-20021487" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://www.mayoclinic.org/diseases-conditions/tinnitus/basics/risk-factors/con-20021487', 'are m...
href="http://stopmyearsringing.weebly.com/t-gone-tinnitus-remedies.html" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://stopmyearsringing.weebly.com/t-gone-tinnitus-remedies.html', 'brought on by sinus problems');">brought on by si...
class="clear"></div></div></div></div><div
class="sidebar"><div
class="widget widget_text"><div
class="widget-content"><div
class="textwidget"><center><img

 view all matches for this distribution


HPUX-FS

 view release on metacpan or  search on metacpan

contrib/hp_disk_info.cgi  view on Meta::CPAN

print POSTOUT "check_xwrap","\n";
#end of spacer
print POSTOUT "             } if","\n";
print POSTOUT "                } def","\n";
print POSTOUT "%","\n";
print POSTOUT "%------------defines--formula-based","\n";
print POSTOUT "%","\n";
print POSTOUT "","\n";
print POSTOUT "% Define the Font","\n";
print POSTOUT "/HelveticaBold findfont fonth scalefont setfont","\n";
print POSTOUT "%width of cell (will vary depening on maximum string width","\n";

 view all matches for this distribution


HPUX-LVM

 view release on metacpan or  search on metacpan

contrib/hp_disk_info.cgi  view on Meta::CPAN

print POSTOUT "check_xwrap","\n";
#end of spacer
print POSTOUT "             } if","\n";
print POSTOUT "                } def","\n";
print POSTOUT "%","\n";
print POSTOUT "%------------defines--formula-based","\n";
print POSTOUT "%","\n";
print POSTOUT "","\n";
print POSTOUT "% Define the Font","\n";
print POSTOUT "/HelveticaBold findfont fonth scalefont setfont","\n";
print POSTOUT "%width of cell (will vary depening on maximum string width","\n";

 view all matches for this distribution


HTML-DTD

 view release on metacpan or  search on metacpan

share/html-3-strict.dtd  view on Meta::CPAN

                "{" REF5 >

<!--
 The inclusion of %math and exclusion of %notmath is used here
 to alter the content model for the B, SUB and SUP elements,
 to limit them to formulae rather than general text elements.
-->

<!ENTITY % mathvec "VEC|BAR|DOT|DDOT|HAT|TILDE" -- common accents -->
<!ENTITY % mathface "B|T|BT" -- control of font face -->
<!ENTITY % math "BOX|ABOVE|BELOW|%mathvec|ROOT|SQRT|ARRAY|SUB|SUP|%mathface">
<!ENTITY % formula "#PCDATA|%math">

<!ELEMENT MATH - - (#PCDATA)* -(%notmath) +(%math)>
<!ATTLIST MATH
        id      ID      #IMPLIED
        class    NAMES   #IMPLIED -- e.g. class=chem -->

share/html-3-strict.dtd  view on Meta::CPAN

     Note that the names of common functions are recognized
     by the parser without the need to use "&" and ";" around
     them, e.g. int, sum, sin, cos, tan, ...
-->

<!ELEMENT BOX - - ((%formula)*, (LEFT, (%formula)*)?,
                   ((OVER|ATOP|CHOOSE), (%formula)*)?,
                   (RIGHT, (%formula)*)?)>
<!ATTLIST BOX
        size  (normal|medium|large|huge) normal -- oversize delims -->

<!ELEMENT (OVER|ATOP|CHOOSE|LEFT|RIGHT) - O EMPTY>

share/html-3-strict.dtd  view on Meta::CPAN

     
     e.g. <above sym=ssmile>x</above>
     places an upwardly turning curve above the "x"
 -->

<!ELEMENT ABOVE - - (%formula)+>
<!ATTLIST ABOVE sym ENTITY #IMPLIED>

<!-- Horizontal line drawn BELOW contents
     The symbol attribute allows authors to 
     supply an entity name for an arrow symbol etc.
     Generalisation of LaTeX's underline command.
 -->

<!ELEMENT BELOW - - (%formula)+>
<!ATTLIST BELOW sym ENTITY #IMPLIED>

<!-- Convenience tags for common accents:
     vec, bar, dot, ddot, hat and tilde
-->

<!ELEMENT (%mathvec) - - (%formula)+>

<!--
  T and BT are used to designate terms which should
  be rendered in an upright font (& bold face for BT)
-->

<!ELEMENT (T|BT) - - (%formula)+>
<!ATTLIST (T|BT) class NAMES #IMPLIED>

<!-- Roots  e.g. <ROOT>3<OF>1+x</ROOT> -->

<!ELEMENT ROOT - - ((%formula)+, OF, (%formula)+)>
<!ELEMENT OF - O (%formula)* -- what the root applies to -->

<!ELEMENT SQRT - - (%formula)* -- square root convenience tag -->

<!-- LaTeX like arrays. The COLDEF attribute specifies
     a single capital letter for each column determining
     how the column should be aligned, e.g. coldef="CCC"

share/html-3-strict.dtd  view on Meta::CPAN

        ldelim  CDATA   #IMPLIED  -- stretchy left delimiter --
        rdelim  CDATA   #IMPLIED  -- stretchy right delimiter --
        labels (labels) #IMPLIED  -- TeX's \bordermatrix style -->

<!ELEMENT ROW - O (ITEM)*>
<!ELEMENT ITEM - O (%formula)*>
<!ATTLIST ITEM
        align   CDATA  #IMPLIED  -- override coldef alignment --
        colspan NUMBER 1         -- merge columns as per TABLE --
        rowspan NUMBER 1         -- merge rows as per TABLE -->

 view all matches for this distribution


HTML-Dojo

 view release on metacpan or  search on metacpan

lib/HTML/Dojo/src.pm  view on Meta::CPAN

 * prototype a data provider that enforces strong typing
 * prototype a data provider that prevents ad-hoc attributes
 * prototype a data provider that enforces single-kind item
 * prototype a data provider that allows for login/authentication
 * have loosely typed result sets play nicely with widgets that expect strong typing
 * prototype an example of spreadsheet-style formulas or derivation rules
 * experiment with some sort of fetch() that returns only a subset of a data provider's items


__CPAN_FILE__ src/data/old/Item.js
/*

 view all matches for this distribution


HTML-DublinCore

 view release on metacpan or  search on metacpan

t/test.html  view on Meta::CPAN

estado de la cuesti&oacute;n, aunque quiz&aacute; el escaso n&uacute;mero de motores desarrollados en 
ese momento limit&oacute; el alcance del mismo.</p>
<h3>Leighton y Srivastava (1995-1999).</h3>
<p>De similar importancia al trabajo anterior son las aportaciones de Leighton y 
Srivastava. En el primero de sus trabajos, Leighton evaluaba cuatro motores: 
Infoseek, Lycos, Webcrawler y WWWWorm. Tras la formulaci&oacute;n y ejecuci&oacute;n de ocho 
preguntas, calculaba una serie de medidas basadas en la relevancia, considerando 
adem&aacute;s la ratio de acierto &uacute;nico (documentos recuperados s&oacute;lo en un motor), y el 
n&uacute;mero de enlaces err&oacute;neos junto al n&uacute;mero de documentos duplicados. El 
resultado final de este estudio destaca a Lycos e Infoseek sobre los otros dos. 
El impacto de este trabajo sorprendi&oacute; hasta al mismo autor, quien al principio 

t/test.html  view on Meta::CPAN

web elaborada desde el punto de vista del usuario final (<a href="#Johnson, F.C">Johnson, 2001</a>).</p>

<h3>Oppenheim (2000).</h3>

<p>A partir de la s&iacute;ntesis de estudios de evaluaci&oacute;n anteriores, los autores 
formulan una metodolog&iacute;a de evaluaci&oacute;n de los motores de b&uacute;squeda, agrupando los 
m&eacute;todos m&aacute;s empleados en cuatro categor&iacute;as: </p>
<ul>
  <li>Evaluaciones a peque&ntilde;a escala </li>
  <li>Evaluaciones basadas en los tests Cranfield </li>
  <li>Evaluaciones basadas en los tests Cranfield con estimaci&oacute;n del tama&ntilde;o del 

 view all matches for this distribution


HTML-EasyTags

 view release on metacpan or  search on metacpan

lib/HTML/EasyTags.pm  view on Meta::CPAN


Thanks to W3C for publishing their standards documents in an easy-to-understand 
manner.  I made good use of their XHTML primer document when making release 1-06 
of this module.  The most recent version is at "http://www.w3.org/TR/xhtml1".  
The full title is "XHTML(TM) 1.0: The Extensible HyperText Markup Language -- 
A Reformulation of HTML 4 in XML 1.0 -- W3C Recommendation 26 January 2000".  
I used this document to determine what changes I needed to make for this 
module's output to easily support the new XHTML standard as it supported HTML 4 
and previous versions before, while keeping backwards compatability.

Thanks to B<Lincoln D. Stein> for setting a good interface standard in the

 view all matches for this distribution


HTML-Embperl

 view release on metacpan or  search on metacpan

IntroD.pod  view on Meta::CPAN

werden die Daten zunächst noch einmal angezeigt.
Von dort kann man zum vorherigen Formular zurückkehren, um die Daten zu
korrigieren oder der Benutzer bestätigt die Daten, wodurch sie zu einer vordefinierten
Email Adresse gesandt werden. Das Beispiel zeigt auch wie eine Fehlerüberprüfung
implementiert werden kann. Wenn der Name oder die Email Adresse weggelassen wird,
wird eine entsprechende Fehlermeldung angezeigt und das Eingabeformular erscheint wieder.

Der erste Teil ist die Fehlerüberprüfung; der zweite Teil die Bestätigungsseite;
der dritte Teil versendet die Email, wenn die Eingaben bestätigt wurden und der
letzte Teil ist das Eingabeformular.

In Abhängigkeit der Werte von C<$fdat{check}>, C<$fdat{send}> und ob C<$fdat{name}> und
C<$fdat{email}> Daten enthalten, entscheidet das Dokument welcher Teil zur
Ausführung kommt.

 view all matches for this distribution


HTML-ExtractMeta

 view release on metacpan or  search on metacpan

t/10.extract.t  view on Meta::CPAN

    my $html = read_text( $FindBin::Bin . '/html/techcrunch.html' );

    my $EM = HTML::ExtractMeta->new( html => $html );

    is( $EM->title,       "The 10 Best iOS And Android Games Of 2012", 'get_title' );
    is( $EM->description, "Editor's note: Stephen Danos is the associate editor for the mobile app discovery site Appolicious. This year’s most captivating games either pushed the envelope with state-of-the-art graphics and rich narratives, or perf...
    is( $EM->url,         "http://techcrunch.com/2012/12/29/the-10-best-ios-and-android-games-of-2012/", 'get_url' );
    is( $EM->image_url,   "http://tctechcrunch2011.files.wordpress.com/2012/12/app-stores.jpg?w=136", 'get_image_url' );
    is( $EM->site_name,   "TechCrunch", 'get_site_name' );
    is( $EM->type,        "article", 'get_type' );

 view all matches for this distribution


HTML-FormFu

 view release on metacpan or  search on metacpan

lib/HTML/FormFu/Model/HashRef.pm  view on Meta::CPAN


  # $hashref is very much the same as the hashref you passed to default_values()

=head1 DESCRIPTION

If you need the content of a formular as hashref or for processing with other modules
like C<JSON> you can use this model.

=head1 METHODS

=head2 create

 view all matches for this distribution


HTML-FormHandler

 view release on metacpan or  search on metacpan

lib/HTML/FormHandler/I18N/ca_es.pm  view on Meta::CPAN

# Auto define lexicon
our %Lexicon = (
    '_AUTO' => 1,

    # H::F
    'There were errors in your form'=> q(El formulari te errors),

    # H::F::Field
    'field is invalid' => 'Campo invalido',
    'Wrong value' => 'Valor incorrecte',
    '[_1] does not match' => '[_1] no coincideix',

lib/HTML/FormHandler/I18N/ca_es.pm  view on Meta::CPAN

    'File not found for upload field' => q(El fitxer especificat no existeix),

    # H::F::Model
    'Value must be unique in the database' => 'El valor ha de ser únic a la base de dades',
    # H::F::Widget::Theme::BootstrapFormMessages
    'There were errors in your form' => q(Hi ha errors al formulari),
    'Your form was successfully submitted' => q(El formulari s'ha enviat correctament),
  );

1;

__END__

 view all matches for this distribution


( run in 3.690 seconds using v1.01-cache-2.11-cpan-483215c6ad5 )