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
override fun sync( | |
currentAutoGratuityOnTicket: AutoGratuity?, | |
coverCount: Int, | |
enableAutoGratuity: (AutoGratuity) -> Unit, | |
disableAutoGratuity: () -> Unit, | |
) { | |
if (!currentAutoGratuityOnTicket.hasBeenManuallyToggled && | |
autoGratuityService.isAutoGratuityEnabled | |
) { | |
val autoGratuity = autoGratuityService.autoGratuity |
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
public void fitToScreen(){ | |
mSaveScale = 1; | |
float scale; | |
Drawable drawable = getDrawable(); | |
if (drawable == null || drawable.getIntrinsicWidth() == 0 | |
|| drawable.getIntrinsicHeight() == 0) | |
return; | |
int bmWidth = drawable.getIntrinsicWidth(); | |
int bmHeight = drawable.getIntrinsicHeight(); |
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
private void addPolylinesToMap(final DirectionsResult result){ | |
new Handler(Looper.getMainLooper()).post(new Runnable() { | |
@Override | |
public void run() { | |
Log.d(TAG, "run: result routes: " + result.routes.length); | |
for(DirectionsRoute route: result.routes){ | |
Log.d(TAG, "run: leg: " + route.legs[0].toString()); | |
List<com.google.maps.model.LatLng> decodedPath = PolylineEncoding.decode(route.overviewPolyline.getEncodedPath()); |
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
Column(modifier = Modifier.fillMaxSize()) { | |
var state1 by remember { mutableStateOf(_state1) } | |
var state2 by remember { mutableStateOf(_state2) } | |
LazyColumn( | |
modifier = Modifier.wrapContentSize(), | |
) { | |
items( | |
items = state1.cartRows, | |
key = { value -> |
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
/* Suppose I have the following table: */ | |
CREATE TABLE {table} ( | |
{id} STRING PRIMARY KEY, | |
{name} STRING NOT NULL COLLATE LOCALIZED, | |
{data} BLOB | |
) | |
/* | |
* Where {data} is is large object such as: | |
* class Data( |
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.app.Application | |
import dagger.hilt.android.HiltAndroidApp | |
@HiltAndroidApp | |
class MyApplication : Application(){ | |
override fun onCreate() { | |
super.onCreate() | |
} | |
} |
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
private void calculateDirections(Marker marker){ | |
Log.d(TAG, "calculateDirections: calculating directions."); | |
com.google.maps.model.LatLng destination = new com.google.maps.model.LatLng( | |
marker.getPosition().latitude, | |
marker.getPosition().longitude | |
); | |
DirectionsApiRequest directions = new DirectionsApiRequest(mGeoApiContext); | |
directions.alternatives(true); |
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
/** | |
* Update the GPS coordinate of a ClusterItem | |
* @param clusterMarker | |
*/ | |
public void setUpdateMarker(ClusterMarker clusterMarker) { | |
Marker marker = getMarker(clusterMarker); | |
if (marker != null) { | |
marker.setPosition(clusterMarker.getPosition()); | |
} | |
} |
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
[settings] | |
DEBUG=True | |
SECRET_KEY=y#bz$z0prv)@bie(@3wa@=--ana7%%k!hvo)b-3d4#0mnhh0pi6 | |
AWS_ACCESS_KEY_ID=M5YCPZP3QT36OWMMZS23 | |
AWS_SECRET_ACCESS_KEY=5Npq/S/7tX2IqBl51p3QEAMJuuGvHuFH4680Cl59M3s | |
AWS_STORAGE_BUCKET_NAME=open-api-space | |
AWS_S3_ENDPOINT_URL=https://nyc3.digitaloceanspaces.com | |
AWS_LOCATION=open-api-static |