-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
136 changed files
with
1,565 additions
and
166 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
1 change: 0 additions & 1 deletion
1
Best travel/Best travel/obj/Debug/netcoreapp3.1/Best travel.AssemblyInfoInputs.cache
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
Best travel/Best travel/obj/Debug/netcoreapp3.1/Best travel.csproj.CoreCompileInputs.cache
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
Best travel/Best travel/obj/Debug/netcoreapp3.1/Best travel.csproj.FileListAbsolute.txt
This file was deleted.
Oops, something went wrong.
Binary file not shown.
1 change: 0 additions & 1 deletion
1
Best travel/Best travel/obj/Debug/netcoreapp3.1/Best travel.genruntimeconfig.cache
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file added
BIN
+59.8 KB
Decode the Morse code/.vs/Decode the Morse code/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.31424.327 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Decode the Morse code", "Decode the Morse code\Decode the Morse code.csproj", "{21083589-1024-454A-A488-9BE545675638}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{21083589-1024-454A-A488-9BE545675638}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{21083589-1024-454A-A488-9BE545675638}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{21083589-1024-454A-A488-9BE545675638}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{21083589-1024-454A-A488-9BE545675638}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {974D8CAE-774E-4D80-BB4D-26F683C70924} | ||
EndGlobalSection | ||
EndGlobal |
9 changes: 9 additions & 0 deletions
9
Decode the Morse code/Decode the Morse code/Decode the Morse code.csproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<RootNamespace>Decode_the_Morse_code</RootNamespace> | ||
</PropertyGroup> | ||
|
||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text.RegularExpressions; | ||
|
||
namespace Decode_the_Morse_code | ||
{ | ||
class MorseCodeDecoder | ||
{ | ||
public static string Decode(string morseCode) | ||
{ | ||
string trimmed = morseCode.Trim(new char[] { ' ' }); | ||
|
||
List<string> letters = new List<string>(); //was just string. But this "SOS" decode as 1 sym | ||
string result = ""; | ||
|
||
Regex letterRgx = new Regex(@"([.|-])+"); | ||
Regex spaceRgx = new Regex(@"[ | ]+"); | ||
|
||
MatchCollection letterMatches = letterRgx.Matches(trimmed); | ||
MatchCollection spaceMatches = spaceRgx.Matches(trimmed); | ||
|
||
foreach (Match letMatch in letterMatches) | ||
{ | ||
letters.Add(MorseCode.Get(letMatch.Value)); | ||
} | ||
|
||
Console.WriteLine("letters=" + letters); | ||
|
||
int ind = 0; | ||
foreach (Match spMatch in spaceMatches) | ||
{ | ||
result += letters[ind]; | ||
if (spMatch.Value == " ") result += " "; | ||
Console.WriteLine(result + $" {ind} + |{spMatch.Value}|"); | ||
ind++; | ||
} | ||
Console.WriteLine(); | ||
for (; ind < letters.Count; ind++) | ||
{ | ||
result += letters[ind]; | ||
Console.WriteLine(result); | ||
} | ||
|
||
return result; | ||
} | ||
} | ||
} |
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
... code/Decode the Morse code/obj/Debug/netcoreapp3.1/Decode the Morse code.AssemblyInfo.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// Этот код создан программой. | ||
// Исполняемая версия:4.0.30319.42000 | ||
// | ||
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае | ||
// повторной генерации кода. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
using System; | ||
using System.Reflection; | ||
|
||
[assembly: System.Reflection.AssemblyCompanyAttribute("Decode the Morse code")] | ||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] | ||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] | ||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] | ||
[assembly: System.Reflection.AssemblyProductAttribute("Decode the Morse code")] | ||
[assembly: System.Reflection.AssemblyTitleAttribute("Decode the Morse code")] | ||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] | ||
|
||
// Создано классом WriteCodeFragment MSBuild. | ||
|
1 change: 1 addition & 0 deletions
1
...ode the Morse code/obj/Debug/netcoreapp3.1/Decode the Morse code.AssemblyInfoInputs.cache
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2f9f97db79114d0771bfa9da1da76738415251ab |
Binary file renamed
BIN
+273 Bytes
...ug/netcoreapp3.1/Best travel.assets.cache → ...app3.1/Decode the Morse code.assets.cache
Binary file not shown.
Binary file added
BIN
+86.3 KB
...e Morse code/obj/Debug/netcoreapp3.1/Decode the Morse code.csproj.AssemblyReference.cache
Binary file not shown.
68 changes: 68 additions & 0 deletions
68
...e the Morse code/Decode the Morse code/obj/Decode the Morse code.csproj.nuget.dgspec.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"format": 1, | ||
"restore": { | ||
"C:\\Users\\WHOAMI\\Desktop\\Codewars\\Decode the Morse code\\Decode the Morse code\\Decode the Morse code.csproj": {} | ||
}, | ||
"projects": { | ||
"C:\\Users\\WHOAMI\\Desktop\\Codewars\\Decode the Morse code\\Decode the Morse code\\Decode the Morse code.csproj": { | ||
"version": "1.0.0", | ||
"restore": { | ||
"projectUniqueName": "C:\\Users\\WHOAMI\\Desktop\\Codewars\\Decode the Morse code\\Decode the Morse code\\Decode the Morse code.csproj", | ||
"projectName": "Decode the Morse code", | ||
"projectPath": "C:\\Users\\WHOAMI\\Desktop\\Codewars\\Decode the Morse code\\Decode the Morse code\\Decode the Morse code.csproj", | ||
"packagesPath": "C:\\Users\\WHOAMI\\.nuget\\packages\\", | ||
"outputPath": "C:\\Users\\WHOAMI\\Desktop\\Codewars\\Decode the Morse code\\Decode the Morse code\\obj\\", | ||
"projectStyle": "PackageReference", | ||
"fallbackFolders": [ | ||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", | ||
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\" | ||
], | ||
"configFilePaths": [ | ||
"C:\\Users\\WHOAMI\\AppData\\Roaming\\NuGet\\NuGet.Config", | ||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", | ||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", | ||
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" | ||
], | ||
"originalTargetFrameworks": [ | ||
"netcoreapp3.1" | ||
], | ||
"sources": { | ||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, | ||
"https://api.nuget.org/v3/index.json": {} | ||
}, | ||
"frameworks": { | ||
"netcoreapp3.1": { | ||
"targetAlias": "netcoreapp3.1", | ||
"projectReferences": {} | ||
} | ||
}, | ||
"warningProperties": { | ||
"warnAsError": [ | ||
"NU1605" | ||
] | ||
} | ||
}, | ||
"frameworks": { | ||
"netcoreapp3.1": { | ||
"targetAlias": "netcoreapp3.1", | ||
"imports": [ | ||
"net461", | ||
"net462", | ||
"net47", | ||
"net471", | ||
"net472", | ||
"net48" | ||
], | ||
"assetTargetFallback": true, | ||
"warn": true, | ||
"frameworkReferences": { | ||
"Microsoft.NETCore.App": { | ||
"privateAssets": "all" | ||
} | ||
}, | ||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.301\\RuntimeIdentifierGraph.json" | ||
} | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.