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
package functional | |
sealed class Either<L, R> { | |
abstract fun fold(left: (L) -> Unit, right: (R) -> Unit) | |
abstract fun <ML> mapLeft(f: (L) -> ML): Either<ML, R> | |
abstract fun <MR> mapRight(f: (R) -> MR): Either<L, MR> |
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 kotlin.math.min | |
fun levenshtein(lhs : CharSequence, rhs : CharSequence) : Int { | |
if(lhs == rhs) { return 0 } | |
if(lhs.isEmpty()) { return rhs.length } | |
if(rhs.isEmpty()) { return lhs.length } | |
val lhsLength = lhs.length + 1 | |
val rhsLength = rhs.length + 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
class BAT extends StatelessWidget { | |
final double fontSize; | |
const BAT({ | |
super.key, | |
required this.fontSize, | |
}); | |
@override | |
Widget build(BuildContext context) { |
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 bash | |
filename=$(basename -- "$1") | |
filename="${filename%.*}" | |
ffmpeg -i $1 -vcodec libx265 -crf 30 ${filename}-min.mp4 |
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
ffmpeg -i input.xyz -vcodec libx265 -crf 30 output.mp4 |
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
:- use_module(library(bounds)). | |
:- use_module(library(clp_distinct)). | |
suudoku(P) :- | |
Rows = [R1,R2,R3,R4,R5,R6,R7,R8,R9], | |
problem(P, Rows), | |
append_all(Rows, Vars), | |
vars_in(Vars, 1, 9), | |
Vars in 1..9, | |
row_constraint(Rows), |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |
<!-- region hardware --> | |
<!-- Audio --> | |
<uses-feature | |
android:name="android.hardware.audio.low_latency" | |
android:required="false" /> | |
<uses-feature | |
android:name="android.hardware.audio.output" |
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
FROM docker.io/library/ubuntu:22.10 | |
# distrobox stuff | |
RUN export DEBIAN_FRONTEND=noninteractive; \ | |
apt-get update; \ | |
apt upgrade -y; \ | |
apt-get install -y \ | |
bash \ | |
apt-utils \ | |
bc \ |
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
diff --git a/android/app/src/main/java/com/breez/client/plugins/breez/breezlib/GoogleAuthenticator.java b/android/app/src/main/java/com/breez/client/plugins/breez/breezlib/GoogleAuthenticator.java | |
index 52319507..0b05f5b8 100644 | |
--- a/android/app/src/main/java/com/breez/client/plugins/breez/breezlib/GoogleAuthenticator.java | |
+++ b/android/app/src/main/java/com/breez/client/plugins/breez/breezlib/GoogleAuthenticator.java | |
@@ -90,22 +90,8 @@ public class GoogleAuthenticator implements PluginRegistry.ActivityResultListene | |
} catch (Exception e) { | |
Log.w(TAG, "getAccessToken failed", e); | |
if (e instanceof UserRecoverableAuthException) { | |
- Log.w(TAG, "getAccessToken failed but it is recoverable, trying to sign in again"); | |
- GoogleSignInAccount signInResult = Tasks.await(signIn()); |
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.content.res.Resources; | |
import android.graphics.drawable.Drawable; | |
import android.text.Spannable; | |
import android.text.SpannableStringBuilder; | |
import android.text.style.ImageSpan; | |
import android.view.View; | |
import android.widget.ImageView; | |
import android.widget.LinearLayout; | |
import android.widget.SearchView; | |
import android.widget.TextView; |
NewerOlder