Skip to content

Instantly share code, notes, and snippets.

View adamcbuckley's full-sized avatar

Adam Buckley adamcbuckley

  • Hebden Bridge, UK
View GitHub Profile
@adamcbuckley
adamcbuckley / create-dataset.ts
Created September 1, 2022 13:04
Creates an AWS QuickSight dataset, where the source data is supplied as JSON
import {
CreateDataSetCommand,
CreateDataSourceCommand,
DataSetImportMode,
DataSourceType,
DescribeDataSourceCommand,
QuickSightClient,
ResourceStatus
} from "@aws-sdk/client-quicksight";
@adamcbuckley
adamcbuckley / VersionNumberComparator.java
Created January 16, 2020 17:37
A java.util.Comparator for version (or chapter) numbers, which have an arbitrary number of decimal points.
package com.hebdensoft;
import java.util.Comparator;
/**
* <p>A java.util.Comparator for version (or chapter) numbers, which have an arbitrary number of decimal points.</p>
* <p>The code was taken from https://bugs.openjdk.java.net/browse/JDK-8134512 and http://cr.openjdk.java.net/~igerasim/8134512/04/webrev/index.html</p>
* <p>How to use:</p>
* <p><code>myListOfVersionNumbers.sort(VersionNumberComparator.getInstance());</code></p>