Skip to content

Instantly share code, notes, and snippets.

s1rius

Block or report user

Report or block s1rius

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View press.one
{"sig":"926649ec6e5ad17d819901e4caada65320674c21bc3e405bd43415cf7f30929ac4e03cad9d3a6c7c5af8bdc6bb4f54d159fa924cf630e48defb6445166028ede1","msghash":"a3e65d9b343375d427f994e017f134538d32b36258ad7048b074c06812d53635"}
View MultiDraweeView.java
package me.s1rius.multidrawee;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
View DownsampleUtil.java
/*
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
package com.facebook.imagepipeline.producers;
View Build OpenCV&Matering on mac
1.download opencv 2.4.11 on ~/opencv-2.4.11
2.download cmake-3.5.1-Darwin-x86_64.dmg and install
3.clone https://github.com/MasteringOpenCV/code on ~/MasteringOpenCV
4.use cmake build opencv like https://www.youtube.com/watch?v=U49CVY8yOxw
5.cd MasteringOpenCV
6.mkdir build, cd build
7.export OpenCV_DIR="~/opencv-2.4.11/build"
8.cmake -D OpenCV_DIR=$OpenCV_DIR ../src
9.make install
10.done
View ProgressBarAnimation
import android.view.animation.Animation;
import android.view.animation.Transformation;
import android.widget.ProgressBar;
public class ProgressBarAnimation extends Animation {
private ProgressBar mProgressBar;
private int mTo;
private int mFrom;
private long mStepDuration;
View proguard.cfg
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
View GoogleDriverSample
package com.intel.driveapp;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import java.util.ArrayList;
View build.gradle
// Just a dummy script building a useless jar file. Waiting for version 0.3 of Android's new build system.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7+'
}
}
@s1rius
s1rius / FirstTest
Last active Aug 29, 2015
RobolectricGraldeTestRunner build.gradle
View FirstTest
package com.mypackage;
import static org.junit.Assert.assertEquals;
import org.junit.runner.RunWith;
import org.junit.Test;
import org.robolectric.RobolectricTestRunner;
import android.app.Activity;
import android.widget.TextView;
@s1rius
s1rius / build.gradle
Created Feb 6, 2014
Umeng build.gradle 友盟多渠道打包配置
View build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
apply plugin: 'android'
You can’t perform that action at this time.