- JDKがinstall済みであること
- java コマンドに環境変数Pathが通っていること
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
/** | |
* 指定されたファイルをZip形式で圧縮し、同じディレクトリに作成する。 | |
* | |
* @param zipFile 作成先のZIPファイルを示す{@link File}オブジェクト | |
* @param srcFile 圧縮対象の元ファイルを示す{@link File}オブジェクト | |
* @throws IOException ファイルIOで例外が発生した場合 | |
*/ | |
void makeZip(File zipFile, File srcFile) throws IOException { | |
final int bufferSize = 256; |
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
main() { | |
var limit = 100; | |
for (var i = 1; i <= limit; i++) { | |
var sb = new StringBuffer(); | |
if (i % 3 == 0) { | |
sb.add("Fizz"); | |
} | |
if (i % 5 == 0) { | |
sb.add("Buzz"); |
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
var limit = 100; | |
fizz(i) => i % 3 == 0 ? "Fizz" : ""; | |
buzz(i) => i % 5 == 0 ? "Buzz" : ""; | |
for (var i = 1; i <= limit; i++) { | |
var sb = new StringBuffer().add(fizz(i)).add(buzz(i)); | |
print(sb.isEmpty ? "${i}" : sb); | |
} |
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
t-hara:dartlang t_hara$ make copy | |
rm -rf ./build | |
compass compile src/site/ | |
unchanged src/site/scss/style.scss | |
cd ./src/site && jekyll --no-server --no-auto && cd ../.. && cp -R ./src/appengine/* build/ | |
Configuration from /Users/t_hara/work/site/dartlang/src/site/_config.yml | |
Building site: . -> ../../build/static | |
Liquid Exception: uninitialized constant Albino in index.markdown | |
/Users/t_hara/work/site/dartlang/src/site/_plugins/pygments_cache.rb:14:in `render_pygments' | |
/opt/local/lib/ruby1.9/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/tags/highlight.rb:44:in `render' |
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 'package:unittest/unittest.dart'; | |
import 'dart:async'; | |
main () { | |
test("DCI sample in Dart", () { | |
var checking = new Account(balance : 50); | |
var saving = new Account(balance : 45); | |
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
// PdfStamperのコンストラクタに渡したOutputStreamは、PdfStamper#close内でcloseメソッドが呼ばれてしまうため、 | |
// 一時領域としてByteArrayOutputStreamを渡し、編集結果のバイト文字列を引数のOutputStreamに書き込む。 | |
ByteArrayOutputStream tempOut = new ByteArrayOutputStream(); | |
PdfStamper stamp; | |
try { | |
stamp = new PdfStamper(original, tempOut); | |
} catch (IOException e) { | |
throw new DocumentException(e); |
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 'package:unittest/unittest.dart'; | |
void main() { | |
print("intersect"); | |
(new Seq([1, 2, 3]) & new Seq([2, 3, 4])).forEach(print); | |
print("union"); | |
(new Seq([1, 2, 3]) | new Seq([2, 3, 4])).forEach(print); | |
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
main () { | |
new Service().execute(); | |
new AwesomeService().execute(); | |
} | |
class Repository { | |
List<String> find() => ["data1", "data2"]; | |
} | |
class Service { |
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
# let printer ppf = Format.fprintf ppf "\"%s\"";; | |
# #install_printer printer;; |
OlderNewer