drop database Contact; create database Contact; use Contact; CREATE TABLE Employee ( id in…
#! rubyw.exe # encoding: gbk require 'socket' require 'time' require 'cstruct/win32struct'…
require 'hpricot' html = <<END_OF_HTML <html> <head> <title>This i…
#method1 puts (10**2...10**6).select{|n| n.to_s.bytes.map{|x| x-48}.map{|x| x**n.to_s.size…
require 'ping' puts "Pong!" if Ping.pingecho('localhost', 5)
def parse(line) s = line.scan(/\(|\)|"(?:\\.|[^"])*"|[^()" \n]+/) f = ->(t=nil){ case x…
ruby 1.8.7-p72 Python 2.5.2 perl v5.10.0 Lua 5.0.3 OCaml 3.10.2 ghc-6.8.2 gcc 4.3.2 java "…
array1 = [1, 3, 5, 6, 7, 9] array2 = [1, 4, 5, 6, 8, 9, 10, 20] p array1 & array2
require 'rubygems' require 'feed_tools' feed = FeedTools::Feed.open('http://www.rubyinside…
"a".methods.grep /case/
class AveController < ApplicationController def index end def calculate @i=0 @course_nu…