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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
BOX = "centos-65-x64-virtualbox-nocm.box" | |
# Multi-node setup | |
# Make sure to run this: | |
# vagrant plugin install vagrant-hostmanager |
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 com.android.volley.toolbox.HurlStack; | |
import com.squareup.okhttp.OkHttpClient; | |
import java.io.IOException; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
/** | |
* An {@link com.android.volley.toolbox.HttpStack HttpStack} implementation which | |
* uses OkHttp as its transport. | |
*/ |
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 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 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
require "sinatra/base" | |
require "sinatra/namespace" | |
require "multi_json" | |
require "api/authentication" | |
require "api/error_handling" | |
require "api/pagination" | |
module Api | |
class Base < ::Sinatra::Base |
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.squareup.example; | |
public abstract BaseActivity extends SherlockActivity { | |
private final ScopedBus scopedBus = new ScopedBus(); | |
protected ScopedBus getBus() { | |
return scopedBus; | |
} | |
@Override public void onPause() { |
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 com.trolltech.qt.core.QModelIndex; | |
import com.trolltech.qt.gui.*; | |
public class RecursiveSortFilterProxyModel extends QSortFilterProxyModel { | |
protected boolean filterAcceptsRow(int row, QModelIndex parent) { | |
if(super.filterAcceptsRow(row, parent)) { | |
return true; | |
} | |
QStandardItemModel model = (QStandardItemModel)sourceModel(); |