This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
interface ISelectProps { | |
value?: string; | |
options: SelectOption[]; | |
placeholder?: string; | |
onChange?: (value: SelectOption) => void; | |
} | |
interface ISelectState { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class ProductService extends BaseService { | |
private channelsObservable: Observable<ChannelsResponse>; | |
constructor (protected http: Http) { | |
super(http); | |
this.channelsObservable = this.makeRequest('channels').cache(); | |
} | |
getChannels(): Observable<ChannelsResponse> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function algorithm(x, y, z, w) { | |
var n = 0; | |
for (var i = 0; i <= w / x; i++) { | |
for (var j = 0; j <= w / y; j++) { | |
for (var k = 0; k <= w / z; k++) { | |
console.log(i, j, k, '=', i * x + j * y + k * z); | |
if (i * x + j * y + k * z === w) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Candy weighs X grams, tangerine - Y grams and apple - Z grams. | |
Need to write a program that will determine how many different versions of gifts weighing exactly W grams can make Santa Claus. | |
Input data | |
Function should receive four integers X, Y, Z and W. | |
Output data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"request": "api\/v2\/products\/week", | |
"set": "New This Week", | |
"page": 1, | |
"count": 8, | |
"limit": 16, | |
"items": [{ | |
"type": "product", | |
"template": "single-media", | |
"id": 4171, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 удачная регистрация | |
1 - заходим на landing page(lp) | |
2 - вводим firstName, lastName, email, phone, password | |
3 - после сабмита отправляется запрос на node app, где он отправляет запрос регистрации на tds | |
4 - после успешной регистрации, node app отправляет ответ с редирект линкой, | |
типа https://www.optionstarsglobal.com/?hash=f55fe15c-cd7d-4e6b-8389-18874d40330c | |
где хеш мы взяли из тела ответа tds api с поля data.user.sessionId | |
5 - фронт енд редиректит на линку юзера логинит на optionstarsglobal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
let BaseTask = require('./base') | |
, BaseNetwork = require('../networks/base'); | |
class BlacklistTask extends BaseTask { | |
async run() { | |
if (process.env.DRY_RUN === 'true') { | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
let request = require('supertest') | |
, expect = require('chai').expect | |
, server = require('../../../api') | |
, Campaign = require('../../../app/models/campaign') | |
, AuthService = require('../../../app/services/auth'); | |
describe('app/controllers/campaign', function() { | |
let token; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
require('dotenv').load(); | |
require("babel-register")({ | |
only: /app|test/, | |
plugins: ['transform-async-to-generator'] | |
}); | |
let glob = require('glob') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
let expect = require('chai').expect | |
, AuthService = require('../../../app/services/auth') | |
, policy = require('../../../app/policies/authenticated'); | |
describe('app/policies/authenticated', function() { | |
it('returns auth info when token is valid', async function() { | |
let id = 1 | |
, req = { headers: { authentication: await AuthService.generateToken(id) } } |