This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
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; |
<?php | |
$db_host='dbserver'; | |
$db_name='dbame'; | |
$db_user='dbuser'; | |
$db_passwd='dbpassword'; | |
mysql_connect($db_host, $db_user, $db_passwd) | |
or die('Could not connect: ' . mysql_error()); | |
mysql_select_db($db_name) or die('Could not select database'); |
- (UIImage *)compressImage:(UIImage *)image{ | |
float actualHeight = image.size.height; | |
float actualWidth = image.size.width; | |
float maxHeight = 600.0; | |
float maxWidth = 800.0; | |
float imgRatio = actualWidth/actualHeight; | |
float maxRatio = maxWidth/maxHeight; | |
float compressionQuality = 0.5;//50 percent compression | |
if (actualHeight > maxHeight || actualWidth > maxWidth) { |
// http://stackoverflow.com/questions/17535918/aes-gets-different-results-in-ios-and-java | |
- (NSData *)AES256EncryptWithKey:(NSString *)key { | |
// 'key' should be 32 bytes for AES256, will be null-padded otherwise | |
char keyPtr[kCCKeySizeAES256+1]; // room for terminator (unused) | |
bzero(keyPtr, sizeof(keyPtr)); // fill with zeroes (for padding) | |
// fetch key data | |
[key getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8StringEncoding]; | |
<?xml version="1.0" encoding="utf-8"?><!-- | |
~ Copyright (C) 2015 The Android Open Source Project | |
~ | |
~ Licensed under the Apache License, Version 2.0 (the "License"); | |
~ you may not use this file except in compliance with the License. | |
~ You may obtain a copy of the License at | |
~ | |
~ http://www.apache.org/licenses/LICENSE-2.0 | |
~ | |
~ Unless required by applicable law or agreed to in writing, software |
/** | |
* | |
*/ | |
package com.bwuit.app.activities; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.net.HttpURLConnection; | |
import java.net.URL; |
import android.graphics.Color; | |
import android.support.design.widget.TextInputLayout; | |
import android.text.Editable; | |
import android.text.Layout; | |
import android.text.SpannableStringBuilder; | |
import android.text.Spanned; | |
import android.text.TextWatcher; | |
import android.text.style.AlignmentSpan; | |
import android.text.style.ForegroundColorSpan; |
package com.firebase.client; | |
import com.firebase.client.core.Constants; | |
import rx.Observable; | |
import rx.Subscriber; | |
import rx.functions.Action0; | |
import rx.functions.Func1; | |
import rx.subscriptions.Subscriptions; | |
public class RxFirebase { |
master
branch is always production-ready, deployable, 100% green test suitegit pull
is configured to automatically rebase)