require 'net/http' url = URI.parse('http://www.rubyinside.com/test.cgi') response = Net::H…
# ! /usr/bin/sh # Ubuntu系统下安装ruby/rails必要的库和编译环境 sudo apt-get update sudo apt-get install …
#encoding: utf-8 require 'open-uri' require 'nokogiri' doc = Nokogiri::HTML(open('http://w…
create database Contact; use Contact; CREATE TABLE Employee ( Name VARCHAR(50), Phone VARC…
require "win32ole" def ieInputBox( msg, default ) ie = WIN32OLE.new("InternetExplorer.Appl…
require 'net/ftp' ftp = Net::FTP.new("ftp.ruby-lang.org") ftp.login ftp.passive = true fil…
# Calculate the Fibonacci to 'x' number of places and return it as an array def Fibonacci(…
require 'uri' require 'open-uri' require 'iconv' CN_re = /(?:\xe4[\xb8-\xbf][\x80-\xbf]|[\…
// To creates the web application // Use the command rails applicationName: rails oschina …
#!/usr/bin/env ruby # PERMUTATIONS COMPUTER # based on Bogomolyn algorithm # http://www.be…
require 'webrick' class MyServlet < WEBrick::HTTPServlet::AbstractServlet def do_GET(re…
def is_palindrome(word) if word == word.reverse "#{ word } is a palindrome." else "#{ word…