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
#! /usr/local/bin/ruby | |
class OpenHash | |
def initialize elems,f = ->(ob){ return ob.hash} | |
@hashf = f | |
@val = { } | |
elems.each do |elem| | |
insert elem | |
end |
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
#! /usr/local/bin/ruby | |
# -*- coding: utf-8 -*- | |
Profile = "/.oulogin_profile" | |
require 'mechanize' | |
require 'rubygems' | |
idx = ARGV.index "-help" | |
if idx != nil |
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
let mapleader = ',' | |
syntax on | |
"行番号表示 | |
set number | |
"バックアップファイルいらない | |
set nobackup | |
"vi協調モードoff | |
set nocompatible | |
"自動インデント |
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
eval($q= "$q='eva l($q=% p.split *%p)'%[$q,'' ];$o= 0;(m=%q_efg!q !+b<b/tj{f/uj | |
nft|}j }u>b\\ j^<qsj ou)j& 3>>1@(!(+u;% r\\%p-u ^*<%p,>u!jg)j &3>>2*~<qvut< | |
foe_ ).si ze.tim es{| i|m[ i]-= 1};eval(m );p( 0,8, 14,8 ,4,6 | |
,4,7 ,4,1 2,15,5, 36,1 3,6, 13); p(1, 6,16 ,6,6 ,6,4 ,5,6 ,12, | |
13,7 ,36, 13,6 ,13 );p( 2,4, 18,4 ,8,6 ,3,4 ,8,4,4,4,11, 9,36,4,5,4,6 | |
,4,5 ,4); p(2, 4,18,4, 8,7, 2,4, 8,4,5,4,9,4,3,4 ,35,4,5,4,6 ,4,5,4);p(2 | |
,4,1 8,4, 8,4, 1,3,1, 4,8, 4,5, 4,8,4, |
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
:qa! |
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 < | |
class... Args, | |
class Result = std::array< | |
typename std::decay<typename std::common_type<Args...>::type>::type, | |
sizeof...(Args) | |
> | |
> | |
inline Result make_array(Args &&... args) | |
{ | |
return Result{{ std::forward<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 <iostream> | |
int main() | |
{ | |
char str[] = "" | |
#include "/dev/tty" | |
""; | |
std::cout << str << std::endl; |
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
require 'yahoo-japanese-analysis' | |
# use module's class methods directly | |
# configration | |
YahooJA.configure do |config| | |
config.app_key = 'your appid' | |
end | |
# "日本語形態素解析" API |
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 <vector> | |
#include <algorithm> | |
template<class T> | |
class sorter_base{ | |
public: | |
sorter_base(std::vector<T> const& values_) : values(values_){} | |
void set_values(std::vector<T> const& values_) | |
{ | |
values = values_; |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
MAX = 1000-1 | |
def f(i) | |
(1..(MAX/i)).map{|n| n*i }.inject 0,&:+ | |
end | |
# |
OlderNewer