This file contains hidden or 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
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" /> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> |
This file contains hidden or 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
/** このクラスは、ヘッダを作成するためだけに使います */ | |
class Main { new { // ← CGI ではスクリプト(REPL)として実行されるため、それを模倣 | |
class Sample1 { | |
@native def hello() | |
} | |
}} |
This file contains hidden or 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 | |
exec /usr/local/bin/scala "$0" "$@" | |
!# | |
import System._ | |
println("Content-Type: text/html; charset=UTF-8\r\n\r\n") | |
println("<html>") | |
println("REQUEST_METHOD:" + getenv("REQUEST_METHOD")) | |
println("<br/>") | |
println("SCRIPT_NAME:" + getenv("SCRIPT_NAME")) | |
println("</html>") |
This file contains hidden or 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/env python | |
# http://docs.python.jp/3/library/argparse.html | |
def parsearg(): | |
import argparse | |
parser = argparse.ArgumentParser('Create xcworkspace') | |
parser.add_argument('name') | |
parser.add_argument('--xcodeproj', nargs='+', default=[]) | |
parser.add_argument('--use-cocoapods', action='store_const', const=True, default=False) | |
return parser.parse_args() |
This file contains hidden or 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/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import os.path | |
import sys | |
import lxml.html | |
import xlwt | |
This file contains hidden or 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/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import os.path | |
import sys | |
import lxml.html | |
import xlwt | |
This file contains hidden or 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/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import os.path | |
import sys | |
import lxml.html | |
import xlwt | |
This file contains hidden or 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
enum X { X1, X2, X3 } | |
enum Y { Y1, Y2, Y3 } | |
enum Z { Z1, Z2, Z3 } | |
… | |
foreach( a in | |
from z in new[]{ Z1, Z2, Z3 } | |
from y in new[]{ Y1, Y2, Y3 } | |
from x in new[]{ X1, X2, X3 } |
This file contains hidden or 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
// yield 版 | |
IEnumerable<List<T>> Permutations<T>(IEnumerable<T> seq, int count) | |
{ | |
switch (count) { | |
case 0: // special | |
yield break; | |
case 1: // terminate | |
foreach (var t in seq) | |
yield return t; | |
yield break; |
This file contains hidden or 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
public abstract class AC<T> { | |
protected abstract void cannot_override(T... xs); | |
} |