Due to a bug in the packaging of Android OS "L", dependencies which reference Okio need to be repackaged.
For more information see square/okhttp#967
Usage
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014 Victor Robertson | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
#The main method, it takes a string that is an English word and returns that word in Pig Latin. | |
#All words have "ay" appended to them in the line just before the return statement. If the word | |
#begins with a vowel, it is sent to the << "ay" line unmodified. | |
#If it is exactly three letters long, the second two characters of english_word are made the first | |
#two of pig_latin_word, then the first letter of english_word is made the third character of | |
#pig_latin_word. Then the word is ready to get the << "ay" treatment. | |
def translate(english_word) | |
if is_vowel?(english_word[0]) | |
pig_latin_word = english_word |
// your code | |
apply from: "build-plugins/idea-gradle-sources.gradle" |
/** | |
* @project | |
* @author chris.jenkins | |
* @created Dec 28, 2011 | |
*/ | |
package com.application.android.ui.fragments; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.support.v4.app.FragmentStatePagerAdapter; |
/* | |
* SpaceEngineers Scripting Helper | |
* | |
* start with script filename as argument | |
* | |
* possible instructions: | |
* | |
* /**Begin copy here** | |
* /**End copy here** | |
* |
Due to a bug in the packaging of Android OS "L", dependencies which reference Okio need to be repackaged.
For more information see square/okhttp#967
Usage
private ObservableManager obsManager = new ObservableManager(EventBus.getDefault()); | |
@Override | |
public Subscription getStores() { | |
// Get the observable if exists and is not too old | |
Observable<StoresList> observable = obsManager.get(ObservableManager.Types.STORES); | |
if (observable == null) { | |
// If is null create it and us cache to keep it in memeroy | |
observable = api.getStoresList() | |
.compose(applySchedulers(api.getStoresList())) |
/** | |
* An example of adding these transitions to a Fragment. This simple | |
* version just applies opposite transitions to any Fragment whether it is | |
* entering or exiting view. You can also inspect the transit mode parameter | |
* (i.e. TRANSIT_FRAGMENT_OPEN, TRANSIT_FRAGMENT_CLOSE) in combination to do | |
* different animations for, say, adding a fragment versus popping the back stack. | |
* | |
* Transactions without an explicit transit mode set, in this example, will not | |
* animate. Allowing the initial fragment add, for example, to simply appear. | |
*/ |
Handler handler = new Handler(Looper.getMainLooper()); | |
final DisplayManager displayManager = (DisplayManager) getSystemService(Context.DISPLAY_SERVICE); | |
displayManager.registerDisplayListener(new DisplayManager.DisplayListener() { | |
@Override | |
public void onDisplayAdded(int displayId) { | |
} | |
@Override |
import java.io.UnsupportedEncodingException; | |
import java.util.Map; | |
import org.simpleframework.xml.Serializer; | |
import org.simpleframework.xml.core.Persister; | |
import com.android.volley.AuthFailureError; | |
import com.android.volley.NetworkResponse; | |
import com.android.volley.ParseError; | |
import com.android.volley.Request; |