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 React, {Component} from 'react'; | |
import {withRouter} from 'react-router-dom'; | |
import Header from "../components/header/header"; | |
import axios from 'axios'; | |
// let newarr = []; | |
class News extends Component { |
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 React, {Component} from 'react'; | |
import {withRouter} from 'react-router-dom'; | |
import Header from "../components/header"; | |
import axios from "axios"; | |
import serialize from "form-serialize"; | |
class Jurist extends Component { | |
constructor(props) { |
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 PATH = require('path'); | |
const WEBPACK = require('webpack'); | |
const HTML_WEBPACK_PLUGIN = require('html-webpack-plugin'); | |
const MERGE = require('webpack-merge'); | |
const PUG = require('./webpack/pug'); | |
const DEVSERVER = require('./webpack/devserver'); | |
const CSS = require('./webpack/css'); | |
const FONTS = require('./webpack/fonts'); | |
const IMAGES = require('./webpack/images'); | |
const SPRITE_SVG = require('./webpack/svg-sprite'); |
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
<? | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php"); | |
$APPLICATION->SetTitle("1С-Битрикс: Управление сайтом"); | |
CModule::IncludeModule('iblock'); | |
$arrConcert = array(); | |
$res3 = CIBlockElement::GetList(array('PROPERTY_DATE' => 'ASC'),array( 'IBLOCK_ID' => 1,)); | |
while ($obj = $res3->GetNextElement()){ |
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 CoffeeMachine(power, capacity) { | |
Machine.apply(this, arguments); | |
let waterAmount; | |
const WATER_HEAT_CAPACITY = 4200; | |
let timerId; | |
console.log('Create coffee machine with capacity of ' + power + ' vt'); | |
this.setWaterAmount = function (amount) { | |
if (amount < 0) throw new Error('The number must be positive'); | |
if (amount > capacity) throw new Error('Do not add more water then ' + capacity); |
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
async function updateUser(token) { | |
let cancelled = false; | |
// we don't reject, since we don't have access to | |
// the returned promise | |
// so we just don't call other functions, and reject | |
// in the end | |
token.cancel = () => { | |
cancelled = true; | |
}; |
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
var weatherForecast = { | |
id: '', | |
country: '', | |
temperature: '' | |
} | |
var xhr = new XMLHttpRequest(); | |
function query(url) { | |
xhr.open('GET', url); |
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 p1 = new Promise(resolve => setTimeout(resolve, 300, 'first promise')) | |
const p2 = new Promise(resolve => setTimeout(resolve, 200, 'second promise')) | |
const p3 = new Promise(resolve => setTimeout(resolve, 700, 'third promise')) | |
const p4 = new Promise(resolve => setTimeout(resolve, 500, 'fourth promise')) | |
const p5 = new Promise(resolve => setTimeout(resolve, 900, 'fifth promise')) | |
function concurrentCall(arrQueries, count) { | |
const sortRes = [] | |
return new Promise(resolve => { |
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
// index.js | |
const render = () => | |
ReactDOM.render( | |
<Provider store={store}> | |
<ConnectedRouter history={history}> | |
<App /> | |
</ConnectedRouter> | |
</Provider>, | |
root | |
) |
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
// example 1 | |
const p1 = new Promise(resolve => setTimeout(resolve, 300, 'first promise')) | |
const p2 = new Promise(resolve => setTimeout(resolve, 200, 'second promise')) | |
const p3 = new Promise(resolve => setTimeout(resolve, 700, 'third promise')) | |
const p4 = new Promise(resolve => setTimeout(resolve, 500, 'fourth promise')) | |
const p5 = new Promise(resolve => setTimeout(resolve, 900, 'fifth promise')) | |
function concurrentCall(arrQueries, limit) { | |
const sortRes = [] |
OlderNewer