任意のディレクトリにダウンロードして、以下のコマンドを実行する。
./git-branch-log.sh <merge_commit>
print("hello, world!") |
data = {2, 32, 12, 0, 493, 4, 5, 32} | |
for i = 1, #data do | |
for j = i + 1, #data do | |
if data[i] >= data[j] then | |
tmp = data[i] | |
data[i] = data[j] | |
data[j] = tmp | |
end | |
end | |
end |
#!/bin/sh | |
echo $1 | openssl dgst -sha1 |
<?php | |
function setUp() | |
{ | |
$this->manager = $this->backend->getManager($this->manager_name); | |
// DBをモックに差し替え | |
require_once 'Ethna/test/DB/Ethna_DB_PDO_Test.php'; | |
$db = $this->manager->db; | |
$this->manager->db = new Ethna_DB_PDO_Mock($this->ctl, $db->getDSN(), $db->persistent); |
# 複数のAjax通信を行って全ての結果がそろったら次の処理を実行したい等の場合 | |
# Ajax処理 | |
somethingAjax1: -> | |
dfd = $.Deferred() | |
$.getJSON '/something.json', {'param': param }, (data) => | |
# dataを使った処理をする | |
# 無事完了したらresolve() | |
dfd.resolve() |
<?php | |
class Status | |
{ | |
private $value; | |
private static $instances = array(); | |
private function __construct($value) | |
{ |
<?php | |
class AbstractEntity implements EntityInterface | |
{ | |
} |
object Fib extends App { | |
def fib(n: Int): Int = { | |
if (n < 2) { return n } else { return fib(n-1) + fib(n-2) } | |
} | |
Console.println("fib(1) = " + fib(1)); | |
Console.println("fib(2) = " + fib(2)); | |
Console.println("fib(3) = " + fib(3)); | |
Console.println("fib(4) = " + fib(4)); | |
Console.println("fib(5) = " + fib(5)); | |
Console.println("fib(6) = " + fib(6)); |
#!/bin/sh | |
files=`git diff --cached --name-only` | |
assets_path=`git config assets.path` | |
[ -z "$assets_path" ] && exit 0 | |
for file in $files | |
do | |
if [[ "$file" =~ "^$assets_path" ]]; then |