Results for: "minmax"

The path where gem executables are to be installed.

The path were rubygems plugins are to be installed.

Top level install helper method. Allows you to install gems interactively:

% irb
>> Gem.install "minitest"
Fetching: minitest-5.14.0.gem (100%)
=> [#<Gem::Specification:0x1013b4528 @name="minitest", ...>]

Builds a command line string from an argument list, array.

All elements are joined into a single string with fields separated by a space, where each element is escaped for the Bourne shell and stringified using to_s.

ary = ["There's", "a", "time", "and", "place", "for", "everything"]
argv = Shellwords.join(ary)
argv #=> "There\\'s a time and place for everything"

Array#shelljoin is a shortcut for this function.

ary = ["Don't", "rock", "the", "boat"]
argv = ary.shelljoin
argv #=> "Don\\'t rock the boat"

You can also mix non-string objects in the elements as allowed in Array#join.

output = `#{['ps', '-p', $$].shelljoin}`

Builds a command line string from an argument list, array.

All elements are joined into a single string with fields separated by a space, where each element is escaped for the Bourne shell and stringified using to_s.

ary = ["There's", "a", "time", "and", "place", "for", "everything"]
argv = Shellwords.join(ary)
argv #=> "There\\'s a time and place for everything"

Array#shelljoin is a shortcut for this function.

ary = ["Don't", "rock", "the", "boat"]
argv = ary.shelljoin
argv #=> "Don\\'t rock the boat"

You can also mix non-string objects in the elements as allowed in Array#join.

output = `#{['ps', '-p', $$].shelljoin}`
No documentation available
No documentation available

Returns the singleton instance.

SyntaxSuggest.invalid? [Private]

Opposite of ‘SyntaxSuggest.valid?`

Returns the sine of x in radians.

Examples:

sin(-PI)   # => -1.2246063538223773e-16 # -0.0000000000000001
sin(-PI/2) # => -1.0
sin(0.0)   # => 0.0
sin(PI/2)  # => 1.0
sin(PI)    # => 1.2246063538223773e-16  # 0.0000000000000001

Returns the arc sine of x.

Examples:

asin(-1.0) # => -1.5707963267948966 # -PI/2
asin(0.0)  # => 0.0
asin(1.0)  # => 1.5707963267948966  # PI/2

Returns the hyperbolic sine of x in radians.

Examples:

sinh(-INFINITY) # => -Infinity
sinh(0.0)       # => 0.0
sinh(INFINITY)  # => Infinity

Returns the inverse hyperbolic sine of x.

Examples:

asinh(-INFINITY) # => -Infinity
asinh(0.0)       # => 0.0
asinh(INFINITY)  # => Infinity

Returns the value of the gamma function for x.

Examples:

gamma(-2.5)      # => -0.9453087204829431
gamma(-1.5)      # => 2.3632718012073513
gamma(-0.5)      # => -3.5449077018110375
gamma(0.0)      # => Infinity
gamma(1.0)      # => 1.0
gamma(2.0)      # => 1.0
gamma(3.0)      # => 2.0
gamma(4.0)      # => 6.0
gamma(5.0)      # => 24.0

Related: Math.lgamma.

Returns a 2-element array equivalent to:

[Math.log(Math.gamma(x).abs), Math.gamma(x) < 0 ? -1 : 1]

See logarithmic gamma function.

Examples:

lgamma(-4.0) # => [Infinity, -1]
lgamma(-3.0) # => [Infinity, -1]
lgamma(-2.0) # => [Infinity, -1]
lgamma(-1.0) # => [Infinity, -1]
lgamma(0.0)  # => [Infinity, 1]

lgamma(1.0)  # => [0.0, 1]
lgamma(2.0)  # => [0.0, 1]
lgamma(3.0)  # => [0.6931471805599436, 1]
lgamma(4.0)  # => [1.7917594692280545, 1]

lgamma(-2.5) # => [-0.05624371649767279, -1]
lgamma(-1.5) # => [0.8600470153764797, 1]
lgamma(-0.5) # => [1.265512123484647, -1]
lgamma(0.5)  # => [0.5723649429247004, 1]
lgamma(1.5)  # => [-0.12078223763524676, 1]
lgamma(2.5)      # => [0.2846828704729205, 1]

Related: Math.gamma.

Gets the resource limit of the process. cur_limit means current (soft) limit and max_limit means maximum (hard) limit.

resource indicates the kind of resource to limit. It is specified as a symbol such as :CORE, a string such as "CORE" or a constant such as Process::RLIMIT_CORE. See Process.setrlimit for details.

cur_limit and max_limit may be Process::RLIM_INFINITY, Process::RLIM_SAVED_MAX or Process::RLIM_SAVED_CUR. See Process.setrlimit and the system getrlimit(2) manual for details.

Sets the resource limit of the process. cur_limit means current (soft) limit and max_limit means maximum (hard) limit.

If max_limit is not given, cur_limit is used.

resource indicates the kind of resource to limit. It should be a symbol such as :CORE, a string such as "CORE" or a constant such as Process::RLIMIT_CORE. The available resources are OS dependent. Ruby may support following resources.

AS

total available memory (bytes) (SUSv3, NetBSD, FreeBSD, OpenBSD but 4.4BSD-Lite)

CORE

core size (bytes) (SUSv3)

CPU

CPU time (seconds) (SUSv3)

DATA

data segment (bytes) (SUSv3)

FSIZE

file size (bytes) (SUSv3)

MEMLOCK

total size for mlock(2) (bytes) (4.4BSD, GNU/Linux)

MSGQUEUE

allocation for POSIX message queues (bytes) (GNU/Linux)

NICE

ceiling on process’s nice(2) value (number) (GNU/Linux)

NOFILE

file descriptors (number) (SUSv3)

NPROC

number of processes for the user (number) (4.4BSD, GNU/Linux)

NPTS

number of pseudo terminals (number) (FreeBSD)

RSS

resident memory size (bytes) (4.2BSD, GNU/Linux)

RTPRIO

ceiling on the process’s real-time priority (number) (GNU/Linux)

RTTIME

CPU time for real-time process (us) (GNU/Linux)

SBSIZE

all socket buffers (bytes) (NetBSD, FreeBSD)

SIGPENDING

number of queued signals allowed (signals) (GNU/Linux)

STACK

stack size (bytes) (SUSv3)

cur_limit and max_limit may be :INFINITY, "INFINITY" or Process::RLIM_INFINITY, which means that the resource is not limited. They may be Process::RLIM_SAVED_MAX, Process::RLIM_SAVED_CUR and corresponding symbols and strings too. See system setrlimit(2) manual for details.

The following example raises the soft limit of core size to the hard limit to try to make core dump possible.

Process.setrlimit(:CORE, Process.getrlimit(:CORE)[1])

Initializes the supplemental group access list by reading the system group database and using all groups of which the given user is a member. The group with the specified gid is also added to the list. Returns the resulting Array of the GIDs of all the groups in the supplementary group access list. Not available on all platforms.

Process.groups   #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27]
Process.initgroups( "mgranger", 30 )   #=> [30, 6, 10, 11]
Process.groups   #=> [30, 6, 10, 11]
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
Search took: 5ms  ·  Total Results: 1816