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
| import java.util.concurrent.ExecutionException; | |
| import java.util.concurrent.StructuredTaskScope; | |
| import java.util.concurrent.atomic.AtomicLong; | |
| public class MillionsOfTasks { | |
| private final AtomicLong atomicLong; | |
| public MillionsOfTasks() { | |
| atomicLong = new AtomicLong(); | |
| } |
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": "record", | |
| "namespace": "MyEvents", | |
| "name": "PhoneNumber", | |
| "fields": [ | |
| { | |
| "name": "countryCode", | |
| "type": "string" | |
| }, |
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
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| annotations: | |
| dns.alpha.kubernetes.io/internal: api.internal.dik8ssecurity01.k8s.local | |
| kubectl.kubernetes.io/default-container: kube-apiserver | |
| creationTimestamp: null | |
| labels: | |
| k8s-app: kube-apiserver | |
| name: kube-apiserver |
openpgp4fpr:8FC6B46B0E6D168B9AD09E774EE08417F5FD33D2
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
| package com.xyzcorp; | |
| import java.util.HashSet; | |
| import java.util.Objects; | |
| import java.util.Optional; | |
| import java.util.Set; | |
| public class Person implements Comparable<Person>{ | |
| private String firstName; | |
| private String middleName; //null by default |
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
| /* | |
| * (C) Copyright 2021 Boni Garcia (https://bonigarcia.github.io/) | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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
| trait Functor[F[_]]: | |
| def fmap[A, B](fa:F[A])(f: A => B):F[B] | |
| trait Applicative[F[_]] extends Functor[F]: | |
| def pure[A](a:A):F[A] | |
| object Lists: | |
| given Functor[List] with | |
| def fmap[A,B](fa:List[A])(f:A=>B):List[B] = fa.map(f) | |
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
| import scala.compiletime.ops.int.% | |
| type HCF[A <: Int, B <: Int] <: Int = B match { | |
| case 0 => A | |
| case _ => HCF[B, A % B] | |
| } | |
| //A: 50, B: 10 | |
| //HCF[10, 0] | |
| //10 |