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
/* | |
* This is an example of making a CSS animated color property for | |
* the theme-switch component (https://github.com/mahozad/theme-switch). | |
* This gist is referenced in the documentation of the component. | |
* Currently, only Chromium-based browsers (Chrome, Opera, Edge, etc.) support this. | |
* See https://stackoverflow.com/a/63848864 for more information. | |
* For a real-world example, see https://mahozad.ir/android-pie-chart/ | |
* and its source code on https://github.com/mahozad/android-pie-chart/blob/website/docs/styles.css | |
*/ | |
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
#!/usr/bin/env kotlin | |
println("Hello World!") |
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
#!/usr/bin/env kotlin | |
/** | |
* A Kotlin script for extracting (scraping) a phrase from a dynamic page. | |
* NOTE: Download and place the executable [Chrome driver](https://chromedriver.storage.googleapis.com/index.html) beside this script. | |
* See [this stackoverflow post](https://stackoverflow.com/a/69974518/8583692) for more information. | |
* Alternatively, use the [WebDriverManager](https://github.com/bonigarcia/webdrivermanager) library. | |
*/ | |
@file:JvmName("Scraper") |
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
private static DecimalFormatSymbols computeDecimalFormatSymbols( | |
final NumberPointType decimalPointType, final NumberPointType thousandsPointType, final Locale locale) { | |
Validate.notNull(decimalPointType, "Decimal point type cannot be null"); | |
Validate.notNull(thousandsPointType, "Thousands point type cannot be null"); | |
Validate.notNull(locale, "Locale cannot be null"); | |
final DecimalFormatSymbols symbols = new DecimalFormatSymbols(locale); | |
switch (decimalPointType) { |