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
package example; | |
/* | |
* Copyright 2014 Nakamura Masato | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.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
package main | |
import "unicode/utf8" | |
func Reverse(s string) string { | |
runes := []rune(s) | |
for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 { | |
runes[i], runes[j] = runes[j], runes[i] | |
} | |
return string(runes) |
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 scala.annotation.tailrec | |
// scomb.scala | |
object Scomb extends App { | |
private def combSort(a: Array[String]):Array[String] = { | |
@tailrec | |
def combSortTail(res: Array[String])(len: Int)( gap: Int = len) : Array[String] = { | |
val ng = 10 * gap / 13 match { | |
case 9 | 10 => 11 |
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
Definition plus n m := n + m. | |
Definition id (A: Type)(x : A) :A := x. | |
Definition prop0 : forall(A : Prop), A -> A := fun A x => x. | |
Definition prop1 : forall (A B C : Prop), (B -> C) -> (A -> B) -> (A -> C) := | |
fun A B C f g x => f (g x). | |
(* 問0. 任意の命題 A B に対して、A ならば 「A ならば B」ならば Bが成り立つ。*) | |
Definition prob0 : forall (A B : Prop) , A -> (A -> B) -> B := | |
fun A B f g => g f. |
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
FROM centos:centos6 | |
MAINTAINER Masato NAKAMURA "randomstep@gmail.com" | |
# Download Java 6 from the Oracle site and Install | |
# We are chaining all these commands to reduce the size of the image | |
# it does unfortunately make it less readable so i try to explain each step: | |
# 1. download/install wget | |
# 2. pull down the Oracle Java 6 rpm bin file using wget | |
# 3. change permissions on the download bin file to make it executable | |
# 4. extract the bin file into an rpm |
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
package me.masahito | |
class BranchTest extends org.scalatest.FunSuite { | |
val leaf1 = Leaf(new IroIroInfo(1,1)) | |
val leaf2 = Leaf(new IroIroInfo(1,2)) | |
val leaf3 = Leaf(new IroIroInfo(1,3)) | |
val leaf4 = Leaf(new IroIroInfo(1,4)) | |
val leaf5 = Leaf(new IroIroInfo(1,5)) | |
val leaf6 = Leaf(new IroIroInfo(1,6)) |
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
'hubot --create' is deprecated. Use the yeoman generator instead: | |
npm install -g yo generator-hubot | |
mkdir -p bot | |
yo hubot | |
See https://github.com/github/hubot/blob/master/docs/README.md for more details on getting started. |
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/python | |
import argparse | |
import glob | |
import os | |
import sys | |
parser = argparse.ArgumentParser() | |
parser.add_argument("mode") | |
args = parser.parse_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
// ==UserScript== | |
// @name googleMemorize | |
// @namespace http://passion.s25.xrea.com/ | |
// @description 前回検索した単語を検索テキストボックスに表示します。 | |
// @include http://www.google.co.jp/* | |
// @include http://www.google.com/* | |
// ==/UserScript== | |
(function(){ | |
/*関数定義*/ | |
// 検索単語を保存 |
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
// ==UserScript== | |
// @include http://api.wassr.jp/statuses/update.json | |
// ==/UserScript== | |
location.href='http://wassr.jp/my/' |