Skip to content

Instantly share code, notes, and snippets.

View teilin's full-sized avatar

Teis Lindemark teilin

View GitHub Profile

Keybase proof

I hereby claim:

  • I am teilin on github.
  • I am teilin (https://keybase.io/teilin) on keybase.
  • I have a public key whose fingerprint is CBE2 FE7F C8D3 01F1 DE3D E918 0505 4704 AEE6 3FB3

To claim this, I am signing this object:

@teilin
teilin / CreateTables.sql
Created October 3, 2019 04:53
Example table using system versioning
CREATE TABLE dbo.CodeSet
(
Id INT NOT NULL,
TypeCodeSetId INT NOT NULL,
TypeCodeId VARCHAR(10) NOT NULL,
[Timestamp] timestamp,
PRIMARY KEY (Id)
);
ALTER TABLE dbo.CodeSet ADD [SysStartTime] datetime2(0) GENERATED ALWAYS AS ROW START HIDDEN NOT NULL CONSTRAINT DF_Inventory_SysStartTime DEFAULT '1900-01-01 00:00:00', [SysEndTime] datetime2(0) GENERATED ALWAYS AS ROW END HIDDEN NOT NULL CONSTRAINT DF_Inventory_SysEndTime DEFAULT '9999-12-31 23:59:59', PERIOD FOR SYSTEM_TIME ([SysStartTime], [SysEndTime])

My notes

Issue 9
Symptom
ClickOnce applications targeting .NET Framework 4.0 that reference the Microsoft.Bcl or Microsoft.Bcl.Async packages may experience a TypeLoadException or other errors after being installed.
Resolution
This occurs because ClickOnce fails to deploy certain required assemblies. As a workaround, do the following:
Right-click on the project and choose Add Existing Item
Browse to the Microsoft.Bcl net40 package folder
In the File name text box enter *.*
@teilin
teilin / HelloWorld.exs
Created February 18, 2016 23:08
Playing with Elixir a little bit.
defmodule Recursion do
def print_multiple_times(msg, n) when n <= 1 do
IO.puts msg
end
def print_multiple_times(msg, n) do
sub = fn a, b -> a - b end
sub_one = fn a -> sub.(a,1) end
IO.puts msg
print_multiple_times(msg, sub_one.(n))
end
### Keybase proof
I hereby claim:
* I am teilin on github.
* I am teilin (https://keybase.io/teilin) on keybase.
* I have a public key whose fingerprint is 192B 431D 560E 03E9 6F44 A12E E8D8 62A1 3483 EE7D
To claim this, I am signing this object: