-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# RX Java | ||
|
||
## Ref | ||
- https://www.youtube.com/watch?v=7mbjhNCWqvs&list=PLZ3FH0lcV0117kiek3g-qiQDkO4ezy_Ro |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.yen</groupId> | ||
<artifactId>RxJava</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<properties> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>11</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
|
||
<!-- | ||
rxjava | ||
https://mvnrepository.com/artifact/io.reactivex/rxjava | ||
--> | ||
<dependency> | ||
<groupId>io.reactivex</groupId> | ||
<artifactId>rxjava</artifactId> | ||
<version>1.3.8</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
</project> |
30 changes: 30 additions & 0 deletions
30
dev_projects/RxJava/RxJava/src/main/java/com/yen/Main.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.yen; | ||
|
||
import rx.Observable; | ||
|
||
public class Main { | ||
public static void main(String[] args) { | ||
|
||
System.out.println("Hello world!"); | ||
|
||
/** part 1 | ||
* | ||
* https://youtu.be/7mbjhNCWqvs?si=nuGVikk2eSXVRqUE | ||
*/ | ||
Observable<String> observable = Observable.create(emitter -> { | ||
emitter.onNext("click on 1"); | ||
emitter.onNext("click on 2"); | ||
emitter.onNext("click on 3"); | ||
}); | ||
|
||
observable.subscribe(item -> { | ||
System.out.println(item); | ||
}, throwable -> { | ||
System.out.println(throwable.getMessage()); | ||
}, () -> { | ||
System.out.println("op complete !"); | ||
}); | ||
|
||
} | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
dev_projects/be_scratch/ BeScratch/src/main/java/com/yen/dev/test1.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.yen.dev; | ||
|
||
public class test1 { | ||
public static void main(String[] args) { | ||
System.out.println(123); | ||
} | ||
} |