Skip to content
Snippets Groups Projects
Commit de9e078f authored by MaZiFAU's avatar MaZiFAU
Browse files

Auto Code Cleane-Up

parent 63893d4c
Branches
No related tags found
No related merge requests found
Showing with 108 additions and 120 deletions
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using UnityEditor.PackageManager.Requests;
using UnityEngine; using UnityEngine;
using UnityEngine.Networking; using UnityEngine.Networking;
...@@ -169,7 +168,7 @@ IEnumerator _GetContextfromServer() ...@@ -169,7 +168,7 @@ IEnumerator _GetContextfromServer()
else else
break; break;
} }
while(request.result == UnityWebRequest.Result.InProgress) while (request.result == UnityWebRequest.Result.InProgress)
yield return null; yield return null;
System.DateTime answerTime = System.DateTime.UtcNow; System.DateTime answerTime = System.DateTime.UtcNow;
...@@ -217,7 +216,7 @@ IEnumerator _GetContextfromServer() ...@@ -217,7 +216,7 @@ IEnumerator _GetContextfromServer()
System.DateTime parse_time = System.DateTime.Now; System.DateTime parse_time = System.DateTime.Now;
yield return ParsingDictionary.parseFactDictionary[fact.getType()](new_list, fact); yield return ParsingDictionary.parseFactDictionary[fact.getType()](new_list, fact);
justParseTime += System.DateTime.Now - parse_time; justParseTime += System.DateTime.Now - parse_time;
if (new_list.Count == 0) if (new_list.Count == 0)
{ {
Debug.LogWarning("Parsing on context-fact returned empty List -> One of the dependent facts does not exist or parsing failed"); Debug.LogWarning("Parsing on context-fact returned empty List -> One of the dependent facts does not exist or parsing failed");
......
using System.Collections; using System.Collections;
using System.Linq;
using UnityEngine; using UnityEngine;
//using UnityEngine.EventSystems; //using UnityEngine.EventSystems;
using UnityEngine.UI;
using static UIconfig;
public class AlignText : MonoBehaviour public class AlignText : MonoBehaviour
{ {
...@@ -13,11 +10,11 @@ public class AlignText : MonoBehaviour ...@@ -13,11 +10,11 @@ public class AlignText : MonoBehaviour
public Camera Cam1; public Camera Cam1;
public Camera Cam2; public Camera Cam2;
public Camera BackUPCam; public Camera BackUPCam;
// public GameObject Moving_GObj; // public GameObject Moving_GObj;
void Start() void Start()
{ {
StartCoroutine(CheckForNewMainCamRoutine()); StartCoroutine(CheckForNewMainCamRoutine());
} }
...@@ -26,10 +23,10 @@ void Update() ...@@ -26,10 +23,10 @@ void Update()
{ {
//print("Cam" + Cam); //print("Cam" + Cam);
//CheckForNewMainCamRoutine(); //CheckForNewMainCamRoutine();
if (Cam==null) { return; } if (Cam == null) { return; }
transform.forward = Cam.transform.forward; transform.forward = Cam.transform.forward;
//Not yet the perfect solution //Not yet the perfect solution
//Problem is the relative rotation of the TextMesh to the Line-Parent //Problem is the relative rotation of the TextMesh to the Line-Parent
//transform.rotation = Quaternion.Lerp(transform.parent.transform.rotation, Cam.transform.rotation, 0); //transform.rotation = Quaternion.Lerp(transform.parent.transform.rotation, Cam.transform.rotation, 0);
...@@ -54,7 +51,7 @@ IEnumerator CheckForNewMainCamRoutine() ...@@ -54,7 +51,7 @@ IEnumerator CheckForNewMainCamRoutine()
yield return new WaitForSeconds(0);//Verzögerung für Bug aufhebung hinzugefügt, Bug selbst aktuell vergessen yield return new WaitForSeconds(0);//Verzögerung für Bug aufhebung hinzugefügt, Bug selbst aktuell vergessen
switch (UIconfig.MainCameraID) switch (UIconfig.MainCameraID)
{ {
case 0: case 0:
Cam = toCamMain(); Cam = toCamMain();
break; break;
......
...@@ -3,9 +3,7 @@ ...@@ -3,9 +3,7 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UIElements;
public abstract class AbstractAngleFact : FactWrappedCRTP<AbstractAngleFact> public abstract class AbstractAngleFact : FactWrappedCRTP<AbstractAngleFact>
{ {
......
using Newtonsoft.Json; using Newtonsoft.Json;
using REST_JSON_API; using REST_JSON_API;
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.WSA;
/// <summary> /// <summary>
/// Base-class for 1D-Facts /// Base-class for 1D-Facts
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using REST_JSON_API; using REST_JSON_API;
using System.Collections; using System.Collections;
using System.Xml.Linq;
/// <summary> /// <summary>
/// A Circle that is made out of a middle point, a plane and a radius /// A Circle that is made out of a middle point, a plane and a radius
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
using JsonSubTypes; using JsonSubTypes;
using System.Linq; using System.Linq;
using REST_JSON_API; using REST_JSON_API;
using System.Drawing;
using System.Collections; using System.Collections;
using System.Linq.Expressions; using System.Linq.Expressions;
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
using System; using System;
using UnityEngine; using UnityEngine;
using System.Collections; using System.Collections;
using System.Xml.Linq;
/// <summary> /// <summary>
/// Point in 3D Space /// Point in 3D Space
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using Newtonsoft.Json; using Newtonsoft.Json;
using REST_JSON_API; using REST_JSON_API;
using UnityEngine.WSA;
/// <summary> /// <summary>
/// The volume of a cone A defined by a base area <see cref="CircleFact">CircleFact</see>, an apex <see cref="PointFact">PointFact</see> and the volume as float /// The volume of a cone A defined by a base area <see cref="CircleFact">CircleFact</see>, an apex <see cref="PointFact">PointFact</see> and the volume as float
......
...@@ -54,8 +54,8 @@ private void Update2() ...@@ -54,8 +54,8 @@ private void Update2()
break; break;
case 2: case 2:
//InputSystem_script.ActivateModule(); //InputSystem_script.ActivateModule();
//StandaloneInputModule_script.DeactivateModule(); //StandaloneInputModule_script.DeactivateModule();
case 3: case 3:
default: default:
gameObject.GetComponent<StandaloneInputModule>().enabled = false; gameObject.GetComponent<StandaloneInputModule>().enabled = false;
......
...@@ -4,103 +4,103 @@ ...@@ -4,103 +4,103 @@
/// </summary> /// </summary>
namespace geeksforgeeks namespace geeksforgeeks
{ {
// A C# program to print topological // A C# program to print topological
// sorting of a DAG // sorting of a DAG
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
// This class represents a directed graph // This class represents a directed graph
// using adjacency list representation // using adjacency list representation
class Graph class Graph
{ {
// No. of vertices // No. of vertices
private readonly int V; private readonly int V;
// Adjacency List as ArrayList // Adjacency List as ArrayList
// of ArrayList's // of ArrayList's
private List<List<int>> adj; private List<List<int>> adj;
// Constructor // Constructor
Graph(int v) Graph(int v)
{ {
V = v; V = v;
adj = new List<List<int>>(v); adj = new List<List<int>>(v);
for (int i = 0; i < v; i++) for (int i = 0; i < v; i++)
adj.Add(new List<int>()); adj.Add(new List<int>());
} }
// Function to add an edge into the graph // Function to add an edge into the graph
public void AddEdge(int v, int w) { adj[v].Add(w); } public void AddEdge(int v, int w) { adj[v].Add(w); }
// A recursive function used by topologicalSort // A recursive function used by topologicalSort
void TopologicalSortUtil(int v, bool[] visited, void TopologicalSortUtil(int v, bool[] visited,
Stack<int> stack) Stack<int> stack)
{ {
// Mark the current node as visited. // Mark the current node as visited.
visited[v] = true; visited[v] = true;
// Recur for all the vertices // Recur for all the vertices
// adjacent to this vertex // adjacent to this vertex
foreach (var vertex in adj[v]) foreach (var vertex in adj[v])
{ {
if (!visited[vertex]) if (!visited[vertex])
TopologicalSortUtil(vertex, visited, stack); TopologicalSortUtil(vertex, visited, stack);
} }
// Push current vertex to // Push current vertex to
// stack which stores result // stack which stores result
stack.Push(v); stack.Push(v);
} }
// The function to do Topological Sort. // The function to do Topological Sort.
// It uses recursive topologicalSortUtil() // It uses recursive topologicalSortUtil()
void TopologicalSort() void TopologicalSort()
{ {
Stack<int> stack = new Stack<int>(); Stack<int> stack = new Stack<int>();
// Mark all the vertices as not visited // Mark all the vertices as not visited
var visited = new bool[V]; var visited = new bool[V];
// Call the recursive helper function // Call the recursive helper function
// to store Topological Sort starting // to store Topological Sort starting
// from all vertices one by one // from all vertices one by one
for (int i = 0; i < V; i++) for (int i = 0; i < V; i++)
{ {
if (visited[i] == false) if (visited[i] == false)
TopologicalSortUtil(i, visited, stack); TopologicalSortUtil(i, visited, stack);
} }
// Print contents of stack // Print contents of stack
foreach (var vertex in stack) foreach (var vertex in stack)
{ {
Console.Write(vertex + " "); Console.Write(vertex + " ");
} }
} }
// Driver code // Driver code
public static void Main(string[] args) public static void Main(string[] args)
{ {
// Create a graph given // Create a graph given
// in the above diagram // in the above diagram
Graph g = new Graph(6); Graph g = new Graph(6);
g.AddEdge(5, 2); g.AddEdge(5, 2);
g.AddEdge(5, 0); g.AddEdge(5, 0);
g.AddEdge(4, 0); g.AddEdge(4, 0);
g.AddEdge(4, 1); g.AddEdge(4, 1);
g.AddEdge(2, 3); g.AddEdge(2, 3);
g.AddEdge(3, 1); g.AddEdge(3, 1);
Console.WriteLine("Following is a Topological " Console.WriteLine("Following is a Topological "
+ "sort of the given graph"); + "sort of the given graph");
// Function Call // Function Call
g.TopologicalSort(); g.TopologicalSort();
} }
} }
// This code is contributed by Abhinav Galodha // This code is contributed by Abhinav Galodha
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment