Skip to content

Instantly share code, notes, and snippets.

View Younes-Charfaoui's full-sized avatar
🎨
Focusing

Younes Charfaoui Younes-Charfaoui

🎨
Focusing
View GitHub Profile
fun decode(encodedPath: String): List<LatLng> {
val len = encodedPath.length
// For speed we preallocate to an upper bound on the final length, then
// truncate the array before returning.
val path: MutableList<LatLng> = ArrayList()
var index = 0
var lat = 0
var lng = 0
while (index < len) {
name: Build and Test
on:
workflow_dispatch:
jobs:
local_test_job:
name: Running Local Tests
runs-on: ubuntu-latest
package com.mxcs.kotlin
import android.app.Activity
import android.content.Context
import android.content.pm.PackageManager
import android.os.Build
import android.os.VibrationEffect
import android.os.Vibrator
import android.util.Patterns
import android.view.View
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.ListAdapter;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.View.OnClickListener
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
alphas = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
test = (input("put the number that u want to decrypt : "))
test_num = len(str(test))
count = 0
main_word = ""
one_alphabet = ""
class AmplifyApplication : Application() {
override fun onCreate() {
super.onCreate()
try {
Amplify.configure(applicationContext)
Log.i("AmplifyApplication", "Initialized Amplify with success")
} catch (error: AmplifyException) {
Log.e("AmplifyApplication", "Error while initializing Amplify", error)
dependencies {
// the Amplify core dependency
implementation 'com.amplifyframework:core:1.4.1'
}
class MainActivity : AppCompatActivity(), SensorEventListener {
override fun onAccuracyChanged(sensor: Sensor?, accuracy: Int) {
Log.d("SENSORS", "onAccuracyChanged: $accuracy")
}
override fun onSensorChanged(event: SensorEvent) {
Log.d("SENSORS", "onSensorChanged: The values are ${Arrays.toString(event.values)}")
}
}
sensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY).also { gravitySensor ->
sensorManager.registerListener(this, gravitySensor,
SensorManager.SENSOR_DELAY_NORMAL,
SensorManager.SENSOR_DELAY_UI)
}