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
import retrofit2.Call; | |
import retrofit2.Response; | |
import retrofit2.Retrofit; | |
import retrofit2.converter.gson.GsonConverterFactory; | |
public class RetrofitExample { | |
public static void main(String[] args) throws IOException { | |
Retrofit retrofit = new Retrofit.Builder() |
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
import java.io.IOException; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
public class HttpClient { | |
public int getHttResponseCode(String url) throws RuntimeException { | |
HttpURLConnection connection = null; | |
try { | |
URL u = new URL(url); |
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
import java.io.IOException; | |
import java.net.HttpURLConnection; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.util.Date; | |
public class StatusChecker { | |
public WebsiteStatus getStatus(String url) { | |
WebsiteStatus websiteStatus = new WebsiteStatus(); |
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
import java.util.List; | |
public class OrderService { | |
void print(List<Order> list, String n) { | |
double outstanding = 0.0; | |
System.out.println("*****************************"); | |
System.out.println("****** Customer Outstanding Total ******"); | |
System.out.println("*****************************"); |
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
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import static adventofcode.Utils.toInt; | |
import static strman.Strman.repeat; | |
public class Problem09 { | |
public static void main(String[] args) throws Exception { | |
String input = Files.readAllLines(Paths.get("src", "test", "resources", "problem09.txt")).get(0); |
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
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Objects; | |
import static adventofcode.Utils.toInt; | |
import static java.util.stream.Collectors.joining; |
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
package playground | |
import akka.actor.{Actor, ActorLogging, ActorRef, Props} | |
import playground.Parent.{BulkTasks, Finish, TaskCompleted, TaskFailed} | |
import scala.util.{Failure, Success, Try} | |
trait Task { | |
val id: String |
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
import java.util.stream.IntStream; | |
/** | |
* Given a String "abcdef" the program should print | |
* a | |
* ab | |
* abc | |
* abcd | |
* abcde | |
* abcdef |
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
<rule name="yakCiRule" scope="deployed"> | |
<conditions> | |
<type>udm.BaseDeployed</type> | |
<operation>CREATE</operation> | |
</conditions> | |
<steps> | |
<complex-step> | |
<ci> | |
<rules-test.Yak id="Infrastructure/tmp/yak007"> | |
</rules-test.Yak> |
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
<rule name="yakCiRule" scope="deployed"> | |
<conditions> | |
<type>udm.BaseDeployed</type> | |
<operation>CREATE</operation> | |
</conditions> | |
<steps> | |
<complex-step> | |
<ci> | |
<rules-test.Yak id="Infrastructure/tmp/yak007"> | |
</rules-test.Yak> |
NewerOlder