create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
package id.adriyadisavana; | |
import org.bouncycastle.crypto.InvalidCipherTextException; | |
import org.bouncycastle.crypto.engines.AESEngine; | |
import org.bouncycastle.crypto.modes.GCMBlockCipher; | |
import org.bouncycastle.crypto.params.AEADParameters; | |
import org.bouncycastle.crypto.params.KeyParameter; | |
import org.bouncycastle.jce.ECNamedCurveTable; | |
import org.bouncycastle.jce.interfaces.ECPrivateKey; | |
import org.bouncycastle.jce.interfaces.ECPublicKey; |
import android.hardware.camera2.CaptureRequest | |
import android.util.Range | |
import androidx.camera.camera2.interop.Camera2Interop | |
private val imageAnalysisCaptureRequestOption by lazy { | |
val builder = ImageAnalysis.Builder() | |
Camera2Interop.Extender(builder).apply { | |
setCaptureRequestOption( | |
CaptureRequest.CONTROL_AE_MODE, | |
CaptureRequest.CONTROL_AE_MODE_OFF, |
import com.google.mlkit.vision.barcode.Barcode | |
import com.google.mlkit.vision.barcode.BarcodeScannerOptions | |
import com.google.mlkit.vision.barcode.BarcodeScanning | |
import com.google.mlkit.vision.common.InputImage | |
private fun qrCodeAnalyzer(imageAnalysis: ImageAnalysis) { | |
imageAnalysis.setAnalyzer(cameraExecutor, QrCodeAnalyzer { qrCodeResult -> | |
if (processingBarcode.compareAndSet(false, true)) { | |
Log.d("qr code", qrCodeResult.orEmpty()) | |
} |
package main | |
import ( | |
"crypto/rand" | |
"fmt" | |
"math/big" | |
) | |
func main() { | |
prime, _ := new(big.Int).SetString("FFFFFFFFFFFFFFFF966afce3459018f52cfef39ddc76bd182ecb1d6c995c3fd6358cac83931ae7d03e0b47ff48fe45570c2fcbe11beac6c5e9795886b066930240295786034f7c4e7944467f7c3a0f3e98ae7adb6f89fe03c93fcb901d01ce67cb797bc337d4ba01fca91045b09234644b987e18a7a2a2ebba60ab7323a38264d6f67ba900b4ab0315d6c7e50c1d0e6da6da5945f1e6d7078f9dbf2a240a90cecc0861c0c8691bb133fee74a8c90d2ca2366ad72cf252b7fda7de0b8d869072cf3d3ad34d46d04f4fcc84b2fb9e1219678b8afc96e7678218ff50c20529edfa416e51a580d140e2bb4807b4112daad6d093e26736126376257532d6239c7a464a8bd754fe7170572bb4fa8a682975e8dabccc7bb5c5e5223a39c09d3c88bb2b5c0622bb60f4d3ea9000a8f42339cb4ac2cfbb8ae8b33aeeebe07c0f1ccc3e6fa072cf280b5423194da1b55b2f1d9240234ea5f4d1dfe879ecf5f5f53b7f8916db03be16132afcd73661813160e865e8c3f6fcd1f35e048aeFFFFFFFFFFFFFFFF", 16) |
# Fetch changes from all remotes and locally delete | |
# remote deleted branches/tags etc | |
# --prune will do the job :-; | |
git fetch --all --prune | |
cd repo2 | |
git checkout master | |
git remote add r1remote **url-of-repo1** | |
git fetch r1remote |
import android.arch.lifecycle.LiveData | |
import android.arch.lifecycle.MediatorLiveData | |
import android.arch.lifecycle.MutableLiveData | |
fun <X, Y> LiveData<X>.map(func: (X?) -> Y?): MutableLiveData<Y?> { | |
return MediatorLiveData<Y>().apply { | |
addSource(this@map) { x -> value = func(x) } | |
} | |
} |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:roundIcon="@mipmap/ic_launcher_round" | |
android:supportsRtl="true" | |
android:theme="@style/AppTheme" | |
android:networkSecurityConfig="@xml/network_security_config"> |
/** | |
* Checks if the device is rooted. | |
* | |
* @return <code>true</code> if the device is rooted, <code>false</code> otherwise. | |
*/ | |
public static boolean isRooted() { | |
// get from build info | |
String buildTags = android.os.Build.TAGS; | |
if (buildTags != null && buildTags.contains("test-keys")) { |