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
// Language: Swift 4 | |
func getDayFromSqlTime(timeStamp: String) -> String { | |
let dateFormatter = DateFormatter() | |
/* | |
This format is based on what is returned from the webservice. My webservice returns "2018-12-12 20:19:22". | |
Every character has to be represented for this to work properly else Xcode would throw an error. | |
For example if your webservice returns "2018-02-21T10:10:14", then valid format would be "yyyy-MM-dd'T'HH:mm:ss", | |
if "2018-02-02 06:50:16 +0000", then format is "yyyy-MM-dd HH:mm:ss +zzzz". | |
*/ |
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 java.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class Solution { | |
static int diagonalDifference(int[][] a) { | |
// Complete this function |
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 class CardPaymentActivity extends BaseActivity { | |
@BindView(R.id.cardNumberView) | |
TextFieldBoxes cardNumberView; | |
@BindView(R.id.cardMonthView) | |
TextFieldBoxes cardMonthView; | |
@BindView(R.id.cardYearView) | |
TextFieldBoxes cardYearView; |
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
/* Copyright 2019 Google LLC. | |
SPDX-License-Identifier: Apache-2.0 */ | |
public class LiveDataTestUtil { | |
public static <T> T getOrAwaitValue(final LiveData<T> liveData) throws InterruptedException { | |
final Object[] data = new Object[1]; | |
final CountDownLatch latch = new CountDownLatch(1); | |
Observer<T> observer = new Observer<T>() { | |
@Override | |
public void onChanged(@Nullable T o) { | |
data[0] = o; |
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 androidx.compose.foundation.background | |
import androidx.compose.foundation.clickable | |
import androidx.compose.foundation.layout.Arrangement | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.Row | |
import androidx.compose.foundation.layout.Spacer | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.foundation.layout.fillMaxWidth | |
import androidx.compose.foundation.layout.height | |
import androidx.compose.foundation.layout.width |