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
// Copyright 2012 Square, Inc. | |
package com.squareup.widgets; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; | |
/** Maintains an aspect ratio based on either width or height. Disabled by default. */ | |
public class AspectRatioImageView extends ImageView { |
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.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName(); | |
private int previousTotal = 0; // The total number of items in the dataset after the last load | |
private boolean loading = true; // True if we are still waiting for the last set of data to load. | |
private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more. | |
int firstVisibleItem, visibleItemCount, totalItemCount; |
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
<!-- saved from url=(0032)http://silmor.de/ipaddrcalc.html --> | |
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> | |
<title>IPv6 Address Calculator</title> | |
</head> | |
<body> | |
<h1>Address Calculator</h1> |
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
keytool -genkey -v -keystore {name}.keystore -alias {name} -keyalg RSA -keysize 2048 -validity 10000 |
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
/** | |
* Espresso IdlingResource for Ion | |
* https://github.com/koush/ion | |
* https://code.google.com/p/android-test-kit/ | |
* Because you can't deregister an IdlingResource, you have to create a new one per test. | |
* You need to use a unique resourceName each test. | |
*/ | |
public final class IonIdlingResource implements IdlingResource { | |
private static final String TAG = "IonIdlingResource"; |
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
static public String image2encodedString(String plate_read_key) { | |
File d = CitySyncController.getPhotoDir(); | |
File f = new File(d,plate_read_key); | |
InputStream inputStream = null; | |
try { | |
inputStream = new FileInputStream(f); | |
} catch (FileNotFoundException e) { | |
return ""; | |
} | |
byte[] bytes; |