技術者派遣の技術日誌ブログ

February 26, 2009

ASP.NET 4.0ではルーティングも便利になる(予定)

Filed under: C# — Tags: , , , — Shotalow @ 7:22 pm

February 20, 2009

Entity Frameworkの無料ラーニングガイド IIS7の設定のリファレンス

Filed under: .NET Framework, ADO.NET, C# — Tags: , , , , — AspAnn @ 9:27 am

Contributions to Entity framework community

500ページを超えるPDFファイルを提供してくれている方がいます。
さすがにまだざっくりとも読めていないのですが、参考にはなりそうな感じです。

IIS7】 システム構成のリファレンス登場

奥主さんのBlogでIIS7の設定についてのリファレンスの提供が開始されたことがアナウンスされています。

リファレンス自体はこちら

このあたりは趣味でもある(笑)ので、一通り目を通すつもりです。

eBooks.com – C# 3.0 Unleashed: With the .NET Framework 3.5 eBook

,ASP.NET,JAVASCRIPT,JQUERY

NET and LINQ An introduction to UI technologies, including Windows Forms, WPF, ASP.NET Ajax, and Silverlight Coverage of traditional ASMX and WCF Web Services Coverage of multiple .NET technologies, including networking, … Joe Mayo has more than 21 years of software engineering experience and has worked with C# and .NET since July 2000. He regularly contributes to the community through his Web site, http://www

NET and LINQ An introduction to UI technologies, including Windows Forms, WPF, ASP.NET Ajax, and Silverlight Coverage of traditional ASMX and WCF Web Services Coverage of multiple .NET technologies, including networking, … Joe Mayo has more than 21 years of software engineering experience and has worked with C# and .NET since July 2000. He regularly contributes to the community through his Web site, http://www.csharp-station.com/, which has been running since July 2000. …

More:
eBooks.com – C# 3.0 Unleashed: With the .NET Framework 3.5 eBook

February 14, 2009

NetBeans JavaFX プラグイン : エディタの日本語処理問題の回避策(?)

Filed under: JAVA — Tags: , — Sayuri @ 5:37 pm
NetBeans の JavaFX で日本語を使うとパースがうまくいかない場合があるようです。バグとして以下に登録してあります。

  • 156117: I18N : parsing JavaFX codes with Japanese characters fails

以下の右側のスクリーンショットのように、コードの色付けがおかしくなり、赤いアンダーラインのエラーストライプも付いてしまいます。左側が正しいのですが比べるとわかりますね。この問題が発生するとがくっとパフォーマンスが落ちます。ただコンパイルは通りますし、実行もできます。

NetBeans JavaFX Plugin

いろいろ試してみるとどうやら NetBeans が使うデフォルトのエンコーディングが Shift JIS の時にに発生することがわかりました。ということは Windows では必ず発生してしまいますね。Mac 上では JDK6 で発生します。JDK1.5 ではエンコーディングは UTF-8 なのでこの問題が発生しません。JavaFX のソースコードのエンコーディングは関係ありませんでした。NetBeans が使うエンコーディング、つまり起動した OS のエンコーディングが関係しているのではないかと思っています。

ならばここで -Dfile.encoding=UTF-8 をつけて起動すると…

$ netbeans -J-Dfile.encoding=UTF-8

私の確認するかぎりでは小さいプログラムですがこの問題は発生しませんでした。-J-Dfile.encoding=UTF-8 オプションは etc/netbeans.conf ファイルの netbeans_default_options に書いておくことができます。

もしコードのカラーリングがおかしかったり、エラーでもないのにエラーストライプがついていたら、このオプションを試してみてください。

February 11, 2009

WCF REST Starter Kit CodePlex Preview 1 Release Notes – Windows Live

,ASP.NET,JAVASCRIPT,JQUERY

Also, these services cannot be called asynchronously from ASP.NET AJAX clients. To call a general WCF service from AJAX, use the ASP .NET Friendly WCF Service item template available in Visual Studio (not a part of this starter kit).

Also, these services cannot be called asynchronously from ASP.NET AJAX clients. To call a general WCF service from AJAX, use the ASP .NET Friendly WCF Service item template available in Visual Studio (not a part of this starter kit). … at DocumentsVisual Studio 2008TemplatesProject TemplatesVisual C#Web. Item templates are installed under DocumentsVisual Studio 2008TemplatesItem TemplatesVisual Web DeveloperCSharp. …

See the rest here:
WCF REST Starter Kit CodePlex Preview 1 Release Notes – Windows Live

February 10, 2009

[ .NET ] オブジェクト指向 パブリックプロパティ (もしくはパブリックフィールド) の善悪

Filed under: C# — Tags: , , , — Shotalow @ 8:34 am

最近、パブリックプロパティ (もしくはパブリックフィールド) の善悪について悩んでます。
例えば、ドメインオブジェクトを UI に表示する処理って、ドメインオブジェクトに持たせるわけにはいかないですよね?
かといって、DI で UI 表示処理を注入するってのも現実的じゃないと思います。

で、ドメインオブジェクトにパブリックプロパティを用意するとこうなります。

public

February 4, 2009

JIT 最適化にも負けずに呼び出し元のメソッドを取得する方法

Filed under: .NET Framework, ALL, Asp.Net — Tags: , , — citiszo @ 11:03 pm

StackFrame クラス (System.Diagnostics) を使用すると、呼び出し元メソッドを取得することができる。しかし、Release ビルドされたアセンブリでは JIT 最適化により呼び出し元メソッドがインライン化されている可能性がある。
例えば、次のコードの実行結果を Debug ビルドと Release ビルド (非デバッグ実行) とで比較すると一目瞭然だ。

using

February 1, 2009

インスタンスが属するクラスをあとから変更する操作を C# で

Filed under: C# — Tags: , — AspAnn @ 1:02 pm

直交座標系とか極座標系とかはよくわかってないけど、とりあえず C# でもできます。
まぁ、2つのインスタンスのメモリ上のサイズが等しくない場合はマズいことになりかねませんけどね…。
Cartesian と Polar はサイズが等しいので大丈夫です。

// 追記1 (2009/01/28)
対象オブジェクトのフィールドを辿るとマネージヒープ上のオブジェクトへの参照が含まれている、という場合も、場合によってはマズいことになります。

NyaRuRu さんより、「何が起きても不思議ではない」とご指摘頂きました。
今回のコードは動作しましたが、インスタンスサイズを揃えて、フィールドにマネージヒープ上のオブジェクトへの参照を含めないようにしたとしても、確実に大丈夫だと断言することはできません。また、今回のコードが如何なる時でも確実に動作すると断言することもできません。

using

Powered by WordPress