diff --git a/20250115/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/5ae421d8-c0d8-48d7-9e04-4e6b58df94b0.vsidx b/20250115/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/5ae421d8-c0d8-48d7-9e04-4e6b58df94b0.vsidx new file mode 100644 index 0000000..c9e560a Binary files /dev/null and b/20250115/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/5ae421d8-c0d8-48d7-9e04-4e6b58df94b0.vsidx differ diff --git a/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/.suo b/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/.suo new file mode 100644 index 0000000..73c40ed Binary files /dev/null and b/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/.suo differ diff --git a/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.backup.json b/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..80c30ef --- /dev/null +++ b/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.backup.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20250115\\ConsoleApp1\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{1253C52B-9EE2-419E-8ACF-C9DB566348E9}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\progaora\\20250115\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{1253C52B-9EE2-419E-8ACF-C9DB566348E9}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20250115\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeDocumentMoniker": "ConsoleApp1\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20250115\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeToolTip": "ConsoleApp1\\Program.cs", + "ViewState": "AgIAAIcAAAAAAAAAAAAuwKIAAAAFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-15T11:04:49.38Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json b/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json new file mode 100644 index 0000000..9cf4be5 --- /dev/null +++ b/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20250115\\ConsoleApp1\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{1253C52B-9EE2-419E-8ACF-C9DB566348E9}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\progaora\\20250115\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{1253C52B-9EE2-419E-8ACF-C9DB566348E9}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20250115\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeDocumentMoniker": "ConsoleApp1\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20250115\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeToolTip": "ConsoleApp1\\Program.cs", + "ViewState": "AgIAAJ4AAAAAAAAAAAAowLIAAAAMAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-15T11:04:49.38Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20250115/ConsoleApp1/ConsoleApp1.sln b/20250115/ConsoleApp1/ConsoleApp1.sln new file mode 100644 index 0000000..c6e151b --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35222.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{1253C52B-9EE2-419E-8ACF-C9DB566348E9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1253C52B-9EE2-419E-8ACF-C9DB566348E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1253C52B-9EE2-419E-8ACF-C9DB566348E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1253C52B-9EE2-419E-8ACF-C9DB566348E9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1253C52B-9EE2-419E-8ACF-C9DB566348E9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5A66E34C-F969-4135-ADD8-93ABDBB4CB3A} + EndGlobalSection +EndGlobal diff --git a/20250115/ConsoleApp1/ConsoleApp1/App.config b/20250115/ConsoleApp1/ConsoleApp1/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20250115/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj b/20250115/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj new file mode 100644 index 0000000..8c44f60 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {1253C52B-9EE2-419E-8ACF-C9DB566348E9} + Exe + ConsoleApp1 + ConsoleApp1 + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/20250115/ConsoleApp1/ConsoleApp1/Program.cs b/20250115/ConsoleApp1/ConsoleApp1/Program.cs new file mode 100644 index 0000000..57af16c --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/Program.cs @@ -0,0 +1,232 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics.Contracts; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; +using System.Xml; + +namespace ConsoleApp1 +{ + public class ListaElem + { + public ListaElem Next { get; set; } + public T Value { get; set; } + } + + public class SajatLancoltLista: IEnumerable + { + public ListaElem Start { get; private set; } + public ListaElem End { get; private set; } + + public void Add(T value) + { + var next = new ListaElem { Value = value }; + + if (Start == null) + { + Start = next; + End = next; + } else + { + End.Next = next; + End = next; + } + } + + private bool Equals(T value, T other) + { + if (ReferenceEquals(value, other)) + { + return true; + } else + { + return value.Equals(other); + } + + } + + public bool Remove(T value) + { + ListaElem previous = null; + ListaElem current = Start; + + while (current != null) + { + if (Equals(current.Value, value)) + { + if (previous != null) + { + previous.Next = current.Next; + if (current.Next == null) + { + End = previous; + } + } + else + { + Start = Start.Next; + if (Start == null) + { + End = null; + } + } + return true; + } + previous = current; + current = current.Next; + } + + return false; + } + + + public bool Contains(T value) + { + var current = Start; + + while (current != null) + { + if (Equals(current.Value, value)) + { + return true; + } + current = current.Next; + } + return false; + } + + public IEnumerator GetEnumerator() + { + var current = Start; + + while (current != null) + { + var retval = current.Value; + current = current.Next; + yield return retval; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } + + public class SajatVerem : IEnumerable + { + private List _lista; + + public SajatVerem() + { + _lista = new List(); + } + + public void Push(T value) + { + _lista.Add(value); + } + + int Count + { + get { return _lista.Count; } + } + + public T Pop() + { + int vege = _lista.Count - 1; + T ret = _lista[vege]; + _lista.RemoveAt(vege); + return ret; + } + + public T Peak() + { + int vege = _lista.Count - 1; + return _lista[vege]; + } + + public IEnumerator GetEnumerator() + { + for (int i = _lista.Count - 1; i >= 0; i--) + { + yield return _lista[i]; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } + + public class BinarisFa + { + public T Value; + public BinarisFa Right; + public BinarisFa Left; + + public BinarisFa(T value) + { + Value = value; + } + + public void Add(int value) + { + + } + + + } + internal class Program + { + static void Main(string[] args) + { + var lancolt = new SajatLancoltLista(); + + lancolt.Add(1); + lancolt.Add(2); + lancolt.Add(3); + lancolt.Add(4); + lancolt.Add(5); + + foreach (var item in lancolt) + { + Console.WriteLine(item); + } + + lancolt.Remove(1); + + foreach (var item in lancolt) + { + Console.WriteLine(item); + } + + var verem = new SajatVerem(); + verem.Push(11); + verem.Push(12); + verem.Push(13); + verem.Push(14); + verem.Push(15); + + Console.WriteLine("A verem elemei: "); + foreach (var item in verem) + { + Console.WriteLine(item); + } + + Console.WriteLine("Pop:"); + Console.WriteLine(verem.Pop()); + + BinarisFa binarisFa = new BinarisFa(20); + binarisFa.Right + + + Console.ReadKey(); + } + + } +} diff --git a/20250115/ConsoleApp1/ConsoleApp1/Properties/AssemblyInfo.cs b/20250115/ConsoleApp1/ConsoleApp1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3f6bb73 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ConsoleApp1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ConsoleApp1")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1253c52b-9ee2-419e-8acf-c9db566348e9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe b/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe new file mode 100644 index 0000000..ef2dae1 Binary files /dev/null and b/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe differ diff --git a/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe.config b/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb b/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb new file mode 100644 index 0000000..3e9ece7 Binary files /dev/null and b/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb differ diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.AssemblyReference.cache b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.AssemblyReference.cache new file mode 100644 index 0000000..126ed02 Binary files /dev/null and b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.AssemblyReference.cache differ diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0be8d26 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +137ddb1975586287657f37337b64d051167bb6a147915d9fb5b8eb94b1093509 diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..18a8546 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe.config +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.pdb +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.exe +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.pdb diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe new file mode 100644 index 0000000..ef2dae1 Binary files /dev/null and b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe differ diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb new file mode 100644 index 0000000..3e9ece7 Binary files /dev/null and b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb differ diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..94c747e Binary files /dev/null and b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20250115/Feladatok.pdf b/20250115/Feladatok.pdf new file mode 100644 index 0000000..42166c1 Binary files /dev/null and b/20250115/Feladatok.pdf differ diff --git a/20250115/linked_list.cs b/20250115/linked_list.cs new file mode 100644 index 0000000..6bf0066 --- /dev/null +++ b/20250115/linked_list.cs @@ -0,0 +1,22 @@ +using System; +using System.IO; +using System.Collections.Generic; + +namespace LinkedList_Gyak +{ + public Class Lancoltlista{ + public int value; + //public Lancoltlista *pointer; + + public Lancoltlista(int value){ + this.value = value; + } + + } + internal class Program{ + static void Main(string[] args){ + Lancoltlista elem = new Lancoltlista(1); + Console.WriteLine(elem.value); + } + } +} \ No newline at end of file