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; | |
namespace WebApplication1; | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var builder = WebApplication.CreateBuilder(args); |
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; | |
using System.Text.Json; | |
namespace HttpListenerApplication; | |
class Program | |
{ | |
private record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary) | |
{ | |
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); |
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
static void LinqObj76() | |
{ | |
var goods = ReadItems<Item>("goods.txt"); | |
var prices = ReadItems<Cost>("prices.txt"); | |
var result = goods | |
.GroupJoin(prices, g => g.Article, p => p.ItemArticle, | |
(g, p) => p.DefaultIfEmpty().Select(y => new {g.Country, y?.ShopName, y?.Price})) | |
.SelectMany(x => x) | |
.GroupBy(x => x.Country) |
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 static void LinqBegin54() | |
{ | |
IEnumerable<string> a | |
= new[] {"AA", "B21", "A32", "VS", "S", "AAA"}; | |
IEnumerable<string> b | |
= new[] {"B2", "BSS3", "AD6", "SSS"}; | |
/* | |
var result = | |
a.GroupJoin(b, x => x[0], x => x[0], |
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.IO; | |
namespace AssignmentRandomizer | |
{ | |
class Program | |
{ | |
static void Main() | |
{ |
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.Diagnostics; | |
using System.Threading; | |
namespace ConsoleGame | |
{ | |
class Program | |
{ | |
public class At | |
{ |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<script> | |
function WebSocketTest() | |
{ | |
if ("WebSocket" in window) { | |
report("WebSocket поддерживается вашим браузером!"); | |
// Открыть WebSocket | |
var ws = new WebSocket("ws://localhost:8080"); |
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.Net; | |
using System.Net.WebSockets; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace WebTest | |
{ | |
class Program |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<div id="infoPane" /> | |
<script> | |
var infoPane = document.getElementById('infoPane'); | |
var report = function (msg) { |
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.Net; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace WebTest | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
NewerOlder