Skip to content

Instantly share code, notes, and snippets.

View loliGothicK's full-sized avatar
:octocat:
may the --force be with you!

Mitama loliGothicK

:octocat:
may the --force be with you!
View GitHub Profile
#include <tuple>
#include <string>
#include <iostream>
#include <iomanip>
class Person {
std::string first_name_;
std::string last_name_;
int age_;
public:
#include <tuple>
#include <string>
class Person {
std::string first_name_;
std::string last_name_;
int age_;
public:
Person() = default;
Person(const Person&) = default;
@loliGothicK
loliGothicK / EnumAnagramGen.java
Last active March 16, 2017 18:57
Java8 Stream API による、セミコロンレス「いなむのみたま」アナグラムジェネレーターです
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))
@loliGothicK
loliGothicK / Generator.java
Created March 16, 2017 19:01
セミコロンあり
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);
@loliGothicK
loliGothicK / Generator.java
Created March 16, 2017 19:05
import文削除
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));
}
}
public class Generator {
public static void main(String[] args){
for ( String str : new String[] { "いなむのみたま" }) {
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));
}
}
}
public class Generator {
public static void main(String[] args){
for ( String str : new String[] { "いなむのみたま" }) {
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))
);
public class Test {
public static <T> T do_something(java.util.function.Consumer<T> cons, T a){
cons.andThen(/*ここをモック化したい*/).accept(a);
return a;
}
}
@loliGothicK
loliGothicK / Interval.java
Last active March 24, 2017 14:35
雰囲気で書いたJava
import java.util.function.Function;
class Interval<T extends Number> implements IntervalExtended
{
private Class<? extends Number> type;
private T lower;
private T upper;
public Interval() {}
@loliGothicK
loliGothicK / decl_def.hpp
Last active April 19, 2017 21:45
宣言と定義
// 宣言
/*
[Note : 宣言は何回でも書ける
- end note]
*/
class Hoge;
class Hoge;
class Hoge;
void f();