Create futures from list and function.
final var list = List.of('A', 'B', 'C');
AllOfFutureHelpers.<> builder()
.function(e -> someIOFunction(e))| import java.util.LinkedList; | |
| import java.util.List; | |
| import org.mockito.ArgumentMatcher; | |
| import org.mockito.invocation.InvocationOnMock; | |
| import org.mockito.stubbing.Answer; | |
| import lombok.AllArgsConstructor; | |
| import lombok.Setter; |
Java 19 add newHashMap(int) to HashMap and LinkedHashMap.
See: Java doc HashMap
private static final short DEFAULT_LOAD_FACTOR = .75;| <script type="module"> | |
| import mermaid from 'https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.esm.min.mjs'; | |
| mermaid.initialize({ startOnLoad: false }); | |
| await mermaid.run({ | |
| nodes: document.querySelectorAll('pre.mermaid > code:first-child'), | |
| }); | |
| function findMermaidSvg(child) { | |
| if (child.tagName === "A" || child.tagName === "BUTTON") { | |
| return null; |
| #!/usr/bin/env -S deno run --allow-read --allow-write | |
| import { walk } from "https://deno.land/[email protected]/fs/walk.ts"; | |
| import * as cli from "https://deno.land/[email protected]/cli/mod.ts"; | |
| import * as path from "https://deno.land/[email protected]/path/mod.ts"; | |
| interface UnixFilesystemOptions { | |
| uid: number | null; | |
| gid: number | null; | |
| filemod: number; | |
| dirmod: number; |
| #!/usr/bin/env -S deno run --allow-read --allow-write | |
| import { | |
| walk, | |
| type WalkEntry, | |
| type WalkOptions, | |
| } from "https://deno.land/[email protected]/fs/walk.ts"; | |
| import * as path from "https://deno.land/[email protected]/path/mod.ts"; | |
| async function* multiWalk(roots: string[], options?: WalkOptions) { | |
| for (const root of roots) { |