GRAYBYTE WORDPRESS FILE MANAGER5173

Server IP : 198.54.121.189 / Your IP : 216.73.216.224
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/ruby24/lib64/ruby/2.4.0/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/ruby24/lib64/ruby/2.4.0//abbrev.rb
# frozen_string_literal: false
#--
# Copyright (c) 2001,2003 Akinori MUSHA <knu@iDaemons.org>
#
# All rights reserved.  You can redistribute and/or modify it under
# the same terms as Ruby.
#
# $Idaemons: /home/cvs/rb/abbrev.rb,v 1.2 2001/05/30 09:37:45 knu Exp $
# $RoughId: abbrev.rb,v 1.4 2003/10/14 19:45:42 knu Exp $
# $Id: abbrev.rb 53141 2015-12-16 05:07:31Z naruse $
#++

##
# Calculates the set of unambiguous abbreviations for a given set of strings.
#
#   require 'abbrev'
#   require 'pp'
#
#   pp Abbrev.abbrev(['ruby'])
#   #=>  {"ruby"=>"ruby", "rub"=>"ruby", "ru"=>"ruby", "r"=>"ruby"}
#
#   pp Abbrev.abbrev(%w{ ruby rules })
#
# _Generates:_
#   { "ruby"  =>  "ruby",
#     "rub"   =>  "ruby",
#     "rules" =>  "rules",
#     "rule"  =>  "rules",
#     "rul"   =>  "rules" }
#
# It also provides an array core extension, Array#abbrev.
#
#   pp %w{ summer winter }.abbrev
#
# _Generates:_
#   { "summer"  => "summer",
#     "summe"   => "summer",
#     "summ"    => "summer",
#     "sum"     => "summer",
#     "su"      => "summer",
#     "s"       => "summer",
#     "winter"  => "winter",
#     "winte"   => "winter",
#     "wint"    => "winter",
#     "win"     => "winter",
#     "wi"      => "winter",
#     "w"       => "winter" }

module Abbrev

  # Given a set of strings, calculate the set of unambiguous abbreviations for
  # those strings, and return a hash where the keys are all the possible
  # abbreviations and the values are the full strings.
  #
  # Thus, given +words+ is "car" and "cone", the keys pointing to "car" would
  # be "ca" and "car", while those pointing to "cone" would be "co", "con", and
  # "cone".
  #
  #   require 'abbrev'
  #
  #   Abbrev.abbrev(%w{ car cone })
  #   #=> {"ca"=>"car", "con"=>"cone", "co"=>"cone", "car"=>"car", "cone"=>"cone"}
  #
  # The optional +pattern+ parameter is a pattern or a string. Only input
  # strings that match the pattern or start with the string are included in the
  # output hash.
  #
  #   Abbrev.abbrev(%w{car box cone crab}, /b/)
  #   #=> {"box"=>"box", "bo"=>"box", "b"=>"box", "crab" => "crab"}
  #
  #   Abbrev.abbrev(%w{car box cone}, 'ca')
  #   #=> {"car"=>"car", "ca"=>"car"}
  def abbrev(words, pattern = nil)
    table = {}
    seen = Hash.new(0)

    if pattern.is_a?(String)
      pattern = /\A#{Regexp.quote(pattern)}/  # regard as a prefix
    end

    words.each do |word|
      next if word.empty?
      word.size.downto(1) { |len|
        abbrev = word[0...len]

        next if pattern && pattern !~ abbrev

        case seen[abbrev] += 1
        when 1
          table[abbrev] = word
        when 2
          table.delete(abbrev)
        else
          break
        end
      }
    end

    words.each do |word|
      next if pattern && pattern !~ word

      table[word] = word
    end

    table
  end

  module_function :abbrev
end

class Array
  # Calculates the set of unambiguous abbreviations for the strings in +self+.
  #
  #   require 'abbrev'
  #   %w{ car cone }.abbrev
  #   #=> {"car"=>"car", "ca"=>"car", "cone"=>"cone", "con"=>"cone", "co"=>"cone"}
  #
  # The optional +pattern+ parameter is a pattern or a string. Only input
  # strings that match the pattern or start with the string are included in the
  # output hash.
  #
  #   %w{ fast boat day }.abbrev(/^.a/)
  #   #=> {"fast"=>"fast", "fas"=>"fast", "fa"=>"fast", "day"=>"day", "da"=>"day"}
  #
  #   Abbrev.abbrev(%w{car box cone}, "ca")
  #   #=> {"car"=>"car", "ca"=>"car"}
  #
  # See also Abbrev.abbrev
  def abbrev(pattern = nil)
    Abbrev::abbrev(self, pattern)
  end
