sudo apt-get install python3-pip
sudo pip3 install virtualenv
val <T> LiveData<T>.blockingValue: T? | |
get() { | |
var value: T? = null | |
val latch = CountDownLatch(1) | |
observeForever { | |
value = it | |
latch.countDown() | |
} | |
if (latch.await(2, TimeUnit.SECONDS)) return value | |
else throw Exception("LiveData value was not set within 2 seconds") |
# This script was originally written during for a summer course that I | |
# gave at FGV in January 2011. The script was used to show the | |
# students how to retrive data from Banco Central do Brasil | |
# (http://bcb.gov.br/?SERIETEMP) using SOAP protocol and R. | |
library(SSOAP) | |
library(XML) | |
library(RCurl) | |
wsdl <- getURL("https://www3.bcb.gov.br/sgspub/JSP/sgsgeral/FachadaWSSGS.wsdl", |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.