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 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) { |
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
name: Build and Test | |
on: | |
workflow_dispatch: | |
jobs: | |
local_test_job: | |
name: Running Local Tests | |
runs-on: ubuntu-latest |
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 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 |
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
#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; |
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
#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 |
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
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 = "" |
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 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) |
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
dependencies { | |
// the Amplify core dependency | |
implementation 'com.amplifyframework:core:1.4.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 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)}") | |
} | |
} |
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
sensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY).also { gravitySensor -> | |
sensorManager.registerListener(this, gravitySensor, | |
SensorManager.SENSOR_DELAY_NORMAL, | |
SensorManager.SENSOR_DELAY_UI) | |
} |
NewerOlder