The ruby language has existed for a long time and has never been popular in China. Many people only know this language and there are few people. Every language has been developing for more than ten years and has become better and better. There must
Longest Common subsequence, LCs, dynamic planning implementation.
# Encoding: UTF-8 # Author: Xu Jin, 4100213 # Date: nov 01,201 2 # longest-commom-subsequence # To find a longest commom subsequence of two given character arrays by using LCS
# To generate xml, you must create a rexml: document object instance. Require "Rexml/document" File = file. New ("test. xml", "W + ")# Create an XML file and write the following content .Doc = Rexml: Document. New # Create XML content # Add a node
Some people say that textmate is good, but this is suitable for MAC systems. In Windows, I started with editplus and started with Ruby syntax. In addition, the tree map with directories on the left is very friendly, that is, the files in each
Ruby installation in Linux
Ruby installation package: Http://www.ruby-lang.org/en/downloads/Ruby-1.8.6-p111.tar.gz [you can install any version! The methods are the same. But remember that there are commands for these steps]Unzip and
Original
Http://www.ruby-lang.org/zh_cn/documentation/ruby-from-other-languages/to-ruby-from-java/
Omit blablaSimilarity:
Memory Management, with the garbage collection function
All objects have types.
Public, private, and protected Methods
An unexpected problem occurs in a running program. A file to be read does not exist. When you want to store some data, the disk is full. You may enter inappropriate data.
Ruby> file = open ("some_file ")
Err: (eval): 1: In 'open': no such file or
Reprinted please indicate the source: http://blog.csdn.net/guolin_blog/article/details/9400153
This is a copy version of Java Design Pattern dialysis, which is specially provided for Ruby lovers. If you are not familiar with Ruby syntax, please
After some comparisons and selections, we finally decided to use the popular Ruby as the first test script for my automated testing framework design, in addition, its test tool watir almost perfectly replaces the so-called charging tool qtp, and has
Ruby array sorting implementation and performance comparison
Wei renyan 2010.8.21
Recently, I have been studying programming Pearl River. I have explained various sorting methods and gradually explained the advantages and disadvantages of optimizing
#a sudoku solver in Rubymodule Sudokuclass PuzzleASCII=".123456789"BIN="\000\001\002\003\004\005\006\007\010\011"def initialize(lines)if(lines.respond_to?:join)s=lines.joinelses=lines.dupends.gsub!(/\s/,"")raise Invalid,"Grid is the wrong size"
Link: http://mislav.uniqpath.com/poignant-guide/book/chapter-2.htmlchapter 2: kon'nichi wa, Ruby Section 1: Open this book
Pretend that you have already opened this book (although you may have already opened this book), you only find that there is
Smalltalk
Like smalltalk, Ruby is also a dynamic, object-oriented language. You do not need to specify the Data Type statically. Everything is an object. In addition, both have a garbage collection mechanism.
In smalltalk, flow control
Document directory
About Style
About Dynamics
Structure
Others
Usage
/*************************************** *
Call by name
Everything is an object and never closes
Hook everywhere
Yield/block/proc/Lambda, first-class citizen
Symbol and
Recently, I need a fast development language. Currently, the hot and fast development languages are Python and Ruby. Ruby and Python are both excellent scripting languages. Although their design philosophy is almost completely different, they are
The dynamic planning algorithm is used to calculate the shortest editing distance.
#encoding: utf-8#author: xu jin#date: Nov 12, 2012#EditDistance#to find the minimum cost by using EditDistance algorithm#example output:# "Please input a string: "#
Exception Handling is a common problem in the development process. Basically, all advanced languages have their own exception handling systems. Ruby is no exception and is easy to use.
The raise method is used to throw exceptions in Ruby. Remember,
This article is original. Reprinted Please note:Author: UtensilBlog:Http://blog.csdn.net/utensil/Email:Utensilcandel@gmail.com
Finally, I bought practical rails projects. It turns out that this article "conquer Ruby on Rails" has blossomed
Why's lucky stiff. I am just a porter. You don't have to read the original text.
Well, suppose there is an instance method in a class. We hope this method runs only once ." Cut, I thought it was an egg. "The old people who have been familiar with
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.