diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..24cb4403 --- /dev/null +++ b/.gitignore @@ -0,0 +1,205 @@ +# Download this file using PowerShell v3 under Windows with the following comand: +# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore +# or wget: +# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# OS generated files # +.DS_Store* +Icon? + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +*.Cache +ClientBin/ +# [Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings +modulesbin/ +tempbin/ + +# EPiServer Site file (VPP) +AppData/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# vim +*.txt~ +*.swp +*.swo + +# svn +.svn + +# Remainings from resolvings conflicts in Source Control +*.orig + +# SQL Server files +**/App_Data/*.mdf +**/App_Data/*.ldf +**/App_Data/*.sdf + + +#LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store + +# SASS Compiler cache +.sass-cache + +# Visual Studio 2014 CTP +**/*.sln.ide + +# Visual Studio temp something +.vs/ + +# VS 2015+ +*.vc.vc.opendb +*.vc.db + +# Rider +.idea/ + +**/node_modules/* + +# Added by Jskonst +Properties/ + +##### +# End of core ignore list, below put you custom 'per project' settings (patterns or path) +##### \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..5c7247b4 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,7 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [] +} \ No newline at end of file diff --git a/CourseApp.Tests/DemoTest.cs b/CourseApp.Tests/DemoTest.cs new file mode 100644 index 00000000..cc887f21 --- /dev/null +++ b/CourseApp.Tests/DemoTest.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using Xunit; + +namespace CourseApp.Tests +{ + public class DemoTest + { + [Fact] + public void Test1() + { + Assert.True(true); + } + + [Fact] + public void TestEmptyListA() + { + double a = 0.1; + double b = 0.5; + double xn = 1.37; + double xk = 2.57; + double dx = 0.3; + Assert.Empty(Program.TaskA(a, b, xn, xk, dx)); + } + + [Fact] + public void TestTaskA() + { + double a = 0.8; + double b = 0.4; + double xn = 1.23; + double xk = 7.23; + double dx = 1.2; + List res = Program.TaskA(a, b, xn, xk, dx); + List expy = new List { 2.237126168657003, 2.215581361121909, 2.5269082194827885, 2.785377126824208, 3.0079000350329963 }; + for (int i = 0; i < 5; i++) + { + Assert.Equal(expy[i], res[i], 3); + } + } + + [Fact] + public void TestXnMoreThenXk() + { + List res = Program.TaskA(0.8, 0.4, 1.23, 7.23, 1.2); + Assert.Equal(res, new List()); + } + + [Fact] + public void TestDx() + { + List res = Program.TaskA(0.8, 0.4, 1.23, 7.23, 1.2); + Assert.Equal(res, new List()); + } + + [Fact] + public void TestEmptyListB() + { + List x = new List(); + Assert.Empty(Program.TaskB(0.8, 0.4, x)); + } + + [Fact] + public void TestTaskB() + { + List x = new List { 1.88, 2.26, 3.84, 4.55, -6.21 }; + List res = Program.TaskB(0.8, 0.4, x); + List expy = new List { 2.0558467733507353, 2.1665433513017915, 2.5754036757838303, 2.7287991234367484, double.NaN }; + for (int i = 0; i < 5; i++) + { + Assert.Equal(expy[i], res[i], 3); + } + } + } +} diff --git a/CourseApp.Tests/PigTest.cs b/CourseApp.Tests/PigTest.cs new file mode 100644 index 00000000..b3bd0a32 --- /dev/null +++ b/CourseApp.Tests/PigTest.cs @@ -0,0 +1,54 @@ +using System; +using Xunit; + +namespace CourseApp.Tests +{ + public class PigTest + { + [Fact] + public void TestEmptyConstructor() + { + var item = new Pig(); + Assert.Equal("Test", item.Name); + Assert.Equal(1, item.Age); + Assert.Equal(1, item.Salo); + Assert.Equal("Male", item.Gender); + } + + [Theory] + [InlineData("PigMale", 5, 7, "Male")] + [InlineData("PigFemale", 2, 1, "Female")] + [InlineData("PigPigger", 10, 11, "Male")] + public void TestFullConstructor(string name, int age, int salo, string gender) + { + var item = new Pig(name, age, salo, gender); + Assert.Equal(age, item.Age); + Assert.Equal(name, item.Name); + Assert.Equal(salo, item.Salo); + Assert.Equal(gender, item.Gender); + } + + [Fact] + public void TestRightSetAge() + { + var item = new Pig(); + item.Age = 11; + Assert.Equal(11, item.Age); + } + + [Fact] + public void TestWrongSetAge() + { + try + { + var item = new Pig(); + item.Age = -100; + } + catch (System.Exception) + { + Console.WriteLine("Возраст должен быть больше 1 года"); + Assert.True(true); + } + } + } +} diff --git a/CourseApp/CourseApp.sln b/CourseApp/CourseApp.sln new file mode 100644 index 00000000..a1be028d --- /dev/null +++ b/CourseApp/CourseApp.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.852 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CourseApp", "CourseApp.csproj", "{17CB0273-34D3-4D23-965F-FC4AD0A83D0F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CourseApp.Tests", "..\CourseApp.Tests\CourseApp.Tests.csproj", "{E0133767-62A2-4B4A-87A2-BD09BC775E0A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {17CB0273-34D3-4D23-965F-FC4AD0A83D0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17CB0273-34D3-4D23-965F-FC4AD0A83D0F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17CB0273-34D3-4D23-965F-FC4AD0A83D0F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17CB0273-34D3-4D23-965F-FC4AD0A83D0F}.Release|Any CPU.Build.0 = Release|Any CPU + {E0133767-62A2-4B4A-87A2-BD09BC775E0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0133767-62A2-4B4A-87A2-BD09BC775E0A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0133767-62A2-4B4A-87A2-BD09BC775E0A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0133767-62A2-4B4A-87A2-BD09BC775E0A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1849B280-B447-4D18-9764-F412B7768C4F} + EndGlobalSection +EndGlobal diff --git a/CourseApp/Pig.cs b/CourseApp/Pig.cs new file mode 100644 index 00000000..28478602 --- /dev/null +++ b/CourseApp/Pig.cs @@ -0,0 +1,92 @@ +using System; + +namespace CourseApp +{ + public class Pig + { + private int salo; + private int age; + + public Pig() + : this("Untitled", 1, 1, "Male") + { + } + + public Pig(string name, int age, int salo, string gender) + { + Name = name; + Age = age; + Salo = salo; + Gender = gender; + } + + public string Name { get; set; } + + public int Age + { + get + { + return this.age; + } + + set + { + if (value >= 1 && value < 10) + { + this.age = value; + } + else + { + Console.WriteLine("Возраст свиньи должен быть меньше 10"); + } + } + } + + public string Gender { get; set; } + + public string IsPoisoned + { + get { return this.Gender; } + } + + public int Salo + { + get + { + return this.salo; + } + + set + { + if (value >= 0) + { + this.salo = value; + } + else + { + throw new System.Exception(); + } + } + } + + public void Eat() + { + Console.WriteLine("Nem Nem"); + } + + public void Old() + { + this.age++; + } + + public void LostSalo() + { + this.salo--; + } + + public string View() + { + return @"PIGGEER"; + } + } +} \ No newline at end of file diff --git a/CourseApp/Program.cs b/CourseApp/Program.cs new file mode 100644 index 00000000..ba5739c9 --- /dev/null +++ b/CourseApp/Program.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; + +namespace CourseApp +{ + public class Program + { + public static double MyFunction(double a, double b, double x) + { + var y = (Math.Pow(x - a, 2 / 3.0) + Math.Pow(Math.Abs(x + b), 1 / 5.0)) / Math.Pow(Math.Pow(x, 2) - Math.Pow(a + b, 2), 1 / 9.0); + return y; + } + + public static List TaskA ( + double a, + double b, + double xn, + double xk, + double dx) + { + if (dx > (xk - xn)) + { + List y = new List(); + return y; + } + + if (xn < xk) + { + List y = new List(); + for (double x = xn; x < xk; x += dx) + { + y.Add(MyFunction(a, b, x)); + } + + return y; + } + else + { + List y = new List(); + return y; + } + } + + public static List TaskB ( + double a, + double b, + List x) + { + List y = new List(); + for (var i = 0; i < x.Count; i++) + { + y.Add(MyFunction(a, b, x[i])); + } + + return y; + } + + public static void Main(string[] args) + { + const double a = 0.8; + const double b = 0.4; + const double xn = 1.23; + const double xk = 7.23; + const double dx = 1.2; + Console.WriteLine("TaskA:"); + foreach (var item in TaskA(a, b, xn, xk, dx)) + { + Console.WriteLine($"y={item}"); + } + + Console.WriteLine("TaskB:"); + List x = new List { 1.88, 2.26, 3.84, 4.55, -6.21 }; + foreach (var item in TaskB(a, b, x)) + { + Console.WriteLine($"y = {item}"); + } + + var it = new Pig(); + Console.WriteLine(it.View()); + Console.ReadLine(); + } + } +} \ No newline at end of file diff --git a/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.deps.json b/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.deps.json new file mode 100644 index 00000000..5a0fab9c --- /dev/null +++ b/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.deps.json @@ -0,0 +1,34 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v3.1", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v3.1": { + "CourseApp/1.0.0": { + "dependencies": { + "StyleCop.Analyzers": "1.0.2" + }, + "runtime": { + "CourseApp.dll": {} + } + }, + "StyleCop.Analyzers/1.0.2": {} + } + }, + "libraries": { + "CourseApp/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "StyleCop.Analyzers/1.0.2": { + "type": "package", + "serviceable": true, + "sha512": "sha512-3xD87lafnVhsSEtJKk50G7FGutvaXkFz4XrrLrxnk/DhZU42dnCGWUsvKuBv4mTS0XdIgTY88tLhxW/8Vi3Pow==", + "path": "stylecop.analyzers/1.0.2", + "hashPath": "stylecop.analyzers.1.0.2.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.dll b/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.dll new file mode 100644 index 00000000..c5c234ac Binary files /dev/null and b/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.dll differ diff --git a/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.exe b/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.exe new file mode 100644 index 00000000..6b6ba3b8 Binary files /dev/null and b/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.exe differ diff --git a/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.pdb b/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.pdb new file mode 100644 index 00000000..47e613bf Binary files /dev/null and b/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.pdb differ diff --git a/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.runtimeconfig.dev.json b/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.runtimeconfig.dev.json new file mode 100644 index 00000000..17dd7d79 --- /dev/null +++ b/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.runtimeconfig.dev.json @@ -0,0 +1,8 @@ +{ + "runtimeOptions": { + "additionalProbingPaths": [ + "C:\\Users\\Елисей\\.dotnet\\store\\|arch|\\|tfm|", + "C:\\Users\\Елисей\\.nuget\\packages" + ] + } +} \ No newline at end of file diff --git a/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.runtimeconfig.json b/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.runtimeconfig.json new file mode 100644 index 00000000..48b8c87e --- /dev/null +++ b/CourseApp/bin/Debug/netcoreapp3.1/CourseApp.runtimeconfig.json @@ -0,0 +1,9 @@ +{ + "runtimeOptions": { + "tfm": "netcoreapp3.1", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "3.1.0" + } + } +} \ No newline at end of file diff --git a/CourseApp/obj/CourseApp.csproj.nuget.cache b/CourseApp/obj/CourseApp.csproj.nuget.cache new file mode 100644 index 00000000..7185d63a --- /dev/null +++ b/CourseApp/obj/CourseApp.csproj.nuget.cache @@ -0,0 +1,5 @@ +{ + "version": 1, + "dgSpecHash": "FEns0qG9qUuPKxFZGS3Ex/hhlWzfk6/znq08XdOannfR09ScXII7B562O8qoijhJma1JC8JVtQrcbHHijKPX/w==", + "success": true +} \ No newline at end of file diff --git a/CourseApp/obj/CourseApp.csproj.nuget.dgspec.json b/CourseApp/obj/CourseApp.csproj.nuget.dgspec.json new file mode 100644 index 00000000..f7a7ceef --- /dev/null +++ b/CourseApp/obj/CourseApp.csproj.nuget.dgspec.json @@ -0,0 +1,66 @@ +{ + "format": 1, + "restore": { + "C:\\Users\\Елисей\\Desktop\\DD\\Tprogramming_147_2019\\CourseApp\\CourseApp.csproj": {} + }, + "projects": { + "C:\\Users\\Елисей\\Desktop\\DD\\Tprogramming_147_2019\\CourseApp\\CourseApp.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\Елисей\\Desktop\\DD\\Tprogramming_147_2019\\CourseApp\\CourseApp.csproj", + "projectName": "CourseApp", + "projectPath": "C:\\Users\\Елисей\\Desktop\\DD\\Tprogramming_147_2019\\CourseApp\\CourseApp.csproj", + "packagesPath": "C:\\Users\\Елисей\\.nuget\\packages\\", + "outputPath": "C:\\Users\\Елисей\\Desktop\\DD\\Tprogramming_147_2019\\CourseApp\\obj\\", + "projectStyle": "PackageReference", + "configFilePaths": [ + "C:\\Users\\Елисей\\AppData\\Roaming\\NuGet\\NuGet.Config" + ], + "originalTargetFrameworks": [ + "netcoreapp3.1" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "netcoreapp3.1": { + "projectReferences": {} + } + }, + "warningProperties": { + "allWarningsAsErrors": true, + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "netcoreapp3.1": { + "dependencies": { + "StyleCop.Analyzers": { + "suppressParent": "All", + "target": "Package", + "version": "[1.0.2, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.100\\RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/CourseApp/obj/CourseApp.csproj.nuget.g.props b/CourseApp/obj/CourseApp.csproj.nuget.g.props new file mode 100644 index 00000000..c7561dd0 --- /dev/null +++ b/CourseApp/obj/CourseApp.csproj.nuget.g.props @@ -0,0 +1,18 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\Елисей\.nuget\packages\ + PackageReference + 5.4.0 + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + C:\Users\Елисей\.nuget\packages\stylecop.analyzers\1.0.2 + + \ No newline at end of file diff --git a/CourseApp/obj/CourseApp.csproj.nuget.g.targets b/CourseApp/obj/CourseApp.csproj.nuget.g.targets new file mode 100644 index 00000000..d212750c --- /dev/null +++ b/CourseApp/obj/CourseApp.csproj.nuget.g.targets @@ -0,0 +1,6 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + \ No newline at end of file diff --git a/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.AssemblyInfo.cs b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.AssemblyInfo.cs new file mode 100644 index 00000000..86c04c01 --- /dev/null +++ b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.AssemblyInfo.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("CourseApp")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("CourseApp")] +[assembly: System.Reflection.AssemblyTitleAttribute("CourseApp")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Создано классом WriteCodeFragment MSBuild. + diff --git a/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.AssemblyInfoInputs.cache b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.AssemblyInfoInputs.cache new file mode 100644 index 00000000..a50a62e1 --- /dev/null +++ b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +d7237ae28cef3eedd30d3c3e36a864ff09c9c363 diff --git a/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.assets.cache b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.assets.cache new file mode 100644 index 00000000..ac25a1f2 Binary files /dev/null and b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.assets.cache differ diff --git a/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.csproj.FileListAbsolute.txt b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.csproj.FileListAbsolute.txt new file mode 100644 index 00000000..771bd207 --- /dev/null +++ b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.csproj.FileListAbsolute.txt @@ -0,0 +1,22 @@ +C:\Users\Влад\Desktop\GITINIT\Tprogramming_147_2019\CourseApp\bin\Debug\netcoreapp3.1\CourseApp.exe +C:\Users\Влад\Desktop\GITINIT\Tprogramming_147_2019\CourseApp\bin\Debug\netcoreapp3.1\CourseApp.deps.json +C:\Users\Влад\Desktop\GITINIT\Tprogramming_147_2019\CourseApp\bin\Debug\netcoreapp3.1\CourseApp.runtimeconfig.json +C:\Users\Влад\Desktop\GITINIT\Tprogramming_147_2019\CourseApp\bin\Debug\netcoreapp3.1\CourseApp.runtimeconfig.dev.json +C:\Users\Влад\Desktop\GITINIT\Tprogramming_147_2019\CourseApp\bin\Debug\netcoreapp3.1\CourseApp.dll +C:\Users\Влад\Desktop\GITINIT\Tprogramming_147_2019\CourseApp\bin\Debug\netcoreapp3.1\CourseApp.pdb +C:\Users\Влад\Desktop\GITINIT\Tprogramming_147_2019\CourseApp\obj\Debug\netcoreapp3.1\CourseApp.csprojAssemblyReference.cache +C:\Users\Влад\Desktop\GITINIT\Tprogramming_147_2019\CourseApp\obj\Debug\netcoreapp3.1\CourseApp.AssemblyInfoInputs.cache +C:\Users\Влад\Desktop\GITINIT\Tprogramming_147_2019\CourseApp\obj\Debug\netcoreapp3.1\CourseApp.AssemblyInfo.cs +C:\Users\Влад\Desktop\GITINIT\Tprogramming_147_2019\CourseApp\obj\Debug\netcoreapp3.1\CourseApp.dll +C:\Users\Влад\Desktop\GITINIT\Tprogramming_147_2019\CourseApp\obj\Debug\netcoreapp3.1\CourseApp.pdb +C:\Users\Елисей\Desktop\DD\Tprogramming_147_2019\CourseApp\bin\Debug\netcoreapp3.1\CourseApp.exe +C:\Users\Елисей\Desktop\DD\Tprogramming_147_2019\CourseApp\bin\Debug\netcoreapp3.1\CourseApp.deps.json +C:\Users\Елисей\Desktop\DD\Tprogramming_147_2019\CourseApp\bin\Debug\netcoreapp3.1\CourseApp.runtimeconfig.json +C:\Users\Елисей\Desktop\DD\Tprogramming_147_2019\CourseApp\bin\Debug\netcoreapp3.1\CourseApp.runtimeconfig.dev.json +C:\Users\Елисей\Desktop\DD\Tprogramming_147_2019\CourseApp\bin\Debug\netcoreapp3.1\CourseApp.dll +C:\Users\Елисей\Desktop\DD\Tprogramming_147_2019\CourseApp\bin\Debug\netcoreapp3.1\CourseApp.pdb +C:\Users\Елисей\Desktop\DD\Tprogramming_147_2019\CourseApp\obj\Debug\netcoreapp3.1\CourseApp.csprojAssemblyReference.cache +C:\Users\Елисей\Desktop\DD\Tprogramming_147_2019\CourseApp\obj\Debug\netcoreapp3.1\CourseApp.AssemblyInfoInputs.cache +C:\Users\Елисей\Desktop\DD\Tprogramming_147_2019\CourseApp\obj\Debug\netcoreapp3.1\CourseApp.AssemblyInfo.cs +C:\Users\Елисей\Desktop\DD\Tprogramming_147_2019\CourseApp\obj\Debug\netcoreapp3.1\CourseApp.dll +C:\Users\Елисей\Desktop\DD\Tprogramming_147_2019\CourseApp\obj\Debug\netcoreapp3.1\CourseApp.pdb diff --git a/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.csprojAssemblyReference.cache b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.csprojAssemblyReference.cache new file mode 100644 index 00000000..bd83100d Binary files /dev/null and b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.csprojAssemblyReference.cache differ diff --git a/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.dll b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.dll new file mode 100644 index 00000000..c5c234ac Binary files /dev/null and b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.dll differ diff --git a/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.exe b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.exe new file mode 100644 index 00000000..6b6ba3b8 Binary files /dev/null and b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.exe differ diff --git a/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.pdb b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.pdb new file mode 100644 index 00000000..47e613bf Binary files /dev/null and b/CourseApp/obj/Debug/netcoreapp3.1/CourseApp.pdb differ diff --git a/CourseApp/obj/project.assets.json b/CourseApp/obj/project.assets.json new file mode 100644 index 00000000..8223db30 --- /dev/null +++ b/CourseApp/obj/project.assets.json @@ -0,0 +1,94 @@ +{ + "version": 3, + "targets": { + ".NETCoreApp,Version=v3.1": { + "StyleCop.Analyzers/1.0.2": { + "type": "package" + } + } + }, + "libraries": { + "StyleCop.Analyzers/1.0.2": { + "sha512": "3xD87lafnVhsSEtJKk50G7FGutvaXkFz4XrrLrxnk/DhZU42dnCGWUsvKuBv4mTS0XdIgTY88tLhxW/8Vi3Pow==", + "type": "package", + "path": "stylecop.analyzers/1.0.2", + "hasTools": true, + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "analyzers/dotnet/cs/StyleCop.Analyzers.CodeFixes.dll", + "analyzers/dotnet/cs/StyleCop.Analyzers.dll", + "stylecop.analyzers.1.0.2.nupkg.sha512", + "stylecop.analyzers.nuspec", + "tools/install.ps1", + "tools/uninstall.ps1" + ] + } + }, + "projectFileDependencyGroups": { + ".NETCoreApp,Version=v3.1": [ + "StyleCop.Analyzers >= 1.0.2" + ] + }, + "packageFolders": { + "C:\\Users\\Елисей\\.nuget\\packages\\": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\Елисей\\Desktop\\DD\\Tprogramming_147_2019\\CourseApp\\CourseApp.csproj", + "projectName": "CourseApp", + "projectPath": "C:\\Users\\Елисей\\Desktop\\DD\\Tprogramming_147_2019\\CourseApp\\CourseApp.csproj", + "packagesPath": "C:\\Users\\Елисей\\.nuget\\packages\\", + "outputPath": "C:\\Users\\Елисей\\Desktop\\DD\\Tprogramming_147_2019\\CourseApp\\obj\\", + "projectStyle": "PackageReference", + "configFilePaths": [ + "C:\\Users\\Елисей\\AppData\\Roaming\\NuGet\\NuGet.Config" + ], + "originalTargetFrameworks": [ + "netcoreapp3.1" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "netcoreapp3.1": { + "projectReferences": {} + } + }, + "warningProperties": { + "allWarningsAsErrors": true, + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "netcoreapp3.1": { + "dependencies": { + "StyleCop.Analyzers": { + "suppressParent": "All", + "target": "Package", + "version": "[1.0.2, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.100\\RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/Interface/IComparable.cs b/Interface/IComparable.cs new file mode 100644 index 00000000..9935892f --- /dev/null +++ b/Interface/IComparable.cs @@ -0,0 +1,4 @@ +public interface IComparable +{ + int CompareTo(object obj); +} \ No newline at end of file diff --git a/Interface/IResultOfMentalWork.cs b/Interface/IResultOfMentalWork.cs new file mode 100644 index 00000000..e5fc86f7 --- /dev/null +++ b/Interface/IResultOfMentalWork.cs @@ -0,0 +1,12 @@ +public interface IResultOfMentalWork +{ + string Name { get; set; } + + string Country { get; set; } + + int ProdYear { get; set; } + + string Mark(int mark); + + string Send(string toWho); +} \ No newline at end of file diff --git a/Interface/PieceOfArt.cs b/Interface/PieceOfArt.cs new file mode 100644 index 00000000..13ead91c --- /dev/null +++ b/Interface/PieceOfArt.cs @@ -0,0 +1,45 @@ +using System; + +namespace CourseApp +{ + public abstract class PieceOfArt : IComparable, IResultOfMentalWork + { + public PieceOfArt(int prodYear, string name, string country) + { + Name = name; + ProdYear = prodYear; + Country = country; + } + + public string Name { get; set; } + + public string Country { get; set; } + + public virtual int ProdYear { get; set; } + + public abstract string Watch(); + + public abstract string Mark(int mark); + + public abstract string Send(string toWho); + + public new abstract string ToString(); + + public virtual string VirtualView() + { + return "Virtual Method"; + } + + public int CompareTo(PieceOfArt poa) + { + if (poa != null) + { + return this.Name.CompareTo(poa.Name); + } + else + { + throw new ArgumentException("object not found"); + } + } + } +} diff --git a/Interface/Program.cs b/Interface/Program.cs new file mode 100644 index 00000000..df98aeb0 --- /dev/null +++ b/Interface/Program.cs @@ -0,0 +1,84 @@ +// Вариант 22 +using System; +using System.Collections; +using System.Collections.Generic; + +namespace CourseApp +{ + public class Program + { + public static double MyFunction(double a, double x) + { + var lg = Math.Log10(Math.Pow(x, 2) - 1); + + var c = Math.Pow(a, Math.Pow(x, 2) - 1) - lg + Math.Pow(Math.Pow(x, 2) - 1, 1 / 3); + return c; + } + + public static List TaskA(double a, double xn, double xk, double dx) + { + List y = new List(); + for (var x = xn; x < xk; x += dx) + { + y.Add(MyFunction(a, x)); + } + + return y; + } + + public static List TaskB(double a, List x) + { + List y = new List(5); + foreach (double i in x) + { + y.Add(MyFunction(a, i)); + } + + return y; + } + + public static void Main(string[] args) + { + var pieces = new List() { new Film(1987, "Nekromantik", "Germany"), new Picture(1503, "Mona Lisa", "Italy"), new Film(2013, "Moebiuseu", "South Korea") }; + foreach (var p in pieces) + { + Console.WriteLine(p.Name); + } + + pieces.Sort(); + + foreach (var p in pieces) + { + Console.WriteLine(p.Name); + } + + for (int i = 0; i < 2; i++) + { + Console.WriteLine(pieces[i].Send("Tommy")); + } + + List taskA = TaskA(2.25, 1.2, 2.7, 0.3); + + foreach (var item in taskA) + { + Console.WriteLine($"y={item}"); + } + + List xB = new List() { 1.31, 1.39, 1.44, 1.56, 1.92 }; + List taskB = TaskB(2, xB); + for (int i = 0; i < 5; i++) + { + Console.WriteLine($"x={xB[i]}"); + } + + foreach (var item in taskB) + { + Console.WriteLine($"y={item}"); + } + + Console.WriteLine(CalcAge.CalculateAge(28, 6, 2000, true)); + + Console.ReadLine(); + } + } +} \ No newline at end of file diff --git a/Kolmogorov_Veniamin.docx b/Kolmogorov_Veniamin.docx new file mode 100644 index 00000000..4122a6b4 Binary files /dev/null and b/Kolmogorov_Veniamin.docx differ diff --git a/README.md b/README.md index 556d11d5..6dbaef9e 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@ -# Tprogramming_147_2019 \ No newline at end of file +# Tprogramming_147_2019 +Veniamin Kolmogorov diff --git a/Window/Styles/images/avatar.png b/Window/Styles/images/avatar.png new file mode 100644 index 00000000..2bb3c01d Binary files /dev/null and b/Window/Styles/images/avatar.png differ diff --git a/Window/Styles/images/background.jpg b/Window/Styles/images/background.jpg new file mode 100644 index 00000000..b4897233 Binary files /dev/null and b/Window/Styles/images/background.jpg differ diff --git a/Window/Styles/style.css b/Window/Styles/style.css new file mode 100644 index 00000000..47cb35a4 --- /dev/null +++ b/Window/Styles/style.css @@ -0,0 +1,165 @@ +html, body { + background: #f3f2f3; + background-image: url(../Styles/images/background.jpg); + background-repeat: no-repeat; + background-size: auto; + color: #000000; +} + +#name { + right: 20px; +} + +#container { + background: rgb(198, 191, 255); + margin: 16px auto; + border-radius: 30px; + max-width: 900px; + min-width: 600px; + min-height: 800px; + max-height: 900px; +} + +#header { + background: rgb(117, 231, 222); + border-radius: 30px; + height: 100px; + max-width: 900px; + min-width: 500px; + border-style: solid; + border-width: 1px; +} + +#content { + background: #99CC99; + float: left; + max-width: 600px; + height: 400px; +} + +#clear { + clear: both; +} + +#footer { + background: #87b0c9; + height: 90px; + max-width: 900px; + border-radius: 10px; +} + +h6 { + margin-left: 20px; +} + +h1 { + white-space: nowrap; + text-align: center; + margin-top: 13px; +} + +.nav { + margin-left: 10px; + margin-right: 20px; + float: right; +} + +ul.hr { + margin-left: 10px; + padding: 0px; +} + +ul.hr li { + display: inline; + margin-right: 5px; +} + +#skills { + padding-right: 0; + background: rgb(202, 206, 202); + float: right; + margin-right: 10px; + margin-top: 0px; + max-width: 200px; + height: 200px; + border-radius: 30px; + border-style: groove; +} + +#info { + font-size: 18px; + max-width: 400px; + border-radius: 15px; + border-style: none; + margin-top: 10px; + float: 0.3; + margin-right: 0px; + margin-left: 220px; + list-style-type: none; +} + +ul.info { + list-style-type: none; +} + +ul.info li { + list-style-type: none; +} + +#about { + margin-left: 10px; + margin-right: 10px; + margin-bottom: 10px; + margin-top: 100px; + border-radius: 10px; + border-style: ridge; +} + +p.text { + margin-left: 10px; + margin-right: 10px; + margin-bottom: 10px; + margin-top: 10px; +} + +img.avatar { + border-radius: 20ch; +} + +#avatar { + margin: 16px auto; + float: left; + margin-right: 10px; + margin-left: 10px; + border-style: none; +} + +h3, h5 { + text-align: center; +} + +#copyright { + float: right; + margin-right: 20px; + margin-top: 50px; +} + +.bold-font { + font-weight: 500; +} + +#footerContacts { + float: left; + padding-top: 22px; + padding-left: 20px; +} + +ul.footerContacts li { + margin-left: 5px; + list-style-type: none; + font-size: 19px; +} + +#intendation { + padding-right: 10px; +} diff --git a/Window/index.html b/Window/index.html new file mode 100644 index 00000000..30e623a4 --- /dev/null +++ b/Window/index.html @@ -0,0 +1,84 @@ + + + + + + + + + + + + <h1>Моё резюме</h1> + +Вениамин Колмогоров + + + +
+
+ My photo +
+
+
My skills
+
    +
  • Deutsche A2
  • +
  • C#/C++ Beginner,OOP
  • +
  • HTML,CSS
  • +
  • Python
  • +
  • Git
  • +
