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 { readFileSync } from 'fs'; | |
| import moment from 'moment'; | |
| import babel from '@babel/parser'; | |
| import logg from './logger.js'; | |
| const { parse } = babel; | |
| const rname = process.argv[2]; | |
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
| <?php | |
| error_reporting(E_ALL); | |
| ini_set('display_errors', 1); | |
| $rates = json_decode(file_get_contents('https://kodaktor.ru/j/rates'), true); | |
| $rates_length = count($rates); | |
| $the_highest_sell_value = max(array_map(function ($value) { | |
| // ['sell' => $sell] = $value; | |
| // list('sell' => $sell) = $value; |
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
| ... | |
| Different | |
| Counter | |
| Implementations | |
| ... |
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
| const { get } = require('axios'); | |
| require('should'); | |
| const headers = { 'Content-Type': 'application/json' }; | |
| const cases = [ | |
| {a: 3, b: 6, xs: 9}, | |
| {a: -4, b: 1, xs: -3}, | |
| {a: 0.1, b: 0.2, xs: 0.3} | |
| ]; | |
| cases.forEach(({ a, b, xs }) => | |
| describe(xs + 'asyncAdd', () => |
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
| let two = 2; | |
| two **= 8; // two = two ** 8 | |
| Out.log(two); // результат 256 |
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
| { | |
| "extends": "airbnb", | |
| "parser": "babel-eslint", | |
| "rules": { | |
| "no-console": 0 | |
| } | |
| } |
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 express from 'express'; | |
| const PORT = 4321 | |
| , app = express() | |
| , freq = {} | |
| ; | |
| app | |
| .use( ({url}, res, next) => { | |
| if (url in freq) freq[url]++; else freq[url]=1; | |
| console.log(url) || next(); |
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
| /*jshint esversion: 6 */ | |
| const PORT = 2222; | |
| const server = require('http').createServer(); | |
| const ws = require('ws'); | |
| const s = new ws.Server({ server }); | |
| const clients = []; | |
| console.log('app started'); | |
| s | |
| .on('connection', ws=> { | |
| let id = Math.random(); |
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
| describe('Набор', () => { it('спецификация', () => { | |
| expect(1).toBe(1); | |
| }); | |
| }); |
NewerOlder