require "pstore" db = PStore.new("employee.dat") db.transaction do db["params"] = {"name" …
require 'dbm' DBM.open('r') do |db| db['t'] ="W" db[23] = "F" end DBM.open('r') do |db| pu…
require 'net/ssh' def test_ssh_connect(address,username,password) begin Net::SSH.start(add…
require 'net/ftp' ftp = Net::FTP.new('ftp.domain.com') ftp.passive = true ftp.login ftp.ch…
require 'net/telnet' # 连接到远程主机 foobar telnet = Net::Telnet.new("Host" => "foobar") {|c|…
require 'yaml' puts ({ 'measurements' => 'metric' }.to_yaml) puts ({ :measurements =>…
ClassPart = proc do <copy here code you want to move out of the main class> end
require 'win32ole' excel = WIN32OLE.new("excel.application") excel.Workbooks.Add excel.Ran…
#coding: utf-8 require 'sinatra' require 'omniauth' require 'omniauth-github' use Rack::Se…
require "dbi" URL = "dbi:Oracle:oracle.neumann" dbh = DBI.connect(URL, "scott", "tiger") r…
require 'gserver' class HelloServer < GServer def serve(io) io.puts("Say something to m…
#Insertion Sort Method def insertionSort(list) list.each_with_index do |data,i| j = i - 1 …