<commit_before>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Devices.Geolocation;
using Windows.UI.ViewManagement;
using System.Collections.ObjectModel;
using System.Text.RegularExpressions;
using Microsoft.WindowsAzure.MobileServices;
using System.Threading.Tasks;
using Windows.Graphics.Display;

namespace WhitworthMap
{

    public sealed partial class MainPage : Page
    {

        // List of events that is queried from the Azure Mobile Service
        private IMobileServiceTable<Event> eventsTable = App.MobileService.GetTable<Event>();

        public MainPage()
        {
            this.InitializeComponent();
            GetCoord();
            WindowResize();
        }

        public async void GetCoord() 
        {
            //creates object of geolocator type
            Geolocator geolocator = new Geolocator();
            //creates geopostion object, makes requests every 10 seconds for 5 minutes
            Geoposition geopostion = await geolocator.GetGeopositionAsync(maximumAge: TimeSpan.FromMinutes(5), timeout: TimeSpan.FromSeconds(10));
            double LatIt = geopostion.Coordinate.Latitude;
            double LongIt = geopostion.Coordinate.Longitude;
            locationPing.Visibility = Visibility.Visible;
            locationPingShadow.Visibility = Visibility.Visible;
            double calc1 = (47.757025 - LatIt) * (111545.9883);
            double calc2 = (117.426186 + LongIt) * (83612.52731); 
            int Calc1 = Convert.ToInt32(Math.Round(calc1));
            int Calc2 = Convert.ToInt32(Math.Round(calc2));
            Canvas.SetLeft(locationPing, Calc2 - 15);
            Canvas.SetTop(locationPing, Calc1 - 30);
            Canvas.SetLeft(locationPingShadow, Calc2 - 24);
            Canvas.SetTop(locationPingShadow, Calc1 - 14);
        }
        
        private void BackButton_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
        {
            ViewBuildings.Begin();
        }

        private void Title_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
        {
            ViewEvents.Begin();
        }

        public void WindowResize() 
        {
            // Gets the scroll containers margin property
            Thickness margin = ScrollContainer.Margin;
            // Gets the current windows resolution percentage
            ResolutionScale resolutionScale = DisplayProperties.ResolutionScale;
            // Converts the resolution percentage to a double
            double resolutionOffset = (Convert.ToDouble(resolutionScale) * 0.01);
            // Gets the current height of the window and multiplies it by the resolution percentage
            double Perfheight = ((Window.Current.Bounds.Width) * .5625) * resolutionOffset;
            // Elias uses his less magical number
            double answer1 = (Perfheight * .09);
            double answer2 = Math.Abs(Perfheight - Window.Current.Bounds.Height) + 87;
            double answer = answer1 + answer2;
            // Sets the margin properties
            margin.Top = answer;
            margin.Bottom = answer;
            margin.Left = 0;
            margin.Right = 0;
            // Sets the Scroll containers margin
            ScrollContainer.Margin = margin;
        }

        private async void Building_Tapped(object sender, RoutedEventArgs e)<commit_msg>sickofdisshizzle<commit_after>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Devices.Geolocation;
using Windows.UI.ViewManagement;
using System.Collections.ObjectModel;
using System.Text.RegularExpressions;
using Microsoft.WindowsAzure.MobileServices;
using System.Threading.Tasks;
using Windows.Graphics.Display;

namespace WhitworthMap
{

    public sealed partial class MainPage : Page
    {

        // List of events that is queried from the Azure Mobile Service
        private IMobileServiceTable<Event> eventsTable = App.MobileService.GetTable<Event>();

        public MainPage()
        {
            this.InitializeComponent();
            GetCoord();
            WindowResize();
        }

        public async void GetCoord()
        {
            //creates object of geolocator type
            Geolocator geolocator = new Geolocator();
            //creates geopostion object, makes requests every 10 seconds for 5 minutes
            Geoposition geopostion = await geolocator.GetGeopositionAsync(maximumAge: TimeSpan.FromMinutes(5), timeout: TimeSpan.FromSeconds(10));
            double LatIt = geopostion.Coordinate.Latitude;
            double LongIt = geopostion.Coordinate.Longitude;
            locationPing.Visibility = Visibility.Visible;
            locationPingShadow.Visibility = Visibility.Visible;
            double calc1 = (47.757025 - LatIt) * (111545.9883);
            double calc2 = (117.426186 + LongIt) * (83612.52731);
            int Calc1 = Convert.ToInt32(Math.Round(calc1));
            int Calc2 = Convert.ToInt32(Math.Round(calc2));
            Canvas.SetLeft(locationPing, Calc2 - 15);
            Canvas.SetTop(locationPing, Calc1 - 30);
            Canvas.SetLeft(locationPingShadow, Calc2 - 24);
            Canvas.SetTop(locationPingShadow, Calc1 - 14);
        }

        private void BackButton_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
        {
            ViewBuildings.Begin();
        }

        private void Title_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
        {
            ViewEvents.Begin();
        }

        public void WindowResize()
        {
            // Gets the scroll containers margin property
            Thickness margin = ScrollContainer.Margin;
            // Gets the current windows resolution percentage
            ResolutionScale resolutionScale = DisplayProperties.ResolutionScale;
            // Converts the resolution percentage to a double
            double resolutionOffset = (Convert.ToDouble(resolutionScale) * 0.01);
            // Gets the current height of the window and multiplies it by the resolution percentage
            double Perfheight = (Window.Current.Bounds.Width * .5625) * resolutionOffset;
            // Elias uses his less magical number
            if (Window.Current.Bounds.Height <= 768)
            {
                double answer1 = (Perfheight * .09);
                double answer2 = Math.Abs(Perfheight - Window.Current.Bounds.Height) + 87;
                double answer = answer1 + answer2;
                // Sets the margin properties
                margin.Top = answer;
                margin.Bottom = answer;
                margin.Left = 0;
                margin.Right = 0;
                // Sets the Scroll containers margin
                ScrollContainer.Margin = margin;
            }
            else 
            {
                double answer = (Perfheight - 768) / 4;

                margin.Top = answer;
                margin.Bottom = answer;
                margin.Left = 0;
                margin.Right = 0;
                // Sets the Scroll containers margin
                ScrollContainer.Margin = margin;
            }
        }

        private async void Building_Tapped(object sender, RoutedEventArgs e)
{'fraction_non_alphanumeric': 0.08228980322003578, 'fraction_numerical': 0.022105801175568617, 'mean_word_length': 2.228960396039604, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2877821', 'n_tokens_mistral': 2175, 'n_tokens_neox': 2018, 'n_words': 517}