This file contains 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 Cookies from "js-cookie"; | |
import { Route, Switch } from "react-router"; | |
import { Redirect } from "react-router-dom"; | |
import MessagesPage from "./components/MessagesPage"; | |
import LoginPageContainer from "./containers/loginPageContainer"; | |
import RegisterPageContainer from "./containers/registerPageContainer"; |
This file contains 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 from "react"; | |
import Cookies from "js-cookie"; | |
import { Route, Switch } from "react-router"; | |
import { Redirect } from "react-router-dom"; | |
import MessagesPage from "./components/MessagesPage"; | |
import LoginPageContainer from "./containers/loginPageContainer"; | |
import RegisterPageContainer from "./containers/registerPageContainer"; |
This file contains 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
class ChatService { | |
_baseApi = `http://localhost:5000/api`; | |
async getResourse(url, type = null) { | |
const res = await fetch(this._baseApi + url, type); | |
const resJSON = await res.json(); | |
if (!res.ok) { | |
throw new Error(resJSON.message); | |
} | |
return resJSON; |
This file contains 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
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <conio.h> | |
#include "CircDoubList.h" | |
#include "Node.h" | |
using namespace std; | |
LinkedList::LinkedList() { |
This file contains 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
#include "Parallelepiped.h" | |
#include "Parallelogram.h" | |
Parallelepiped::Parallelepiped() | |
{ | |
} | |
This file contains 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
#include "DinLst.h" | |
#include <string> | |
#include <iostream> | |
#include <fstream> | |
#include <windows.h> | |
using namespace std; | |
List* ReadFromFile(string fName, string lName) { | |
ifstream fin(fName); |
This file contains 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
#include "Tree.h" | |
#include <cmath> | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <sstream> | |
using namespace std; | |
Tree::Tree(string name, int data, int key) |
This file contains 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 static = require('node-static'); | |
const http = require('http'); | |
const port = 8000; | |
const file = new static.Server('./public'); | |
const server = http.createServer((req, res) => { | |
req.addListener('end', () => { |
This file contains 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
#include <string> | |
#include "DinLst.h" | |
#include <iostream> | |
#include <fstream> | |
#include <windows.h> | |
using namespace std; | |
List* ReadFromFile(string fName, string lName) { | |
ifstream fin(fName); |
This file contains 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
List* ReadFromFile(char* name, char* lname) { | |
FILE* f = fopen(name, "r"); | |
char *a; | |
if(!f) { | |
printf("Ошибка открытия файла"); | |
} | |
List *list = CreateList(lname, "info"); | |
while(fgets(a, 100,f)) { | |
if(!feof(f)) { | |
AddHead(list, a); |