If you are annoyed that "Sources for Android 26" are not yet available via SDK manager, this might be for you:
- Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base
@Composable | |
private fun Calendar( | |
modifier: Modifier = Modifier, | |
date: LocalDate | |
) { | |
val firstDate = with(date) { | |
val firstOfMonth = withDayOfMonth(1) | |
val firstDayOfFirstWeek = firstOfMonth.dayOfWeek.value | |
firstOfMonth.minusDays(firstDayOfFirstWeek.toLong()) | |
} |
fun Modifier.horizontalFadingEdge( | |
scrollState: ScrollState, | |
length: Dp, | |
edgeColor: Color? = null, | |
) = composed( | |
debugInspectorInfo { | |
name = "length" | |
value = length | |
} | |
) { |
/* Changes the readable line length in Obsidian Notes. Tested in Obsidian v0.15.9 | |
See also: https://forum.obsidian.md/t/adjustable-readable-line-length/7564/6 | |
Note: For this the "readable line length" property in settings has to be enabled | |
(as expected). 700px width is the application's default, adjust all numbers below. | |
Pixel (or percentage) as a unit enables a width independent from the number of characters | |
(good when adjusting zoom level / font size). For fixed amount of characters use rem */ | |
:root { |
val world = "World" | |
val spannedText = SpannableString("Hello $world!") | |
spannedText | |
.spanWith(world) { | |
what = BackgroundColorSpan(Color.RED) | |
flags = Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | |
} | |
.spanWith(world) { | |
what = StyleSpan(Typeface.BOLD) | |
flags = Spanned.SPAN_EXCLUSIVE_EXCLUSIVE |
@RunWith(Parameterized::class) | |
class KotlinTest(val paramOne: Int, val paramTwo: String) { | |
companion object { | |
@JvmStatic | |
@Parameterized.Parameters | |
fun data() : Collection<Array<Any>> { | |
return listOf( | |
arrayOf(1, "I"), // First test: (paramOne = 1, paramTwo = "I") | |
arrayOf(1999, "MCMXCIX") // Second test: (paramOne = 1999, paramTwo = "MCMXCIX") |
__author__ = 'schwa' | |
import os | |
import subprocess | |
import glob | |
from github import Github # pip install PyGithub | |
from bitbucket.bitbucket import Bitbucket # pip install --user bitbucket-api | |
GH_USERNAME = '[email protected]' | |
GH_PASSWORD = '1234' |
If you are annoyed that "Sources for Android 26" are not yet available via SDK manager, this might be for you:
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base