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
import java.util.*; | |
import java.io.*; | |
import java.security.*; | |
public class ChangePassword | |
{ | |
private final static JKS j = new JKS(); | |
public static void main(String[] args) throws Exception | |
{ |
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
import androidx.compose.animation.core.Animatable | |
import androidx.compose.animation.core.Spring | |
import androidx.compose.animation.core.animateFloatAsState | |
import androidx.compose.animation.core.spring | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.gestures.detectDragGestures | |
import androidx.compose.foundation.layout.aspectRatio | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.foundation.layout.wrapContentSize | |
import androidx.compose.integration.demos.BlockFilter.Companion.Lighting |
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
#!/bin/bash | |
# Tells an Android emulator to take a snapshot of itself and then | |
# delete that snapshot immediately. The act of taking a snapshot | |
# forces the emulator to temporarily pause and trigger unexpected | |
# system behaviors. When it happens during a test run, it can | |
# trigger certain hard-to-reproduce flakes. | |
SNAPSHOT=__TEMPORARY_SNAPSHOT | |
AUTH="$(cat ~/.emulator_console_auth_token)" | |
PORT=$1 |
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
fun Modifier.saturate(saturation: Float): Modifier = | |
drawWithCache { | |
// Cache the paint object so it can be reused between draw calls. | |
val contentPaint = Paint().apply { | |
colorFilter = ColorFilter.saturate(saturation) | |
} | |
onDrawWithContent { | |
drawIntoCanvas { | |
it.saveLayer(Rect(Offset.Zero, size), contentPaint) |
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
import android.annotation.SuppressLint | |
import androidx.compose.animation.core.animateDpAsState | |
import androidx.compose.animation.core.animateFloatAsState | |
import androidx.compose.foundation.Canvas | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.gestures.awaitFirstDown | |
import androidx.compose.foundation.gestures.forEachGesture | |
import androidx.compose.foundation.gestures.horizontalDrag | |
import androidx.compose.foundation.layout.Arrangement.spacedBy | |
import androidx.compose.foundation.layout.Box |
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
@Preview(showBackground = true, showSystemUi = true) | |
@Composable | |
fun App() { | |
Column { | |
MarxistRow { | |
Text("Left Text", Modifier.background(Color.Red)) | |
Text("Right Text", Modifier.background(Color.Blue)) | |
} | |
MarxistRow { |
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/local/bin/go run $0 "$@"; exit | |
/* | |
Terminal program that plays a sine wave. | |
The pitch and volume can be controlled (help is shown in the UI). | |
Installation: | |
go get github.com/gizak/termui |
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
import android.util.Log | |
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.currentComposer | |
import androidx.compose.runtime.remember | |
import androidx.compose.ui.unit.IntBounds | |
import androidx.ui.tooling.CallGroup | |
import androidx.ui.tooling.Group | |
import androidx.ui.tooling.NodeGroup | |
import androidx.ui.tooling.asTree |
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
@Composable fun App() { | |
DebugBounds { | |
Column(Modifier.background(Color.White).fillMaxSize()) { | |
BasicText("Some text") | |
Spacer(Modifier.size(10.dp)) | |
BasicText("More text") | |
Spacer(Modifier.size(5.dp)) | |
BasicText("Button", Modifier | |
.clickable { } | |
.background(Color.Blue, RoundedCornerShape(3.dp)) |
NewerOlder