How to plot from Corel Draw 10, How to plot from Corel Draw 11. Note: Make sure Corel Draw is open, and the drawing you ... saved from Corel Draw earlier). Curve resolution should read 0.001 Inches . Nothing else should have a check in it ...,
Ruby Cheat Sheet
Short summary:
This cheat sheet describes Ruby features in roughly the order they'll be presented in class. Its not a reference to the language. You do have a reference to the language ...
Long summary:Ruby Cheat Sheet This cheat sheet describes Ruby features in roughly the order theyll be presented in class. Its not a reference to the language. You do have a reference to the language its in Programming Ruby-the-book-0.4 on your CD. Click on index.html in that folder, and youll find most of the text of Andy Hunt and Dave Thomass fine book Programming Ruby. Variables Ordinary (local) variables are created through assignment: number = 5 Now the variable number has the value 5. Ordinary variables begin with lowercase letters. After the first character, they can contain any alphabetical or numeric character. Underscores are helpful for making them readable: this_is_my_variable = 5 A variables value is gotten simply by using the name of the variable. The following has the value 10: number + this_is_my_variable Conditional tests (if) if number == 5 puts Success else puts FAILURE end Put the if, else, and end on separate lines as shown. You dont have to indent, but you should. Function calls puts hello puts(hello) assert_equal(5, number) A string . Strings can be surrounded with single or double quotes. parentheses can be omitted if not required. If youre not sure whether theyre required, put them in. To be safe, put them in whenever the call is at all complicated. Even one as simple as this. Ruby Cheat Sheet 2 Function definitions def assert_equal(expected, actual) if expected != actual puts FAILURE! end end Functions can return values, and those values can be assigned to variables. The return value is the last statement in the definition. Heres a simple example: def five Note that no parentheses are required. 5 end variable = five Variable s value is 5. Note that we didnt need to say five(), as is required in some languages. You can put in the parentheses if you prefer. Heres a little more complicated example: def make_positive(number) if number < 0 -number else number end end variable = make_positive(-5) Variable s value is 5. variable = make_positive(five) Variable s value is 5. Very simple regular expressions Regular expressions are characters surrounded by // or %r . A regular expression is compared to a string like this: regexp = string Most characters in a regular expression match the same character in a string. So, these all match: /a/ = a string /a/ = string me along This also matches: /as/ = a string with astounding length Ruby Cheat Sheet 3 Notice that the regular expression can match anywhere in the string. If you want it to match only the beginning of the string, start it with a caret: / as/ = alas, no match If you want it to match at the end, end with a dollar sign: /no$/ = no match, alas If you want the regular expression to match any character in a string, use a period: / .s/ = As if I didnt know better! There are a number of other special characters that let you amazing and wonderful things with strings. See ...
Source: www.testingeducation.org
Ruby Course, Ruby Course. an immersive programming course ... if you already know some programming languages, there are sure some surprises here: ...,
Sockets programming in Ruby, This tutorial shows how to develop sockets-based networking applications using the Ruby language. Ruby basics and walks through the most important classes for sockets programming, followed by working chat application that illustrates these fundamentals ...,
Working on the Rails Road, Ruby and Rails programming. When not to use Rails! Really large applications ... interest in general Ruby programming. will continue to expand rapidly ...,