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
<UserControl x:Class="TestApplication.UserControl1" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
mc:Ignorable="d" | |
d:DesignHeight="450" d:DesignWidth="800"> | |
<ListView> | |
<ListView.View> | |
<GridView> |
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
using NLog; | |
using System; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Animatroller.Framework.Utility | |
{ | |
public class HighPrecisionTimer : IDisposable | |
{ |
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
/* | |
// March 2014 - TMRh20 - Updated along with High Speed RF24 Library fork | |
// Parts derived from examples by J. Coliz <maniacbug@ymail.com> | |
*/ | |
/** | |
* Example for efficient call-response using ack-payloads | |
* | |
* This example continues to make use of all the normal functionality of the radios including | |
* the auto-ack and auto-retry features, but allows ack-payloads to be written optionlly as well. | |
* This allows very fast call-response communication, with the responding radio never having to |
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
Microsoft Visual Studio Solution File, Format Version 12.00 | |
# Visual Studio Version 16 | |
VisualStudioVersion = 16.0.29905.134 | |
MinimumVisualStudioVersion = 10.0.40219.1 | |
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Iot.Device.Bindings", "Iot.Device.Bindings\Iot.Device.Bindings.csproj", "{D512B7BA-7A2F-4547-82BA-985BF2CABE01}" | |
EndProject | |
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Device.Gpio", "System.Device.Gpio\System.Device.Gpio.csproj", "{68358886-9767-4D3F-A07F-C0C8AB6EFFBE}" | |
EndProject | |
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mcp9808.Samples", "devices\Mcp9808\samples\Mcp9808.Samples.csproj", "{8CD00379-CC10-4FC5-92F4-D702A11FCEFF}" |
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
public static async Task XboxWake(IPAddress ipAddress, string liveId, int retries = 5) | |
{ | |
using (var socket = new DatagramSocket()) | |
{ | |
var connectionProfile = Windows.Networking.Connectivity.NetworkInformation.GetInternetConnectionProfile(); | |
await socket.BindServiceNameAsync("", connectionProfile.NetworkAdapter); | |
using (var stream = await socket.GetOutputStreamAsync(new HostName(ipAddress.ToString()), "5050")) | |
{ | |
using (var writer = new DataWriter(stream)) |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public static class Extentions | |
{ | |
public static List<List<T>> ChunkBy<T>(this ICollection<T> source, int chunkSize) | |
{ | |
return source | |
.Select((x, i) => new { Index = i, Value = x }) |
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
using System; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace Haukcode.DataAccess.Util | |
{ | |
internal static class PropertyHelper | |
{ | |
public static void Set<T, TProp>(T target, Expression<Func<T, TProp>> memberLamda, TProp sourceValue, ref bool isDirty) | |
{ |
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
Start | |
01 | |
-- | |
Device descriptor: | |
Descriptor Length: 12 | |
Descriptor type: 01 | |
USB version: 0200 |
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
// Map answers | |
Util.MapImmutableOneToMany( | |
currentData: target.Answer, | |
newData: source.Answers, | |
equality: (a, b) => a.ExternalId == b.AnswerId, | |
insert: i => | |
{ | |
var newEntity = new DataModel.Answer(); | |
TransformAnswer(newEntity, i); | |
target.Answer.Add(newEntity); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public static class Util | |
{ | |
public static void MapManyToManyAssociation<T>( | |
ICollection<T> currentData, | |
ICollection<T> newData, | |
Func<T, T, bool> equality, |
NewerOlder