Skip to content

Instantly share code, notes, and snippets.

View guffyWave's full-sized avatar

Gufran Khurshid guffyWave

View GitHub Profile
@guffyWave
guffyWave / 0_reuse_code.js
Last active August 29, 2015 14:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@guffyWave
guffyWave / gist:92d18c58d45705d3287a
Created June 19, 2015 06:20
Working IplImage in JavaCV
package com.appxperts.opencvfirstapp;
import android.app.Activity;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
@guffyWave
guffyWave / Logic20June1215PM
Created June 20, 2015 06:46
Logic20June1215PM
package com.appxperts.opencvfirstapp;
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.graphics.*;
import com.squareup.picasso.Transformation;
/**
* Transforms an image into a circle representation. Such as a avatar.
*/
public class CircularTransformation implements Transformation
{
int radius = 10;
package com.twilio;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
// ActivityOptions activityOptions = ActivityOptions.makeScaleUpAnimation(v, 0, 0, v.getWidth(), v.getHeight());
// Bundle bundle = new Bundle();
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
// WhiteLabellingGalleryActivity.start(WhiteLabellingToolActivity.this, activityOptions, bundle);
// } else {
// WhiteLabellingGalleryActivity.start(WhiteLabellingToolActivity.this, null, bundle);
// }
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:recyclerview-v7:22.0.0'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
public class ShowHideToggleButton extends LinearLayout {
Context context;
public ShowHideToggleButton(final Context context) {
this(context, null);
}
public ShowHideToggleButton(Context context, AttributeSet attrs) {
this(context, attrs, 0);
For Class
/**
* <h1>Hello, World!</h1>
* The HelloWorld program implements an application that
* simply displays "Hello World!" to the standard output.
* <p>
* Giving proper comments in your program makes it more
* user friendly and it is assumed as a high quality code.
*