+
+
+
+
Main information
+
    +
  • Name: Kolmogorov Veniamin Aleksandrovich
  • +
  • Location: Privolzhsk, Russia
  • +
  • Education: School №1
  • +
+
+
+ + + +
+

About Myself

+

+אני יושב מאחורי סורגים בצינוק לח. +גדל בשבי, הנשר הצעיר, +חברי העצוב, מנופף בכנף, +אוכל ארור נושך מתחת לחלון., +הוא מנקר וזורק ומביט מבעד לחלון., +זה כמו שהוא מתכנן דבר אחד איתי. +היא קוראת לי בעיניה ובכי. +והוא רוצה לומר משהו: "בואו נעוף מכאן! +אנחנו ציפורים חופשיות, הגיע הזמן, אחי, הגיע הזמן! +למקום שבו ההר לבן מאחורי הענן, +היכן שקצוות הים הופכים לכחולים., +שם, לך היכן שרק הרוח... כן אני כן!...»

+
+
+ +
+ + +
+ + + + + \ No newline at end of file diff --git a/_stylecop/stylecop.json b/_stylecop/stylecop.json new file mode 100644 index 00000000..32647514 --- /dev/null +++ b/_stylecop/stylecop.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", + "settings": { + "documentationRules": { + "documentExposedElements": false, + "documentInterfaces": false, + "companyName": "Test Company", + "copyrightText": "This source code is Copyright © {companyName} and MAY NOT be copied, reproduced,\npublished, distributed or transmitted to or stored in any manner without prior\nwritten consent from {companyName} (www.yourcompany.com).", + "xmlHeader":false + } + } +} \ No newline at end of file diff --git a/_stylecop/stylecop.ruleset b/_stylecop/stylecop.ruleset new file mode 100644 index 00000000..4e97dbda --- /dev/null +++ b/_stylecop/stylecop.ruleset @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/courseworkspace.code-workspace b/courseworkspace.code-workspace new file mode 100644 index 00000000..c6a742e9 --- /dev/null +++ b/courseworkspace.code-workspace @@ -0,0 +1,11 @@ +{ + "folders": [ + { + "path": "CourseApp" + }, + { + "path": "CourseApp.Tests" + } + ], + "settings": {} +} \ No newline at end of file