| Method | Path | Description | Params |
|---|---|---|---|
| GET | /health |
health endpoint | - |
| GET | /status |
status of the application and chain | include_chain (bool, optional) - when true, returns chain status |
| did:3:kjzl6cwe1jw14az1nu6usezgcqk16os0vzjzw6nheicts4jt0sp7yld8pv2cqj1 |
This is a UI test description
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
| { | |
| "word_wrap": false, | |
| "color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", | |
| "font_size": 13.0, | |
| "tab_size": 2, | |
| "detect_indentation": false, | |
| "translate_tabs_to_spaces": true, | |
| "save_on_focus_lost": true, | |
| // "draw_white_space": "all", | |
| "trim_trailing_white_space_on_save": true, |
| ### Ancient Roman Numerals | |
| def to_roman(integer, numeral="") | |
| return numeral if integer == 0 | |
| if integer/1000 >= 1 | |
| numeral << 'M' * ( integer/1000 ) | |
| remainder = integer % 1000 | |
| elsif integer/500 >= 1 | |
| numeral << 'D' * ( integer/500 ) |
###In Ruby, is the attribute of an object an object?
To illustrate, let's define a Book class where each book (or each instance of Book) has an author.
class Book
attr_accessor :author
def author
@author| rvm list | |
| ~ dgamboa$ rvm list | |
| rvm rubies | |
| ruby-1.8.7-p370 [ i686 ] | |
| ruby-1.9.2-p320 [ x86_64 ] | |
| =* ruby-1.9.3-p194 [ x86_64 ] |
The following table shows the speed results of six different approaches to creating a reverse polish notation calculator with Ruby. The code was written by five different incoming Dev Bootcamp students and one instructor.
| Approach | Time (ms) |
|---|---|
| First | 119.2 |
| Second | 295.6 |
| Third | 264.7 |
| Fourth | 274.3 |
| # The following method will take strings like '5 4 +', '-1', '5 -3 4 + 6 9 - * +', and '2 3 4 7 + * -', and return the result of running the calculation. | |
| # Note: when performing division it will always round down. | |
| def evaluate(string) | |
| return string.to_i unless string.include?(' ') | |
| string.match /(-?\d+) (-?\d+) ([-+*\/])(?!\d)/ | |
| result = ($1.to_i).send($3,$2.to_i) | |
| string.gsub!($1 + ' ' + $2 + ' ' + $3, result.to_s) | |
| evaluate(string) | |
| end |