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 kotlin.math.ln | |
| import kotlin.math.pow | |
| fun convertToSuffix(x: Double): String { | |
| if (x < 1_000) return "$x" | |
| val exp = (ln(x) / ln(1_000.0)).toInt() | |
| return String.format("%.1f%c", x / 1_000.0.pow(exp), "kmgtpe".toCharArray()[exp - 1]) | |
| } |
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
| fun getBitmapFromDrawable(resId: Int): Bitmap? { | |
| val drawable = AppCompatResources.getDrawable(requireContext(), resId) ?: return null | |
| val bitmap = Bitmap.createBitmap( | |
| drawable.intrinsicWidth, | |
| drawable.intrinsicHeight, | |
| Bitmap.Config.ARGB_8888 | |
| ) | |
| val canvas = Canvas(bitmap) | |
| drawable.setBounds(0, 0, canvas.width, canvas.height) | |
| drawable.draw(canvas) |
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
| #!/bin/bash | |
| # depends on jq to parse json | |
| # https://stedolan.github.io/jq/ | |
| # | |
| # This script will query the last.fm API for | |
| # similar artists based on the currently playing track. | |
| # It will crop the current playlist, and shuffle the API results. | |
| # | |
| # You can configure 3 parameters: |
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
| diff -Naur wine-5.9/dlls/ntdll/esync.c wine-fsync/dlls/ntdll/esync.c | |
| --- wine-5.9/dlls/ntdll/esync.c 2020-08-10 01:37:43.417493835 -0600 | |
| +++ wine-fsync/dlls/ntdll/esync.c 2020-08-10 01:39:33.252766633 -0600 | |
| @@ -48,6 +48,7 @@ | |
| #include "ntdll_misc.h" | |
| #include "esync.h" | |
| +#include "fsync.h" | |
| WINE_DEFAULT_DEBUG_CHANNEL(esync); |
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
| # Copyright 2020 Gentoo Authors | |
| # Distributed under the terms of the GNU General Public License v2 | |
| EAPI=7 | |
| PYTHON_COMPAT=( python3_8 ) | |
| inherit distutils-r1 | |
| MY_PN="legendary-gl" | |
| MY_P="${MY_PN}-${PV}" |
OlderNewer