- don't criticise, condemn or complain
- give honest and sincere appreciation
- arouse in the other person an eager want
- Become genuinely interested in other people
- Smile
- Remember person's name
- Be a good listener. Encourage others to talk about themselves
package com.eutechpro; | |
import org.junit.rules.TestRule; | |
import org.junit.runner.Description; | |
import org.junit.runners.model.Statement; | |
import java.util.concurrent.TimeUnit; | |
import io.reactivex.Scheduler; |
//Application | |
public class YourApplication extends Application { | |
private static SomeComponent component; | |
} | |
public static getComponent(Bundle bundle){ | |
component = DaggerSomeComponent | |
.builder() | |
.someModule(new SomeModule(bundle)) |
package com.eutechpro.matchers; | |
import android.graphics.Typeface; | |
import android.support.annotation.ColorInt; | |
import android.view.View; | |
import android.widget.TextView; | |
import org.hamcrest.Description; | |
import org.hamcrest.Matcher; | |
import org.hamcrest.TypeSafeMatcher; |
render json:{error:'401 Unauthorized!'},status: 401 |
Enabling communication with API if server has Self-Signed Certificate |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
package rs.webnet.locmar.util; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.util.Log; | |
/** | |
* Created by kursulla on 2/10/14. | |
* <p/> |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.pm.ActivityInfo; | |
import android.content.res.Configuration; | |
/** | |
* Created by kursulla on 3/13/14. | |
*/ | |
public class AndroidUtil { | |
public static boolean isTablet(Context context) { |
//Define as Actviity properties | |
private long backPressTime; | |
private static final int DOUBLE_BACK_TIME_LIMIT = 800; | |
//Define method that will perform the "magic" | |
private void doubleBackPressTrigger() { | |
if (backPressTime + DOUBLE_BACK_TIME_LIMIT > System.currentTimeMillis()) { | |
super.onBackPressed(); | |
}else { | |
Toast.makeText(getBaseContext(), "Press \"Back\" twice to get out of the application!", Toast.LENGTH_SHORT).show(); |