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
@Beta | |
private class HeaderDecor extends RecyclerView.ItemDecoration { | |
private RecyclerView.AdapterDataObserver adapterDataObserver; | |
private RecyclerView.ViewHolder headerViewHolder; | |
private int headerViewType; | |
private final Rect tmpBounds = new Rect(); | |
@Override public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state) { | |
if (headerViewHolder == null) { | |
headerViewHolder = obtainViewHolder(parent); |
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
# coding: utf8 | |
import re, json, bs4, requests, argparse, os, optparse | |
from urlparse import parse_qs, urlsplit, urlparse | |
ALL = -100 | |
KEY_EPISODE_NUMBER = "episode" | |
KEY_EPISODE_SEASON = "season" | |
KEY_EPISODE_FILE = "file" |
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
#ifndef __JniWrapper_h__ | |
#define __JniWrapper_h__ | |
#include <jni.h> | |
#include <string> | |
#include <exception> | |
//#include <boost/noncopyable.hpp> | |
namespace Android |
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
package spoon.test; | |
import spoon.reflect.declaration.*; | |
import java.util.ArrayList; | |
import java.util.IntSummaryStatistics; | |
import java.util.TreeSet; | |
import java.util.function.Consumer; | |
import java.util.function.ToIntFunction; |
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
package codetail.project.watchme.common.drawables; | |
import android.annotation.TargetApi; | |
import android.content.res.Resources; | |
import android.content.res.TypedArray; | |
import android.content.res.XmlResourceParser; | |
import android.graphics.BitmapFactory; | |
import android.graphics.drawable.ColorDrawable; | |
import android.graphics.drawable.Drawable; | |
import android.os.Build; |
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 String humanReadableByteCount(long bytes, boolean si) { | |
int unit = si ? 1000 : 1024; | |
if (bytes < unit) return bytes + " B"; | |
int exp = (int) (Math.log(bytes) / Math.log(unit)); | |
String pre = (si ? "kMGTPE" : "KMGTPE").charAt(exp-1) + (si ? "" : "i"); | |
return String.format("%.1f %sB", bytes / Math.pow(unit, exp), pre); | |
} |
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
package uz.uza.news.utils; | |
import android.content.Context; | |
import android.content.res.Configuration; | |
import android.content.res.Resources; | |
import android.os.Build; | |
import java.util.Locale; | |
public final class LocaleUtils { |
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
//usage in modules just add | |
dependencies { | |
addSquareUpArtifacts ":app", 'retrofit', '1.9.0', 'okhttp', '2.3.0' | |
} |
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
package com.pixite.fragment.widget; | |
import android.content.res.Resources; | |
import android.graphics.Canvas; | |
import android.graphics.ColorFilter; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.drawable.Drawable.Callback; | |
import android.view.Gravity; |
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.Color; | |
import android.os.Bundle; | |
import android.support.annotation.Nullable; | |
import android.support.v4.app.Fragment; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.view.ViewTreeObserver; | |
import android.view.animation.AccelerateInterpolator; |