このドキュメントは次の環境で記述されていますが、 他の開発環境でもほぼ同様の考え方で問題なく使えます。
- オペレーシングシステム:Windows 10 (Windows Vista以降が必要)
- 対応言語: C / C++ / C#
- 対応コンパイラ: gccまたはg++ (minGW) / csc
このドキュメントは次の環境で記述されていますが、 他の開発環境でもほぼ同様の考え方で問題なく使えます。
| // | |
| // ToyGC.swift | |
| // ToyGC | |
| // | |
| // Created by satoshia on 2015/08/31. | |
| // Copyright © 2015 satoshia. All rights reserved. | |
| // | |
| import Darwin | |
| import Foundation |
| /** | |
| * Produces a function which uses template strings to do simple interpolation from objects. | |
| * | |
| * Usage: | |
| * var makeMeKing = generateTemplateString('${name} is now the king of ${country}!'); | |
| * | |
| * console.log(makeMeKing({ name: 'Bryan', country: 'Scotland'})); | |
| * // Logs 'Bryan is now the king of Scotland!' | |
| */ | |
| var generateTemplateString = (function(){ |
本稿ではNim言語 (旧称: Nimrod) の構文を紹介します。
Nim言語の概要やインストール方法については、ブログ記事があるのでそちらをご参照下さい。
Microsoft’s navigator.msLaunchUri method only works in Internet Explorer on Windows 8. Therefore I came up with a (nearly) cross-browser implementation that uses the native msLaunchUri when it’s available and falls back to adventurous hacks when running in other browsers.
launchUri (uri, successCallback, noHandlerCallback, unknownCallback)
| // Amazonの注文履歴をTSV形式で出力するスクリプト | |
| // | |
| // 2015-01-01 時点での DOM 構造に対応, GoogleCrome, Opera でテスト済。 | |
| // formatEntry関数を書き換えれば自由な書式で出力できます。 | |
| // | |
| // 参考: | |
| // - Amazonの注文履歴をCSV形式にして出力するスクリプト | |
| // https://gist.github.com/arcatdmz/8500521 | |
| // - Amazon で使った金額の合計を出す奴 (2014 年バージョン) | |
| // https://gist.github.com/polamjag/866a8af775c44b3c1a6d |
| // Amazon で使った金額の合計を出す奴 | |
| // | |
| // 使い方: | |
| // 1. 全部コピーする (右上の Raw をクリックした先でやるのが楽) | |
| // 2. Amazon の注文履歴ページ ( https://www.amazon.co.jp/gp/css/order-history/ ) を開く | |
| // 3. F12 または 右クリ→要素の検証 とかで出てくる開発者ツールのコンソール (JavaScript REPL) にペースト | |
| // 4. エンターで実行 | |
| // (Firefox はなんか allow pasting とタイプしろみたいなことを言われるので従う) | |
| // 5. しばらく待つと alert で合計金額を表示 | |
| // |
| import javafx.beans.binding.Bindings; | |
| import javafx.beans.property.ObjectProperty; | |
| import javafx.beans.property.SimpleObjectProperty; | |
| import javafx.scene.control.Cell; | |
| import javafx.scene.control.TableCell; | |
| import javafx.scene.control.TableColumn; | |
| import javafx.scene.control.TextArea; | |
| import javafx.scene.input.KeyCode; | |
| import javafx.util.Callback; | |
| import javafx.util.StringConverter; |
| .button-icon-shape { | |
| -fx-scale-x: 2.0; | |
| -fx-scale-y: 2.0; | |
| } | |
| .stop-button-icon { | |
| -fx-fill: black; | |
| } | |
| .circle-button { |