This file contains hidden or 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 <iostream> | |
| #include <vector> | |
| template<typename T> | |
| struct Node | |
| { | |
| T value; | |
| unsigned inf, sup; | |
| Node<T> *left, *right; | |
This file contains hidden or 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
| package info.ex_studio.dev.java;import java.util.Arrays;import java.util.Collections;import java.util.List;import java.util.stream.Stream;public class StringShuffle{public static void main(String[]args){List<Object>list=Arrays.asList("花金だーワッショーイ!テンションGAGEGAGEマック".chars().mapToObj(c->new Character((char)c).toString()).toArray());Collections.shuffle(list);System.out.println(list.stream().map(x->x.toString()).reduce(new String(""),(p,q)->p.concat(q)));}} |
This file contains hidden or 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
| #!/usr/bin/ruby | |
| module Token | |
| INCREMENT_POINTER = 0 | |
| DECREMENT_POINTER = 1 | |
| INCREMENT_VALUE = 2 | |
| DECREMENT_VALUE = 3 | |
| BYTE_INPUT = 4 | |
| BYTE_OUTPUT = 5 | |
| LOOP_BEGIN = 6 |
This file contains hidden or 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
| //package info.ex-studio.gist; | |
| import java.util.*; | |
| import java.lang.*; | |
| import java.io.*; | |
| interface Hashable<T> | |
| { | |
| T get(); | |
| void set(T value); |
This file contains hidden or 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 <bits/stdc++.h> | |
| class Resource | |
| { | |
| private: | |
| char* buffer; | |
| public: | |
| Resource() : buffer(NULL) | |
| { |
This file contains hidden or 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 | |
| # Edit it | |
| #cd path/to/llvm/build/top/dir | |
| cd ~/work/llvm+clang | |
| svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-svn | |
| svn co http://llvm.org/svn/llvm-project/cfe/trunk llvm-svn/tools/clang | |
| svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk llvm-svn/tools/clang/tools/extra | |
| svn co http://llvm.org/svn/llvm-project/lldb/trunk llvm-svn/tools/lldb |
This file contains hidden or 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 <stdio.h> | |
| #include <vector.h> | |
| void vector_debug(vector) | |
| struct vector *vector; | |
| { | |
| char delimiter = ' '; | |
| unsigned i; | |
| for(i = 0; i < vector->_size; ++i) | |
| { |
This file contains hidden or 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
| (1..100).each{|i|puts ((a=([i]*2).zip([3,5]).map{|a,b|a%b}.map{|v|v==0})&&a+=[!a.reduce(:|)]).zip(["Fizz","Buzz",i.to_s]).map{|f,s|f ?s:""}.reduce(:+)} |
This file contains hidden or 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
| ### Bind key ### | |
| # Linux | |
| if [ `uname -a | grep 'Linux' | wc -c` -ne 0 ]; then | |
| if [ -n "${TMUX}" ]; then | |
| bindkey "^[[1~" beginning-of-line | |
| bindkey "^[[4~" end-of-line | |
| else | |
| bindkey "^[[H" beginning-of-line | |
| bindkey "^[[F" end-of-line | |
| fi |
This file contains hidden or 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 string | |
| def all(pattern, argstr): | |
| if isinstance(pattern, dict): | |
| return exists(pattern, argstr) | |
| else: | |
| return reduce(lambda x, y : x and y, | |
| map(lambda x : x >= 0, | |
| map(argstr.find, filter(lambda x : isinstance(x, str), pattern)) | |
| ) + map(lambda pattern : exists(pattern, argstr), |