See the new site: https://postgresisenough.dev
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 androidx.compose.ui.draw.drawWithCache | |
| import androidx.compose.ui.geometry.CornerRadius | |
| import androidx.compose.ui.geometry.Offset | |
| import androidx.compose.ui.geometry.Rect | |
| import androidx.compose.ui.geometry.Size | |
| import androidx.compose.ui.graphics.BlendMode | |
| import androidx.compose.ui.graphics.Brush | |
| import androidx.compose.ui.graphics.Color | |
| import androidx.compose.ui.graphics.ColorFilter | |
| import androidx.compose.ui.graphics.ImageBitmap |
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 androidx.compose.foundation.layout.Box | |
| import androidx.compose.runtime.Composable | |
| import androidx.compose.ui.Modifier | |
| import androidx.compose.ui.draw.drawWithContent | |
| import androidx.compose.ui.geometry.Offset | |
| import androidx.compose.ui.graphics.BlendMode | |
| import androidx.compose.ui.graphics.Color | |
| import androidx.compose.ui.graphics.nativeCanvas | |
| @Composable |
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
| // This prints the dependencies of each task in the current execution graph | |
| gradle.taskGraph.whenReady( | |
| closureOf<TaskExecutionGraph> { | |
| println("About to run ${allTasks.size} tasks: (use `-i` to see why tasks are skipped, use `--rerun-tasks` to prevent UP-TO-DATE checks)") | |
| allTasks.forEachIndexed { i, task -> | |
| val dependenciesString = | |
| if (task.dependsOn.isEmpty()) { | |
| "" | |
| } else { | |
| task.dependsOn.joinToString(", ", " (depends on ", ")") { dependency -> |
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
| lane :test do | options | | |
| apk_downloader(json_key: "./xxx@xxx.iam.gserviceaccount.com.json", package_name: "m.zhgchg.li", version_code:1000, export_file_path: "./zhgchgli.apk") | |
| end |
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
| suspend fun <ReturnT> Mutex.checkedWithLock( | |
| block: suspend () -> ReturnT | |
| ): ReturnT { | |
| val element = LockedMutexesElement(this).key | |
| check (currentCoroutineContext()[element] == null) { | |
| "Reentered Mutex" | |
| } | |
| return withContext(element) { withLock { block() } } | |
| } |
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
| @Composable | |
| fun ParallaxScreen(modifier: Modifier = Modifier) { | |
| val context = LocalContext.current | |
| val scope = rememberCoroutineScope() | |
| var data by remember { mutableStateOf<SensorData?>(null) } | |
| DisposableEffect(Unit) { | |
| val dataManager = SensorDataManager(context) | |
| dataManager.init() |
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
| @file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") | |
| // Tooltip implementation for AndroidX Jetpack Compose | |
| // See usage example in the next file | |
| // Tested with Compose version **1.1.0-alpha06** | |
| // Based on material DropdownMenu implementation. | |
| import androidx.compose.animation.core.MutableTransitionState | |
| import androidx.compose.animation.core.animateFloat |
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 androidx.compose.foundation.layout.BoxWithConstraints | |
| import androidx.compose.foundation.layout.BoxWithConstraintsScope | |
| import androidx.compose.foundation.text.InlineTextContent | |
| import androidx.compose.foundation.text.InternalFoundationTextApi | |
| import androidx.compose.foundation.text.TextDelegate | |
| import androidx.compose.material.LocalTextStyle | |
| import androidx.compose.material.Text | |
| import androidx.compose.runtime.Composable | |
| import androidx.compose.ui.Alignment | |
| import androidx.compose.ui.Modifier |
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 androidx.compose.ui.Modifier | |
| import androidx.compose.ui.composed | |
| import androidx.compose.ui.draw.drawBehind | |
| import androidx.compose.ui.graphics.Color | |
| import androidx.compose.ui.graphics.Paint | |
| import androidx.compose.ui.graphics.drawscope.drawIntoCanvas | |
| import androidx.compose.ui.graphics.toArgb | |
| import androidx.compose.ui.unit.Dp | |
| import androidx.compose.ui.unit.dp |