(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
namespace YourNamespace | |
{ | |
/// <summary> | |
/// Uses the Name value of the <see cref="ColumnAttribute"/> specified to determine | |
/// the association between the name of the column in the query results and the member to | |
/// which it will be extracted. If no column mapping is present all members are mapped as | |
/// usual. | |
/// </summary> | |
/// <typeparam name="T">The type of the object that this association between the mapper applies to.</typeparam> | |
public class ColumnAttributeTypeMapper<T> : FallbackTypeMapper |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Runtime.Serialization; | |
using System.Security.Cryptography; | |
using System.Text; | |
using Newtonsoft.Json; |
param ( | |
[Parameter(Mandatory = $true)] | |
[string] $FabricDataRoot, | |
[Parameter(Mandatory = $true)] | |
[string] $FabricLogRoot | |
) | |
$Preferences = Get-MpPreference | |
$ExclusionList = "$env:ProgramFiles\Microsoft Service Fabric", | |
$FabricDataRoot, |
<# | |
.NOTES | |
How to use: Open Visual Studio, go to Tools – External Tools to bring up the External Tools dialog, add a new tools menu with the following configuration: | |
Title: Manage User Secrets (Or whatever you want) | |
Command: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe (Path to powershell.exe) | |
Arguments: Path-to-this-script(e.g. D:\VisualStudioTools\usersecrets.ps1) | |
Initial Directory: $(ProjectDir) | |
.PARAMETER ProjectFilePath | |
The csproj file's path, or keep it empty to search *.csproj file in initial directory |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
public class CameraDragMove : MonoBehaviour | |
{ | |
private Vector3 ResetCamera; | |
private Vector3 Origin; | |
private Vector3 Diference; | |
private bool Drag = false; |
void Update(Entity entity) | |
{ | |
if (entity == null) | |
{ | |
throw new ArgumentNullException(nameof(entity)); | |
} | |
db.Entry(entity).State = EntityState.Detached; | |
var old = db.Entities.Find(entity.Id); | |
var oldEntry = db.Entry(old); |
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> | |
<PropertyGroup> | |
<OutputType>WinExe</OutputType> | |
<TargetFrameworks>net472;netcoreapp3.0</TargetFrameworks> | |
<UseWindowsForms>true</UseWindowsForms> | |
<LangVersion>7.3</LangVersion> | |
</PropertyGroup> | |
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' "> | |
<Reference Include="System" /> |
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> | |
<PropertyGroup> | |
<OutputType>WinExe</OutputType> | |
<TargetFrameworks>net472;netcoreapp3.0</TargetFrameworks> | |
<UseWPF>true</UseWPF> | |
</PropertyGroup> | |
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' "> | |
<Reference Include="System" /> | |
<Reference Include="System.Data" /> |