view release on metacpan or search on metacpan
lib/App/BPOMUtils/Table/FoodType.pm view on Meta::CPAN
[605, "Formula Lanjutan"],
[606, "Formula Pertumbuhan"],
[610, "Makanan Diet Diabetes"],
[
613,
"Makanan formula sebagai makanan diet kontrol berat badan",
],
[615, "Pangan Ibu Hamil dan Pangan Ibu Menyusui"],
[651, "Air mineral alami"],
[652, "Air Minum dalam Kemasan (AMDK)"],
[653, "Air Bermineral"],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CSVUtils/csv_mix_formulas.pm view on Meta::CPAN
package App::CSVUtils::csv_mix_formulas;
use 5.010001;
use strict;
use warnings;
use Log::ger;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-02-24'; # DATE
our $DIST = 'App-CSVUtils-csv_mix_formulas'; # DIST
our $VERSION = '0.002'; # VERSION
use App::CSVUtils qw(
gen_csv_util
);
use List::Util qw(sum);
gen_csv_util(
name => 'csv_mix_formulas',
summary => 'Mix several formulas/recipes (lists of ingredients and their weights/volumes) into one, '.
'and output the combined formula',
description => <<'MARKDOWN',
Each formula is a CSV comprised of at least two fields. The first field (by
default literally the first field, but can also be specified using
`--ingredient-field`) is assumed to contain the name of ingredients. The second
field (by default literally the second field, but can also be specified using
`--weight-field`) is assumed to contain the weight of ingredients. A percent
form is recognized and will be converted to its decimal form (e.g. "60%" or
lib/App/CSVUtils/csv_mix_formulas.pm view on Meta::CPAN
sugar,14,bar,baz,qux
water,80,bar,baz,qux
will result in the following CSV. Note: 1) for the header, except for the first
two fields which are the ingredient name and weight which will contain the mixed
formula, the other fields will simply collect values from all the CSV files. 2)
for sorting order: decreasing weight then by name.
ingredient,%weight,extra-field1,extra-field2,extra-field3
water,80,foo,bar,qux
sugar,14.5,foor,bar,qux
lib/App/CSVUtils/csv_mix_formulas.pm view on Meta::CPAN
# TODO: allow to customize
if ($r->{input_filenum} == 1) {
# assign the ingredient field and weight field
if (defined $r->{util_args}{ingredient_field}) {
die "csv-mix-formulas: FATAL: Specified ingredient field does not exist\n"
unless defined $r->{input_fields_idx}{ $r->{util_args}{ingredient_field} };
$r->{ingredient_field} = $r->{util_args}{ingredient_field};
die "csv-mix-formulas: FATAL: Specified weight field does not exist\n"
unless defined $r->{input_fields_idx}{ $r->{util_args}{weight_field} };
$r->{weight_field} = $r->{util_args}{weight_field};
} else {
die "csv-mix-formulas: FATAL: At least 2 fields are required\n" unless @{ $r->{input_fields} } >= 2;
$r->{ingredient_field} = $r->{input_fields}[0];
$r->{weight_field} = $r->{input_fields}[1];
}
}
lib/App/CSVUtils/csv_mix_formulas.pm view on Meta::CPAN
}
}
#use DD; dd $ingredients;
my $num_formulas = @{ $r->{input_filenames} };
return unless $num_formulas;
# calculate the weights of the mixed formula
for my $ingredient (keys %{ $ingredients }) {
$ingredients->{$ingredient}{ $r->{weight_field} } = sum( @{ $ingredients->{$ingredient}{ $r->{weight_field} } } ) / $num_formulas;
}
for my $ingredient (sort { ($ingredients->{$b}{ $r->{weight_field} } <=> $ingredients->{$a}{ $r->{weight_field} }) ||
(lc($a) cmp lc($b)) } keys %$ingredients) {
lib/App/CSVUtils/csv_mix_formulas.pm view on Meta::CPAN
}
},
);
1;
# ABSTRACT: Mix several formulas/recipes (lists of ingredients and their weights/volumes) into one, and output the combined formula
__END__
=pod
=encoding UTF-8
=head1 NAME
App::CSVUtils::csv_mix_formulas - Mix several formulas/recipes (lists of ingredients and their weights/volumes) into one, and output the combined formula
=head1 VERSION
This document describes version 0.002 of App::CSVUtils::csv_mix_formulas (from Perl distribution App-CSVUtils-csv_mix_formulas), released on 2024-02-24.
=head1 FUNCTIONS
=head2 csv_mix_formulas
Usage:
csv_mix_formulas(%args) -> [$status_code, $reason, $payload, \%result_meta]
Mix several formulasE<sol>recipes (lists of ingredients and their weightsE<sol>volumes) into one, and output the combined formula.
Each formula is a CSV comprised of at least two fields. The first field (by
default literally the first field, but can also be specified using
C<--ingredient-field>) is assumed to contain the name of ingredients. The second
field (by default literally the second field, but can also be specified using
C<--weight-field>) is assumed to contain the weight of ingredients. A percent
form is recognized and will be converted to its decimal form (e.g. "60%" or
lib/App/CSVUtils/csv_mix_formulas.pm view on Meta::CPAN
sugar,14,bar,baz,qux
water,80,bar,baz,qux
will result in the following CSV. Note: 1) for the header, except for the first
two fields which are the ingredient name and weight which will contain the mixed
formula, the other fields will simply collect values from all the CSV files. 2)
for sorting order: decreasing weight then by name.
ingredient,%weight,extra-field1,extra-field2,extra-field3
water,80,foo,bar,qux
sugar,14.5,foor,bar,qux
lib/App/CSVUtils/csv_mix_formulas.pm view on Meta::CPAN
Return value: (any)
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/App-CSVUtils-csv_mix_formulas>.
=head1 SOURCE
Source repository is at L<https://github.com/perlancar/perl-App-CSVUtils-csv_mix_formulas>.
=head1 AUTHOR
perlancar <perlancar@cpan.org>
lib/App/CSVUtils/csv_mix_formulas.pm view on Meta::CPAN
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-CSVUtils-csv_mix_formulas>
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CSVUtils/csv_check_cell_values.pm view on Meta::CPAN
tags => ['accepts-schema', 'accepts-regex', 'category:checking'],
examples => [
{
summary => 'Check whether the `rank` field has monotonically increasing values',
argv => ['formula.csv', '-f', 'rank', '--with-schema', 'array/num//monotonically_increasing'],
test => 0,
'x.doc.show_result' => 0,
},
],
lib/App/CSVUtils/csv_check_cell_values.pm view on Meta::CPAN
=over
=item * Check whether the `rank` field has monotonically increasing values:
csv_check_cell_values(
input_filename => "formula.csv",
include_fields => ["rank"],
with_schema => "array/num//monotonically_increasing"
);
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CamelPKI/Controller/Test.pm view on Meta::CPAN
pieces of controllers and views to play with Catalyst to learn how it
works.
Contrary to all other kind of tests, learning tests are neither
normative (success is not required) nor automated (success criteria
may are not be implemented, or even formulated).
=head2 json_helloworld
Accepts a JSON parameter which contains an associative table with keys
"nom" (meaning last name in French) and "prenom" (first name), and
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Chart/Series/Calculation.pm view on Meta::CPAN
}
#------------------------------------------------------------------------------
# http://mathworld.wolfram.com/LeastSquaresFitting.html
# Least squares generally, including deriving formula using
# derivative==0 as follows:
#
# The sum of squares is
#
# R^2(a,b) = Sum (y[i] - (a + b*x[i]))^2
view all matches for this distribution
view release on metacpan or search on metacpan
# Matches the last child element of the given type (JQuery,Selectors,Child,Filters,Table 2.5)
:last-of-type
# Matches the nth child element, even or odd child elements, or nth child element
# computed by the supplied formula within the context based on the given parameter
# (JQuery,Selectors,Child,Filters,Table 2.5)
:nth-child(n),:nth-child(even|odd),:nth-child(Xn+Y)
# Matches the nth child element, even or odd child elements, or nth child element
# computed by the supplied formula within the context, counting from the last to
# the first element, based on the given parameter (JQuery,Selectors,Child,Filters,Table 2.5)
:nth-last-child(n),:nth-last-child(even|odd),:nth-last-child(Xn+Y)
# Matches the nth child element, even or odd child elements, or nth child element
# of their parent in relation to siblings with the same element name
echo "$n" | perl -nle 'sub is_prime{($n)=@_; ("N" x $n) !~ /^ (NN+?) (?{ print "Trying: $n. Grouping by: $^N" }) \1+ $/x} is_prime($_); print ""'
#
# Debug Regex 2
echo "$n" | perl -Mre=debug -nle 'sub is_prime{("N" x shift) !~ /^ (NN+?) \1+ $/x} print if is_prime($_)'
# Calculate pi using the formula:
# pi = SUMMATION(x:0.5 to 0.5): 4 / (1 + x^2)
perl -le '$int = 5; $h = 1/$int; for m^C$i(1..$int){ my $x = $h * ($i - 0.5); $sum += 4 / (1 + $x**2) }; $pi = $h * $sum; print $pi'
# Example of having true value that is numerically 0.
# Documented in: perldoc perlfunc
sub log_base {
my ($base, $value) = @_;
return log($value)/log($base);
}
# Calculate GCD and LCM using euclids formula.
perl -E '
$_m = $m = 35;
$_n = $n = 20;
while ( 1 ) {
say "$m, $n, ", ($_m * $_n / $m);
perl -MExcel::Writer::XLSX -E "$wb = Excel::Writer::XLSX->new('my.xlsx') or die qq($!\n); $ws = $wb->add_worksheet('my'); $ws->write('A1', 'Hello Excel'); $wb->close"
# Excel - Simple: Add a format to make a cell bold
perl -MExcel::Writer::XLSX -E "$wb = Excel::Writer::XLSX->new('my.xlsx') or die qq($!\n); $ws = $wb->add_worksheet('my'); $format = $wb->add_format; $format->set_bold; $ws->write(0, 0, 'Hello Excel', $format); $wb->close"
# Create a spreadsheet/excel with formulas using perl (only on lnxbr42)
perl -MExcel::Writer::XLSX -le '
$wb=Excel::Writer::XLSX->new("new.xlsx");
$ws=$wb->add_worksheet;
$ws->write("A1","In Excel");
$ws->write("B2",3);
#############################################################
# Get last row in an excel column
=MATCH(TRUE,INDEX($K$3:$K$22="",0),0)-1
# Show excel formulas
Ctrl + `
# Insert the current date
Ctrl + :
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/perlcriticrc view on Meta::CPAN
# modules.
[-ValuesAndExpressions::ProhibitConstantPragma]
# A good idea, but there are too many places where this would be more
# confusing than helpful. Pull out numbers if one might change them
# independent of the algorithm, but don't do so for mathematical formulae.
[-ValuesAndExpressions::ProhibitMagicNumbers]
# This has never triggered on anything useful and keeps telling me to add
# underscores to UNIX timestamps and port numbers, which is just silly.
[-ValuesAndExpressions::RequireNumberSeparators]
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ErrorCalculator.pm view on Meta::CPAN
sub _run_calculation {
my $func = $body;
if (not $funclabel->get_text() eq 'Valid Function ') {
new_and_run
Gtk2::Ex::Dialogs::ErrorMsg( text => "You should give me a valid formula first." );
return();
}
if (not $inlabel->get_text() eq 'Valid Data File ') {
new_and_run
lib/App/ErrorCalculator.pm view on Meta::CPAN
exponentiation. Trigonometric, inverse
trigonometric and hyperbolic functions are implemented
(C<sin cos tan cot asin acos atan acot sinh cosh asinh acoth>).
C<log> indicates a natural logarithm.
Additionally, you may include derivatives in the formula which
will be evaluated (analytically) for you. The syntax for this is:
C<partial_derivative(a * x + b, x)>. (Would evaluate to C<a>.)
In order to allow for errors in constants, the program uses the
L<Math::SymbolicX::Error> parser extension: use the
C<error(1 +/- 0.2)> function to include constants with
associated uncertainties in your formulas.
The input files may be of any format recognized by the
L<Spreadsheet::Read> module. That means: Excel sheets,
OpenOffice (1.0) spreadsheets, CSV (comma separated values)
text files, etc.
The program reads tabular data from the spreadsheet file.
It expects each column to contain the data for one variable
in the formula.
a, b, c
1, 2, 3
4, 5, 6
7, 8, 9
This would assign C<1> to the variable C<a>, C<2> to C<b>
and C<3> to C<c> and then evaluate the formula with those
values. The result would be written to the first data line
of the output file. Then, the data in the next row will be
used and so on. If a column is missing data, it is assumed
to be zero.
lib/App/ErrorCalculator.pm view on Meta::CPAN
=head1 SEE ALSO
New versions of this module can be found on http://steffen-mueller.net or CPAN.
L<Math::Symbolic> implements the formula parser, compiler and evaluator.
(See also L<Math::Symbolic::Parser> and L<Math::Symbolic::Compiler>.)
L<Number::WithError> does the actual error propagation.
L<Gtk2> offers the GUI.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/FinanceUtils.pm view on Meta::CPAN
use 5.010001;
use strict;
use warnings;
use Perinci::Sub::Gen::FromFormulas qw(gen_funcs_from_formulas);
our %SPEC;
my $res = gen_funcs_from_formulas(
prefix => 'calc_fv_',
symbols => {
fv => {
caption => 'future value',
schema => ['float*'],
lib/App/FinanceUtils.pm view on Meta::CPAN
caption => 'periods',
summary => 'Number of periods',
schema => ['float*'],
},
},
formulas => [
{
formula => 'fv = pv*(1+r)**n',
examples => [
{
summary => 'Invest $100 at 6% annual return rate for 5 years',
args => {pv=>100, r=>0.06, n=>5},
},
lib/App/FinanceUtils.pm view on Meta::CPAN
src_plang => 'bash',
},
],
},
{
formula => 'pv = fv/(1+r)**n',
examples => [
{
summary => 'Want to get $100 after 5 years at 6% annual return rate, how much to invest?',
args => {fv=>100, r=>0.06, n=>5},
},
],
},
{
formula => 'r = (fv/pv)**(1/n) - 1',
examples => [
{
summary => 'Want to get $120 in 5 years using $100 investment, what is the required return rate?',
args => {fv=>120, pv=>100, n=>5},
},
],
},
{
formula => 'n = log(fv/pv) / log(1+r)',
examples => [
{
summary => 'Want to get $120 using $100 investment with annual 6% return rate, how many years must we wait?',
args => {fv=>120, pv=>100, r=>0.06},
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GUI/Harmonograph.pm view on Meta::CPAN
already mentioned functions.
The second selector has five options: "= + - * /". If you choose the
first (equal sign) your time variable will be just swapped out with another
variable. The other four option describe the operation that will be applied
upon you time value. So e.g. if you select plus the resulting formula
will be C<x = radius * cos (time + (...))>. The allude to whatever you
will choose with the next three selectors.
Selector three and four are just factors. They contain natural numbers
and natural constants you can multiply the variable with. And last not
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GUI/Juliagraph.pm view on Meta::CPAN
=over 4
=item *
iteration formula with up to four monomials
=item *
choosable exponent and factor for each of them
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GoogleSearchUtils.pm view on Meta::CPAN
summary => '(DEPRECATED) Open google search page in browser',
description => <<'_',
This utility can save you time when you want to open multiple queries (with
added common prefix/suffix words) or specify some options like time limit. It
will formulate the search URL(s) then open them for you in browser. You can also
specify to print out the URLs instead.
Aside from standard web search, you can also generate/open other searches like
image, video, news, or map.
lib/App/GoogleSearchUtils.pm view on Meta::CPAN
(DEPRECATED) Open google search page in browser.
This utility can save you time when you want to open multiple queries (with
added common prefix/suffix words) or specify some options like time limit. It
will formulate the search URL(s) then open them for you in browser. You can also
specify to print out the URLs instead.
Aside from standard web search, you can also generate/open other searches like
image, video, news, or map.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/msdoc.pm view on Meta::CPAN
map { $_ => 1 }
map { @{$_->[1]} }
grep { $file =~ $_->[0] } (
[ qr/\.doc[xm]$/, [ qw(w:t w:delText w:instrText wp:posOffset) ] ],
[ qr/\.ppt[xm]$/, [ qw(a:t) ] ],
[ qr/\.xls[xm]$/, [ qw(t v f formula1) ] ],
);
};
my $level = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
README.deepl-FR.md view on Meta::CPAN
L'interface de **gpt-4o** est instable et son bon fonctionnement ne peut être garanti pour le moment.
- **--xlate-labor**
- **--xlabor**
Au lieu d'appeler le moteur de traduction, vous êtes censé travailler pour lui. Après avoir préparé le texte à traduire, il est copié dans le presse-papiers. Vous devez les coller dans le formulaire, copier le résultat dans le presse-papi...
- **--xlate-to** (Default: `EN-US`)
Spécifiez la langue cible. Vous pouvez obtenir les langues disponibles par la commande `deepl languages` lorsque vous utilisez le moteur **DeepL**.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MtAws/FileVersions.pm view on Meta::CPAN
# when $a->{mtime} <=> $b->{mtime} returns 1 or -1, we use that
# ( defined($a->{mtime}) && defined($b->{mtime}) && ($a->{mtime} <=> $b->{mtime}) ) ||
# ( $a->{'time'} <=> $b->{'time'} );
# alternative 2:
# possible alternative formula:
#(defined($a->{mtime}) ? $a->{mtime} : $a->{time}) <=> (defined($b->{mtime}) ? $b->{mtime} : $b->{time})
sub _cmp
{
my ($a, $b) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
share/public/javascripts/he.js view on Meta::CPAN
string = string.replace(regexEscape, hexEscape);
}
return string
// Encode astral symbols.
.replace(regexAstralSymbols, function($0) {
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
var high = $0.charCodeAt(0);
var low = $0.charCodeAt(1);
var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
return '&#x' + codePoint.toString(16).toUpperCase() + ';';
})
view all matches for this distribution
view release on metacpan or search on metacpan
share/mib/lldp.mib view on Meta::CPAN
STATUS current
DESCRIPTION
"The time-to-live value expressed as a multiple of the
lldpMessageTxInterval object. The actual time-to-live value
used in LLDP frames, transmitted on behalf of this LLDP agent,
can be expressed by the following formula: TTL = min(65535,
(lldpMessageTxInterval * lldpMessageTxHoldMultiplier)) For
example, if the value of lldpMessageTxInterval is '30', and
the value of lldpMessageTxHoldMultiplier is '4', then the
value '120' is encoded in the TTL field in the LLDP header.
share/mib/lldp.mib view on Meta::CPAN
DESCRIPTION
"The lldpTxDelay indicates the delay (in units
of seconds) between successive LLDP frame transmissions
initiated by value/status changes in the LLDP local systems
MIB. The recommended value for the lldpTxDelay is set by the
following formula:
1 <= lldpTxDelay <= (0.25 * lldpMessageTxInterval)
The default value for lldpTxDelay object is two seconds.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/PhotoDB/handlers.pm view on Meta::CPAN
$data{coating} = &prompt({prompt=>'What coating does this lens have?', default=>$$defaults{coating}});
$data{hood} = &prompt({prompt=>'What is the model number of the suitable hood for this lens?', default=>$$defaults{hood}});
$data{exif_lenstype} = &prompt({prompt=>'EXIF lens type code', default=>$$defaults{exif_lenstype}});
$data{rectilinear} = &prompt({prompt=>'Is this a rectilinear lens?', type=>'boolean', default=>$$defaults{rectilinear}//'yes'});
$data{image_circle} = &prompt({prompt=>'What is the diameter of the image circle?', type=>'integer', default=>$$defaults{image_circle}});
$data{formula} = &prompt({prompt=>'Does this lens have a named optical formula?', default=>$$defaults{formula}});
$data{shutter_model} = &prompt({prompt=>'What shutter does this lens incorporate?', default=>$$defaults{shutter_model}});
return \%data;
}
# Add accessory compatibility info to a lens
lib/App/PhotoDB/handlers.pm view on Meta::CPAN
my $href = shift;
my $db = $href->{db};
my %data;
$data{manufacturer_id} = $href->{manufacturer_id} // &choose_manufacturer({db=>$db});
$data{toner} = $href->{toner} // &prompt({prompt=>'What is the name of this toner?'});
$data{formulation} = $href->{formulation} // &prompt({prompt=>'What is the chemical formulation of this toner?'});
$data{stock_dilution} = $href->{stock_dilution} // &prompt({prompt=>'What is the stock dilution of this toner?'});
return &newrecord({db=>$db, data=>\%data, table=>'TONER'});
}
# Add a new type of filmstock to the database
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Physics/ParticleMotion.pm view on Meta::CPAN
# to the specified file for further processing. (For example with
# tk-motion-img.pl.)
# output_file = ex1.dat
# This section contains any number of constants that may be used in the
# formulas that define the differential equations. The section should
# exist, but it may be empty.
[constants]
k = 1
m = 1
# This section defines the movement of the first particle (p1).
[p1]
# This is the differential equation of the first coordinate of the
# first particle. It is of the form
# (d^2/dt^2) x1 = yourformula
# "yourformula" may be any string that is correctly parsed by the
# Math::Symbolic parser. It may contain the constants specified above
# and any of the following variables:
# x1 is the first (hence "x") coordinate of the first particle (hence "x1").
# x2 is the x-coordinate of the second particle if it exists, and so on.
# y3 therefore represents the second coordinate of the third particle whereas
lib/App/Physics/ParticleMotion.pm view on Meta::CPAN
# Note that this example simulation only has two dimensions and hence
# "z8" doesn't exist.
# vx1 is the x-component of the velocity of the first particle.
# Therefore, vy3 represents the y-component of the velocity of the
# third particle. You get the general idea...
# All formulas may be correlated with other differential equations.
# That means, "funcx" of the first particle may contain y2 and the
# like. (Provided the dimensions and the particles exist.)
#
# Our example is a simple oszillator
funcx = - k/m * x1*(x1^2)^0.5
lib/App/Physics/ParticleMotion.pm view on Meta::CPAN
=head1 SEE ALSO
New versions of this module can be found on http://steffen-mueller.net or CPAN.
L<Math::Symbolic> implements the formula parser, compiler and evaluator.
(See also L<Math::Symbolic::Parser> and L<Math::Symbolic::Compiler>.)
L<Config::Tiny> implements the configuration reader.
L<Tk> in conjunction with L<Tk::Cloth> offer the GUI.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Repository.pm view on Meta::CPAN
* Signature: $summarized_rows = $rep->summarize_rows($table, $rows, $columns, $summary_keys, $options);
* Param: $table string
* Param: $rows [][]
* Param: $columns []
* Param: $summary_keys []
* Param: $formulas {}
* Return: $summarized_rows []
* Throws: App::Exception::Repository
* Since: 0.01
Sample Usage:
lib/App/Repository.pm view on Meta::CPAN
[ 1, "Ben", "Blue", 22.6, 195, ],
);
@columns = ( "id", "name", "team", "rating", "score" );
@summary_keys = ( "team" );
$summarized_rows = $rep->summarize_rows(\@rows, \@columns, \@summary_keys, \%formulas);
@rows = (
{ id=>5, name=>"Jim", team=>"Green", rating=>13.5, score=>320, },
{ id=>3, name=>"Bob", team=>"Green", rating=> 4.2, score=>230, },
{ id=>9, name=>"Ken", team=>"Green", rating=>27.4, score=>170, },
view all matches for this distribution
view release on metacpan or search on metacpan
3.2.1.n.2 Pertinent processes
3.2.1.n.3 Topology
3.2.2 Process descriptions
3.2.2.1 Process 1
3.2.2.1.1 Input data entities
3.2.2.1.2 Algorithm or formula of process
3.2.2.1.3 Affected data entities
3.2.2.2 Process 2
3.2.2.2.1 Input data entities
3.2.2.2.2 Algorithm or formula of process
3.2.2.2.3 Affected data entities
...
3.2.2.m Process m
3.2.2.m.1 Input data entities
3.2.2.m.2 Algorithm or formula of process
3.2.2.m.3 Affected data entities
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/RoboBot/Plugin/Social/Karma.pm view on Meta::CPAN
message processing pipeline which looks for any karma giving/taking. Any
substrings in messages which match ``nick++`` or ``nick--`` are extracted and
used to automatically increment or decrement, respectively, the named person's
global karma.
A user's karma is calculated using a weighted formula that discourages a single
benefactor or detractor from completely dominating their target's reputation.
It is not a simple integer. Though this module would be much less obtuse if it
were, because karma currently calculates pretty weirdly in some circumstances.
The end goal is for the number of distinct benefactors/detractors to matter
more than the number of grants/revokes performed by a single entity. Stated
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SD/Replica/github.pm view on Meta::CPAN
- add a new comment
- edit a comment's body
- close a ticket (or reopen)
Thus, there is no "history" API call---we just get the current state, and we
can formulate our own history based on the list of comments, updated_at
timestamps, and comparing our state with the current state.
GitHub issues can also have arbitrary "labels" applied to them, but we're
currently ignoring this functionality.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SeismicUnixGui/script/L_SU.pl view on Meta::CPAN
V 0.3.4 has classifies sunix programs using tabbed notebooks Sept. 12, 2018
V0.3.7 removed all ticks from strings in GUIS using control module
From now on users can write words with gaps and commas and L_SU will accept these
value and formulate the correct Seismic Unix sytnax.
V 0.3.8 Standardized format with PerlTidy, tidyviewer .perltidyrc Aug., 2019
V 0.3.9 Introduce Moose attributes to record real-time GUI history
view all matches for this distribution
view release on metacpan or search on metacpan
socialcalc/SocialCalcServersideUtilities.pm view on Meta::CPAN
# Cells:
#
# The sheet's cell data is stored as the value of the "cells" key.
# The $sheet{cells} value is a hash with cell coordinates as keys
# and a hash with the cell attributes as the value. For example,
# $sheet{cells}{A1}{formula} might have a value of "SUM(A1:A10)".
#
# Not all cells need an entry nor a data structure. If they are blank and use
# default values for their attributes, then they need not be present.
#
# Cell data is stored in a hash with the following "key: value" pairs:
#
# coord: the column/row as a string, e.g., "A1"
# datavalue: the value to be used for computation and formatting for display,
# string or numeric (tolerant of numbers stored as strings)
# datatype: if present, v=numeric value, t=text value, f=formula,
# or c=constant that is not a simple number (like "$1.20")
# formula: if present, the formula (without leading "=") for computation or the constant
# valuetype: first char is main type, the following are sub-types.
# Main types are b=blank cell, n=numeric, t=text, e=error
# Examples of using sub-types would be "nt" for a numeric time value, "n$" for currency, "nl" for logical
#
# The following optional values, if present, are mainly used in rendering, overriding defaults:
socialcalc/SocialCalcServersideUtilities.pm view on Meta::CPAN
# defaulttextvalueformat:valueformat# - default text value format number in sheet valueformat list
# defaultcolor:color# - default number for text color in sheet color list
# defaultbgcolor:color# - default number for background color in sheet color list
# circularreferencecell:coord - cell coord with a circular reference
# recalc:value - on/off (on is default). If not "off", appropriate changes to the sheet cause a recalc
# needsrecalc:value - yes/no (no is default). If "yes", formula values are not up to date
#
# The Column attributes:
# Column attributes are stored in $sheet{colattribs}.
# $sheet{colattribs}{width}{col-letter(s)}: width or blank for column
# $sheet{colattribs}{hide}{col-letter(s)}: yes/no (default is no)
socialcalc/SocialCalcServersideUtilities.pm view on Meta::CPAN
my $maxrow = 1;
$sheet->{attribs}{lastcol} = 0;
$sheet->{attribs}{lastrow} = 0;
my ($linetype, $value, $coord, $type, $rest, $cell, $cr, $style, $valuetype,
$formula, $attrib, $num, $name, $desc);
while ($str =~ /([^\r\n]+)/g) {
($linetype, $rest) = split(/:/, $1, 2);
if ($linetype eq "cell") {
socialcalc/SocialCalcServersideUtilities.pm view on Meta::CPAN
$cell->{datatype} = "t";
}
$cell->{valuetype} = $valuetype;
}
elsif ($style eq "vtf") {
($valuetype, $value, $formula, $type, $rest) = split(/:/, $rest, 5);
$cell->{datavalue} = ($value =~ /\\[cnb]/) ? DecodeFromSave($value) : $value;
$cell->{formula} = ($value =~ /\\[cnb]/) ? DecodeFromSave($formula) : $formula;
$cell->{datatype} = "f";
$cell->{valuetype} = $valuetype;
}
elsif ($style eq "vtc") {
($valuetype, $value, $formula, $type, $rest) = split(/:/, $rest, 5);
$cell->{datavalue} = ($value =~ /\\[cnb]/) ? DecodeFromSave($value) : $value;
$cell->{formula} = ($value =~ /\\[cnb]/) ? DecodeFromSave($formula) : $formula;
$cell->{datatype} = "c";
$cell->{valuetype} = $valuetype
}
elsif ($style eq "b") {
my ($t, $r, $b, $l);
socialcalc/SocialCalcServersideUtilities.pm view on Meta::CPAN
else {
$str .= ":vt:$cell->{valuetype}:$value";
}
}
else {
my $formula = EncodeForSave($cell->{formula});
if ($cell->{datatype} eq "f") {
$str .= ":vtf:$cell->{valuetype}:$value:$formula";
}
elsif ($cell->{datatype} eq "c") {
$str .= ":vtc:$cell->{valuetype}:$value:$formula";
}
}
if ($cell->{errors}) {
$str .= ":e:" . EncodeForSave($cell->{errors});
}
socialcalc/SocialCalcServersideUtilities.pm view on Meta::CPAN
return $displayvalue;
}
if ($valuetype eq "t") {
$valueformat = $sheet->{valueformats}->[($cell->{textvalueformat} || $sheetattribs->{defaulttextvalueformat})] || "";
if ($valueformat eq "formula") {
if ($cell->{datatype} eq "f") {
$displayvalue = SpecialChars("=$cell->{formula}") || " ";
}
elsif ($cell->{datatype} eq "c") {
$displayvalue = SpecialChars("'$cell->{formula}") || " ";
}
else {
$displayvalue = SpecialChars("'$displayvalue") || " ";
}
return $displayvalue;
socialcalc/SocialCalcServersideUtilities.pm view on Meta::CPAN
$valueformat = $sheet->{valueformats}->[$valueformat];
if (length($valueformat) == 0) {
$valueformat = "";
}
$valueformat = "" if $valueformat eq "none";
if ($valueformat eq "formula") {
if ($cell->{datatype} eq "f") {
$displayvalue = SpecialChars("=$cell->{formula}") || " ";
}
elsif ($cell->{datatype} eq "c") {
$displayvalue = SpecialChars("'$cell->{formula}") || " ";
}
else {
$displayvalue = SpecialChars("'$displayvalue") || " ";
}
return $displayvalue;
}
elsif ($valueformat eq "forcetext") {
if ($cell->{datatype} eq "f") {
$displayvalue = SpecialChars("=$cell->{formula}") || " ";
}
elsif ($cell->{datatype} eq "c") {
$displayvalue = SpecialChars($cell->{formula}) || " ";
}
else {
$displayvalue = SpecialChars($displayvalue) || " ";
}
return $displayvalue;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SweeperBot.pm view on Meta::CPAN
# Is the game over (we hit a mine)?
# Returns -1 if game is over and we lost, 0 if not over, 1 if over and we won
sub game_over {
# Capture game button and determine its sig
# Game button is always at (x,56). X-value must be determined by
# calculation using formula: x=w/2-11
# Size is 26x26
our($l,$t,$w);
# If we don't know where our smiley lives, then go find it.
if (not $Smiley_offset) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/WebSearchUtils.pm view on Meta::CPAN
summary => 'Open web search page in browser',
description => <<'_',
This utility can save you time when you want to open multiple queries (with
added common prefix/suffix words) or specify some options like time limit. It
will formulate the search URL(s) then open them for you in browser. You can also
specify to print out the URLs instead.
Aside from standard web search, you can also generate/open other searches like
image, video, news, or map.
lib/App/WebSearchUtils.pm view on Meta::CPAN
Open web search page in browser.
This utility can save you time when you want to open multiple queries (with
added common prefix/suffix words) or specify some options like time limit. It
will formulate the search URL(s) then open them for you in browser. You can also
specify to print out the URLs instead.
Aside from standard web search, you can also generate/open other searches like
image, video, news, or map.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Widget/RepositoryEditor.pm view on Meta::CPAN
######################################################################
## x TODO: add "summary" feature
## x TODO: add cross-tabulation
## x TODO: add editing capability
## x TODO (edit): pass sort information into the edit rows screen
## x TODO (edit): check for formulas and primary key to determine read-only (Rep::DB.pm)
## o TODO (edit): don't allow editing for read-only fields
## o TODO (edit): only allow editable fields to be selected
## o TODO (edit): for selected rows screen, show all fields, allow editing on selected fields
## o TODO (edit): when no rows selected, use the selection criteria to get the new rows
## o TODO (export): allow exporting of data
lib/App/Widget/RepositoryEditor.pm view on Meta::CPAN
## we add it to the list and use its alias
## x TODO: add primary key to the group-by clause whenever non-summary group-by is required
## (or editing is required)
## x TODO: autogenerate missing aliases (i.e. col001) for use in group by, order by
## x TODO: only display the columns in the selected columns list (more will be returned)
## x TODO: add default {summary} formula as count(distinct COL) (for non-numbers)
## x TODO: add default {summary} formula as sum(COL) (for numbers)
package App::Widget::RepositoryEditor;
$VERSION = (q$Revision: 3668 $ =~ /(\d[\d\.]*)/)[0]; # VERSION numbers generated by svn
use App;
view all matches for this distribution
view release on metacpan or search on metacpan
script/contenttype view on Meta::CPAN
application/vnd.joost.joda-archive joda
application/vnd.kahootz ktr
application/vnd.kahootz ktz
application/vnd.kde.karbon karbon
application/vnd.kde.kchart chrt
application/vnd.kde.kformula kfo
application/vnd.kde.kivio flw
application/vnd.kde.kontour kon
application/vnd.kde.kpresenter kpr
application/vnd.kde.kpresenter kpt
application/vnd.kde.kspread ksp
script/contenttype view on Meta::CPAN
application/vnd.novadigm.edx edx
application/vnd.novadigm.ext ext
application/vnd.oasis.opendocument.chart odc
application/vnd.oasis.opendocument.chart-template otc
application/vnd.oasis.opendocument.database odb
application/vnd.oasis.opendocument.formula odf
application/vnd.oasis.opendocument.formula-template odft
application/vnd.oasis.opendocument.graphics odg
application/vnd.oasis.opendocument.graphics-flat-xml fodg
application/vnd.oasis.opendocument.graphics-template otg
application/vnd.oasis.opendocument.image odi
application/vnd.oasis.opendocument.image-template oti
view all matches for this distribution