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
| <!doctype html> | |
| <html class="no-js" lang=""> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title></title> | |
| <link rel="stylesheet" href="css/style.css"> | |
| <meta name="description" content=""> |
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
| // task 1 | |
| function onError(error){ | |
| console.log(error) | |
| } | |
| function onSuccess(result){ | |
| console.log(result) | |
| } | |
| function devider(a,b,onSuccess,onError){ | |
| if (b === 0) { | |
| onError("Zero division error") |
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
| // task 1 | |
| function createOrder(orderId){ | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => { | |
| let rand = Math.random() > 0.3; | |
| if(rand){ resolve(orderId); } | |
| else(reject(`Order ${orderId} was not created`)); | |
| console.log("Creating order:" + orderId); | |
| }, 1000) |
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
| using System.Text; | |
| var builder = WebApplication.CreateBuilder(args); | |
| var persons = new List<Person> | |
| { | |
| new Person("Jon", "Smith", "jon@mail.com", 20, "1234567890"), | |
| new Person("Alex", "Mart", "Alex@mail.com", 18, "1234567890"), | |
| new Person("May", "Doe", "May@mail.com", 20, "1234567890"), | |
| new Person("Jon", "Smith", "Jon@mail.com", 20, "1234567890"), |
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
| // Program.cs | |
| using hw1; | |
| var builder = WebApplication.CreateBuilder(args); | |
| var app = builder.Build(); | |
| var users = new List<User>(); | |
| app.UseStaticFiles(); |
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
| using WebApplication1.Middlewares; | |
| using WebApplication1.Model; | |
| using WebApplication1.Services; | |
| var builder = WebApplication.CreateBuilder(args); | |
| var app = builder.Build(); | |
| app.MapGet("upload/image", async (context) => |
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
| using System.Security.Claims; | |
| using Microsoft.AspNetCore.Authentication; | |
| using Microsoft.AspNetCore.Authentication.Cookies; | |
| using Microsoft.AspNetCore.Authorization; | |
| using MVCSTEP.Models; | |
| var people = new List<Person> | |
| { | |
| new Person("tom@gmail.com", "12345"), | |
| new Person("bob@gmail.com", "55555") |
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
| Docker hw |
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
| hw2 |
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
| hw3 |