You need to do this if you try this command:
ssh -T [email protected]and you get something that says
[email protected]: Permission denied (public key).| import android.graphics.Bitmap | |
| import android.graphics.BitmapShader | |
| import android.graphics.RuntimeShader | |
| import android.graphics.Shader | |
| import android.os.Build | |
| import androidx.compose.animation.core.withInfiniteAnimationFrameMillis | |
| import androidx.compose.foundation.shape.RoundedCornerShape | |
| import androidx.compose.runtime.getValue | |
| import androidx.compose.runtime.produceState | |
| import androidx.compose.ui.Modifier |
| fun Fragment.showBottomSheetDialog( | |
| @LayoutRes layout: Int, | |
| @IdRes textViewToSet: Int? = null, | |
| textToSet: String? = null, | |
| fullScreen: Boolean = true, | |
| expand: Boolean = true | |
| ) { | |
| val dialog = BottomSheetDialog(context!!) | |
| dialog.setOnShowListener { | |
| val bottomSheet: FrameLayout = dialog.findViewById(com.google.android.material.R.id.design_bottom_sheet) ?: return@setOnShowListener |
You need to do this if you try this command:
ssh -T [email protected]and you get something that says
[email protected]: Permission denied (public key).| import android.view.LayoutInflater | |
| import android.view.View | |
| import android.view.ViewGroup | |
| import androidx.appcompat.app.AppCompatActivity | |
| import androidx.fragment.app.DialogFragment | |
| import androidx.fragment.app.Fragment | |
| import androidx.lifecycle.DefaultLifecycleObserver | |
| import androidx.lifecycle.Lifecycle | |
| import androidx.lifecycle.LifecycleOwner | |
| import androidx.viewbinding.ViewBinding |
| // Retrofit2/OkHttp3 CookieJar Interceptor kotlin | |
| // JaoSrikate | |
| import android.util.Log | |
| import android.webkit.CookieManager | |
| import io.reactivex.Observable | |
| import okhttp3.* | |
| import okhttp3.logging.HttpLoggingInterceptor | |
| import retrofit2.Call | |
| import retrofit2.Response |
| fun encrypt(context:Context, strToEncrypt: String): ByteArray { | |
| val plainText = strToEncrypt.toByteArray(Charsets.UTF_8) | |
| val keygen = KeyGenerator.getInstance("AES") | |
| keygen.init(256) | |
| val key = keygen.generateKey() | |
| saveSecretKey(context, key) | |
| val cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING") | |
| cipher.init(Cipher.ENCRYPT_MODE, key) | |
| val cipherText = cipher.doFinal(plainText) |
| import android.content.Context; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.graphics.Canvas; | |
| import android.graphics.Color; | |
| import android.graphics.Matrix; | |
| import android.graphics.Paint; | |
| import android.graphics.Path; | |
| import android.graphics.RectF; | |
| import android.graphics.drawable.BitmapDrawable; |
| val spanned = spannable{ bold("some") + italic(" formatted") + color(Color.RED, " text") } | |
| val nested = spannable{ bold(italic("nested ")) + url("www.google.com", "text") } | |
| val noWrapping = bold("no ") + sub("wrapping ) + sup("also ") + "works" | |
| text_view.text = spanned + nested + noWrapping |
| /** | |
| * Tracks download of a DownloadManager job and reports progress. | |
| */ | |
| internal class DownloadProgressUpdater(private val manager: DownloadManager, private val downloadId: Long, private var downloadProgressListener: DownloadProgressListener?) : Thread() { | |
| private val query: DownloadManager.Query = DownloadManager.Query() | |
| private var totalBytes: Int = 0 | |
| interface DownloadProgressListener { | |
| fun updateProgress(progress: Long) | |
| } |