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
public class FizzBuzz { | |
public static void main(String[] args){ | |
for(int i : new int[] { 1 }) // define counter | |
for(int dummy : new int[100]) | |
if( ( | |
(i%15==0) ? | |
System.out.printf("FIZZBUZZ\n") == null | |
: (i%3==0) ? | |
System.out.printf("FIZZ\n") == null | |
: (i%5==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
public class EnumAnagramGen { | |
public static void main( String[] args ) { | |
for ( String str : new String[] { "いなむのみたま" }) { | |
try (java.util.stream.Stream<?> stream = java.util.stream.Stream.of().onClose( | |
() -> java.util.stream.Stream.<java.util.List<String>>of( | |
java.util.Arrays.<String>asList(str.split("")) | |
).peek( | |
e -> java.util.Collections.shuffle(e) | |
).forEach( | |
e -> e.stream().forEach(t -> java.lang.System.out.printf(t)) |
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
template < typename ...Args > | |
void func( Args ...args ); |
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
#include <tuple> | |
#include <string> | |
struct Person { | |
std::string first_name; | |
std::string last_name; | |
int age; | |
}; | |
bool operator<(const Person& x, const Person& y) |
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
bool operator<(const Person& x, const Person& y) | |
{ | |
return (x.last_name < y.last_name) || !(y.last_name < x.last_name) | |
&& ( (x.first_name < y.first_name) || !(y.first_name < x.first_name) | |
&& (x.age < y.age )); | |
} |
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
#include <tuple> | |
#include <string> | |
class Person { | |
std::string first_name_; | |
std::string last_name_; | |
int age_; | |
public: | |
Person() = default; | |
Person(const Person&) = default; |
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
#include <tuple> | |
#include <string> | |
#include <iostream> | |
#include <iomanip> | |
class Person { | |
std::string first_name_; | |
std::string last_name_; | |
int age_; | |
public: |
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
#include <tuple> | |
#include <string> | |
#include <iostream> | |
#include <iomanip> | |
class Person { | |
std::string first_name_; | |
std::string last_name_; | |
int age_; | |
public: |
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.lang.System; | |
import java.util.List; | |
import java.util.Arrays; | |
import java.util.Collections; | |
public class Generator { | |
public static void main(String[] args){ | |
String str = "いなむのみたま"; | |
List<String> array = Arrays.<String>asList(str.split("")); | |
Collections.shuffle(array); |
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
public class Generator { | |
public static void main(String[] args){ | |
String str = "いなむのみたま"; | |
java.util.List<String> array = java.util.Arrays.<String>asList(str.split("")); | |
java.util.Collections.shuffle(array); | |
array.stream().forEach(e->java.lang.System.out.printf(e)); | |
} | |
} |