Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.198
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby32 /
share /
ri /
system /
Enumerable /
Delete
Unzip
Name
Size
Permission
Date
Action
all%3f-i.ri
1.86
KB
-rw-r--r--
2026-04-07 17:42
any%3f-i.ri
1.81
KB
-rw-r--r--
2026-04-07 17:42
cdesc-Enumerable.ri
10.38
KB
-rw-r--r--
2026-04-07 17:42
chain-i.ri
533
B
-rw-r--r--
2026-04-07 17:42
chunk-i.ri
3.92
KB
-rw-r--r--
2026-04-07 17:42
chunk_while-i.ri
2.26
KB
-rw-r--r--
2026-04-07 17:42
collect-i.ri
808
B
-rw-r--r--
2026-04-07 17:42
collect_concat-i.ri
1.04
KB
-rw-r--r--
2026-04-07 17:42
compact-i.ri
526
B
-rw-r--r--
2026-04-07 17:42
count-i.ri
1.13
KB
-rw-r--r--
2026-04-07 17:42
cycle-i.ri
1.2
KB
-rw-r--r--
2026-04-07 17:42
detect-i.ri
1.06
KB
-rw-r--r--
2026-04-07 17:42
drop-i.ri
713
B
-rw-r--r--
2026-04-07 17:42
drop_while-i.ri
815
B
-rw-r--r--
2026-04-07 17:42
each_cons-i.ri
888
B
-rw-r--r--
2026-04-07 17:42
each_entry-i.ri
1.16
KB
-rw-r--r--
2026-04-07 17:42
each_slice-i.ri
889
B
-rw-r--r--
2026-04-07 17:42
each_with_index-i.ri
1.11
KB
-rw-r--r--
2026-04-07 17:42
each_with_object-i.ri
862
B
-rw-r--r--
2026-04-07 17:42
entries-i.ri
510
B
-rw-r--r--
2026-04-07 17:42
filter-i.ri
851
B
-rw-r--r--
2026-04-07 17:42
filter_map-i.ri
886
B
-rw-r--r--
2026-04-07 17:42
find-i.ri
1.16
KB
-rw-r--r--
2026-04-07 17:42
find_all-i.ri
930
B
-rw-r--r--
2026-04-07 17:42
find_index-i.ri
1.13
KB
-rw-r--r--
2026-04-07 17:42
first-i.ri
1.1
KB
-rw-r--r--
2026-04-07 17:42
flat_map-i.ri
1.1
KB
-rw-r--r--
2026-04-07 17:42
grep-i.ri
1.11
KB
-rw-r--r--
2026-04-07 17:42
grep_v-i.ri
1.15
KB
-rw-r--r--
2026-04-07 17:42
group_by-i.ri
1
KB
-rw-r--r--
2026-04-07 17:42
include%3f-i.ri
956
B
-rw-r--r--
2026-04-07 17:42
inject-i.ri
5.64
KB
-rw-r--r--
2026-04-07 17:42
lazy-i.ri
1.19
KB
-rw-r--r--
2026-04-07 17:42
map-i.ri
750
B
-rw-r--r--
2026-04-07 17:42
max-i.ri
2.66
KB
-rw-r--r--
2026-04-07 17:42
max_by-i.ri
1.54
KB
-rw-r--r--
2026-04-07 17:42
member%3f-i.ri
995
B
-rw-r--r--
2026-04-07 17:42
min-i.ri
2.65
KB
-rw-r--r--
2026-04-07 17:42
min_by-i.ri
1.54
KB
-rw-r--r--
2026-04-07 17:42
minmax-i.ri
1.46
KB
-rw-r--r--
2026-04-07 17:42
minmax_by-i.ri
966
B
-rw-r--r--
2026-04-07 17:42
none%3f-i.ri
1.77
KB
-rw-r--r--
2026-04-07 17:42
one%3f-i.ri
1.93
KB
-rw-r--r--
2026-04-07 17:42
partition-i.ri
1.26
KB
-rw-r--r--
2026-04-07 17:42
reduce-i.ri
5.47
KB
-rw-r--r--
2026-04-07 17:42
reject-i.ri
894
B
-rw-r--r--
2026-04-07 17:42
reverse_each-i.ri
1.01
KB
-rw-r--r--
2026-04-07 17:42
select-i.ri
851
B
-rw-r--r--
2026-04-07 17:42
slice_after-i.ri
1.62
KB
-rw-r--r--
2026-04-07 17:42
slice_before-i.ri
5.34
KB
-rw-r--r--
2026-04-07 17:42
slice_when-i.ri
2.85
KB
-rw-r--r--
2026-04-07 17:42
sort-i.ri
1.52
KB
-rw-r--r--
2026-04-07 17:42
sort_by-i.ri
3.39
KB
-rw-r--r--
2026-04-07 17:42
sum-i.ri
1.45
KB
-rw-r--r--
2026-04-07 17:42
take-i.ri
584
B
-rw-r--r--
2026-04-07 17:42
take_while-i.ri
820
B
-rw-r--r--
2026-04-07 17:42
tally-i.ri
1.23
KB
-rw-r--r--
2026-04-07 17:42
to_a-i.ri
527
B
-rw-r--r--
2026-04-07 17:42
to_h-i.ri
1004
B
-rw-r--r--
2026-04-07 17:42
to_set-i.ri
413
B
-rw-r--r--
2026-04-07 17:42
uniq-i.ri
986
B
-rw-r--r--
2026-04-07 17:42
zip-i.ri
2.5
KB
-rw-r--r--
2026-04-07 17:42
Save
Rename
U:RDoc::AnyMethod[iI"slice_before:ETI"Enumerable#slice_before;TF:privateo:RDoc::Markup::Document:@parts["o:RDoc::Markup::Paragraph; [ I"JWith argument +pattern+, returns an enumerator that uses the pattern ;TI"3to partition elements into arrays ("slices"). ;TI"CAn element begins a new slice if <tt>element === pattern</tt> ;TI"%(or if it is the first element).;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"1a = %w[foo bar fop for baz fob fog bam foy] ;TI"6e = a.slice_before(/ba/) # => #<Enumerator: ...> ;TI"e.each {|array| p array } ;T:@format0o; ; [I"Output:;T@o;; [ I" ["foo"] ;TI"["bar", "fop", "for"] ;TI"["baz", "fob", "fog"] ;TI"["bam", "foy"] ;T; 0o; ; [ I"=With a block, returns an enumerator that uses the block ;TI"(to partition elements into arrays. ;TI"IAn element begins a new slice if its block return is a truthy value ;TI"%(or if it is the first element):;T@o;; [I"He = (1..20).slice_before {|i| i % 4 == 2 } # => #<Enumerator: ...> ;TI"e.each {|array| p array } ;T; 0o; ; [I"Output:;T@o;; [I" [1] ;TI"[2, 3, 4, 5] ;TI"[6, 7, 8, 9] ;TI"[10, 11, 12, 13] ;TI"[14, 15, 16, 17] ;TI"[18, 19, 20] ;T; 0o; ; [I"BOther methods of the Enumerator class and Enumerable module, ;TI"2such as +to_a+, +map+, etc., are also usable.;T@o; ; [I"IFor example, iteration over ChangeLog entries can be implemented as ;TI" follows:;T@o;; [I"'# iterate over ChangeLog entries. ;TI"open("ChangeLog") { |f| ;TI"0 f.slice_before(/\A\S/).each { |e| pp e } ;TI"} ;TI" ;TI"B# same as above. block is used instead of pattern argument. ;TI"open("ChangeLog") { |f| ;TI"C f.slice_before { |line| /\A\S/ === line }.each { |e| pp e } ;TI"} ;T; 0o; ; [I"@"svn proplist -R" produces multiline output for each file. ;TI"$They can be chunked as follows:;T@o;; [ I"@IO.popen([{"LC_ALL"=>"C"}, "svn", "proplist", "-R"]) { |f| ;TI"? f.lines.slice_before(/\AProp/).each { |lines| p lines } ;TI"} ;TI"E#=> ["Properties on '.':\n", " svn:ignore\n", " svk:merge\n"] ;TI"># ["Properties on 'goruby.c':\n", " svn:eol-style\n"] ;TI"T# ["Properties on 'complex.c':\n", " svn:mime-type\n", " svn:eol-style\n"] ;TI"@# ["Properties on 'regparse.c':\n", " svn:eol-style\n"] ;TI" # ... ;T; 0o; ; [ I"BIf the block needs to maintain state over multiple elements, ;TI""local variables can be used. ;TI"OFor example, three or more consecutive increasing numbers can be squashed ;TI"5as follows (see +chunk_while+ for a better way):;T@o;; [I"a = [0, 2, 3, 4, 6, 7, 9] ;TI"prev = a[0] ;TI"p a.slice_before { |e| ;TI" prev, prev2 = e, prev ;TI" prev2 + 1 != e ;TI"}.map { |es| ;TI"@ es.length <= 2 ? es.join(",") : "#{es.first}-#{es.last}" ;TI"}.join(",") ;TI"#=> "0,2-4,6,7,9" ;T; 0o; ; [ I"6However local variables should be used carefully ;TI";if the result enumerator is enumerated twice or more. ;TI"EThe local variables should be initialized for each enumeration. ;TI")Enumerator.new can be used to do it.;T@o;; [,I"D# Word wrapping. This assumes all characters have same width. ;TI"#def wordwrap(words, maxwidth) ;TI" Enumerator.new {|y| ;TI"2 # cols is initialized in Enumerator.new. ;TI" cols = 0 ;TI"" words.slice_before { |w| ;TI"" cols += 1 if cols != 0 ;TI" cols += w.length ;TI" if maxwidth < cols ;TI" cols = w.length ;TI" true ;TI" else ;TI" false ;TI" end ;TI"# }.each {|ws| y.yield ws } ;TI" } ;TI" end ;TI"#text = (1..20).to_a.join(" ") ;TI",enum = wordwrap(text.split(/\s+/), 10) ;TI"puts "-"*10 ;TI"?enum.each { |ws| puts ws.join(" ") } # first enumeration. ;TI"puts "-"*10 ;TI"cenum.each { |ws| puts ws.join(" ") } # second enumeration generates same result as the first. ;TI"puts "-"*10 ;TI"#=> ---------- ;TI"# 1 2 3 4 5 ;TI"# 6 7 8 9 10 ;TI"# 11 12 13 ;TI"# 14 15 16 ;TI"# 17 18 19 ;TI"# 20 ;TI"# ---------- ;TI"# 1 2 3 4 5 ;TI"# 6 7 8 9 10 ;TI"# 11 12 13 ;TI"# 14 15 16 ;TI"# 17 18 19 ;TI"# 20 ;TI"# ---------- ;T; 0o; ; [I"Dmbox contains series of mails which start with Unix From line. ;TI"BSo each mail can be extracted by slice before Unix From line.;T@o;; ["I"# parse mbox ;TI"open("mbox") { |f| ;TI" f.slice_before { |line| ;TI"" line.start_with? "From " ;TI" }.each { |mail| ;TI" unix_from = mail.shift ;TI" i = mail.index("\n") ;TI" header = mail[0...i] ;TI" body = mail[(i+1)..-1] ;TI"' body.pop if body.last == "\n" ;TI"O fields = header.slice_before { |line| !" \t".include?(line[0]) }.to_a ;TI" p unix_from ;TI" pp fields ;TI" pp body ;TI" } ;TI"} ;TI" ;TI"M# split mails in mbox (slice before Unix From line after an empty line) ;TI"open("mbox") { |f| ;TI" emp = true ;TI" f.slice_before { |line| ;TI" prevemp = emp ;TI" emp = line == "\n" ;TI". prevemp && line.start_with?("From ") ;TI" }.each { |mail| ;TI"' mail.pop if mail.last == "\n" ;TI" pp mail ;TI" } ;TI"};T; 0: @fileI"enum.c;T:0@omit_headings_from_table_of_contents_below0I"Wslice_before(pattern) -> enumerator slice_before {|elt| ... } -> enumerator ;T0[ I" (p1);T@�FI"Enumerable;TcRDoc::NormalModule00