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
/* | |
Minimalistic (length-wise) looping Java code for Project Euler problem #2 (https://projecteuler.net/problem=2). | |
Finds the sum of /even/ Fibonacci numbers which do not exceed 4 million. | |
^= operater use for variable swap in Java cannot be as compact as in C, see: | |
http://stackoverflow.com/questions/3844934/why-is-this-statement-not-working-in-java-x-y-x-y | |
@author Taimo Peelo | |
*/ | |
public class SumEvenFibo_lt_4M { | |
public static void main(String[] args) { // Output is 4613732 |
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.math.BigDecimal; | |
import java.math.RoundingMode; | |
import java.time.*; | |
import java.time.format.DateTimeFormatter; | |
import java.time.temporal.ChronoUnit; | |
import java.time.temporal.TemporalQuery; | |
import static java.time.DayOfWeek.FRIDAY; | |
import static java.time.temporal.ChronoField.DAY_OF_MONTH; |
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 javax.net.ssl.SSLSocketFactory; | |
import java.util.Set; | |
import static java.util.Arrays.stream; | |
import static java.util.stream.Collectors.toSet; | |
/** | |
* @author Taimo Peelo | |
*/ | |
public class JdkTlsCipherSuiteList { |