tailieunhanh - HandBooks Professional Java-C-Scrip-SQL part 239
Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 239', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 1 bar .grep Numeric 1 1 bar . grep Numeric x puts x 1 prints 2 item item Returns true if an item equal to item is present in e. Items are compared using . x . See x . Returns the item in e with the maximum value. Assumes a comparison is possible between the items. .max 5 item See item Returns the item in e with the minimum value. Assumes a comparison is possible between the items. .min 1 x . Returns an array of all items for which the block returns false. foo bar baz .reject s Ab s foo x . See x . a b . Returns an array of sorted items from e. If a block is specified it s used for the comparison. Like the block must compare the two items and return a positive number a b 0 a b or a negative number a b . See Numbers As you d expect Ruby provides a suitably powerful set of classes for manipulating numeric data through the classes Numeric Integer Fixnum Bignum and Float. In addition further tools are available in the Precision and Math modules for manipulating numeric data. Numeric Superclass of all concrete numbers Numeric provides common behavior of numbers. Numeric is an abstract class so you should not instantiate this class. Included Module Comparable Instance Methods n Returns n. - n Returns n negated. n num n - num n num n num Performs arithmetic operations addition subtraction multiplication and division. n num Returns the modulus of n. n num Exponentiation. Returns the absolute value of n. Returns the smallest integer greater than or equal to n. num Returns an array containing num and n both possibly converted to a type that allows them to be operated on mutually. Used in automatic type conversion in numeric operators. num
đang nạp các trang xem trước