Skip to content

Instantly share code, notes, and snippets.

これはテスト1ですよ
<?xml version="1.0"?>
<project name="SimpleAnt" default="compile">
<target name="compile">
<echo>compileだけど表示するだけで何もしない</echo>
</target>
<target name="test" depends="compile">
<echo>testだけど表示するだけで何もしない</echo>
</target>
</project>
@siguremon
siguremon / CalcTest.java
Created March 2, 2012 20:59
Calcクラスに対するテストクラス
package net.siguremon.sample.junit;
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class CalcTest {
@siguremon
siguremon / Calc.java
Created March 2, 2012 20:58
テスト対象のサンプルクラス
package net.siguremon.sample.junit;
public class Calc {
public int sum(int x, int y) {
return x + y;
}
}
@siguremon
siguremon / intent-filter-filetype.xml
Created February 2, 2012 14:38
特定の拡張子のファイル(*.xxx)のみに反応するintent-filter
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
<data android:scheme="file" />
<data android:host="*" />
<data android:pathPattern=".*\\.xxx" />
</intent-filter>
@siguremon
siguremon / split-str.l
Created August 27, 2011 04:38
split string function in common lisp
(defun split-str (string &optional (separator " "))
(split-str-1 string separator))
(defun split-str-1 (string &optional (separator " ") (r nil))
(let ((n (position separator string
:from-end t
:test #'(lambda (x y)
(find y x :test #'string=)))))
(if n
(split-str-1 (subseq string 0 n) separator (cons (subseq string (1+ n)) r))