This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Peregrine.Utilities | |
{ | |
public static class Readability | |
{ |
This file contains hidden or 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
/// <summary> | |
/// Calculates the heat index | |
/// </summary> | |
/// <param name="t">Temperature in Fahrenheit</param> | |
/// <param name="rh">Relative humidity (0..1)</param> | |
/// <returns>Heat Index in Fahrenheit</returns> | |
public double GetHeatIndex(double t, double rh) | |
{ | |
if (rh < 0 || rh > 1) |
This file contains hidden or 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
using System; | |
namespace CodeFormulaOfTheDay | |
{ | |
/// <summary> | |
/// Extension methods for geodesic calculations. | |
/// </summary> | |
public static class Geodesic | |
{ | |
/// <summary> |
This file contains hidden or 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
using System; | |
#if NETFX_CORE | |
using Windows.UI.Xaml.Data; | |
#else | |
using System.Windows.Data; | |
#endif | |
namespace SampleApp.Common | |
{ | |
/// <summary> |
This file contains hidden or 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
public abstract class ClassA<T> where T : ClassB { } | |
public abstract class ClassB { } | |
public class SubClassB : ClassB { } | |
public class SubClassA : ClassA<SubClassB> { } | |
ClassA<ClassB> obj = new SubClassA(); //Won't compile :( |
This file contains hidden or 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
#region Haversine | |
/// <summary> | |
/// Gets the distance between two points in meters using the Haversine Formula. | |
/// </summary> | |
/// <param name="startLong">The start longitude.</param> | |
/// <param name="startLat">The start latitude.</param> | |
/// <param name="endLat">The end latitude.</param> | |
/// <param name="endLong">The end longitude.</param> | |
/// <returns>Distance between the two points in meters</returns> | |
public static double GetDistanceHaversine(double startLong, double startLat, double endLat, double endLong) |
This file contains hidden or 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
Windows.ApplicationModel.Activation.FileOpenPickerContinuationEventArgs | |
Windows.ApplicationModel.Activation.FileSavePickerContinuationEventArgs | |
Windows.ApplicationModel.Activation.FolderPickerContinuationEventArgs | |
Windows.ApplicationModel.Activation.IContinuationActivatedEventArgs | |
Windows.ApplicationModel.Activation.IFileOpenPickerContinuationEventArgs | |
Windows.ApplicationModel.Activation.IFileSavePickerContinuationEventArgs | |
Windows.ApplicationModel.Activation.IFolderPickerContinuationEventArgs | |
Windows.ApplicationModel.Activation.IWebAccountProviderActivatedEventArgs | |
Windows.ApplicationModel.Activation.IWebAccountProviderContinuationEventArgs | |
Windows.ApplicationModel.Activation.WebAccountProviderActivatedEventArgs |
This file contains hidden or 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
internal class GraphTile | |
{ | |
public static Task CreateTileGraphAsync(Data data, int width, int height, string filename) | |
{ | |
return RenderAndSaveToFileAsync(GetVisual(data, width, height), (uint)width, (uint)height, filename); | |
} | |
public static Task CreateTileGraphAsync(Data data, int width, int height, IRandomAccessStream stream) | |
{ | |
return RenderAndSaveToStreamAsync(GetVisual(data, width, height), (uint)width, (uint)height, stream); | |
} |
This file contains hidden or 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
<Page | |
x:Class="App2.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:App1" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d"> | |
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> |
This file contains hidden or 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
4>c:\source\Tests\UnitTests.Universal\sg.exe : warning : SG0002 : Cannot generate serialization code for type 'System.Globalization.CompareInfo' | |
4>c:\source\Tests\UnitTests.Universal\sg.exe : warning : SG0002 : Cannot generate serialization code for type 'System.Globalization.CultureData' | |
4>c:\source\Tests\UnitTests.Universal\sg.exe : warning : SG0002 : Cannot generate serialization code for type 'System.Globalization.TextInfo' | |
4>c:\source\Tests\UnitTests.Universal\sg.exe : warning : SG0002 : Cannot generate serialization code for type 'MyProjectNameSpace.MyTypeHere' | |
4>c:\source\Tests\UnitTests.Universal\sg.exe : warning : SG0002 : Cannot generate serialization code for type 'MyProjectNameSpace.MyTypeHere' | |
4>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x86\ilc\IlcInternals.targets(886,5): error : System.ArgumentNullException: Value cannot be null. | |
4>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x86\ilc\IlcInternals.targets(886,5): error : Parameter name: key | |
4>C:\Program Files (x86)\MSBuild\Micro |