Skip to content

Instantly share code, notes, and snippets.

View r9software's full-sized avatar
🏠
Working from home

Rodolfo Abarca r9software

🏠
Working from home
View GitHub Profile
/** 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
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
<?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"
<?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"
@r9software
r9software / cardview
Created June 27, 2017 17:36
CardView
<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"
@r9software
r9software / textView
Created June 26, 2017 22:22
Floating labels on text Inputs
<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" />