Do you want to feel the trouble-free installation of Ruby?
It doesn't matter. Now we have a try Ruby site, so long as you have a browser, you can use Ruby immediately. Try Ruby provides an interactive environment similar to Ruby's IRB, A brief Ruby
The most obvious feature of Dynamic Language is that the behavior/attribute of a class instance can be dynamically modified after the new version is released! I personally think this kind of processing is more in line with the real world than Java/C
The module in ruby is a bit similar to the namespace in. net. It can be used to distinguish the module with the same name but belongs to different developers (or organizations ).Code.
The following code defines an me module, in which SQRT is the
When using Ruby to output text to the console, Good coloring is necessary. The following describes how to output the colored text to the OS X terminal. In fact, it should also apply in Linux.
Originally, I only needed to post the link to the blog
Today, I opened the RSS feed from delicious and saw many people collect the latest Fowler's recommendation for rake.
ArticleAfter reading this article, I feel that it is really good and can replace ant.
Ant's XML method has been unpleasant. XML
1: I'm Sadek drobi, I'm here at qcon with Matsumoto yukihiro. Matz, can you tell us what you 've ve been up to lately?
Recently, I 've been working on the version 1.9, which is the Development version of Ruby, which is much faster than the stable
I,
Create a file
F = file. new (file. join ("C:", "test.txt"), "W +") F. puts ("I am Jack") F. puts ("Hello World ")
File Mode
"R": Read-Only. Starts at beginning of file (default mode ).
"R +": Read-write. Starts at beginning of file.
1. Equal?
We often need to compare two objects. Ruby provides a variety of methods for comparing objects. We can use equal? The method is used to compare whether two objects are the same. This method is used to compare whether two values point to
In the previous article, we set up a ruby development environment. In fact, it is incomplete because only Ruby computers are installed and Ruby development cannot be carried out, even the most basic debugging functions cannot be used, just as Java
ArticleDirectory
1.1 install Ruby
1.2 install rake and albacore
4.1, rakefile
4.2. Other functions provided by albacore
Microsoft tools are known for integration. automated building is generally based on Visual Studio or its
N = [1, 2, 3, nil, nil] P nn1 = n. compactp n1n2 = n. Compact! P n2p n
It mainly involves communication with limited levels. I like research and I am sorry for it.
Let's talk about an array loop first.
Arr = [1, 2, 3] n = arr
Analysis: [
Ruby is very powerful. You can use the WIN32API module of the additional database DL/Win32 to directly call WIN32API
WIN32API. NewParameter 1 string Call DLL nameParameter 2 Name of the dllexport IN THE STRING DLLParameter 3 String Array
Here we mainly use non-Greedy quantifiers. +? "Means matching any character until the first character is met"
In addition, find the matched group, as shown in figure X [0].
Require 'open-Uri 'Open ('HTTP: //
Ruby on Rails is a Web application that enables you to develop, deploy, and maintain
ProgramA simple framework.
Of course, all web frameworks share the same goal. What makes rails so different? We can answer this question in several ways.
First,
First, we need a simple view for our index defined in Part 1
Index. rhtml in views/login
here comes the content which
Will be used after the user logged on.
This is just some dummy content that will be "blocked" by a modal extjs
1,BreakJump out of layer Loop
2,NextIgnore the remaining part of this loop and start the next loop
3,RedoStart the loop again, or start from this time
4,RetryStart the loop body again
5. $ array
6,Attr_writer: Username is equivalentDef
Class variables and class methodsFor a long time, all classes we created contain instance variables and instance methods: variables and methods associated with a specific class instance.Sometimes, classes also need to have their own States. So there
Ruby provides a powerful Inheritance Mechanism, and there are many inheritance methods. The simplest is"
Module Foo def Foo puts 'heyyyyoooo! 'Endclass Bar include fooendbar. New. Foo # heyyyyoooo! Bar. Foo # nomethoderror: Undefined method 'foo'
Learning more than one programming languages, perferable extends different style ones, like scripting, object-oriented, functional, logic, etc. Learning Languages teaches you need about programming.
Read Good bools, for example, "pragmatic
6, Using a Thread Group
A thread group is a way to manage threads. It logically associates threads with each other. Generally, all threads belong to the Default thread group (it is a class constant ). If a new thread group is created, the new thread
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.