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
def getVersionName = { getVersionProps()['appVersionName'] } | |
def getVersionProps() { | |
def versionPropsFile = file('gradle.properties') | |
if (!versionPropsFile.exists()) { | |
versionPropsFile.createNewFile() | |
} | |
def versionProps = new Properties() | |
versionProps.load(new FileInputStream(versionPropsFile)) | |
return versionProps |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"_id": "58acbe62d2cc022efd9f1d32", | |
"index": 0, | |
"guid": "d6fffee6-9f05-43e0-83fa-7b5f27ac7e95", | |
"isActive": true, | |
"balance": "$2,360.24", | |
"picture": "http://placehold.it/32x32", | |
"age": 34, | |
"eyeColor": "green", |
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
apply from: 'deps.gradle' | |
// ... | |
dependencies { | |
compile supportLibs | |
compile rxJavaLibs | |
compile retrofitLibs | |
compile okHttpLibs |
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
<?php | |
// API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR_SERVER_API_KEY' ); | |
$registrationIds = array("YOUR_DEVICE_TOKEN"); | |
// prep the bundle | |
$msg = array | |
( |
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 controllers; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
import java.util.Map; | |
/** | |
* Created by user on 06.04.2016. |
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 android.app.Activity; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.KeyEvent; | |
import android.view.View; | |
import com.quinny898.library.persistentsearch.SearchBox; | |
/** |
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
@Provides @CacheDir File provideCacheDir(Context context) { | |
File f = Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) | |
? context.getExternalCacheDir() | |
: context.getCacheDir(); | |
if (f != null) { | |
f.mkdirs(); | |
} | |
return f; | |
} |
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
public class NewsDetailsFragment extends Fragment { | |
private String html = "<html><body>\\u003cp\\u003e\\u0026nbsp;\\u003c/p\\u003e\\r\\n\\r\\n\\u003cp\\u003eКоманда Александра Хацкевича уступила действующим чемпионам Европы с минимальным счетом 0:1. Единственный гол испанцы забили на 45-й минуте усилиями Давида Сильвы.\\u003c/p\\u003e\\r\\n\\r\\n\\u003cp\\u003eПолузащитник \\u0026laquo;Рубина\\u0026raquo; Сергей Кисляк вышел на поле в стартовом составе и был заменен на 78-й минуте встречи.\\u003c/p\\u003e\\r\\n\\r\\n\\u003cp\\u003eТакже накануне сборная России на \\u0026laquo;Открытие Арена\\u0026raquo; в Москве с таким же счетом проиграла сборной Австрии. Футболисты \\u0026laquo;Рубина\\u0026raquo; Сергей Рыжиков, Эльмир Набиуллин и Магомед Оздоев на поле так и не появились.\\u0026nbsp;\\u003c/p\\u003e\\r\\n\\r\\n\\u003cp style=\\\"text-align:right\\\"\\u003eФото:\\u0026nbsp;\\u003ca href=\\\"http://ru.uefa.com/uefaeuro/qualifiers/season=2016/matches/round=2000446/match=2013962/postmatch/photos/index.h |
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
public class SignUpScreen extends BaseFragment{ | |
private void signUp(RegistrationInfo regInfo) { | |
startProgressAnimation(); | |
bind(api.registerWith(regInfo))) | |
.flatMap(registerResponse -> api.getToken("password", userName, password, Consts.CLIENT_ID, Consts.CLIENT_SECRET)) | |
.flatMap(token -> { | |
User.saveTokens(token); | |
return api.getProfileInfo(Consts.SELF); | |
}) |
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
public class Wrapper<T> { | |
@JsonCreator | |
public Wrapper(){} | |
protected Map<String, T> map = new HashMap<>(); | |
@JsonAnySetter public void set(String name, T t) { | |
map.put(name, t); | |
} |
NewerOlder