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
| this.firstService.getFirstResults(filterOption).pipe( | |
| mergeMap(firstResult => this.secondService.getSecondResults(firstResult)), | |
| mergeMap(secondResult => this.thirdService.getThirdResults(secondResult)) | |
| ).subscribe( | |
| thirdResult => this.processResult(thirdResult, filterOption), | |
| null, | |
| () => console.log("COMPLETE") | |
| ); |
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 main(String[] args) { | |
| //variables | |
| int id; | |
| String data1, data1, data3, data4; | |
| //Array | |
| String dataArray[][] = new String[20][3]; | |
| Scanner sc = new Scanner(System.in); |
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.gson.JsonArray; | |
| import com.google.gson.JsonElement; | |
| import com.google.gson.JsonObject; | |
| import com.google.gson.JsonParser; | |
| public class A { | |
| public static void main(String[] args) { | |
| String jsonString = "{\n" + | |
| " \"coord\": {\n" + | |
| " \"lon\": -96.8,\n" + |
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 static org.junit.Assert.assertEquals; | |
| import static org.mockito.ArgumentMatchers.anyList; | |
| import static org.mockito.Mockito.mock; | |
| import static org.mockito.Mockito.when; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.Collections; | |
| import java.util.List; |
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 com; | |
| import java.awt.*; | |
| import java.awt.event.KeyAdapter; | |
| import java.awt.event.KeyEvent; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
| import javax.swing.*; | |
| import javax.swing.event.DocumentEvent; | |
| import javax.swing.event.DocumentListener; |
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 com.bar.grrr; | |
| import java.io.IOException; | |
| import com.fasterxml.jackson.annotation.JsonProperty; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| public class ABC { | |
| @JsonProperty("class") |
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 class Regex { | |
| public static void main(String[] args) { | |
| String pattern = "^(if|while)[(][a-z](\\|{2}+|&{2})[a-z]+[)][{]"; | |
| String s = "if(a||b){"; | |
| System.out.println("s.matches(pattern) = " + s.matches(pattern)); // prints true | |
| } | |
| } |
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
| interface EntityVisitor<T> { | |
| T visitGood(Good good); | |
| T visitBad(Bad bad); | |
| } | |
| class Good { | |
| <T> T accept(EntityVisitor<T> visitor) { | |
| return visitor.visitGood(this); | |
| } | |
| } |
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
| interface GenericPair<L, R> { | |
| readonly L leftElement; | |
| readonly R rightElement; | |
| } |
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.util.Collections; | |
| import java.util.LinkedList; | |
| import java.util.List; | |
| import java.util.Objects; | |
| public class Repro { | |
| public static void main(String[] args) { | |
| Holder someHolder = new Holder(); | |
| List<C> Cs = new LinkedList<>(); |