Linux premium180.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
LiteSpeed
: 162.0.209.168 | : 216.73.216.187
Cant Read [ /etc/named.conf ]
8.3.30
nortrmdp
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
opt /
alt /
ruby18 /
share /
ri /
1.8 /
system /
Enumerable /
[ HOME SHELL ]
Name
Size
Permission
Action
Enumerator
[ DIR ]
drwxr-xr-x
all%3f-i.yaml
856
B
-rw-r--r--
any%3f-i.yaml
877
B
-rw-r--r--
cdesc-Enumerable.yaml
2.9
KB
-rw-r--r--
collect-i.yaml
609
B
-rw-r--r--
count-i.yaml
815
B
-rw-r--r--
cycle-i.yaml
896
B
-rw-r--r--
detect-i.yaml
732
B
-rw-r--r--
drop-i.yaml
435
B
-rw-r--r--
drop_while-i.yaml
539
B
-rw-r--r--
each_cons-i.yaml
633
B
-rw-r--r--
each_slice-i.yaml
563
B
-rw-r--r--
each_with_index-i.yaml
609
B
-rw-r--r--
entries-i.yaml
546
B
-rw-r--r--
enum_cons-i.yaml
633
B
-rw-r--r--
enum_slice-i.yaml
563
B
-rw-r--r--
enum_with_index-i.yaml
609
B
-rw-r--r--
find-i.yaml
728
B
-rw-r--r--
find_all-i.yaml
541
B
-rw-r--r--
find_index-i.yaml
769
B
-rw-r--r--
first-i.yaml
455
B
-rw-r--r--
grep-i.yaml
845
B
-rw-r--r--
group_by-i.yaml
519
B
-rw-r--r--
include%3f-i.yaml
585
B
-rw-r--r--
inject-i.yaml
209
B
-rw-r--r--
map-i.yaml
601
B
-rw-r--r--
max-i.yaml
678
B
-rw-r--r--
max_by-i.yaml
466
B
-rw-r--r--
member%3f-i.yaml
583
B
-rw-r--r--
min-i.yaml
678
B
-rw-r--r--
min_by-i.yaml
460
B
-rw-r--r--
minmax-i.yaml
787
B
-rw-r--r--
minmax_by-i.yaml
567
B
-rw-r--r--
none%3f-i.yaml
895
B
-rw-r--r--
one%3f-i.yaml
893
B
-rw-r--r--
partition-i.yaml
537
B
-rw-r--r--
reduce-i.yaml
2.05
KB
-rw-r--r--
reject-i.yaml
485
B
-rw-r--r--
reverse_each-i.yaml
297
B
-rw-r--r--
select-i.yaml
537
B
-rw-r--r--
sort-i.yaml
926
B
-rw-r--r--
sort_by-i.yaml
3.16
KB
-rw-r--r--
take-i.yaml
398
B
-rw-r--r--
take_while-i.yaml
509
B
-rw-r--r--
to_a-i.yaml
540
B
-rw-r--r--
to_set-i.yaml
348
B
-rw-r--r--
zip-i.yaml
1.01
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : sort_by-i.yaml
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Sorts <em>enum</em> using a set of keys generated by mapping the values in <em>enum</em> through the given block. - !ruby/struct:SM::Flow::VERB body: " %w{ apple pear fig }.sort_by {|word| word.length}\n #=> ["fig", "pear", "apple"]\n" - !ruby/struct:SM::Flow::P body: The current implementation of <tt>sort_by</tt> generates an array of tuples containing the original collection element and the mapped value. This makes <tt>sort_by</tt> fairly expensive when the keysets are simple - !ruby/struct:SM::Flow::VERB body: " require 'benchmark'\n include Benchmark\n\n a = (1..100000).map {rand(100000)}\n\n bm(10) do |b|\n b.report("Sort") { a.sort }\n b.report("Sort by") { a.sort_by {|a| a} }\n end\n" - !ruby/struct:SM::Flow::P body: <em>produces:</em> - !ruby/struct:SM::Flow::VERB body: " user system total real\n Sort 0.180000 0.000000 0.180000 ( 0.175469)\n Sort by 1.980000 0.040000 2.020000 ( 2.013586)\n" - !ruby/struct:SM::Flow::P body: However, consider the case where comparing the keys is a non-trivial operation. The following code sorts some files on modification time using the basic <tt>sort</tt> method. - !ruby/struct:SM::Flow::VERB body: " files = Dir["*"]\n sorted = files.sort {|a,b| File.new(a).mtime <=> File.new(b).mtime}\n sorted #=> ["mon", "tues", "wed", "thurs"]\n" - !ruby/struct:SM::Flow::P body: "This sort is inefficient: it generates two new <tt>File</tt> objects during every comparison. A slightly better technique is to use the <tt>Kernel#test</tt> method to generate the modification times directly." - !ruby/struct:SM::Flow::VERB body: " files = Dir["*"]\n sorted = files.sort { |a,b|\n test(?M, a) <=> test(?M, b)\n }\n sorted #=> ["mon", "tues", "wed", "thurs"]\n" - !ruby/struct:SM::Flow::P body: This still generates many unnecessary <tt>Time</tt> objects. A more efficient technique is to cache the sort keys (modification times in this case) before the sort. Perl users often call this approach a Schwartzian Transform, after Randal Schwartz. We construct a temporary array, where each element is an array containing our sort key along with the filename. We sort this array, and then extract the filename from the result. - !ruby/struct:SM::Flow::VERB body: " sorted = Dir["*"].collect { |f|\n [test(?M, f), f]\n }.sort.collect { |f| f[1] }\n sorted #=> ["mon", "tues", "wed", "thurs"]\n" - !ruby/struct:SM::Flow::P body: This is exactly what <tt>sort_by</tt> does internally. - !ruby/struct:SM::Flow::VERB body: " sorted = Dir["*"].sort_by {|f| test(?M, f)}\n sorted #=> ["mon", "tues", "wed", "thurs"]\n" full_name: Enumerable#sort_by is_singleton: false name: sort_by params: | enum.sort_by {| obj | block } => array visibility: public
Close