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
declare module "proj4" { | |
interface Transformer { | |
forward: (p: Point) => Point; | |
inverse: (p: Point) => Point; | |
} | |
class Point { | |
x: number; | |
y: number; |
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
02; // Get firmware version | |
4A 01 00; // 1 target requested | |
// Select the payment system environment | |
40 01 00 A4 04 00 0E 31 50 41 59 2E 53 59 53 2E 44 44 46 30 31; | |
40 01 00 C0 00 00 20; | |
40 01 00 B2 00 0C 00; | |
40 01 00 B2 01 0C 00; | |
40 01 00 B2 01 0C 29; |
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
// knockout 3.4.0 | |
ko.utils.addOrRemoveItem = function (array, value, included) { /* .. */ } | |
ko.utils.anyDomNodeIsAttachedToDocument = function (nodes) { /* .. */ } | |
ko.utils.arrayFilter = function (array, predicate) { /* .. */ } | |
ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ } |
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
/* | |
* Example code for my blog post on function shims for NancyFx request handlers | |
* Blog post is here: http://anthonysteele.co.uk/more-patterns-for-web-services-in-nancyfx | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Nancy; |
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
<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" /> |
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
module XHR { | |
export class Header { | |
header: string; | |
data: string; | |
constructor(header: string, data: string) { | |
this.header = header; | |
this.data = data; | |
} | |
} |
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
<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" /> |
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
open System | |
// Basic data structures | |
[<Flags>] | |
type Day = | |
| None = 0 | |
| Mon = 1 | |
| Tue = 2 | |
| Wed = 4 | |
| Thu = 8 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>Blazor Loading</title> | |
<base href="/" /> | |
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" /> | |
<link href="css/site.css" rel="stylesheet" /> | |
</head> |
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
How to use serilog in ASP.NET Core 2.0 | |
One of major changes core 2.0 compare to core 2 preview is how to registe logging. | |
logging should be configged before website instanced. | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ |
OlderNewer