end

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 03 2024 22:47:57
root / root
0755
cgi
--
March 03 2024 22:47:57
root / linksafe
0755
digest
--
March 03 2024 22:47:57
root / linksafe
0755
drb
--
March 03 2024 22:47:57
root / linksafe
0755
fiddle
--
March 03 2024 22:47:57
root / linksafe
0755
forwardable
--
March 03 2024 22:47:57
root / root
0755
io
--
March 03 2024 22:47:59
root / linksafe
0755
irb
--
March 03 2024 22:47:57
root / linksafe
0755
json
--
March 03 2024 22:47:59
root / linksafe
0755
matrix
--
March 03 2024 22:47:57
root / linksafe
0755
net
--
March 03 2024 22:47:57
root / linksafe
0755
openssl
--
March 03 2024 22:47:57
root / linksafe
0755
optparse
--
March 03 2024 22:47:57
root / linksafe
0755
psych
--
March 03 2024 22:48:00
root / linksafe
0755
racc
--
March 03 2024 22:47:57
root / linksafe
0755
rbconfig
--
March 03 2024 22:48:02
root / linksafe
0755
rdoc
--
March 03 2024 22:48:01
root / linksafe
0755
rexml
--
March 03 2024 22:47:57
root / linksafe
0755
rinda
--
March 03 2024 22:47:57
root / linksafe
0755
ripper
--
March 03 2024 22:47:57
root / linksafe
0755
rss
--
March 03 2024 22:47:57
root / linksafe
0755
rubygems
--
March 03 2024 22:48:02
root / linksafe
0755
shell
--
March 03 2024 22:47:57
root / linksafe
0755
syslog
--
March 03 2024 22:47:57
root / root
0755
unicode_normalize
--
March 03 2024 22:47:57
root / root
0755
uri
--
March 03 2024 22:47:57
root / linksafe
0755
webrick
--
March 03 2024 22:47:57
root / linksafe
0755
x86_64-linux
--
March 03 2024 22:48:00
root / root
0755
yaml
--
March 03 2024 22:47:57
root / linksafe
0755
English.rb
6.452 KB
March 31 2020 11:42:18
root / linksafe
0644
abbrev.rb
3.492 KB
March 31 2020 11:42:18
root / linksafe
0644
base64.rb
3.307 KB
March 31 2020 11:42:18
root / linksafe
0644
benchmark.rb
17.898 KB
March 31 2020 11:42:18
root / linksafe
0644
cgi.rb
9.804 KB
March 31 2020 11:42:18
root / linksafe
0644
cmath.rb
9.478 KB
March 31 2020 11:42:18
root / linksafe
0644
csv.rb
83.531 KB
March 31 2020 11:42:18
root / linksafe
0644
date.rb
0.98 KB
July 26 2023 14:47:32
root / linksafe
0644
debug.rb
29.976 KB
March 31 2020 11:42:18
root / linksafe
0644
delegate.rb
10.306 KB
March 31 2020 11:42:18
root / linksafe
0644
digest.rb
2.826 KB
July 26 2023 14:47:33
root / linksafe
0644
drb.rb
0.049 KB
March 31 2020 11:42:18
root / linksafe
0644
e2mmap.rb
3.944 KB
March 31 2020 11:42:18
root / linksafe
0644
erb.rb
27.246 KB
March 31 2020 11:42:18
root / linksafe
0644
expect.rb
2.174 KB
July 26 2023 14:47:48
root / linksafe
0644
fiddle.rb
1.683 KB
July 26 2023 14:47:35
root / linksafe
0644
fileutils.rb
44.056 KB
March 31 2020 11:42:18
root / linksafe
0644
find.rb
2.516 KB
March 31 2020 11:42:18
root / linksafe
0644
forwardable.rb
8.504 KB
March 31 2020 11:42:18
root / linksafe
0644
getoptlong.rb
15.409 KB
March 31 2020 11:42:18
root / linksafe
0644
ipaddr.rb
17.1 KB
March 31 2020 11:42:18
root / linksafe
0644
irb.rb
20.289 KB
March 31 2020 11:42:18
root / linksafe
0644
json.rb
1.767 KB
July 26 2023 14:47:36
root / linksafe
0644
kconv.rb
5.768 KB
July 26 2023 14:47:38
root / linksafe
0644
logger.rb
23.534 KB
March 31 2020 11:42:18
root / linksafe
0644
mathn.rb
3.424 KB
March 31 2020 11:42:18
root / linksafe
0644
matrix.rb
53.366 KB
March 31 2020 11:42:18
root / linksafe
0644
mkmf.rb
84.322 KB
July 26 2023 14:46:03
root / linksafe
0644
monitor.rb
7.02 KB
March 31 2020 11:42:18
root / linksafe
0644
mutex_m.rb
2.04 KB
March 31 2020 11:42:18
root / linksafe
0644
observer.rb
5.832 KB
March 31 2020 11:42:18
root / linksafe
0644
open-uri.rb
24.764 KB
March 31 2020 11:42:18
root / linksafe
0644
open3.rb
20.595 KB
March 31 2020 11:42:18
root / linksafe
0644
openssl.rb
0.435 KB
July 26 2023 14:47:47
root / linksafe
0644
optionparser.rb
0.058 KB
March 31 2020 11:42:18
root / linksafe
0644
optparse.rb
57.25 KB
March 31 2020 11:42:18
root / linksafe
0644
ostruct.rb
10.201 KB
March 31 2020 11:42:18
root / linksafe
0644
pathname.rb
16.078 KB
July 26 2023 14:47:47
root / linksafe
0644
pp.rb
14.431 KB
March 31 2020 11:42:18
root / linksafe
0644
prettyprint.rb
15.895 KB
March 31 2020 11:42:18
root / linksafe
0644
prime.rb
12.49 KB
March 31 2020 11:42:18
root / linksafe
0644
profile.rb
0.23 KB
March 31 2020 11:42:18
root / linksafe
0644
profiler.rb
4.539 KB
March 31 2020 11:42:18
root / linksafe
0644
pstore.rb
14.705 KB
March 31 2020 11:42:18
root / linksafe
0644
psych.rb
15.249 KB
July 26 2023 14:47:48
root / linksafe
0644
rdoc.rb
5.065 KB
March 31 2020 11:42:18
root / linksafe
0644
resolv-replace.rb
1.763 KB
March 31 2020 11:42:18
root / linksafe
0644
resolv.rb
73.479 KB
March 31 2020 11:42:18
root / linksafe
0644
ripper.rb
2.556 KB
July 26 2023 14:47:52
root / linksafe
0644
rss.rb
2.871 KB
March 31 2020 11:42:18
root / linksafe
0644
rubygems.rb
35.378 KB
March 31 2020 11:42:18
root / linksafe
0644
scanf.rb
23.558 KB
March 31 2020 11:42:18
root / linksafe
0644
securerandom.rb
7.483 KB
March 31 2020 11:42:18
root / linksafe
0644
set.rb
20.735 KB
March 31 2020 11:42:18
root / linksafe
0644
shell.rb
11.371 KB
March 31 2020 11:42:18
root / linksafe
0644
shellwords.rb
6.657 KB
March 31 2020 11:42:18
root / linksafe
0644
singleton.rb
4.056 KB
March 31 2020 11:42:18
root / linksafe
0644
socket.rb
42.99 KB
July 26 2023 14:47:56
root / linksafe
0644
sync.rb
7.295 KB
March 31 2020 11:42:18
root / linksafe
0644
tempfile.rb
10.802 KB
March 31 2020 11:42:18
root / linksafe
0644
thwait.rb
3.351 KB
March 31 2020 11:42:18
root / linksafe
0644
time.rb
22.355 KB
March 31 2020 11:42:18
root / linksafe
0644
timeout.rb
3.825 KB
March 31 2020 11:42:18
root / linksafe
0644
tmpdir.rb
4.295 KB
March 31 2020 11:42:18
root / linksafe
0644
tracer.rb
6.44 KB
March 31 2020 11:42:18
root / linksafe
0644
tsort.rb
14.299 KB
March 31 2020 11:42:18
root / linksafe
0644
ubygems.rb
0.291 KB
March 31 2020 11:42:18
root / linksafe
0644
un.rb
9.176 KB
March 31 2020 11:42:18
root / linksafe
0644
unicode_normalize.rb
3.196 KB
March 31 2020 11:42:18
root / linksafe
0644
uri.rb
3.1 KB
March 31 2020 11:42:18
root / linksafe
0644
weakref.rb
2.946 KB
March 31 2020 11:42:18
root / linksafe
0644
webrick.rb
6.72 KB
March 31 2020 11:42:18
root / linksafe
0644
yaml.rb
1.73 KB
March 31 2020 11:42:18
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF