I hereby claim:
- I am riggaroo on github.
- I am riggaroo (https://keybase.io/riggaroo) on keybase.
- I have a public key ASBwdwxxd9GeCz_wXXJYp-hWBxALsHCP9wZLUxYZpcx2cAo
To claim this, I am signing this object:
public class RestServiceMockUtils { | |
public static String convertStreamToString(InputStream is) throws Exception { | |
BufferedReader reader = new BufferedReader(new InputStreamReader(is)); | |
StringBuilder sb = new StringBuilder(); | |
String line = null; | |
while ((line = reader.readLine()) != null) { | |
sb.append(line).append("\n"); | |
} | |
reader.close(); |
<TextView | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:visibility="gone" | |
tools:visibility="visible" | |
tools:text="Rebecca Franks" /> |
public static BaseResponseDto parseError(Response<?> response) { | |
Converter<ResponseBody, BaseResponseDto> converter = | |
Injection.getRetrofitInstance() | |
.responseBodyConverter(BaseResponseDto.class, new Annotation[0]); | |
BaseResponseDto error; | |
try { | |
error = converter.convert(response.errorBody()); | |
} catch (IOException e) { |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Put this file in the "debug" folder so it only gets merged into debug builds --> | |
<manifest | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
package="org.bookdash.android"> | |
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/> | |
<uses-permission android:name="android.permission.WAKE_LOCK"/> | |
<!-- Disable animations on debug builds so that the animations do not interfere with Espresso |
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
import android.content.Context; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import java.util.List; | |
#parse("File Header.java") |
I hereby claim:
To claim this, I am signing this object:
private void initialiseOnlinePresence() { | |
final DatabaseReference onlineRef = databaseReference.child(".info/connected"); | |
final DatabaseReference currentUserRef = databaseReference.child("/presence/" + userId); | |
onlineRef.addValueEventListener(new ValueEventListener() { | |
@Override | |
public void onDataChange(final DataSnapshot dataSnapshot) { | |
Log.d(TAG, "DataSnapshot:" + dataSnapshot); | |
if (dataSnapshot.getValue(Boolean.class)){ | |
currentUserRef.onDisconnect().removeValue(); | |
currentUserRef.setValue(true); |
public class FriendsActivity extends AppCompatActivity { | |
private static final String TAG = "MainActivity"; | |
public static final String FEATURE_FLAG_ADD_FRIENDS = "feature_add_friends"; | |
private FirebaseRemoteConfig remoteConfig; | |
private Button buttonAddFriend; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { |
#/usr/local/bin/bash | |
# Prerequistes: You need to install imagemagick and pdfimages for this script to work | |
# Usage - ./convert_book.sh pdf_name.pdf | |
# output - zip file with images and bookdetails.json file | |
# This script assumes the normal structure of a book dash book and wont work for bigger books or books with different formatting to the standard book dash book | |
# it is always advised to check the output zipped file to ensure its correct | |
folderName=$(basename "$1") | |
folderName="${folderName%.*}" |
import android.content.Context | |
import android.graphics.Bitmap | |
import android.graphics.BitmapFactory | |
import android.graphics.ImageFormat | |
import android.graphics.Matrix | |
import android.hardware.camera2.* | |
import android.hardware.camera2.CameraAccessException.CAMERA_ERROR | |
import android.media.ImageReader | |
import android.os.Handler | |
import android.util.Log |