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


BSD-devstat

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

      s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
      s++;
    }
    sawinf = 1;
  } else if (*s == 'N' || *s == 'n') {
    /* XXX TODO: There are signaling NaNs and quiet NaNs. */
    s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
    s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
    s++;
    sawnan = 1;
  } else

 view all matches for this distribution


BSD-getloadavg

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

      s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
      s++;
    }
    sawinf = 1;
  } else if (*s == 'N' || *s == 'n') {
    /* XXX TODO: There are signaling NaNs and quiet NaNs. */
    s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
    s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
    s++;
    sawnan = 1;
  } else

 view all matches for this distribution


BSON-XS

 view release on metacpan or  search on metacpan

bson/bson-decimal128.c  view on Meta::CPAN

                           char                    *str)        /* OUT */
{
   uint32_t COMBINATION_MASK = 0x1f;   /* Extract least significant 5 bits */
   uint32_t EXPONENT_MASK = 0x3fff;    /* Extract least significant 14 bits */
   uint32_t COMBINATION_INFINITY = 30; /* Value of combination field for Inf */
   uint32_t COMBINATION_NAN = 31;      /* Value of combination field for NaN */
   uint32_t EXPONENT_BIAS = 6176;      /* decimal128 exponent bias */

   char *str_out = str;                /* output pointer in string */
   char significand_str[35];           /* decoded significand digits */

bson/bson-decimal128.c  view on Meta::CPAN

   if (BSON_UNLIKELY ((combination >> 3) == 3)) {
      /* Check for 'special' values */
      if (combination == COMBINATION_INFINITY) {  /* Infinity */
         strcpy (str_out, "Inf");
         return;
      } else if (combination == COMBINATION_NAN) { /* NaN */
         /* str, not str_out, to erase the sign */
         strcpy (str, "NaN");
         /* we don't care about the NaN payload. */
         return;
      } else {
         biased_exponent = (high >> 15) & EXPONENT_MASK;
         significand_msb = 0x8 + ((high >> 14) & 0x1);
      }

bson/bson-decimal128.c  view on Meta::CPAN

 *
 * bson_decimal128_from_string --
 *
 *    This function converts @string in the format [+-]ddd[.]ddd[E][+-]dddd to
 *    decimal128.  Out of range values are converted to +/-Infinity.  Invalid
 *    strings are converted to NaN.
 *
 *    If more digits are provided than the available precision allows,
 *    round to the nearest expressable decimal128 with ties going to even will
 *    occur.
 *
 *    Note: @string must be ASCII only!
 *
 * Returns:
 *    true on success, or false on failure. @dec will be NaN if @str was invalid
 *    The &bson_decimal128_t converted from @string at @dec.
 *
 * Side effects:
 *    None.
 *

bson/bson-decimal128.c  view on Meta::CPAN

   if (*str_read == '+' || *str_read == '-') {
      is_negative = *(str_read++) == '-';
      includes_sign = true;
   }

   /* Check for Infinity or NaN */
   if (!isdigit (*str_read) && *str_read != '.') {
      if (_dec128_istreq (str_read, "inf") ||
          _dec128_istreq (str_read, "infinity")) {
         BSON_DECIMAL128_SET_INF (*dec, is_negative);
         return true;

 view all matches for this distribution


BSON

 view release on metacpan or  search on metacpan

lib/BSON.pm  view on Meta::CPAN

            else {
                return { '$numberDouble' => 'Infinity' }
                    if $data =~ $is_inf;
                return { '$numberDouble' => '-Infinity' }
                    if $data =~ $is_ninf;
                return { '$numberDouble' => 'NaN' }
                    if $data =~ $is_nan;
                my $value = "$data";
                $value = $value / 1.0;
                return { '$numberDouble' => "$value" };
            }

 view all matches for this distribution


BZ-Client

 view release on metacpan or  search on metacpan

t/101login.t  view on Meta::CPAN

          if $tester->isSkippingIntegrationTests();

        my $client = $tester->client();

        # check client isnt logged in before log in
      diag( sprintf 'apikey: %s', $server->{testApiKey} || 'NaN' );

      SKIP: {
            skip( 'Always logged in when using apikey', 1 )
              if $server->{testApiKey};
            ok( !$client->is_logged_in(),

t/101login.t  view on Meta::CPAN

                ok( 1, 'No errors from ->logout when already logged in' );
            }

            ok( $ret, '->logout returned true when already logged in' )
                or diag 'Expected true, got: ' . ( defined $ret ? $ret : 'undef' );
            diag( sprintf 'apikey: %s', $server->{testApiKey} || 'NaN' );

          SKIP: {
                skip( 'Always logged in when using apikey', 1 )
                  if $server->{testApiKey};
                ok( !$client->is_logged_in(),

t/101login.t  view on Meta::CPAN

                ok( 1, 'No errors from ->logout when not logged in' );
            }

            ok( $ret, '->logout when not logged in, returned true' )
                or diag 'Expected true, got: ' . ( defined $ret ? $ret : 'undef' );
            diag( sprintf 'apikey: %s', $server->{testApiKey} || 'NaN' );
          SKIP: {
                skip( 'Always logged in when using apikey', 1 )
                  if $server->{testApiKey};
                ok( !$client->is_logged_in(),
                    'The client is STILL not logged in.' );

 view all matches for this distribution


BackupPC-XS

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

      s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
      s++;
    }
    sawinf = 1;
  } else if (*s == 'N' || *s == 'n') {
    /* XXX TODO: There are signaling NaNs and quiet NaNs. */
    s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
    s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
    s++;
    sawnan = 1;
  } else

 view all matches for this distribution


Barcode-ZBar

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

		return 0;
	    s++;
	}
	sawinf = 1;
    } else if (*s == 'N' || *s == 'n') {
	/* XXX TODO: There are signaling NaNs and quiet NaNs. */
	s++;
	if (s == send || (*s != 'A' && *s != 'a'))
	    return 0;
	s++;
	if (s == send || (*s != 'N' && *s != 'n'))

 view all matches for this distribution


BarefootJS

 view release on metacpan or  search on metacpan

lib/BarefootJS.pm  view on Meta::CPAN

my $OMITTED = \'omitted';
sub _omitted { return (ref $_[0] && refaddr($_[0]) == refaddr($OMITTED)) || _undef_p($_[0]) ? 1 : 0 }

# JS ToString / ToNumber for a helper argument (a needle, a separator, a
# count), which spell `null` / `undefined` as JS does (`"null"` / 0,
# `"undefined"` / NaN); `string` / `number` are the display helpers.
sub _js_string { BarefootJS::Evaluator::_to_string($_[0]) }
sub _js_number { BarefootJS::Evaluator::_to_number($_[0]) }

# NOTE: This runtime is template-engine-agnostic AND framework-agnostic by
# design, so it can ship as a standalone CPAN distribution. It depends only on

lib/BarefootJS.pm  view on Meta::CPAN

# template can render value-equivalent output without a JS engine.
#
# Failure policy mirrors the Go adapter (#1188): user-data marshalling
# (json) bubbles errors so Mojolicious aborts loudly on cycles /
# unsupported values rather than silently producing an empty payload.
# Numeric coercion follows JS semantics (NaN propagates as the special
# string 'NaN'; non-numeric input returns 'NaN' rather than 0). Strings
# always coerce to a string representation.
# ---------------------------------------------------------------------------

sub json ($self, $value) {
    # `JSON.stringify`: `null` (`undef`) is "null"; `undefined` (`UNDEF`)

lib/BarefootJS.pm  view on Meta::CPAN

    # holding it is skipped, and an array element holding it is written as
    # `null`.
    #
    # A number is written as JS writes it (`_format_number`): shortest
    # round-trip digits, `-0` as `0`, an unpadded exponent (`-4e-8`,
    # `-4e+21`), and NaN / Infinity as `null`, at any depth (#3787). The
    # encoders print `%.15g` (`0.3` for `0.1 + 0.2`), pad the exponent
    # (`-4e-08`) and spell Infinity `-Inf` or `"-Inf"`. Arrays and hashes
    # are walked here with sorted keys, as the canonical encoders do;
    # strings and other leaves go through the backend's encoder (Mojo's
    # `to_json` returns a character string, suitable for embedding in HTML

lib/BarefootJS.pm  view on Meta::CPAN

    return $ref eq 'JSON::PP::Boolean' || $ref eq 'Mojo::JSON::_Bool';
}

sub number ($self, $value) {
    # JS `Number(v)` mirror. Numeric coerces via Perl's implicit
    # numeric context; non-numeric / undef yield real numeric NaN
    # (`'nan' + 0`) so downstream arithmetic propagates correctly
    # (`Math.floor(NaN) === NaN`). Returning the literal string
    # "NaN" would conflate the user-passing-the-string-"NaN" case
    # with the parse-failure case, and break NaN detection in
    # downstream helpers.
    return 0 + 'nan' if _nullish($value);
    return $value + 0 if looks_like_number($value);
    return 0 + 'nan';
}

# JS `+` / `-` / `*` / `/` over numbers (#3454). The adapters emit these
# instead of Perl's native operators so the result is the IEEE double JS
# computes: a 64-bit IV sum past 2**53 rounds as a double, a perl with a
# wider NV (-Duselongdouble / -Dusequadmath) rounds to the double JS has,
# and division by zero yields +/-Infinity or NaN instead of dying. Each
# operand goes through JS ToNumber (`_num`): `undef` (`null`) is 0, `UNDEF`
# (`undefined`) NaN, a string its JS numeric value.
sub _as_double { unpack('d', pack('d', $_[0])) }
sub _num { _as_double(_js_number($_[0])) }

sub add ($self, $l, $r) {
    return _as_double(_num($l) + _num($r));

lib/BarefootJS.pm  view on Meta::CPAN

    return BarefootJS::Evaluator::_divide(_num($l), _num($r));
}

# JS `%` (#3474): the truncated remainder, which takes the dividend's sign
# (`-7 % 2` is -1) and keeps a fraction. Perl's native `%` floors (`-7 % 2`
# is 1) and converts both operands to integers (`NaN % 2` is 0).
sub mod ($self, $l, $r) {
    return BarefootJS::Evaluator::_remainder(_num($l), _num($r));
}

# NaN is the only float for which `$x != $x` holds. Used as the
# portable sentinel check in floor/ceil/round. The `Math` helpers coerce
# through JS ToNumber (`null` is 0, `undefined` NaN), as `Math.floor(null)`
# is 0.
sub _is_nan { my $n = shift; return $n != $n }

# True for +/-Infinity. `9**9**9` is Perl's portable infinity literal; a
# finite number is always strictly less than +Inf in magnitude.

lib/BarefootJS.pm  view on Meta::CPAN

    # + 0.5)` reproduces that for both signs.
    return POSIX::floor($n + 0.5);
}

# `Math.min(a, b)` / `Math.max(a, b)` -- two-arg forms only (#2168
# math-methods). JS returns NaN if either operand is NaN.
sub min ($self, $a, $b) {
    my $x = _js_number($a);
    my $y = _js_number($b);
    return $x if _is_nan($x);
    return $y if _is_nan($y);

lib/BarefootJS.pm  view on Meta::CPAN

# the same IR node (`array-method` / method `includes`). This helper
# dispatches at the Perl level via `ref()`:
#   - ARRAY ref:  scan elements with `BarefootJS::Evaluator::_same_value_zero`,
#                 matching `Array.prototype.includes`'s SameValueZero
#                 semantics (no cross-type coercion, e.g. `[2].includes("2")`
#                 is false; NaN matches NaN) — the same algorithm the
#                 evaluator's serialized-callback path already uses for
#                 `.includes`, so both positions agree. This used to be a
#                 stringy `eq` scan, which coerced numbers to strings
#                 (`[2].includes("2")` was true) and diverged from JS.
#   - scalar:     `index($recv, $sub) != -1`, the needle JS ToString'd

lib/BarefootJS.pm  view on Meta::CPAN

# JS primitive helpers (spec/js-primitive-semantics.md, "Operation table"):
# ToBoolean, ToNumber, ToString, the relational operators, binary `+` and
# unary `-`. Each delegates to the callback evaluator's primitive of the same
# operation, so a template helper call and a callback body share one
# implementation. A boolean result is a Perl boolean, as `strict_eq`'s is.
# Unlike `number` and `string` (display helpers: `undef` / `UNDEF` -> NaN /
# ''), an `undef` operand reads as JS null here (0 / 'null') and `UNDEF` as JS
# undefined (NaN / 'undefined').
sub truthy ($self, $v) {
    return BarefootJS::Evaluator::_truthy($v) ? !!1 : !!0;
}

# Boxes for a value-position JS `l || r` / `l && r` (#3824): the adapters

lib/BarefootJS.pm  view on Meta::CPAN

        return $i if $item eq $elem;
    }
    return -1;
}

# JS `ToIntegerOrInfinity` for a string position or index (#3613): NaN →
# 0, truncation toward zero, and ±Infinity clamped to ±2**53 so the
# caller's range check treats it as out of range (a bare `int()` keeps
# NaN, which then indexes element 0 with a warning).
sub _to_integer_or_infinity ($self, $value) {
    my $n = _js_number($value);
    return 0 if _is_nan($n);
    return 2**53 if $n >= 2**53;
    return -(2**53) if $n <= -(2**53);

lib/BarefootJS.pm  view on Meta::CPAN

}

# `Array.prototype.flat(depth)` with a DYNAMIC depth (#2094) — the depth is
# itself an arbitrary runtime value (e.g. a prop), not a compile-time literal,
# so it must be coerced with JS's `ToIntegerOrInfinity` before delegating to
# `flat` above: truncate toward zero; negative -> 0; NaN / non-numeric -> 0;
# +Infinity or a huge finite value -> flatten fully.
#
# Deliberately a SEPARATE entry point from `flat`, not a smarter version of
# it: the literal-depth path's `-1` argument is a compile-time SENTINEL baked
# into the template source, meaning "the source literally said `Infinity`". A

lib/BarefootJS.pm  view on Meta::CPAN

#
# Perl's scalar type system blurs string/number duality, so `looks_like_number`
# (already the codebase's ToNumber-style coercion check, see BarefootJS::
# Evaluator's `_to_number`) is reused here rather than inventing a new
# convention. `looks_like_number` on this Perl (5.38) already recognises the
# strings "Infinity" / "-Infinity" / "NaN" as numeric (verified empirically:
# `perl -MScalar::Util=looks_like_number -e 'print looks_like_number("Infinity")'`
# prints 1), and `$str + 0` on those strings yields the corresponding Perl
# non-finite double, so no extra string special-casing is needed here.
sub _coerce_flat_depth ($depth) {
    return 0 unless defined $depth;

lib/BarefootJS.pm  view on Meta::CPAN

    elsif (!ref($depth) && looks_like_number($depth)) {
        $f = $depth + 0;
    }
    else {
        # undef handled above; anything else non-numeric (a plain string
        # that isn't a number, a HASH/ARRAY ref, ...) coerces via NaN.
        return 0;
    }
    return 0 if $f != $f;              # NaN
    return -1 if $f == 9**9**9;        # +Infinity -> flatten fully sentinel
    return 0  if $f == -(9**9**9);     # -Infinity -> 0
    my $trunc = int($f);               # Perl's int() truncates toward zero
    return 0  if $trunc < 0;
    return -1 if $trunc > 1_000_000;   # huge finite ~= flatten fully

lib/BarefootJS.pm  view on Meta::CPAN

# `round` helper uses), then format the exact multiple. A negative
# `digits` clamps to 0, mirroring how the adapters default an omitted
# argument.
sub to_fixed ($self, $value, $digits = $OMITTED) {
    my $n = $self->number($value);
    # JS toFixed returns the STRINGS "NaN" / "Infinity" / "-Infinity" for
    # non-finite inputs; the numeric values would stringify per-platform
    # ("nan"/"inf"/...) and diverge.
    return 'NaN' if _is_nan($n);
    return $n < 0 ? '-Infinity' : 'Infinity' if _is_inf($n);
    # An omitted or `undefined` digit count is 0, as ToIntegerOrInfinity
    # makes `null` too.
    $digits = _omitted($digits) ? 0 : $self->_to_integer_or_infinity($digits);
    $digits = 0 if $digits < 0;

lib/BarefootJS.pm  view on Meta::CPAN

        @parts = split /$q/, $s, -1;
    }

    # Optional `limit` caps the number of pieces (JS `split(sep, limit)`):
    # an omitted or `undefined` one is unbounded, any other one ToUint32'd
    # (`null` and NaN are 0 → empty; a negative limit wraps to a large one,
    # effectively unbounded).
    unless (_omitted($limit)) {
        my $n = _to_uint32($limit);
        @parts = @parts[0 .. $n - 1] if $n < scalar @parts;
    }

lib/BarefootJS.pm  view on Meta::CPAN

sub pad_end ($self, $recv, $target = $OMITTED, $pad = $OMITTED) {
    my $s = defined $recv && !ref($recv) ? "$recv" : '';
    return $self->_pad($s, $target, $pad, 0);
}

# JS `ToUint32` (`split`'s limit): NaN and the infinities are 0.
sub _to_uint32 ($value) {
    my $n = _js_number($value);
    return 0 if $n != $n || $n == 9**9**9 || $n == -(9**9**9);
    my $t = $n < 0 ? POSIX::ceil($n) : POSIX::floor($n);
    $t = POSIX::fmod($t, 4294967296);

lib/BarefootJS.pm  view on Meta::CPAN

# Compare two projected keys, ascending orientation (-1 / 0 / 1); the
# caller negates for 'desc'. 'auto' compares numerically when both
# keys look like numbers, else lexically (matches Go's `bf_sort`).
# A nil key (`null` / `undefined`) reads as '' lexically and `null` as 0
# numerically, so the order stays total without warnings; a numeric
# `a.f - b.f` over an `undefined` key is NaN, which the sort reads as
# "equal".
sub _compare_sort_key ($av, $bv, $compare_type) {
    my $str = sub ($v) { _nullish($v) ? '' : $v };
    if ($compare_type eq 'string') {
        return $str->($av) cmp $str->($bv);

 view all matches for this distribution


Basset

 view release on metacpan or  search on metacpan

lib/Basset/Object.pm  view on Meta::CPAN


All easy enough. Refer to any subclasses of this class for further examples.

Basset::Object includes two other alternate accessors for you - regex and private.

 Some::Class->add_attr(['user_id', '_isa_regex_accessor', qr{^\d+$}, "Error - user_id must be a number", "NaN"]);

The arguments to it are, respectively, the name of the attribute, the internal accessor used, the regex used to validate, the error message to return, and the error code to return.
If you try to mutate with a value that doesn't match the regex, it'll fail.

 Some::Class->add_attr(['secret', '_isa_private_accessor']);

 view all matches for this distribution


Beagle

 view release on metacpan or  search on metacpan

share/public/js/base/jquery.js  view on Meta::CPAN

 * Copyright 2011, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Thu Jun 30 14:16:56 2011 -0400
 */
(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("ifram...
shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\...
)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++...

 view all matches for this distribution


BeamerReveal

 view release on metacpan or  search on metacpan

#TODO.org#  view on Meta::CPAN

    clearTimers(slide);

    const timers = [];
    slide.querySelectorAll('audio[data-autoplay-after], video[data-autoplay-after]').forEach(media => {
      const delay = parseInt(media.getAttribute('data-autoplay-after'), 10);
      if (Number.isNaN(delay)) return;

      const id = setTimeout(() => {
        // Only play if this slide is still current
        if (Reveal.getCurrentSlide() !== slide) return;

 view all matches for this distribution


Bencher-Scenarios-Accessors

 view release on metacpan or  search on metacpan

lib/Bencher/Scenario/Accessors/ClassStartup.pm  view on Meta::CPAN


The above result presented as chart:

=begin html

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAAH4CAMAAABUnipoAAAJJmlDQ1BpY2MAAEiJlZVnUJNZF8fv8zzphUASQodQQ5EqJYCUEFoo0quoQOidUEVsiLgCK4qINEWQRQEXXJUia0UUC4uCAhZ0gywCyrpxFVFBWXDfGZ33HT+8/5l7z2/+c+bec8/5cAEgiINlwct7YlK6wNvJjhkYFMwE3yiMn5...

=end html


To display as an interactive HTML table on a browser, you can add option C<--format html+datatables>.

 view all matches for this distribution


Bencher-Scenarios-Data-Dmp

 view release on metacpan or  search on metacpan

lib/Bencher/Scenario/Data/Dmp/Dump.pm  view on Meta::CPAN

    ],
    datasets => [
        {
            name => 'a100-num-various',
            args => { data => [ (0, 1, -1, "+1", 1e100,
                                 -1e-100, "0123", "Inf", "-Inf", "NaN") x 10 ] },
        },
        {
            name => 'a100-num-int',
            args => { data => [ 1..100 ] },
        },

 view all matches for this distribution


Bencher-Scenarios-DataDmp

 view release on metacpan or  search on metacpan

lib/Bencher/Scenario/DataDmp.pm  view on Meta::CPAN

    ],
    datasets => [
        {
            name => 'a100-num-various',
            args => { data => [ (0, 1, -1, "+1", 1e100,
                                 -1e-100, "0123", "Inf", "-Inf", "NaN") x 10 ] },
        },
        {
            name => 'a100-num-int',
            args => { data => [ 1..100 ] },
        },

 view all matches for this distribution


Bencher-Scenarios-StringFunctions

 view release on metacpan or  search on metacpan

lib/Bencher/Scenario/StringFunctions/CommonPrefix.pm  view on Meta::CPAN

    315581/s  -- 
 
 Legends:
   : dataset=elems10prefix1 ds_tags= p_tags= participant=String::CommonPrefix::common_prefix perl=perl

=for html <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAAH4CAMAAABUnipoAAAJJmlDQ1BpY2MAAEiJlZVnUJNZF8fv8zzphUASQodQQ5EqJYCUEFoo0quoQOidUEVsiLgCK4qINEWQRQEXXJUia0UUC4uCAhZ0gywCyrpxFVFBWXDfGZ33HT+8/5l7z2/+c+bec8/5cAEgiINlwct7YlK6wNvJjhkY...


Benchmark module startup overhead (C<< bencher -m StringFunctions::CommonPrefix --module-startup >>):

 #table9#

 view all matches for this distribution


Benchmark-DKbench

 view release on metacpan or  search on metacpan

data/wiki2.html  view on Meta::CPAN

	dvp_meta.height=parseInt(vx.nvl(vx.dvp_height,225));

	dispatchVideoCdn(50);
	function dispatchVideoCdn(awspercent) {
		var tmpint=parseInt(awspercent);
		if (awspercent && !isNaN(tmpint) && tmpint>0) {
			awspercent=tmpint;
		} else {
			awspercent=0;
		}
		var cdn='hw';

data/wiki2.html  view on Meta::CPAN

				var curr=0;
				var total=0;
				var found=0;
				var keys=[];
				for (var key in capmeta) {
					if (capmeta.hasOwnProperty(key) && !isNaN(tmpval=parseFloat(key)) && tmpval>=0) {
						total++;
						keys.push(key);
						if (found==0) {
							if (pos<tmpval) {
								found++;

 view all matches for this distribution


Benchmark-Perl-Formance-Cargo

 view release on metacpan or  search on metacpan

share/P6STD/STD.pm6  view on Meta::CPAN


    # Note, does not include <1/2> forms, which are parsed as quotewords

    token number {
        [
        | 'NaN' »
        | <integer>
        | <dec_number>
        | <rad_number>
        | 'Inf' »
        ]

 view all matches for this distribution


BerkeleyDB

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

      s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
      s++;
    }
    sawinf = 1;
  } else if (*s == 'N' || *s == 'n') {
    /* XXX TODO: There are signaling NaNs and quiet NaNs. */
    s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
    s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
    s++;
    sawnan = 1;
  } else

 view all matches for this distribution


Bin-Data-1D

 view release on metacpan or  search on metacpan

scripts/summing  view on Meta::CPAN

  #my $FH = $o{1} ? \* STDOUT : \*STDERR ; # <-- 意味があったのか???
  select $o{1} ? \* STDOUT : \*STDERR ; # <-- 意味があったのか???
  print  $o{q}? '' : 'header=' , qq{'$header'\t} if $o{'='} ;
  my $fmt = $o{q} ? "%s\t%d\t%g\t%s" : "%s <- sum ;\t%d + %d <- counted + not ; \t%s <- average ;" ;
  #$fmt = "%50X <- sum ;\t%d + %d <- counted + not ;" if $o{h} ; 
  my $quot = $lln != 0 ? $sum/$lln : "NaN" ;
  if ( "$quot" > $quot ) { $quot = "$quot" . '..(-)' } 
  elsif ( "$quot" < $quot ) { $quot = "$quot" . '..(+)' }
  #if ( $o{h} ) { say sprintf( & hex8 ( $sum)  ; return } ;
  $sum = & hex8 ( $sum ) if $o{h} ; 
  say sprintf ($fmt , $sum, $lln, $nlln , "$quot") , sprintf "\t%0.6f sec calculation (summing)." , tv_interval ${ dt_start } ; 
}

sub hex8 { 
  my @out = '' ;
  my $n = $_ [0] ; $n = 0 if $n eq "NaN" ;
  my $c = 12 ; 
  do {my $t = $n % 16**8 ; $n = int $n /16**8 ; unshift @out , sprintf "%08x" , $t ; say $n } while ($n != 0 && $c--) ;
  my $out = join " " , @out ;
  $out =~ s/^00+/0x 0/; 
  return $out ;

 view all matches for this distribution


Bin-Subtotal

 view release on metacpan or  search on metacpan

scripts/summing  view on Meta::CPAN

  #my $FH = $o{1} ? \* STDOUT : \*STDERR ; # <-- 意味があったのか???
  select $o{1} ? \* STDOUT : \*STDERR ; # <-- 意味があったのか???
  print  $o{q}? '' : 'header=' , qq{'$header'\t} if $o{'='} ;
  my $fmt = $o{q} ? "%s\t%d\t%g\t%s" : "%s <- sum ;\t%d + %d <- counted + not ; \t%s <- average ;" ;
  #$fmt = "%50X <- sum ;\t%d + %d <- counted + not ;" if $o{h} ; 
  my $quot = $lln != 0 ? $sum/$lln : "NaN" ;
  if ( "$quot" > $quot ) { $quot = "$quot" . '..(-)' } 
  elsif ( "$quot" < $quot ) { $quot = "$quot" . '..(+)' }
  #if ( $o{h} ) { say sprintf( & hex8 ( $sum)  ; return } ;
  $sum = & hex8 ( $sum ) if $o{h} ; 
  say sprintf ($fmt , $sum, $lln, $nlln , "$quot") , sprintf "\t%0.6f sec calculation (summing)." , tv_interval ${ dt_start } ; 
}

sub hex8 { 
  my @out = '' ;
  my $n = $_ [0] ; $n = 0 if $n eq "NaN" ;
  my $c = 12 ; 
  do {my $t = $n % 16**8 ; $n = int $n /16**8 ; unshift @out , sprintf "%08x" , $t ; say $n } while ($n != 0 && $c--) ;
  my $out = join " " , @out ;
  $out =~ s/^00+/0x 0/; 
  return $out ;

 view all matches for this distribution


Bio-BigFile

 view release on metacpan or  search on metacpan

t/01.bigwig.t  view on Meta::CPAN

ok(ref $es_list,'ARRAY');
ok(scalar @$es_list,500);
ok(join(' ',sort keys %{$es_list->[0]}),"maxVal minVal sumData sumSquares validCount");
ok($es_list->[300]{sumData}/$es_list->[300]{validCount},$summary->[300]);

my $value = $wig->bigWigSingleSummary('I',1,5000000,bbiSumMean,'NaN');
ok ($value > 0);

1;

 view all matches for this distribution


Bio-DB-Big

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

      s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
      s++;
    }
    sawinf = 1;
  } else if (*s == 'N' || *s == 'n') {
    /* XXX TODO: There are signaling NaNs and quiet NaNs. */
    s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
    s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
    s++;
    sawnan = 1;
  } else

 view all matches for this distribution


Bio-DB-HTS

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

      s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
      s++;
    }
    sawinf = 1;
  } else if (*s == 'N' || *s == 'n') {
    /* XXX TODO: There are signaling NaNs and quiet NaNs. */
    s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
    s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
    s++;
    sawnan = 1;
  } else

 view all matches for this distribution


Bio-Emboss

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

      s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
      s++;
    }
    sawinf = 1;
  } else if (*s == 'N' || *s == 'n') {
    /* XXX TODO: There are signaling NaNs and quiet NaNs. */
    s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
    s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
    s++;
    sawnan = 1;
  } else

 view all matches for this distribution


Bio-MaxQuant-Evidence-Statistics

 view release on metacpan or  search on metacpan

lib/Bio/MaxQuant/Evidence/Statistics.pm  view on Meta::CPAN


=head2 logRatios

Logs ratios (base 2) throughout the dataset, and sets a flag so it can't get logged again.

Treatment of "special values": empty string, <= 0, NaN, and any other non-number are removed
from the data!

=cut

sub logRatios {

 view all matches for this distribution


Bio-Phylo

 view release on metacpan or  search on metacpan

lib/Bio/Phylo/Util/CONSTANT.pm  view on Meta::CPAN

my $looks_like_number;
{
    eval { Scalar::Util::looks_like_number(0) };
    if ($@) {
        my $LOOKS_LIKE_NUMBER_RE =
          qr/^([-+]?\d+(\.\d+)?([eE][-+]\d+)?|Inf|NaN)$/;
        $looks_like_number = sub {
            my $num = shift;
            if ( defined $num and $num =~ $LOOKS_LIKE_NUMBER_RE ) {
                return 1;
            }

 view all matches for this distribution


Bio-Roary

 view release on metacpan or  search on metacpan

contrib/roary_plots/roary_files/jquery.min.js  view on Meta::CPAN

/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery.min.map
*/
(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.3",f=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.in...
};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(funct...
},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Xt,Ut,Yt=x.now(),Vt=/\?/,Gt=/#.*$/,Jt=/([?&])_=[^&]*/,Qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Kt=/^(?:a...

 view all matches for this distribution


Bio-SDRS

 view release on metacpan or  search on metacpan

lib/Bio/SDRS.pm  view on Meta::CPAN

    my $self = shift;
    my ($assay, $pam, $data) = @_;
    my $stdev = Math::NumberCruncher::StandardDeviation($data);
    my $mean = Math::NumberCruncher::Mean($data);
    my $cutoff = $mean / 10;
    $stdev = $cutoff if ($stdev eq 'NaN' || $stdev < $cutoff);
    my ($l, $h, $step);
    $step = $stdev / 2.5;
    $step = sprintf("%.3f", $step);
    if ($step == 0.0) {
	carp "Data range too small for $assay -- step size raised to 0.001.\n";

 view all matches for this distribution


( run in 1.704 second using v1.01-cache-2.11-cpan-60884a8df76 )