This file contains hidden or 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
/** I will have to go with the linear solution */ | |
/*** | |
* Write a function called "reconcileHelper" that processes two arrays of integers. | |
Each array will have only distinct numbers (no repeats of the same integer in the same array), and the arrays are not sorted. | |
Your job is to find out which numbers are in array 1, but not array 2, and which numbers are in array 2, but not in array | |
* */ | |
public String reconcileHelper(int[] array1, int[] array2){ | |
//add to a hashmap so it is simpler to use |
This file contains hidden or 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
protected String uploadFileOkHttp(String requestUrl, final String fileName) { | |
final File file = new File(fileName); | |
MultipartBody.Builder builder = new MultipartBody.Builder(); | |
builder.setType(MultipartBody.FORM); | |
// using imageName because file name may be XXX.tmp, not XXX.jpg | |
builder.addFormDataPart("file", fileName, new RequestBody() { | |
@Override |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android" | |
xmlns:app = "http://schemas.android.com/apk/res-auto" | |
android:orientation = "vertical" | |
android:layout_width = "match_parent" | |
android:background="@color/background_app_color" | |
android:layout_height = "match_parent"> | |
<RelativeLayout android:layout_width = "match_parent" android:layout_height = "50dp"> | |
<ImageView android:layout_width = "24dp" android:layout_margin="13dp" | |
android:layout_height = "24dp" |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.v7.widget.CardView | |
xmlns:android = "http://schemas.android.com/apk/res/android" | |
xmlns:card_view = "http://schemas.android.com/tools" | |
xmlns:app = "http://schemas.android.com/apk/res-auto" | |
android:id = "@+id/card_view1" | |
android:layout_width = "match_parent" | |
android:layout_height = "75dp" | |
android:layout_marginBottom = "10dp" |
This file contains hidden or 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
<android.support.v7.widget.CardView | |
xmlns:card_view="http://schemas.android.com/apk/res-auto" | |
android:id="@+id/card_view" | |
android:layout_gravity="center" | |
android:layout_width="200dp" | |
android:layout_height="200dp" | |
card_view:cardCornerRadius="4dp"> | |
<TextView | |
android:id="@+id/info_text" |
This file contains hidden or 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
<android.support.design.widget.TextInputLayout | |
android:id="@+id/input_layout_password" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<EditText | |
android:id="@+id/input_password" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:hint="@string/hint_email" /> |