Skip to content

Instantly share code, notes, and snippets.

Avatar

Vadim Anufriev va-anufriev

View GitHub Profile
@va-anufriev
va-anufriev / task-1-1.scala
Created Mar 25, 2018
tinkoff-qa-scala-1-part-1
View task-1-1.scala
def permList(l: List[Int]): List[List[Int]] = l match {
case List(ele) => List(List(ele))
case list =>
for {
i <- List.range(0, list.length)
p <- permList(list.slice(0, i) ++ list.slice(i + 1, list.length))
} yield list(i) :: p
}
// если честно я не донца понимаю как это работает
@va-anufriev
va-anufriev / task-1-2.scala
Created Mar 25, 2018
tinkoff-qa-scala-1-part-2
View task-1-2.scala
def mtp1(map: Map[Int, (String, Int, String)]): List[Person] = {
map.map {
case (_, (name, age, phone)) => Person(name, age, phone)
} toList
}
val mtp2 = (mp: Map[Int, (String, Int, String)]) => for (z <- mp) yield Person(z._2._1, z._2._2, z._2._3)
val mtp3 = (mp: Map[Int, (String, Int, String)]) => for (z <- mp.values) yield Person.tupled(z)
@va-anufriev
va-anufriev / task-2.scala
Created Mar 25, 2018
tinkoff-qa-scala-2
View task-2.scala
abstract class BankProducts(val productName: String) {
var balance: Double = 0
}
class Debet extends BankProducts(productName = "Debet")
class DebetCard extends BankProducts(productName = "DebetCard")
class CreditCard extends BankProducts(productName = "CreditCard")
val d1 = new Debet
val dc1 = new DebetCard
View connect_reconnect_clappr.html
<HTML>
<HEAD>
<TITLE>HTMLplayer</TITLE>
<script type="text/javascript" src="https://cdn.jsdelivr.net/clappr/latest/clappr.min.js"></script>
</HEAD>
<div>
<div id="player"></div>
<script>
var player = new Clappr.Player({
language: 'en-EN',
View clappr-ad-way-4.html
<html>
<head>
<meta charset="utf-8">
<!--<script src="http://cdn.clappr.io/latest/clappr.min.js"></script>-->
<script src="../clappr-1142-20161018.js"></script>
</head>
<body>
<div id="player1"></div>
<script>
class mediaControlSeekDisable extends Clappr.MediaControl {
View clappr-reload-config.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>clappr gist</title>
<script src="http://cdn.clappr.io/latest/clappr.min.js"></script>
</head>
<body>
<div id="player"></div>
<script>
View clappr-ad-draft.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>clappr</title>
<script src="http://cdn.clappr.io/latest/clappr.min.js"></script>
</head>
<body>
<div id="player"></div>
<script>
View clappr-with-playlist.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>clappr</title>
<script src="http://cdn.clappr.io/latest/clappr.min.js"></script>
</head>
<body>
<div id="player"></div>
<script>
@va-anufriev
va-anufriev / clappr-rtmp-0.2.50.html
Created Aug 16, 2016
clappr with rtmp-plugin (work)
View clappr-rtmp-0.2.50.html
<html>
<head>
<!--<script src="http://cdn.clappr.io/latest/clappr.min.js"></script>-->
<script src="http://cdn.clappr.io/0.2.50/clappr.min.js"></script>
<script src="http://cdn.jsdelivr.net/clappr.rtmp/latest/rtmp.min.js"></script>
</head>
<body>
<div id="player"></div>
<script>
var player = new Clappr.Player({
@va-anufriev
va-anufriev / clappr-rtmp.html
Created Aug 15, 2016
clappr with rtmp plugin
View clappr-rtmp.html
<html>
<head>
<script src="http://cdn.clappr.io/latest/clappr.min.js"></script>
<script src="http://cdn.jsdelivr.net/clappr.rtmp/latest/rtmp.min.js"></script>
</head>
<body>
<div id="player"></div>
<script>
var player = new Clappr.Player({
source: 'rtmp://cdntest.cdnvideo.ru/cdntest-dvr/bunny_loop.sdp',