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 class ARACrypt | |
{ | |
private uint lfsrA = 0x13579BDF; | |
private uint lfsrB = 0x2468ACE0; | |
private uint lfsrC = 0xFDB97531; | |
private uint maskA = 0x80000062; | |
private uint maskB = 0x40000020; | |
private uint maskC = 0x10000002; | |
private uint rot0A = 0x7FFFFFFF; | |
private uint rot0B = 0x3FFFFFFF; |
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
PUT /XXXXX/_settings | |
{ | |
"settings": { | |
"index.blocks.write": true | |
} | |
} | |
POST /XXXXX/_split/XXXXX_split | |
{ | |
"settings": { |
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
<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 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
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 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 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 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.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 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
Start | |
01 | |
-- | |
Device descriptor: | |
Descriptor Length: 12 | |
Descriptor type: 01 | |
USB version: 0200 |
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
// 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 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; | |
public static class Util | |
{ | |
public static void MapManyToManyAssociation<T>( | |
ICollection<T> currentData, | |
ICollection<T> newData, | |
Func<T, T, bool> equality, |
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; | |
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 }) |
NewerOlder