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
| var express = require('express'); | |
| var path = require('path'); | |
| var favicon = require('serve-favicon'); | |
| var logger = require('morgan'); | |
| var cookieParser = require('cookie-parser'); | |
| var bodyParser = require('body-parser'); | |
| var Pusher = require('pusher'); | |
| var pusher = new Pusher({ |
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 some.awesome.package; | |
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| import android.view.animation.Animation; | |
| import android.view.animation.Animation.AnimationListener; | |
| import android.view.animation.Transformation; | |
| import android.widget.RelativeLayout; |
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
| /** | |
| * Check if the application is in the foreground or background. | |
| * * | |
| * Register this callbacks for an application | |
| * Application application = (Application) context.getApplicationContext(); | |
| * application.registerActivityLifecycleCallbacks(new BaseLifeCycleCallbacks()); | |
| * * | |
| * Note: These callbacks can be registered at any level of the application lifecycle. | |
| * Previous methods to get the application lifecycle forced the lifecycle callbacks to be registered |
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
| //index.js | |
| var express = require('express'), | |
| app = module.exports = express.createServer(), | |
| mongoose = require('mongoose'); | |
| mongoose.connect('mongodb://localhost/nodeAuth'); | |
| //configure app | |
| app.configure(function() { | |
| app.set('views', __dirname + '/views'); |
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 com.android.volley.AuthFailureError; | |
| import com.android.volley.NetworkResponse; | |
| import com.android.volley.Request; | |
| import com.android.volley.Response; | |
| import com.android.volley.VolleyLog; | |
| import com.android.volley.toolbox.HttpHeaderParser; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.IOException; | |
| import java.io.UnsupportedEncodingException; |
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.os.Handler; | |
| import android.os.SystemClock; | |
| import android.view.animation.BounceInterpolator; | |
| import android.view.animation.Interpolator; | |
| import com.google.android.gms.maps.GoogleMap; | |
| import com.google.android.gms.maps.model.Marker; | |
| /** | |
| * Performs a bounce animation on a {@link Marker} when it is clicked. |
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.os.Bundle; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.AbsListView; | |
| import android.widget.ListView; | |
| import android.support.v4.app.ListFragment; | |
| import com.nineoldandroids.animation.Animator; | |
| import com.nineoldandroids.animation.ObjectAnimator; |
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.google.devrel.samples.gmstest.app; | |
| import android.app.Activity; | |
| import android.content.Intent; | |
| import android.os.AsyncTask; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| import android.view.Menu; | |
| import android.view.MenuItem; | |
| import android.view.View; |
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 com.google.gson.Gson; | |
| import com.google.gson.JsonSyntaxException; | |
| import com.android.volley.AuthFailureError; | |
| import com.android.volley.NetworkResponse; | |
| import com.android.volley.ParseError; | |
| import com.android.volley.Request; | |
| import com.android.volley.Response; | |
| import com.android.volley.Response.ErrorListener; | |
| import com.android.volley.Response.Listener; |
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.database.Cursor; | |
| import android.support.annotation.Nullable; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| public abstract class RecyclerCursorAdapter<U, V extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements OnSwipeListener { | |
| //The number of headers to be displayed by default if child classes want a header | |
| public static final int HEADER_COUNT = 1; | |
| //The number of footers to be displated by default if child classes want a footer |