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
class ServerDemo { | |
public void start() throws IOException{ | |
ServerSocket ss = new ServerSocket(5678); | |
ss.bind(local); | |
while (true) { | |
Socket socket = ss.accept(); |
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 io.reactivex.rxjava3.core.Observable; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class Main { | |
public static ExecutorService pool = Executors.newFixedThreadPool(1); | |
public static Observable<Integer> createObservable() { | |
return Observable.create(sub -> { | |
pool.submit(() -> { |
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 com.google.auto.service.AutoService; | |
import com.sun.tools.javac.api.JavacTrees; | |
import com.sun.tools.javac.code.Flags; | |
import com.sun.tools.javac.processing.JavacProcessingEnvironment; | |
import com.sun.tools.javac.tree.JCTree; | |
import com.sun.tools.javac.tree.TreeMaker; | |
import com.sun.tools.javac.tree.TreeTranslator; | |
import com.sun.tools.javac.util.Context; | |
import com.sun.tools.javac.util.List; | |
import com.sun.tools.javac.util.ListBuffer; |
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.lang.annotation.*; | |
@Target(ElementType.TYPE) | |
@Retention(RetentionPolicy.SOURCE) | |
public @interface Helper { } |