
Ruby
Get flash to fully experience Pearltrees
Ruby for systems administrators
Ruboto: Ruby on Android
1 filename = ' data.csv ' 2 file = File . new (filename, ' r ' ) 3 4 file. each_line ( " \n " ) do | row | 5 columns = row. split ( " , " ) 6 7 break if file. lineno > 10 8 end 1 require ' rubygems ' 2 require ' faster_csv ' 3 4 FasterCSV . foreach ( " data.csv " , : quote_char => ' " ' , : col_sep => ' ; ' , : row_sep => : auto ) do | row | 5 puts row[ 0 ] 6 end
How to parse CSV data with Ruby - Ruby - csv, parse, ruby, fastercsv, ccsv, csvscan, excelsior
url = URI.parse( db_url ) http = Net::HTTP.new( url.host, url.port ) http.use_ssl = true if url.port == 443 http.verify_mode = OpenSSL::SSL::VERIFY_NONE if url.port == 443 path = url.path + "?" + url.query res, data = http.get( path ) case res when Net::HTTPSuccess, Net::HTTPRedirection # parse link doc = Nokogiri::HTML(data) a = doc.xpath("//item") b = [] a.each do |z| b
Connect to https site with Nokogiri (Page 1) - Controllers and Views - Rails Forum - Ruby on Rails Help and Discussion Forum
Programmation Ruby/Types standards - Wikibooks
Un livre de Wikibooks. Nous allons voir ici tous les types que nous pouvons considérer comme "standards", dans le sens où nous les retrouvons dans la plupart des langages, et que ceux-ci sont directement intégrés à l'interpréteur ( built-in ). Néanmoins il ne faut pas perdre de vue qu'il s'agit en réalité d'objets. En ruby les chaînes de caractères sont représentées par l'objet " String ". En réalité cet objet contient et permet la manipulation d'un nombre indéfini d'octets, typiquement des caractères, nous pourrons néanmoins y stocker tout type de données binaires ou non. Mais le moyen le plus courant de créer une chaîne est de la placer entre simple quote (') ou entre double quote (").Ruby QuickRef
alias and BEGIN begin break case class def defined? do else elsif END end ensure false for if in module next nil not or redo rescue retry return self super then true undef unless until when while yield 'no interpolation' "#{interpolation}, and backslashes\n" %q(no interpolation) %Q(interpolation and backslashes) %(interpolation and backslashes) `echo command interpretation with interpolation and backslashes` %x(echo command interpretation with interpolation and backslashes)Getting Started with Nokogiri | Engine Yard Ruby on Rails Blog
Ruby on Rails is a new kid in the block into the world of Web application development that is rapidly gaining interest, even though it is in beta versions. These days, I am trying to get my hands dirty with Ruby on Rails using various tutorial posts and also some books. Over the coming days, i will try to share my learnings with you through the blog.

