Skip to content

Instantly share code, notes, and snippets.

View wbarcovsky's full-sized avatar

Vladimir Barcovsky wbarcovsky

  • Altarix
  • Samara, RU
View GitHub Profile
```
class BaseBadgeType
{
public $type;
public $points;
abstruct public isAvailable($userData);
// ...
import {object, string, number, Schema } from 'yup';
interface Hash {
[p: string]: string;
}
class FormSchema {
constructor(protected schema: Schema<any>) {}
protected _errors: Hash = {};
<?php
class Enum
{
private static $values = [];
private static $valueMap = [];
private $value;
public function __construct($value)
{

Тестовое задание

Необходимо создать на angular 4+ приложение для создания галлереи изображений

  • Общий макет: http://dl3.joxi.net/drive/2018/05/28/0006/2353/424241/41/2c50a3870f.jpg
  • По кнопке "Добавить изображение" в галлерею добавляется новое пустое изображение
  • Под каждым изображением располагается поле ввода, в которое вводится описание изобарежния - тег
  • По нажатию на кнопку "Go!" происходит поиск изображения через API-метод по заданному тегу: http://api.giphy.com/v1/gifs/search?q=${tagName}&api_key=cRGtLEMwTwfZgVDcmQxpRDZXqqGoBGxR Пример: http://api.giphy.com/v1/gifs/search?q=test&api_key=cRGtLEMwTwfZgVDcmQxpRDZXqqGoBGxR
const request = require('request');
class DdosRequest {
constructor(init) {
Object.assign(this, init);
}
async send() {
return new Promise((resolve, reject) => {
http://backend.test.zhs.altarix.org/v1/test/enrich?md5=adbfe87594861726cff6a9fba6157486
http://backend.test.zhs.altarix.org/v1/test/enrich?md5=f86567d17ab10e1d420a6efe4ba28266
http://backend.test.zhs.altarix.org/v1/test/enrich?md5=9b22350392973482b4925ba3e967dfb7
http://backend.test.zhs.altarix.org/v1/test/enrich?md5=c4f9b3344ac3aaf3ed923a7dc391e03d
http://backend.test.zhs.altarix.org/v1/test/enrich?md5=f86567d17ab10e1d420a6efe4ba28266
http://backend.test.zhs.altarix.org/v1/test/enrich?md5=a711d8edf2695eb78f8146ba53b115bd
http://backend.test.zhs.altarix.org/v1/test/enrich?md5=9b22350392973482b4925ba3e967dfb7
http://backend.test.zhs.altarix.org/v1/test/enrich?md5=4a51fea02ba04240db7e67f70ab5452b
http://backend.test.zhs.altarix.org/v1/test/enrich?md5=adbfe87594861726cff6a9fba6157486
http://backend.test.zhs.altarix.org/v1/test/enrich?md5=adbfe87594861726cff6a9fba6157486
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<style>
body {
if (result.Strategy[0].Weight > 0)
{
this.WriteLink("\nСтиль обучения:\n");
int pragmatic = 0;
int viewer = 0;
int teoretic = 0;
int practic = 0;
for (int i = 0; i < result.Strategy.Count; i++)
{
if (result.Strategy[i].Indicator == Indicator.Pragmatic) pragmatic = result.Strategy[i].Weight;
<?php
trait CacheTrait
{
protected static $__lazy = [];
protected static function cache($createFunction, $id = null)
{
if ($id === null) {
$funcInfo = new ReflectionFunction($createFunction);
trait LazyTrait
{
protected static $__lazy = [];
protected static function lazyCreate($createFunction, $id = null)
{
if ($id === null) {
$funcInfo = new ReflectionFunction($createFunction);
$source = file($funcInfo->getFileName());
$body = implode("", array_slice($source, $funcInfo->getStartLine(), $funcInfo->getEndLine()));