- Вынесите проект, который возвращает список вакансий с сайта proglib.io в отдельную библиотеку
Реализуйте телеграмм бота, который: - По запросу /vacancies выведите все вакансии с сайта proglib.io
- По запросу /all_employers выведите все компании с сайта hh.ru
- По запросу /search_employers {текст_поиска} выведите результаты поиска нанимателей
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
using System; | |
using System.Text.RegularExpressions; | |
using Microsoft.EntityFrameworkCore; | |
namespace SimpleJournal.ValueObjects; | |
[Owned] | |
public class Phone | |
{ | |
public string Value { get; private set; } |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Logging; | |
using System.Data.SqlClient; | |
namespace UserRegistration.Controllers | |
{ |
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
var saved = new HashSet<string>(); | |
while (saved.Count < 8) | |
{ | |
RGB color = new RGB(0, 0, 0); | |
//Поток 1: | |
var task1 = Task.Run(() => | |
{ | |
color.SetColor(255, 255, 255); | |
}); | |
//Поток 2: |
- Для сдачи экзамена каждому студенту следует ответить на 3 вопроса.
- Ответ хотя бы на 1 вопрос из категории Junior обязателен.
- В категории Senior можно ответить максимум на 1 вопрос.
- В категории Middle можно ответить максимум на 2 вопроса.
- Исчерпывающий ответ на вопрос дает максимальный балл в соответствии с категорией вопроса.
- Частичный ответ снижает балл.
- Если ответ не дан, баллы за него не начисляются.
- Вопросы из категории Senior можно пропустить максимум 2 раза, каждый пропущенный вопрос уменьшает общее кол-во баллов на 1.
Студент приходит на экзамен. Ему достаётся случайный вопрос. Вопросы бывают сложности Junior, Middle, Senior. Ответ на Junior даёт 3 балла, ответ на Middle даёт 4 балла, ответ на Senior даёт 5 баллов. Вопросы уровня Senior можно пропустить (до 2 раз). Вопросы уровня Junior и Middle пропустить нельзя, это равносильно провалу ответа (0 баллов). Ответ хотя бы на 1 вопрос из категории Junior обязателен. Частичный ответ даёт частичную оценку.
- Для сдачи экзамена каждому студенту следует ответить на 3 вопроса.
- Ответ хотя бы на 1 вопрос из категории Junior обязателен.
- В категории Senior можно ответить максимум на 1 вопрос.
- В категории Middle можно ответить максимум на 2 вопроса.
- Исчерпывающий ответ на вопрос дает максимальный балл в соответствии с категорией вопроса.
- Частичный ответ снижает балл.
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
public class AppAuthFilterAttribute : Attribute, IAuthorizationFilter, IAppOrderedFilter | |
{ | |
public FilterOrder Order { get; set; } | |
public void OnAuthorization(AuthorizationFilterContext context) | |
{ | |
//some logic... | |
} | |
} |
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
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Mvc.Formatters; | |
using Microsoft.AspNetCore.Mvc.Infrastructure; | |
namespace Services; | |
public class ResponseDefaultFormatterService | |
{ | |
private readonly IHttpResponseStreamWriterFactory _streamWriterFactory; | |
private readonly OutputFormatterSelector _formatterSelector; |
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
using System.Net.Http.Json; | |
public class ShopClient | |
{ | |
private readonly string _host; | |
private readonly HttpClient _httpClient; | |
public ShopClient(string? host = null, HttpClient? httpClient = null) | |
{ | |
_httpClient = httpClient ?? new HttpClient(); |
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
# For example 3919 will be reversed to 9193 | |
reverse = 0 | |
number = int(input(“Please input a number to be reversed.\n”)) | |
while (number > 0): | |
lastDigit = number % 10 | |
reverse =(reverse*10) + lastDigit | |
number = number // 10 | |
print(reverse) |