# Hash holding the roman values # Values above 3999 are not accepted, as numerals with bar…
function win_to_utf8 ($string) { $in_arr = array ( chr(208), chr(192), chr(193), chr(194),…
url = 'http://xx' #post到url field_hash = {key: key, token: token} #post数据 request = RestCl…
puts "Enter Number of Data Set" n=gets.chomp n=n.to_f sum_d=0 i=0 while i<n i=i+1 puts …
#!/usr/bin/env ruby # -*- coding: gb18030 -*- # __FILE__ : ctrlvol.rb # 2012-7 # ruby 1.9.…
require 'find' def fileWalk(path) Find.find(path) do |f| type = "File" if File.file?(f) ty…
REQUEST_URI: <%= request.env["REQUEST_URI"] %> <br /> SERVER_NAME: <%= requ…
require 'resolv' Resolv.each_address("http://www.google.com/") do |ip| puts ip end
require 'net/ftp' ftp = Net::FTP.new('ftp.ruby-lang.org') ftp.passive = true ftp.login(use…
require 'gserver' class HelloServer < GServer def serve(io) io.puts("To stop this serve…
puts (1..Float::INFINITY).lazy.map{|n| (0..n).inject([1,0]) {|(a,b), _| [b, a+b]}[0] }.tak…
require 'rubygems' require 'markaby' m = Markaby::Builder.new items = ['Bread', 'Butter', …