[SIMILAR] WITH 27066 dosomething WITH 21001 nothing WITH 12128 jscript WITH 9777 idispatch WITH 7107 itest WITH 7107 hresult WITH 5027 vbscript WITH 4741 不一 WITH 4479 でno WITH 4198 application WITH 3888 test WITH 3827 interface WITH 3453 、js WITH 2823 ムエ WITH 2376 null WITH 1822 ロパ WITH 1745 パテ WITH 1619 当す WITH 1512 一致 WITH 1496 相当 WITH 1344 ブジ WITH 1151 生成 WITH 985 に相 WITH 936 標準 WITH 801 オブ WITH 687 ェイ WITH 595 エラ WITH 567 ェク WITH 501 イム WITH 498 ーフ WITH 438 ンタ WITH 415 方法 の検索結果 165 件中 1 - 10 件目 (1.17329022 秒)
interface ITest : IDispatch { HRESULT doSomething([in] ITest* pTest); }; のようなインターフェイスがあったときに、JScriptから var test = ...; test.doSomething(null); とやると、型の不一致でランタイムエラーになってしまうんですね。VBScriptなら、 set test = ... test.doSomething Nothing とする ...
キーと値からなる設定ファイルをパースするとします。設定ファイルはこんな感じです。 name=Test value=5 マップなどで値を持つという方法もありますが、ちゃんと型付けするために専用の型を用意することにします。そうするとパースするコードはこんな感じでしょうか。 import Control.Monad import Data.Maybe ...
# (スコア:5124)
Invalid TextNewCGIはCGIモナドで、DBのアクセスはIOモナドの中で行われるので、もはや関数型というよりは単なる手続き型にしか見えません… import Control.Monad.Trans import Data.Maybe import qualified Database.HDBC as DB import qualified Database.HDBC.ODBC as ODBC import IO import Network.NewCGI ...
# (スコア:5124)
スクリプトからマクロを呼び出すときに変数を設定できるようにしました。こんな感じになります。 set macro = macroParser.parse("@Add($x,$y)") macro.setVariable "x", "10" macro.setVariable "y", "22" z = macro.evaluate(nothing, document.accounts("test")) MsgBox z スクリプトからマクロに何か値を渡 ...
# (スコア:5124)
Maybeの中の値を元に、Maybe自体をNothingにしたいケースが結構あります。例えば、Maybe Stringで中の文字列が空の場合にはNothingにしたいケースなどです。 nonEmptyString :: Maybe String -> Maybe String nonEmptyString s = case s of Just s | s /= "" -> Just s _ -> Nothing これを少し一般化すると、こ ...
# (スコア:5124)
GHC 6.12でDeprecatedになるらしいImpredicative Polymorphismをどうやって書き換えるのか考えてみました。 例えばこんなの。 {-# LANGUAGE ImpredicativeTypes, Rank2Types #-} f :: Maybe (forall a. [a] -> a) -> (Int, Char) f (Just g) = (g [1, 2, 3], g ['a', 'b']) f Nothing = (99, 'z') のように定義 ...
# (スコア:5124)
I think that there is a funny bug in QMail (WM2003 version at least): you receive e-mail, open it (encoding is wrong), chose encoding manually, message becomes readable, then you press REPLY button - and nothing really happens! ...
# (スコア:5124)
Well, I tap 'Apply rules to all' and program obviously does nothing - then I tap 'Apply rules' and they really apply to messages in current folder (I see a progress bar for a moment). 'Apply rules to all' seems to have no effect at all (no progress bar). ...
# (スコア:5124)
エディットビュー上で修正する部分などを作りこむのはおいおい考えるとしても、外部のスペルチェッカを簡単に呼び出せると便利かもしれません。そんな機能を入れてみようかと思ったのですが、スクリプトでやれそうなので試しに書いてみました。 以下のスクリプトを保存してscriptsフォルダに適当なファイル名で ...
# (スコア:4922)
Invalid TextOutlookのドキュメントを見て最初に思いついたのはこれです。 var app = new ActiveXObject("Outlook.Application"); var ns = app.GetNameSpace("MAPI"); var entries = ns.AddressLists.Item(1).AddressEntries; for (n = 1; n <= entries.Count; ++n) { var entry = entries.Item(n); WScript.S ...
# (スコア:3305)
# (スコア:10000)