This file contains hidden or 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 javax.crypto.Cipher; | |
import javax.crypto.KeyGenerator; | |
import javax.crypto.SecretKey; | |
import javax.crypto.spec.GCMParameterSpec; | |
import java.util.Base64; | |
/** | |
* Possible KEY_SIZE values are 128, 192 and 256 | |
* Possible T_LEN values are 128, 120, 112, 104 and 96 | |
*/ |
This file contains hidden or 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 javax.crypto.Cipher; | |
import java.security.KeyPair; | |
import java.security.KeyPairGenerator; | |
import java.security.PrivateKey; | |
import java.security.PublicKey; | |
import java.util.Base64; | |
/** | |
* @author Anass AIT BEN EL ARBI | |
* <ul> |
This file contains hidden or 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
#!/bin/sh | |
# A shell script to resize icon images and generate the alternative drawables with the proper screen pixel densities (dip) for Android. | |
# The passed icon image would be the xxxhdpi drawable & the other drawables (xxhdpi, xhdpi, hdpi & mdpi) would be scaled down from that. | |
# How to use: | |
# ./drawablegen.sh <icon image file relative path> | |
# Example: | |
# ./drawablegen.sh my_image.png | |
# This will create all the drawable folders, if not has already, in a res folder inside the current directory (as returned by pwd). | |
# Use only with PNG images. | |
# Requires ImageMagick to be installed & added to the path environment variable. Install with: sudo apt install imagemagick |
This file contains hidden or 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.company.retrofit2.annotation; | |
import java.lang.annotation.Documented; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.Target; | |
import static java.lang.annotation.ElementType.METHOD; | |
import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
/** |
This file contains hidden or 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
if [ $# -eq 0 ]; then | |
echo "No arguments supplied" | |
else if [ -f "$1" ]; then | |
echo " Creating different dimensions (dips) of "$1" ..." | |
mkdir -p drawable-xxhdpi | |
mkdir -p drawable-xhdpi | |
mkdir -p drawable-hdpi | |
mkdir -p drawable-mdpi | |
if [ $1 = "ic_launcher.png" ]; then |
This file contains hidden or 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.app.Activity; | |
import android.app.Dialog; | |
import android.app.Fragment; | |
import android.os.Build; | |
import android.support.annotation.RequiresApi; | |
import android.view.SurfaceView; | |
import android.view.Window; | |
import android.view.WindowManager; | |
/** |
This file contains hidden or 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.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import android.text.Editable; | |
import android.text.Spannable; | |
import android.text.TextWatcher; |
This file contains hidden or 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
/** | |
* Created by milechainsaw on 7/19/16. | |
* | |
* Exponential backoff callback for Retrofit2 | |
* | |
*/ | |
public abstract class BackoffCallback<T> implements Callback<T> { | |
private static final int RETRY_COUNT = 3; | |
/** | |
* Base retry delay for exponential backoff, in Milliseconds |
This file contains hidden or 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 app.goplus.in.v2.network; | |
import retrofit2.Call; | |
import retrofit2.Callback; | |
import retrofit2.Response; | |
/** | |
* Created by pallavahooja on 16/05/16. | |
*/ | |
public class APIHelper { |
This file contains hidden or 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
study(title="Moving Average", shorttitle="MA100 5min", overlay=true) | |
out = interval > 15 ? na : isintraday ? security(ticker, "5", sma(close,100)) : na | |
plot(out, color=blue, style=circles, title="MA100 5min") |
NewerOlder