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
# 使用例 | |
# wnd = Window.new("calc") # ハンドラwnd生成 | |
# wnd.post(:wm_command,32781) | |
class Window | |
attr_reader :handler | |
require 'dl/win32' | |
MESSAGE_TYPE = { | |
:wm_command => 273, | |
:wm_keydown => 256, | |
:wm_keyup => 257, |
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
# まだ途中 | |
# | |
# description: | |
# * タスク自動化に使う | |
# * たとえば以下のような状況で使う | |
# * Aフォルダには1sごとにキャプチャ画像が増えていく | |
# * Aフォルダのファイルは随時ネットワーク上にコピー | |
# * Aフォルダのファイルは縮小化してBフォルダにコピー | |
# * BフォルダにできたファイルのパスはEXCELに記録する | |
# |
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
// Ubiquityで使う | |
// すべての検索結果について、,url,title,docの組をとってくる | |
gglob: function(key){ | |
var results = []; | |
$.ajax({ | |
url: "http://www.google.co.jp/search", | |
data: {q: key}, | |
async: false, | |
success: function(data,textStatus){ | |
// サーチごとに |
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
-- ルーチン同士の呼び出し関係を解析するコード | |
-- * Parsecを使う | |
-- * ファイルinを読み込んで行ごとに分解して表示 | |
-- * 表示するのはcallの行のみ | |
-- * showを一部実装 | |
-- 同じフォルダにApplicativeParsec.hsを用意する | |
import ApplicativeParsec | |
import Data.Maybe |
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
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 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 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 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 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 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"; |
OlderNewer