class Cruncher def crunch return 5 end end
require 'find' module Find def match(*paths) matched = [] find(*paths) { |path| matched &l…
#!/usr/bin/ruby print "Content-type: text/html\r\n\r\n" print "<html><body>Hel…
filter_parameter_logging :password, :password_confirmation
require 'open-uri' puts open('http://www.oschina.net/').read(200)
script/console Loading development environment (Rails 2.3.11) >> p = Package.new =&g…
require 'win32ole' ChartTypeVal = 4100; excel = WIN32OLE.new("excel.application") excel['V…
require 'find' require 'digest/md5' uniqueFileTable = Hash.new sameFileTable = Hash.new #p…
f=File.open('M0030002007.lrc') f.each do |line| puts line.gsub(/[\[\d:\.\]]/,'') end
module Deprecate def self.skip # :nodoc: #@skip ||= false #update by jazz 2011-5-6 true en…
require 'net/http' url = URI.parse('http://www.rubyinside.com/test.cgi') Net::HTTP.start(u…
require 'net/http' require 'net/https' url = URI.parse('https://example.com/') http = Net:…