Skip to content

{
"selection1": [
{
"extract1": "Абиссинская"
},
{
"extract1": "Австралийский мист"
},
{
"extract1": "Азиатская (табби)"
output = ''
animals = ['cat', 'dog', 'bird']
animals.each do |animal|
output += output + animal + ' '
end
puts output # cat cat dog cat cat dog bird
class Cat
attr_reader :color, :breed
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
def feed(food)
puts "Mmmm, " + food + "!"
@Hyoek-Jun-Kwon
Hyoek-Jun-Kwon / cat.c
Last active October 1, 2017 15:19
cat
#include<stdio.h>
int main()
{
int cat=0;
scanf("%d",&cat);
printf("%d",cat);
return 0;
}
@pdolega
pdolega / cats.scala
Created January 27, 2018 16:51
cats
valueOpt.flatTraverse(compute) // also Future[Option[Int]]!
package object_oriented_programming;
/**
* Базовый класс, который определяет базовое поведение всех котиков.
*/
public class Cat {
boolean canPurr = true;
boolean canMeow = true;
int jumpIdentication = 0;
int JUMPS_HIGH = 0, JUMPS_LOW = 1, CANT_JUMP = 2;
/***
* ii. ;9ABH,
* SA391, .r9GG35&G
* &#ii13Gh; i3X31i;:,rB1
* iMs,:,i5895, .5G91:,:;:s1:8A
* 33::::,,;5G5, ,58Si,,:::,sHX;iH1
* Sr.,:;rs13BBX35hh11511h5Shhh5S3GAXS:.,,::,,1AG3i,GG
* .G51S511sr;;iiiishS8G89Shsrrsh59S;.,,,,,..5A85Si,h8
* :SB9s:,............................,,,.,,,SASh53h,1G.
* .r18S;..,,,,,,,,,,,,,,,,,,,,,,,,,,,,,....,,.1H315199,rX,
@pdolega
pdolega / cats.scala
Created January 27, 2018 17:13
cats
def getItemById(itemId: Int): Future[Option[Item]] = /* ... */
def ensureItemExists(itemId: Int): EitherT[Future, BaseException, Item] = {
OptionT(getItemById(itemId))
.toRight(ItemNotFoundException(s"item not found, itemId = $itemId"))
}
def ensureItemStateIs(actual: String, expected: String): EitherT[Future, BaseException, Unit] = {
// Returns a Unit value wrapped into Right and then into Future if condition is true,
@pdolega
pdolega / cats.scala
Created January 27, 2018 16:51
cats
valueOpt.traverse(compute).map(_.flatten) // has type Future[Option[Int]]
/***
* ii. ;9ABH,
* SA391, .r9GG35&G
* &#ii13Gh; i3X31i;:,rB1
* iMs,:,i5895, .5G91:,:;:s1:8A
* 33::::,,;5G5, ,58Si,,:::,sHX;iH1
* Sr.,:;rs13BBX35hh11511h5Shhh5S3GAXS:.,,::,,1AG3i,GG
* .G51S511sr;;iiiishS8G89Shsrrsh59S;.,,,,,..5A85Si,h8
* :SB9s:,............................,,,.,,,SASh53h,1G.
* .r18S;..,,,,,,,,,,,,,,,,,,,,,,,,,,,,,....,,.1H315199,rX,