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
{ | |
"Keycloak": { | |
"realm": "master", | |
"auth-server-url": "http://localhost:8080/", | |
"ssl-required": "none", | |
"resource": "test", | |
"verify-token-audience": false, | |
"credentials": { | |
"secret": "BuIpbumh0dAX8oaRP83MctDtIXQk28GC" | |
}, |
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
started 1 | |
Finished 1 | |
started 2 | |
Finished 2 | |
started 3 | |
started 4 | |
Finished 3 | |
Finished 4 | |
started 5 | |
Finished 5 |
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
package bug | |
import java.lang.reflect.ParameterizedType | |
abstract class Bar<T> { | |
val type: java.lang.reflect.Type | |
init { | |
val superClass = javaClass.genericSuperclass | |
type = (superClass as ParameterizedType).actualTypeArguments[0] |
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
let input = """0 3 6 9 12 15 | |
1 3 6 10 15 21 | |
10 13 16 21 30 45""" |> fun x -> x.Split("\n") | |
let parse (input:string[]) = | |
input | |
|> Array.map (fun x -> x.Split(" ") |> Array.map int) | |
let rec extrapolateSequence (sequence: int[]) = | |
let diffs = |
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 | |
let input = | |
"""LLR | |
AAA = (BBB, BBB) | |
BBB = (AAA, ZZZ) | |
ZZZ = (ZZZ, ZZZ)""" | |
|> fun x -> x.Split('\n') |
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
let input2 = """32T3K 765 | |
T55J5 684 | |
KK677 28 | |
KTJJT 220 | |
QQQJA 483""" |> fun x -> x.Split('\n') // 6440 | |
let cardPower isPart1 = function | |
| 'A' -> 0xE | |
| 'K' -> 0xD | |
| 'Q' -> 0xC |
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 | |
let input = """Time: 7 15 30 | |
Distance: 9 40 200""" |> (fun s -> s.Split('\n', StringSplitOptions.RemoveEmptyEntries)) | |
type Race = | |
{ time : int64 | |
distance : int64 } | |
let splitInts (s: string) = s.Split([|' '|], StringSplitOptions.RemoveEmptyEntries) |> Array.map int |
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 | |
type Rule = | |
{ srcStart: int64 | |
destStart: int64 | |
length: int64 } | |
member this.offset = this.destStart - this.srcStart | |
member this.srcFinish = this.srcStart + this.length - 1L | |
member this.destFinish = this.destStart + this.length - 1L | |
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 | |
let input = [| | |
"Card 1: 41 48 83 86 17 | 83 86 6 31 17 9 48 53" | |
"Card 2: 13 32 20 16 61 | 61 30 68 82 17 32 24 19" | |
"Card 3: 1 21 53 59 44 | 69 82 63 72 16 21 14 1" | |
"Card 4: 41 92 73 84 69 | 59 84 76 51 58 5 54 83" | |
"Card 5: 87 83 26 28 32 | 88 30 70 12 93 22 82 36" | |
"Card 6: 31 18 13 56 72 | 74 77 10 23 35 67 36 11" | |
|] |
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 | |
let input = [| | |
"467..114.." | |
"...*......" | |
"..35..633." | |
"......#..." | |
"617*......" | |
".....+.58." | |
"..592....." | |
"......755." |
NewerOlder