This file contains hidden or 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
const subject = new Rx.Subject(); | |
/* Observers são consumidores dos valores entregues pelos Subjects (ou Observables). | |
São simplemente objetos com três callbacks, um para cada tipo de notificação | |
que pode ser entregue pelo Subject/Observable: next, error e complete.*/ | |
const observerA = { | |
next: valor => console.log(`observerA consumindo informação: ${valor}`), | |
error: err => console.log('observerA recebendo uma notificação de erro'), | |
complete: () => console.log('observerA sendo informando que o subject foi finalizado') | |
} |
This file contains hidden or 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
promise.then ( | |
successFn | |
); | |
observable.subscribe ( | |
nextFn | |
); | |
This file contains hidden or 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 org.apache.log4j.Logger | |
import org.junit.Test | |
import java.time.* | |
import java.time.format.DateTimeFormatter | |
open class ZonedDateTimeWithEpochTest { | |
@Test | |
fun dateTimesExchanges_Between_Brazil_USA_West_Epoch_should_be_the_same() { |
This file contains hidden or 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 static void getTotalHeightofListView(ListView listView) { | |
ListAdapter mAdapter = listView.getAdapter(); | |
int totalHeight = 0; | |
int listWidth = listView.getMeasuredWidth(); | |
for (int i = 0; i < mAdapter.getCount(); i++) { | |
View mView = mAdapter.getView(i, null, listView); |
NewerOlder