2011-07-01から1ヶ月間の記事一覧

カテゴリ並び替え

はてなのカテゴリは登録された順だから多くなってくると探すのに困るのでソートしてみた。 string c=@".NET ActiveDirectory ASP.NET"; var cs = c.Split('\n'); foreach ( var item in cs.OrderBy<string, string>( s => s ) ) { Console.WriteLine(item); } 「=>」は「goes</string,>…

多重起動抑制

コードに埋め込みたくなかったんで。 うーん。いまいちだな。 終了するときに開放だしあんまり気にしなくてもいいかと安易に思ってみたり。 class MultiInstanceBlocker { static Mutex _mutex; static public void Activate( string key ) { if ( IsActivat…

年齢計算

自分が今何歳だったかわからなくなることはよくあるよね。 static void Main( string[] args ) { Console.WriteLine( GetAge( DateTime.ParseExact( "1900/01/01", "yyyy/MM/dd", null ) ) ); } private static int GetAge(DateTime from) { var to = DateTi…

byte表示(リフレクションメモ)

メモリチェック用 private void button1_Click( object sender, EventArgs e ) { if ( textBox1.Text.Length == 0 ) { return; } try { if ( radioDouble.Checked ) { Show( typeof( double ) ); } else if ( radioFloat.Checked ) { Show( typeof( float ) …

Shell Extension

Win7 64bitで動作確認。 unicode, x64, vs2010 Shell Extensionはマネージだと問題あるのでアンマネージで。*1 ファイルパスをクリップボードにコピーする。ちなみにVistaからの「シフト+右クリック」とかいうコマンドは忘却の彼方に追いやると吉。でもこれ…

同時実行

テストとかに・・・。 class Program { static void Main( string[] args ) { for ( int i = 0; i < 10; i++ ) { var a = new A(); new Thread(a.Start).Start(); } Thread.Sleep( 1000 ); Console.WriteLine( "ready?" ); WHandle.Set(); Console.WriteLine…

Control panel のコマンド入力

http://support.microsoft.com/kb/192806/ja アプリケーションの追加と削除control appwiz.cpl 追加 テキスト サービスと入力言語control input.dll ユーザーアカウントcontrol userpasswords2

RDゲートウェイ

httpsでリモート接続 必要な証明書 接続先のサーバー証明書を発行しているCAの証明書を信頼されたルートに置く。 接続先ドメインの証明書を発行しているCAの証明書を信頼されたルートに置く。RDゲートウェイのSSL証明書 発行先が接続先のドメインとなってい…

Content Delivery Network(CDN)

Ajaxの読み込み部品(jQuery)とかMicrosoft Ajax Content Delivery Network Google Libraries APIほんとうに便利な世の中になったと思う。

Google Code Playground なんか日本語入れると動かないよ

Google Code Playground 便利かなと思ったんだけど ↓のソース start と end に日本語入れると動かない。(エラーは出ないけど) http://www.geocoding.jpから緯度経度検索してLatLngで突っ込むしかないの?? (英語で書いても大丈夫だとおもうんだけどそっ…

SQLite

SQLite3 http://www.sqlite.org/index.html型 http://www.sqlite.org/datatype3.html Storage Classes and Datatypes NULL. The value is a NULL value. INTEGER. The value is a signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes depending on the mag…