Functional Programmingis a model of programming that transform and compose stream of immutable sequences by applying map, filter and reduce. Events are immutable because you can't change history.Reactive Programmingis a model of programming focuses on data flow and change propagation.ReactiveXis an API that focuses on asynchronous composition and manipulation of observable streams of data or events by using a combination of the Observer pattern, Iterator pattern, and features of Functional Programming.RxJavais the open-source implementation ofReactiveXin Java.RxJavais a Java VM implementation ofReactiveX(Reactive Extensions): a library for composing asynchronous and event-based programs by using observable sequences.RxAndroidis a lightweight extension to RxJava that providers a Scheduler for Android’s Main Thread, as well as the ability to create a Scheduler that runs on any given Android Handler class.- The two main classes are
ObservableandSubscriber. - `O
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 spanner from '@google-cloud/spanner'; | |
| const spannerOptions = { | |
| min: 10, | |
| max: 100, | |
| }; | |
| // Pretend projectId is a variable with your project ID string in it | |
| // and instanceName is a variable with your db instance name in it | |
| // and databaseName is a variable with your db database name in it | |
| const db = spanner({ projectId }).instance(instanceName).database(databaseName, spannerOptions); |
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
| body { | |
| text-align: justify; | |
| } | |
| code, pre { | |
| font-family: "DejaVuSansMono", monospace; | |
| } | |
| h1, h2, h3, h4, h5, h6 { | |
| text-align: left; |
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
| var ThemeParks = require("themeparks"); | |
| var MagicKingdom = new ThemeParks.Parks.DisneylandResortMagicKingdom(); | |
| // https://api.wdpro.disney.go.com/bulk-service/snapshot/DLR-mobile-character-appearances | |
| // for reference: above URL requests these two URLs at the same time (hense the "bulk-service") | |
| // https://api.wdpro.disney.go.com/global-pool-override-B/bulk-service/snapshot/DLR-mobile-dl-character-appearances | |
| // https://api.wdpro.disney.go.com/global-pool-override-B/bulk-service/snapshot/DLR-mobile-ca-character-appearances | |
| MagicKingdom.GetAPIUrl({ |
This file has been truncated, but you can view the full file.
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
| ⤷ ant all | |
| Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=768M; support was removed in 8.0 | |
| Buildfile: /Users/Cristina/Work/Code/liferay-portal/build.xml | |
| all: | |
| clean: | |
| clean: |
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
| package vertx.proxy.issue.proxy.bottleneck; | |
| import java.util.concurrent.CountDownLatch; | |
| import java.util.concurrent.TimeUnit; | |
| import org.junit.After; | |
| import org.junit.Before; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; |
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 repo = 'vital101/kernl-example-plugin-gitub'; | |
| const token = 'my-token-from-oauth'; | |
| const cloneURL = `https://${token}:[email protected]/${repository}`; | |
| const cloneOptions = { | |
| fetchOpts: { | |
| callbacks: { | |
| certificateCheck: () => { return 1; }, | |
| credentials: () => { | |
| return NodeGit.Cred.userpassPlaintextNew(token, 'x-oauth-basic'); | |
| } |
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 java.io.File; | |
| import java.lang.reflect.Field; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Properties; | |
| import org.apache.maven.archetype.ArchetypeGenerationRequest; | |
| import org.apache.maven.archetype.ArchetypeGenerationResult; | |
| import org.apache.maven.archetype.DefaultArchetypeManager; | |
| import org.apache.maven.archetype.common.ArchetypeFilesResolver; |
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
| <?xml version="1.0"?> | |
| <project basedir="." default="generate-backend-results" name="ci" xmlns:antelope="antlib:ise.antelope.tasks"> | |
| <import file="build-test.xml" /> | |
| <target name="prepare-classpath"> | |
| <gradle-execute dir="modules/test/jenkins-results-parser" task="jar" /> | |
| <copy todir="lib/development"> | |
| <fileset dir="tools/sdk/dist" includes="com.liferay.jenkins.results.parser*.jar" /> |
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 java.io.IOException; | |
| import java.io.InputStream; | |
| import java.nio.ByteBuffer; | |
| import java.nio.channels.Channels; | |
| import java.nio.channels.ReadableByteChannel; | |
| import io.vertx.core.AsyncResult; | |
| import io.vertx.core.Context; | |
| import io.vertx.core.Future; | |
| import io.vertx.core.Handler; |
NewerOlder