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 android.content.Context; | |
import android.content.res.AssetManager; | |
import android.location.Location; | |
import android.os.Handler; | |
import android.os.HandlerThread; | |
import android.util.Log; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import com.google.gson.annotations.Expose; |
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 static void printAllIntentData(Intent intent) { | |
Bundle bundle = intent.getExtras(); | |
if (bundle != null) { | |
for (String key : bundle.keySet()) { | |
Object value = bundle.get(key); | |
Log.d(TAG, String.format("%s %s (%s)", key, | |
value.toString(), value.getClass().getName())); | |
} | |
} | |
} |
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 android.annotation.SuppressLint; | |
import android.database.Cursor; | |
import android.provider.BaseColumns; | |
import android.provider.Telephony; | |
import android.util.Log; | |
public class MessageColumns { | |
public static final int COLUMN_MSG_TYPE = 0; | |
public static final int COLUMN_ID = 1; |
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 android.annotation.SuppressLint; | |
import android.database.Cursor; | |
import android.provider.BaseColumns; | |
import android.provider.Telephony; | |
import android.util.Log; | |
public class MessageColumns { | |
public static final int COLUMN_MSG_TYPE = 0; | |
public static final int COLUMN_ID = 1; |
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 android.annotation.SuppressLint; | |
import android.database.Cursor; | |
import android.provider.BaseColumns; | |
import android.provider.Telephony; | |
import android.util.Log; | |
public class MessageColumns { | |
public static final int COLUMN_MSG_TYPE = 0; | |
public static final int COLUMN_ID = 1; |
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.IOException; | |
import br.com.agileprocess.agileroutes.BuildConfig; | |
import okhttp3.Interceptor; | |
import okhttp3.Request; | |
import okhttp3.Response; | |
public class UserAgentInterceptor implements Interceptor { | |
public UserAgentInterceptor() {} |
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 PlaygroundSupport | |
import UIKit | |
struct Pokemon { | |
let id: UInt | |
let name: String | |
} | |
class PokedexViewController: UITableViewController { | |
let pokemons: [Pokemon] = [ |
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
function dc_trace_cmd() { | |
local parent=`docker inspect -f '{{ .Parent }}' $1` 2>/dev/null | |
declare -i level=$2 | |
echo ${level}: `docker inspect -f '{{ .ContainerConfig.Cmd }}' $1 2>/dev/null` | |
level=level+1 | |
if [ "${parent}" != "" ]; then | |
echo ${level}: $parent | |
dc_trace_cmd $parent $level | |
fi | |
} |
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
from django.contrib.auth.decorators import login_required | |
from django.shortcuts import render | |
@login_required(login_url='/users/login') | |
def secure(request): | |
user = request.user | |
return render(request, 'secure.html', {'email': user.email}) | |
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 android.graphics.Bitmap; | |
import android.graphics.Bitmap.Config; | |
import android.graphics.BitmapFactory; | |
import android.graphics.BitmapFactory.Options; | |
import android.graphics.Canvas; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.graphics.Rect; | |
import android.media.ExifInterface; | |
import android.util.Base64; |
OlderNewer