元は こちら
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.Optional; | |
import java.util.List; | |
import java.util.Arrays; | |
import java.util.stream.Collectors; | |
class StreamTest | |
{ | |
public static void main(String[] 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
#-*- coding: utf-8 -*- | |
import operator | |
def make_value(value): | |
if isinstance(value, Composable): | |
return value |
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
std::string x("aaaZ"); | |
std::string& a = x + "aaaaaa"; // エラー x + "aaaaa" の結果の一時的な値は参照に束縛できない | |
std::string&& a = x + "aaaaaa"; // エラーにならない |
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
#-*- coding: utf-8 -*- | |
import random | |
rnd = random.Random() | |
def main(): | |
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__('wsgiref.simple_server').simple_server.make_server('', 8888, lambda e, s: [s('200 Ok', []), 'hello'][1]).serve_forever() |
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 threading | |
import functools | |
LOCK = threading.RLock() | |
def synchronized(f): | |
@functools.wraps(f) | |
def call(*args, **argd): |
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
#!/bin/sh | |
echo "楽しい ✌('ω'✌ )三✌('ω')✌三( ✌'ω')✌" |
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
#!/bin/sh | |
rm -rf .git | |
hg init . | |
hg add | |
hg commit -m 'git to hg' | |