代码搜索:Ruby

找到约 1,747 项符合「Ruby」的源代码

代码结果 1,747
www.eeworm.com/read/275831/10794092

rb 06 - finding duplicate files.rb

#!/usr/bin/ruby # find_duplicates.rb require 'find' require 'digest/md5' def each_set_of_duplicates(*paths) sizes = {} Find.find(*paths) do |f| (sizes[File.size(f)] ||= [])
www.eeworm.com/read/129756/5970522

rb speed_test.rb

require 'digest/crc32_in_ruby' require 'digest/crc32_in_c' require 'digest/md5' require 'digest/sha1' require 'benchmark' include Benchmark def random_string(size) s = "" size.times {s
www.eeworm.com/read/129756/5970523

rb test_crc32.rb

require 'test/unit' require 'digest/crc32_in_c' require 'digest/crc32_in_ruby' module TestCRC32 def test_01_simple # check against some values calculated by crc32 algorithm in ffv.exe
www.eeworm.com/read/487373/1236989

create

#!/usr/bin/env ruby -wKU $LOAD_PATH
www.eeworm.com/read/389759/2538158

c http11_parser.c

#line 1 "ext/http11/http11_parser.rl" /** * Copyright (c) 2005 Zed A. Shaw * You can redistribute it and/or modify it under the same terms as Ruby. */ #include "http11_parser.h" #include
www.eeworm.com/read/389759/2538279

rb debug.rb

#!/usr/bin/env ruby # # Debug functions, emulating the ones we have in Amarok # # (c) 2006 Ian Monroe # (c) 2006 Mark Kretschmann # (c) 2003-5 Max Howell
www.eeworm.com/read/275831/10794380

rb 15 - writing a cgi script.rb

#!/usr/bin/ruby # ps.cgi processes = %x{ps aux}.collect do |proc| '' + proc.split(/\s+/, 11).join('') + '' end puts 'Content-Type: text/html' # Output other HTTP headers
www.eeworm.com/read/275831/10794495

rb 05 - clearing the screen.rb

#!/usr/bin/ruby -w # clear_console.rb clear_code = %x{clear} puts 'Press enter to clear the screen.' $stdin.gets print clear_code puts "It's cleared!" #--- %x{clear} # => "\e[H\e[2J
www.eeworm.com/read/338640/6316475

rb hello.rb

#!/usr/local/ruby class Hello def initialize(name) @name = name end def hello_matz puts "hello, " + @name + "!" end def array_of_ten (1..10).to_a end end hi = Hello.new("stone") hi.hello_matz t
www.eeworm.com/read/229898/4727446

rb modgraph.rb

#!/usr/bin/ruby # display the kernel module dependencies # author: John Ellson require 'gv' G = Gv.digraph("G") N = Gv.protonode(G) E = Gv.protoedge(G) Gv.setv(G, 'rankd