(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 static class GrainExtensions | |
| { | |
| /// <summary> | |
| /// Get string Id | |
| /// </summary> | |
| /// <param name="grain"></param> | |
| /// <returns></returns> | |
| public static string GetId(this IGrainWithStringKey grain) => grain.GetPrimaryKeyString(); | |
| /// <summary> |
| [StructLayout(LayoutKind.Sequential)] | |
| public struct FixedArray8<T> | |
| where T : unmanaged | |
| { | |
| public T Value0; | |
| public T Value1; | |
| public T Value2; |
| /** | |
| * | |
| * | |
| * @param {SVGSVGElement} svg: root svg element | |
| * @param {number} x | |
| * @param {number} y | |
| * @param {SVGMatrix} ctm: element.getScreemCTM() | |
| * @returns {SVGPoint} real position in container | |
| */ |
| <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" /> |
| <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" /> |
| 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); |
| public class CameraDragMove : MonoBehaviour | |
| { | |
| private Vector3 ResetCamera; | |
| private Vector3 Origin; | |
| private Vector3 Diference; | |
| private bool Drag = false; |
(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.
| <# | |
| .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 |
| param ( | |
| [Parameter(Mandatory = $true)] | |
| [string] $FabricDataRoot, | |
| [Parameter(Mandatory = $true)] | |
| [string] $FabricLogRoot | |
| ) | |
| $Preferences = Get-MpPreference | |
| $ExclusionList = "$env:ProgramFiles\Microsoft Service Fabric", | |
| $FabricDataRoot, |