1つのデバイスでの変更が同じアプリがインストールされた全てのデバイスへ伝わる
アプリはNSUbiquitousKeyValueStoreを通してkey-valueにアクセスできる
func variadic(items: Any...) { | |
print(items.joinWithSeparator(" = ")) // 何も表示されない | |
print(items.map({ String($0) }).joinWithSeparator(" = ")) // a = b | |
} | |
variadic("a", "b") |
#!perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Devel::Peek; | |
my $str = '{"a":"b","c":"あ"}'; | |
Dump $str; | |
print <<EOS; |
[10:37] ~/tmp/2014-05-22/test | |
% git --version | |
git version 1.9.0 | |
[10:37] ~/tmp/2014-05-22/test | |
% git init | |
Initialized empty Git repository in /Users/no-kumagai/tmp/2014-05-22/test/.git/ | |
[10:37] ~/tmp/2014-05-22/test | |
(git)-[master]-% ll |
(function (n) { | |
return (function (fact) { | |
return fact(fact, n); | |
})(function (ft, k) { | |
return (k === 1) ? 1 | |
: k * (ft(ft, (k - 1))); | |
}); | |
})(10) |
[alias] | |
tmp = !sh -c 'git co $1 $2 && git reset $2 > /dev/null && fpath=$2 && tmpfile=/tmp/$1."${fpath##*.}" && mv -f $fpath $tmpfile && git co -- $fpath && view $tmpfile && rm -f $tmpfile' - |
use strict; | |
use warnings; | |
use utf8; | |
use Test::More; | |
use Test::MinimumVersion::Fast; | |
minimum_version_ok('miniversion.pl', '5.010000'); | |
done_testing; |
<?php | |
class Monmon { | |
} | |
try { | |
$class = 'Monmon2'; | |
if (class_exists($class)) { // これがないと Fatal error: Class 'Monmon2' | |
$monmon2 = new $class(); | |
} | |
} catch (Exception $e) { |
http://developer.apple.com/library/ios/samplecode/AdvancedTableSearch/Introduction/Intro.html
(use slib) | |
(load "/usr/local/slib/random") | |
(load "./s3.1.2_estimate-pi-using-rand.scm") | |
(use srfi-27) ; random-real | |
(print "---------------------------- q3.5 -----------------------------") | |
; モンテカルロ積分 | |
; たとえば四角形をちょうど半分にし、その片方の面積を求めたい場合、 |