» tagged pages
» logout

(Feed found, click Add Page to syndicate.) Error finding feed, please try again » Find feed title

A Blog Page allows you to add entries, for news or other time sensitive postings

(Login required to save to your tagged pages.)
(or Cancel)

Make further edits, (or Cancel)

(Login required to save to your tagged pages.)
(or Cancel)

(Editing anonymously: to be credited for your changes, login or register a new account)

Change Page Permissions? Changing these permissions will adjust who can modify this page.

alex (change)
Swik Users (change)
(or Cancel)
Upload an image from your computer:
or Copy an image from a URL:
or Erase the current icon:
Icon Preview:

or Cancel

Erase Ruby? The contents of Ruby page and all pages directly attached to Ruby will be erased.

or Cancel

(Editing anonymously: to be credited for your changes, login or register a new account)

other page actions:
Ruby

Ruby

Tags Applied to Ruby

4 people have tagged this page:

Ruby is the interpreted scripting language for quick and easy object-oriented programming. It is simple, straight-forward, extensible, dynamic, and portable. Similar in scope to Perl and Python, it has high-level data types, automatic memory management, dynamic typing, a module system, exceptions, and a rich standard library.

To help address performance issues, virtual machines for Ruby have been developed, such as JRuby and YARV, which is being integrated into the Ruby distribution.

If you’re investigating Ruby, and building webapps, you’ll want to take a close look at Rails.

You can download Ruby

Visit RubyForge to see some related projects building on or extending the capabilities of Ruby.

Read documentation

And get a 20-minute tutorial

www.ruby-lang.org
, MIT-like, or at your option

sorted by: recent | see : popular
Content Tagged Ruby

Business Natural Languages Development in Ruby

Jay Fields presents his concept of Business Natural Languages (BNL). BNLs are a type of Domain Specific Language, designed to be readable by any subject matter expert, which allows to create maintainable specifications and documentation. The example language is shown using Ruby.

technology: dzone.com: tech links

scarling - starling in scala on memcached and mina

robey from twitter plays with scala and gets perf improvements

scala: del.icio.us/tag/scala

flexonrails.net " Integrating Flex and RabbitMQ using STOMP

An experimental STOMP adapter was recently released for RabbitMQ. This means that it is now possible for Flex/Flash apps to communicate with RabbitMQ using the ActionScript 3 STOMP client. The following is a simple demonstration of how to get these techno

AMQP: del.icio.us/tag/AMQP

HTML Entities for Ruby

Encodes and decodes HTML / XML entities.

XML: del.icio.us/tag/xml

rcodetools の導入 - gan2 の Ruby 勉強日記

>xmpfilter が便利らしいのでぐぐってみたら、rcodetools に含まれていることが分かった。

Emacs: del.icio.us tag/emacs

javaone 2008 summary/reflection

JavaOne 2008 is over. I’m still processing everything I’ve seen, but so far I didn’t see to much I didn’t know about before; certainly nothing shocking. Here are some of my observations related to Java7 and alternative languages for the JVM

technology: dzone.com: tech links

Audioscrobbler

"now_playing" won't have any effect to the statistics, for that use "submit". Use "submit" AFTER playing the song.


require 'digest/md5'
require 'fileutils'
require 'md5'
require 'net/http'
require 'thread'
require 'uri'



Config={}
Config[:user]="yourlastfmusername"
Config[:password]="yourpassword"

Submission_settings={}


def do_handshake
timestamp = Time.now.gmtime.to_i.to_s

md5 = Digest::MD5.hexdigest(Config[:password])
md5 = Digest::MD5.hexdigest(md5 + timestamp)

# replace c=tst and v=1.0 to a vaild id of a last.fm client.

query = "/?hs=true&p=1.2&c=tst&v=1.0&u=#{Config[:user]}&t=#{timestamp}&a=#{md5}"

begin
Net::HTTP.start("post.audioscrobbler.com", 80) do |http|
resp = http.get(query).body.strip

case resp
when /^OK\n([0-9a-z]+)\n(.+)\n(.+)/
puts("handshake succeeded")
Submission_settings[:session_id] = $1
Submission_settings[:now_playing_url] = URI.parse($2)
Submission_settings[:submission_url] = URI.parse($3)
when /^BANNED$/
puts("banned")
when /^BADTIME$/
puts("bad time, go fix your clock")
when /^FAILED (.+)$/
puts("handshake failed - #{resp}")
when /^BADAUTH$/
puts("handshake failed - bad username/password")
else
puts("bad response in handshake - #{resp}")
end
end
rescue SocketError => err
puts("socket error: #{err}")
rescue SystemCallError => err
puts("system call error: #{err}")
rescue IOError => err
puts("io error: #{err}")
rescue Timeout::Error
puts("timeout during handshake")
end
end

def now_playing(a)
[:band,:song,:album,:lenght,:nr,:mb].each do |i|
a[i]="" unless a[i]
a[i]=a[i].to_s.gsub(/ /,'_')
end

Net::HTTP.post_form(Submission_settings[:now_playing_url],{"s"=>Submission_settings[:session_id],"a"=>a[:band], "t"=>a[:song], "b"=>a[:album],"l"=>a[:lenght], "n"=>a[:nr], "m"=>a[:mb] })
end


def submit(a)
[:band,:song,:album,:lenght,:rating,:nr,:mb].each do |i|
a[i]="" unless a[i]
a[i]=a[i].to_s.gsub(/ /,'_')
end

Net::HTTP.post_form(Submission_settings[:now_playing_url],{"s"=>Submission_settings[:session_id],"a[0]"=>a[:band], "t[0]"=>a[:song],"i[0]" =>Time.now.to_i,"o[0]" => 'P', "r[0]"=>a[:rating], "b[0]"=>a[:album],"l[0]"=>a[:lenght], "n[0]"=>a[:nr], "m[0]"=>a[:mb] })
end

Ruby: Code Snippets: ruby

Page 1 | Next >>
Username:
Password:
(or Cancel)