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
    
  
  
    
  | workers Integer(ENV['WEB_CONCURRENCY'] || 2) | |
| threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5) | |
| threads threads_count, threads_count | |
| preload_app! | |
| rackup DefaultRackup | |
| port ENV['PORT'] || 3000 | |
| environment ENV['RACK_ENV'] || 'development' | 
  
    
      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
    
  
  
    
  | public class App { | |
| public static App instance; | |
| private static UserCacher mUserCacher; | |
| private static SharedPreferences mPrefs; | |
| private static TokenRefresher mTokenRefresher; | |
| private GoogleApiClient mGoogleApiClient; | |
| @Override | |
| public void onCreate() { | |
| super.onCreate(); | 
  
    
      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"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.someapp"> | |
| <application | |
| android:name="com.someapp.App" | |
| android:allowBackup="true" | |
| android:icon="@mipmap/ic_launcher" | |
| android:label="@string/app_name" | |
| android:supportsRtl="true" | 
  
    
      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
    
  
  
    
  | public class IntentServiceWrapperClass { | |
| private static final String LOG_TAG = SomeJavaClass.class.getSimpleName(); | |
| private SomeIntentService mSomeIntentService; | |
| public void sendOnlineStatusWithLocation(Context context) { | |
| mSomeIntentService = new Intent(ACTION_SYNC, null, context, SomeIntentService.class); | |
| context.startService(mSomeIntentService); | |
| } | |
| public void stopSendingOnlineStatusWithLocation(Context context) { | 
  
    
      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
    
  
  
    
  | package com.pik.sample.app; | |
| public class SomeLocationIntentService extends IntentService { | |
| private static final String LOG_TAG = SomeLocationIntentService.class.getSimpleName(); | |
| public SomeLocationIntentService() { | |
| super(SomeLocationIntentService.class.getName()); | |
| } | |
| @Nullable | 
  
    
      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
    
  
  
    
  | package com.toasterbits.toiletfinder; | |
| import android.Manifest; | |
| import android.content.Context; | |
| import android.content.pm.PackageManager; | |
| import android.os.Bundle; | |
| import android.support.v4.app.ActivityCompat; | |
| import android.support.v4.app.Fragment; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | 
  
    
      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
    
  
  
    
  | a = 1 | |
| b = 2 | |
| c = 3 | |
| d = 4 | |
| e = 5 | |
| # no guard clause | |
| if a > b | |
| if b > c | |
| if d > e | 
  
    
      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
    
  
  
    
  | profilePhotoUri.getRealPath(); | 
  
    
      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
    
  
  
    
  | File profileImageFile = new File(getRealPathFromURI(profilePhotoUri)); | |
| private String getRealPathFromURI(Uri contentUri) { | |
| String result; | |
| Cursor cursor = getContext().getContentResolver().query(contentUri, null, null, null, null); | |
| if (cursor == null) { | |
| result = contentUri.getPath(); | |
| } else { | |
| cursor.moveToFirst(); | |
| int indx = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA); | 
  
    
      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
    
  
  
    
  | File imageFile = new File(profilePhotoUri.getPath()); | 
NewerOlder