This file contains hidden or 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
| type Functor = class end | |
| let inline map (f: 'a -> 'b) (x: ^Functor) : ^Result = | |
| ((^Functor or ^Result or Functor) : (static member Map : ^Functor * ('a -> 'b) -> ^Result) (x, f)) | |
| type Functor with | |
| static member inline Map (x: list<'a>, f: 'a -> 'b) : list<'b> = | |
| List.map f x | |
| static member inline Map (x: option<'a>, f: 'a -> 'b) : option<'b> = |
This file contains hidden or 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 lang="en" class="home"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>View Transitions</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover"> | |
| <link rel="stylesheet" href="view-transitions.css"> | |
| <script src="view-transitions.js"></script> | |
| </head> |
This file contains hidden or 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
| /* Define the typography layer */ | |
| @layer typography { | |
| /* Define the fonts layer */ | |
| @layer fonts { | |
| /* Example of @font-face declarations */ | |
| @font-face { | |
| font-family: "Inter"; | |
| src: url("/fonts/Inter-Regular.woff2") format("woff2"), | |
| url("/fonts/Inter-Regular.woff") format("woff"); | |
| font-weight: 400; |
This file contains hidden or 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 lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Interactive Draggable Table with Resizable and Reorderable Columns</title> | |
| <style> | |
| /* General table styles */ | |
| table.draggable-table { | |
| border-collapse: collapse; |
This file contains hidden or 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.IO | |
| let lines = File.ReadAllLines "references.fsx" | |
| let fixedLines = lines |> Array.map (fun line -> | |
| if line.StartsWith("#r") then | |
| if line.Contains("/usr/share/dotnet/packs/") then | |
| line.Replace("/packs/", "/shared/") | |
| .Replace(".Ref/","/") | |
| .Replace("/ref/net8.0/", "/") |
This file contains hidden or 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
| // Define the types for the inputs and outputs | |
| type AccountID = AccountID of int | |
| type Balance = Balance of decimal | |
| type Deposit = Deposit of AccountID * decimal | |
| type NewBalance = NewBalance of decimal | |
| type LogMessage = string | |
| // Define an error type for your operations | |
| type BankError = | |
| | AccountNotFound of int |
This file contains hidden or 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
| type ExecuteCallback = ExecuteCallback | |
| // Actor that executes the timer callback | |
| type CallbackActor(callback: TimerCallback, state: obj) = | |
| inherit UntypedActor() | |
| override x.OnReceive(message: obj) = | |
| match message with | |
| | :? ExecuteCallback -> | |
| try |
This file contains hidden or 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
| using System; | |
| using System.Buffers; | |
| using System.Runtime.CompilerServices; | |
| using System.Collections.Generic; | |
| using System.Threading; | |
| var allocatedArrays = new HashSet<int>(); // To track allocated arrays | |
| int i = 0; | |
| while (true) | |
| { |
This file contains hidden or 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 AlarmsGlobal.Command.Domain.User | |
| open CQRS | |
| open Akkling | |
| open Akkling.Persistence | |
| open AkklingHelpers | |
| open Akka | |
| open Common | |
| open Serilog | |
| open System |
This file contains hidden or 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.Threading | |
| let taskGrandchild(order: int) : Async<unit> = | |
| async { | |
| printfn $"Starting Grandchild({order})" | |
| let! ct = Async.CancellationToken | |
| printfn $"Cancellation token GrandChild({order}): {ct.GetHashCode()}" | |
| // use! c = Async.OnCancel(fun () -> printfn $"Cancelled Task Grandchild: {order}") |