Evgenii Legotckoi
Evgenii LegotckoiJune 27, 2016, 2:38 a.m.

RubyUser Guide #13 - Ruby - Inheritance

Inheritance, Ruby, ruby lesson, ruby уроки, user guide, наследование, руководство пользователя

Our classification of objects in everyday life is naturally hierarchical. We know that all cats are mammals , and all mammals are animals . Smaller classes inherit characteristics from the larger classes to which they belong. If all mammals breathe, …

Read
Evgenii Legotckoi
Evgenii LegotckoiJune 26, 2016, 2:36 a.m.

RubyUser Guide #12 - Ruby - classes

class, Ruby, ruby lesson, ruby уроки, user guide, класс, руководство пользователя

The real world is filled by objects, and we can classify them. For example, a very small child is likely to say "bow-wow" when seeing a dog, regardless of the breed; we naturally see the world in terms of these …

Read
Evgenii Legotckoi
Evgenii LegotckoiJune 26, 2016, 2:34 a.m.

RubyUser Guide #11 - Ruby - methods

methods, Ruby, ruby lesson, ruby уроки, user guide, методы, руководство пользователя

What is a method? In OO programming, we don't think of operating on data directly from outside an object; rather, objects have some understanding of how to operate on themselves (when asked nicely to do so). You might say we …

Read
Evgenii Legotckoi
Evgenii LegotckoiJune 26, 2016, 2:24 a.m.

RubyUser Guide #10 - Ruby - Object-oriented thinking

Ruby, ruby lesson, ruby уроки, user guide, ооп, руководство пользователя

Object oriented is a catchy phrase. To call anything object oriented can make you sound pretty smart. Ruby claims to be an object oriented scripting language; but what exactly does "object oriented" mean?

There have been a variety of answers …

Read
Evgenii Legotckoi
Evgenii LegotckoiJune 25, 2016, 2:22 a.m.

RubyUser Guide #09 - Ruby - iterators

interators, Ruby, ruby lesson, ruby уроки, user guide, итераторы, руководство пользователя

Iterators are not an original concept with ruby. They are in common use in object-oriented languages. They are also used in Lisp, though there they are not called iterators. However the concepet of iterator is an unfamiliar one for many …

Read
Evgenii Legotckoi
Evgenii LegotckoiJune 25, 2016, 2:07 a.m.

RubyUser Guide #08 - Ruby - control structures

case, for, Ruby, ruby lesson, ruby уроки, user guide, while, руководство пользователя

This chapter explores more of ruby's control structures.

case

We use the case statement to test a sequence of conditions. This is superficially similar to switch in C and Java but is considerably more powerful, as we shall see.

ruby> …
Read
Evgenii Legotckoi
Evgenii LegotckoiJune 23, 2016, 2:01 a.m.

RubyUser Guide #07 - Ruby - Back to the simple examples

руководство пользователя, ruby lesson, Ruby, ruby уроки, user guide, regular expressions, string

Now let's take apart the code of some of our previous example programs.

The following appeared in the simple examples chapter.

def fact(n)
  if n == 0
    1
  else
    n * fact(n-1)
  end
end
print fact(ARGV[0].to_i), "\n"

Because this is …

Read
Evgenii Legotckoi
Evgenii LegotckoiJune 21, 2016, 1:54 a.m.

RubyUser Guide #06 - Ruby - arrays

arrays, Ruby, ruby lesson, ruby уроки, user guide, массивы, руководство пользователя

You can create an array by listing some items within square brackets ([]) and separating them with commas. Ruby's arrays can accomodate diverse object types.

ruby> ary = [1, 2, "3"]
   [1, 2, "3"]

Arrays can be concatenated or repeated …

Read
Evgenii Legotckoi
Evgenii LegotckoiJune 21, 2016, 1:52 a.m.

RubyUser Guide #05 - Ruby - Regular expressions

user guide, регулярные выражения, ruby lesson, Ruby, ruby уроки, руководство пользователя, regular expressions

Let's put together a more interesting program. This time we test whether a string fits a description, encoded into a concise pattern .

There are some characters and character combinations that have special meaning in these patterns, including:

[] - …

Read
Evgenii Legotckoi
Evgenii LegotckoiJune 18, 2016, 1:49 a.m.

RubyUser Guide #04 - Ruby - Strings

Ruby, ruby lesson, ruby уроки, user guide, руководство пользователя

Ruby deals with strings as well as numerical data. A string may be double-quoted ("...") or single-quoted ('...').

ruby> "abc"
   "abc"
ruby> 'abc'
   "abc"

Double- and single-quoting have different effects in some cases. A double-quoted string allows character escapes by …

Read
Ua

Qt - Test 001. Signals and slots

  • Result:84points,
  • Rating points4
Ua

Qt - Test 001. Signals and slots

  • Result:42points,
  • Rating points-8
ОК

Qt - Test 001. Signals and slots

  • Result:47points,
  • Rating points-6
Last comments
ИМ
Игорь МаксимовNov. 22, 2024, 6:51 p.m.
Django - Tutorial 017. Customize the login page to Django Добрый вечер Евгений! Я сделал себе авторизацию аналогичную вашей, все работает, кроме возврата к предидущей странице. Редеректит всегда на главную, хотя в логах сервера вижу запросы на правильн…
Evgenii Legotckoi
Evgenii LegotckoiOct. 31, 2024, 8:37 p.m.
Django - Lesson 064. How to write a Python Markdown extension Добрый день. Да, можно. Либо через такие же плагины, либо с постобработкой через python библиотеку Beautiful Soup
A
ALO1ZEOct. 19, 2024, 3:19 p.m.
Fb3 file reader on Qt Creator Подскажите как это запустить? Я не шарю в программировании и кодинге. Скачал и установаил Qt, но куча ошибок выдается и не запустить. А очень надо fb3 переконвертировать в html
ИМ
Игорь МаксимовOct. 5, 2024, 2:51 p.m.
Django - Lesson 064. How to write a Python Markdown extension Приветствую Евгений! У меня вопрос. Можно ли вставлять свои классы в разметку редактора markdown? Допустим имея стандартную разметку: <ul> <li></li> <li></l…
d
dblas5July 5, 2024, 6:02 p.m.
QML - Lesson 016. SQLite database and the working with it in QML Qt Здравствуйте, возникает такая проблема (я новичок): ApplicationWindow неизвестный элемент. (М300) для TextField и Button аналогично. Могу предположить, что из-за более новой верси…
Now discuss on the forum
NW
Nayo WaiJan. 30, 2025, 4:22 p.m.
не запускается компьютер!!! Не запускается компьютер (точнее работает блок , но сам монитор вообще жесть)В общем я ничего с интернета не скачивала в последнее время. На компе никаких левых пр…
n
nklyJan. 3, 2025, 9:52 a.m.
Нужно запретить перемещение только некоторых итемов, остальные перемещать можно. Вопрос решен. Узнать QModelIndex элемента на который мы перетаскиваем другой элемент, можно с помощью функции indexAt(event->position().toPoint()) представления QTreeViev вызываемой в переопр…
M
MarselAug. 16, 2023, 9:26 p.m.
OAuth2.0 через VK, получение email Спасибо большое за помощь и простите за то что отнял время своей невнимательностью.
Evgenii Legotckoi
Evgenii LegotckoiJune 24, 2024, 10:11 p.m.
добавить qlineseries в функции Я тут. Работы оень много. Отправил его в бан.
t
tonypeachey1Nov. 15, 2024, 1:04 p.m.
google domain [url=https://google.com/]domain[/url] domain [http://www.example.com link title]

Follow us in social networks