Skip to content

Instantly share code, notes, and snippets.

unserializable /
Created June 1, 2017 07:20
Sum even Fibonacci numbers not exceeding 4 million (Project Euler Problem #2)
Minimalistic (length-wise) looping Java code for Project Euler 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:
@author Taimo Peelo
public class SumEvenFibo_lt_4M {
public static void main(String[] args) { // Output is 4613732
unserializable /
Created January 13, 2017 15:54
Temporal play, with Friday the 13th example.
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;
unserializable /
Last active January 9, 2017 22:33
Lists the enabled / available ciphersuites from the running JDK
import java.util.Set;
import static;
import static;
* @author Taimo Peelo
public class JdkTlsCipherSuiteList {