Skip to content

Instantly share code, notes, and snippets.

View mvacha's full-sized avatar

Michal Vácha mvacha

View GitHub Profile
<ScrollViewer HorizontalScrollMode="Enabled"
VerticalScrollMode="Enabled"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto"
IsHorizontalRailEnabled="True"
IsVerticalRailEnabled="True"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid>
<ScrollViewer HorizontalScrollMode="Enabled"
@mvacha
mvacha / NumLock.txt
Created April 9, 2016 10:41
How to turn on NumLock in Windows 10 (on Intel NUC), definitive guide:
How to turn on NumLock in Windows 10(on Intel NUC), definitive guide:
1) Power options > Choose what the power buttons do > Uncheck "Turn on fast startup"
2) Registry key: HKEY_USERS/.Default/Control Panel/Keyboard/InitialKeyboardIndicators = 2147483650
3) Registry key: HKEY_CURRENT_USER/Control Panel/Keyboard/InitialKeyboardIndicators = 2
4) Intel UEFI BIOS: BootupNumLock State = On, FastBoot = On
public static Task<SqlDataReader> ExecuteReaderAsync(this SqlCommand command)
{
return Task.Factory.FromAsync(command.BeginExecuteReader, command.EndExecuteReader, null);
}
public static Task<object> ExecuteScalarAsync(this SqlCommand command)
{
return command.ExecuteReaderAsync().ContinueWith((executeTask) =>
{
TaskCompletionSource<object> source = new TaskCompletionSource<object>();