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
| # なぜかtext/hatenaのロードに失敗していたので入れた | |
| $LOAD_PATH << "C:/Ruby/lib/ruby/gems/1.8/gems/text-hatena-0.12.20080627.0/lib" | |
| require "nkf" | |
| require "text/hatena" | |
| module Enumerable | |
| def rand | |
| index = Kernel.rand(self.to_a.size) | |
| self[index] | |
| end |
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
| # 準備: | |
| # http://moonrock.jp/~don/ruby/text-hatena/README.html.ja | |
| # からgemダウンロードして | |
| # >gem install text-hatena-~.gem | |
| # を実行した | |
| # なぜかrequireに失敗するので追加した | |
| $LOAD_PATH << "C:/Ruby/lib/ruby/gems/1.8/gems/text-hatena-0.12.20080627.0/lib" | |
| require "text/hatena" |
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
| console.log("__start__"); | |
| $("tr > td > a").each(function(i,link){ | |
| $.get($(link).attr("href"),function(cnt){ | |
| var new_pre = $("<pre/>"); | |
| new_pre.text($(cnt).filter("pre").text()); | |
| $("<div/>").html(new_pre).appendTo($("body")); | |
| }); | |
| }); | |
| console.log("__end__"); |
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
| // バルーン表示メモ | |
| // 以下抜粋 | |
| void InitializeComponent(void) | |
| { | |
| // notifyIcon1 | |
| this->notifyIcon1->BalloonTipIcon = System::Windows::Forms::ToolTipIcon::Warning; | |
| this->notifyIcon1->BalloonTipText = L"ここが内容"; | |
| this->notifyIcon1->BalloonTipTitle = L"タイトル"; | |
| this->notifyIcon1->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"notifyIcon1.Icon"))); // ■アイコンがないとバルーンも表示されない | |
| this->notifyIcon1->Text = L"notifyIcon1"; |
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
| -- foo.txtを読み込んで行番号をつけて表示 | |
| -- ※同ディレクトリにApplicativeParsec.hsが要る | |
| import ApplicativeParsec | |
| p :: CharParser () [PLine] | |
| p = many line | |
| eol = string "\n" | |
| letters = many1 letter |
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
| <html> | |
| <head> | |
| <script type="text/javascript" src="jquery.js"></script> | |
| </head> | |
| <body> | |
| hello | |
| <div id="output">output</div> | |
| <script> | |
| $(function(){ | |
| $.get("file:///C:/usr/tmp/in",function(e){ |
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
| # [単語\t絶対パス\t行番号]のファイルから単語検索する | |
| require "digest/md5" | |
| wanna_search = ARGV[1] | |
| ext = ARGV[0] | |
| context = (ARGV[2] || 1).to_i | |
| max_output = (ARGV[3] || 10).to_i | |
| unless wanna_search && ext | |
| STDERR.puts "args error" |
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
| # 指定のパス下にあるファイルから/w+を取り出して | |
| # 単語\t絶対パス\t行番号 | |
| # のファイルを生成する | |
| require "digest/md5" | |
| paths = ["C:/usr/examples"] | |
| exts = %w{ps1} | |
| $verbose = false |
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
| void setup(){ | |
| size(300,300); | |
| noLoop(); | |
| } | |
| void draw(){ | |
| println("__START__"); | |
| String[] s = loadStrings("c:/usr/tmp/in"); | |
| PFont f = createFont(PFont.list()[0],20); | |
| textFont(f); |
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
| -- ルーチン同士の呼び出し関係を解析するコード | |
| -- * Parsecを使う | |
| -- * ファイルinを読み込んで行ごとに分解して表示 | |
| -- * 表示するのはcallの行のみ | |
| -- * showを一部実装 | |
| -- 同じフォルダにApplicativeParsec.hsを用意する | |
| import ApplicativeParsec | |
| import Data.Maybe |