- Author
draftcode
- Date
2011-11-11T13:18:07+09:00
- ID
289a0136-0c1c-11e1-a06b-040ccee352e6
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.io.StringReader | |
import scala.util.parsing.combinator._ | |
import scala.util.parsing.input._ | |
import scala.util.parsing.combinator.syntactical._ | |
import java.util.Properties | |
object JSONLikeProperties { | |
object Parser extends StandardTokenParsers { | |
lexical.delimiters ++= List("{", "}", "=") | |
//lexical.reserved ++= List("{", "}", "=") |
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 'rake' | |
# http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html | |
require 'net/http' | |
desc "this is a test" | |
task :testing_rake do | |
puts "Hello from rake!" | |
end | |
namespace :remote_file do |
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
"^ " | |
=~ ( | |
("(").("~"^"."^"^"^(""=="")."").("^" | |
^"="^(""=="").""^")").("^"^".").("=" | |
^"~"^(""=="")."").("("^(""=="^").""^ | |
"."^"^").("("^(""=="").""^"^"^")").( | |
(" ^( " | |
== " | |
") . | |
"" ^ |
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
module BinaryTreeZipper | |
type BinaryTree<'value> = | |
| Node of BinaryTree<'value> * 'value * BinaryTree<'value> // leftChild * value * rightChild | |
| LeftOnlyNode of BinaryTree<'value> * 'value | |
| RightOnlyNode of 'value * BinaryTree<'value> | |
| Leaf of string | |
type Path<'value> = | |
| Top |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<templates> | |
<template autoinsert="true" context="java-statements" deleted="false" | |
description="assertEquals - JUnit 4" enabled="true" name="ase">${:importStatic(org.junit.Assert.assertEquals)}assertEquals(${expected:var(java.lang.Object)}, | |
${actual:var(java.lang.Object)});${cursor}</template> | |
<template autoinsert="true" context="java-statements" deleted="false" | |
description="assertTrue - JUnit 4" enabled="true" name="astrue">${:importStatic(org.junit.Assert.assertTrue)}assertTrue(${actual:var(boolean)});${cursor} | |
</template> | |
<template autoinsert="true" context="java-statements" deleted="false" | |
description="assertFalse - JUnit 4" enabled="true" name="asfalse">${:importStatic(org.junit.Assert.assertFalse)}assertFalse(${expected:var(boolean)});${cursor} |
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.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class RegexpSample { | |
/** 英数字の1文字以上5文字以下 */ | |
private static final String REGEX = "[0-9a-z]{1,5}"; | |
/** | |
* 正規表現を満たすかどうかの判定メソッド |
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 | |
# Before running this script, | |
# you must install the Java and the ec2-tools, | |
# and set env of JAVA_HOME, EC2_HOME and PATH. | |
Usage(){ | |
cat <<- EOF 1>&2 | |
----------------------------------------------- | |
setting Grobal IP address on AWS Security Group |
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 org.yoshiori.logback.filter; | |
import org.slf4j.Marker; | |
import org.slf4j.MarkerFactory; | |
import ch.qos.logback.classic.spi.ILoggingEvent; | |
import ch.qos.logback.core.filter.AbstractMatcherFilter; |
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
# -*- encoding: utf-8 -*- | |
""" | |
ticket recommendation: concept proof | |
""" | |
import pa | |
tickets = """ | |
Windows環境で日本語を含むパスに対して、File.expand_path が存在しないパスを返すパターンが存在する。 | |
Please backport thread-safe autoloading patch | |
Ruby 1.9.3 fails to compile in directories with accent in their names |
OlderNewer