Skip to content

Instantly share code, notes, and snippets.

Using RxJava and Glide to download multiple GIFs

SOURCE

This guide is for RxJava 1 and Glide v3 (3.8.0).

Have a list of URLs to GIFs, how to download them all in separated threads and proceed when all GIFs are downloaded?

private void download(final List<String> urlList) {
@Sylyac2000
Sylyac2000 / 1 basic
Created May 22, 2018 22:05 — forked from PhongHuynh93/1 basic
livedata
ARCHITECTURE COMPONENTS - I'M NOT A PURIST BUT ...
http://hannesdorfmann.com/android/arch-components-purist
DIFFERENT LIVEDATA AND OBSERABLE
LiveData seems to be a very simplified version of RxJava’s Observable. LiveData is lifecycle aware so that we as developer don’t have to unsubscribe explicitly as we have to do with RxJava’s Observable. Both implement the Observer pattern.
LiveData doesn’t provide all this fancy functional programming operators as RxJava does although architecture components provides some functional concepts via Transformations helper class such as Transformations.map() and Transformations.switchMap().
https://developer.android.com/topic/libraries/architecture/livedata.html
Unlike a regular observable, LiveData respects the lifecycle of app components, such that the Observer can specify a Lifecycle in which it should observe.
LiveData considers an Observer to be in an active state if the Observer’s Lifecycle is in STARTED or RESUMED state.
@Sylyac2000
Sylyac2000 / Install php 5.6 ubuntu 16
Created January 25, 2018 15:37 — forked from anhtuank7c/Install php 5.6 ubuntu 16
Install php 5.6 ubuntu 16
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6
you can install more php5.6 module
sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml php5.6-intl php5.6-intl php5.6-mbstring php-apcu php-uuid php5.6-cgi php5.6-cli php5.6-gd php5.6-ldap php5.6-sqlite3 php-uploadprogress
https://gist.github.com/daivq/35017a92233d3f7ce7a511f9f897ae2b
https://github.com/scrapy/scrapyd
http://scrapyd.readthedocs.io/en/stable/overview.html