.Net

C#ソースコードのコピペを探す

コピペなどで発生する、似たようなコード片を探すツール Clone Detective for Visual Studio http://www.codeplex.com/CloneDetectiveVS Clone Detective is a Visual Studio integration that allows you to analyze C# projects for source code that is d…

コードカバレッジの目標値

単体テストのコードカバレッジの目標値についての記事をいくつか。 一般的なビジネスアプリケーションで100%のカバレッジを目指すことが困難なのは確かだが、だとすればどのくらいを目指すのが妥当なのか? まずは、「高いカバレッジ」≠「高い品質」というこ…

単体テストの自動生成

Pex: Automated Exploratory Testing for .NET http://research.microsoft.com/Pex/Microsoft Resarchのツール。 手書きのUnitTestコードを実行し、実行パスをモニタリングすることによって条件分岐のポイントを発見し、 そのテストでは通らなかったパスを通…

アセンブリ中のコードを修正する

上のエントリのReflexilが使用しているライブラリが、このMono.Cecil http://www.mono-project.com/Cecil Mockを使った単体テストをすることが難しい構成になっている既存のコードをテストするときに、このライブラリを使用すれば、ハードコードされている依…

アセンブリ内容の操作と、C#/VBによるコードインジェクション

Assembly Manipulation and C#/VB.NET Code Injection http://www.codeproject.com/KB/msil/reflexil.aspx Reflexil is an assembly editor and runs as a plug-in for Lutz Roeder's Reflector. Reflexil is able to manipulate IL code and save the modif…

マネージドコードからWiiリモコンを利用する

Managed Library for Nintendo's Wiimote http://www.codeplex.com/WiimoteLib Project Description A library for using a Nintendo Wii Remote (Wiimote) from .NET. This project started life as an article for Microsoft's Coding4Fun website. A full…

Visual Studioのwebtestファイルをもとにして、他のサイトの情報を取得する

ログインやセッションの必要ないページの情報は、HttpWebRequest/HttpWebResponseを使えば簡単に取得できるが、 ログインやキャッシュが必要 目的のページに辿り着くまでに複数回の画面遷移が必要 動的なパラメータ(ASP.NETのViewStateなど)をリクエストに含…

プログラムを修正してデバッグしても、修正した結果が反映されません。

@IT Insider.NET会議室より http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?topic=44951&forum=7&start=64 スレッドを立てたOne.netです。次のようにすると再現しました。 1.日時を6月29にちにっ変更する 2.開発中のプロジェクトを立ち上げる。 …

C#ソースコードの分析ツールでカスタムルールを作成する

http://d.hatena.ne.jp/m-tanaka/20080528 の続き。 デフォルトのルールだけではなく、プロジェクトのコーディング規約にあわせてカスタマイズできると便利だな と思っていたら、早速カスタムルールの作り方を解説している人がいました。 Part I: Creating C…

ソフトウェアの取扱説明書(ガイダンス)を生成するツール

We are pleased to announce the availability of the patterns & practices Documentation Tools. These are the tools that have been used to create the accompanying documentation for many p&p projects, including the Enterprise Library, Smart Cl…

StyleCop C#ソースコードの分析ツール

Announcing the release of Microsoft Source Analysis for C# http://blogs.msdn.com/sourceanalysis/archive/2008/05/23/announcing-the-release-of-microsoft-source-analysis.aspx https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?Projec…

[Code Project] ハンドジェスチャーの識別

Hands Gesture Recognition http://www.codeproject.com/KB/audio-video/hands_gesture_recognition.aspx より。 Introduction Since the time I’ve wrote my first article about motion detection, I’ve got a lot of e-mails from different people aroun…

[Code Project]貧者のためのLinq

Poor Man's Linq in Visual Studio 2005 http://www.codeproject.com/KB/linq/linq2005.aspx より。 Introduction Language INtegrated Query in C# 3.0 is pure joy to use. Once you try it, you don't want to stop.But a few of us, for whatever reason…

[Code Plex] NLinq

NLinq http://www.codeplex.com/nlinq より。 Project Description NLinq is a framework focusing on reimplementing the Linq functionnalities in Visual Studio .Net 2003 and Visual Studio 2005 (C# & VB .Net) by providing a Linq grammar parser an…

今後の注目株

CodePlexの新着情報にあった気になる情報。 まだ、Releaseは何もないが今後が期待。 Linq Community Contributions http://www.codeplex.com/linqcontrib Unity Community Contributions http://www.codeplex.com/unitycontributions その他のp&p Contribプ…

DBの構造を比較する

DbDiff http://www.codeplex.com/DbDiff より。 Compare MSSql database structures. (Sql 7,Sql 2000,Sql 2005) Features: compare database structure (sql2000 sql2000 or sql2000 sql2005 or sql2005 sql2005) scripting without dmo or smo commandline…

C#で記述されたGIS(地理情報システム)ライブラリ

SharpMap - Open Source Mapping Engine for the 2.0 Common Language Runtime http://www.codeplex.com/SharpMap より。 SharpMap is an easy-to-use mapping library for use in web and desktop applications. It provides access to many types of GIS d…

Visual StudioでPHP

Php for Visual Studio (Php4VS) http://www.codeplex.com/php4vs より。 Project Description The Php4VS is a Package for Visual studio which aims to do the same thing as some others do, but with one difference : for FREE ! Currently, there are…

[Code Project].NETアプリケーションにマウスジェスチャーを追加する

Adding Mouse Gesture Functionality to Your .NET Application Within Seconds http://www.codeproject.com/KB/cs/mouse_gesture.aspx より。 The idea of finding a mouse gesture is as follows:1.Finding the bounding rectangle of the mouse movement …

.netでZipファイルを操作する

DotNet Zip Library http://www.codeplex.com/DotNetZip より。 Project Description The System.IO.Compression namespace in the Microsoft .NET Framework {v2.0 v3.0 v3.5} includes base class libraries supporting compression within streams - both…

シェアポイント検索の関連度(Relevancy) をカスタマイズするツール

SharePoint Search Relevancy Tool http://www.codeplex.com/searchrelevancy より。 Project Description VERY simple tool to adjust the search relevancy settings in MOSS 2007 and the Microsoft Search Server. Originally published and available o…

ViewStateをデータベースなどのhiddenフィールド以外のメディアに保存する

System.Web.UI.PageEx http://www.codeplex.com/DotNetPageEx より。 Project Description The basic purpose of this small project is save System.Web.UI.Page's ViewState to an alternative storage medium, such as disk files, a SQL Server database…

ASP.NETで複数のJavaScriptファイルのダウンロードをまとめて、ページロードを高速化する

Fast ASP.NET web page loading by downloading multiple javascripts after visible content and in batch http://www.codeproject.com/KB/aspnet/fastload.aspx より。 多数のJavaScriptファイルを使用した際にページロードに時間がかかるように感じられる…

ドキュメントからテキストのみを抽出する

先日の修正版のさらに修正版 http://d.hatena.ne.jp/m-tanaka/20080129 http://d.hatena.ne.jp/m-tanaka/20080206FilterがNULL文字列を返却したさいに、StringBuilderだとうまく扱えないので、少し修正 //参考 //http://sqljunkies.com/HowTo/C4AC6E97-8D84-…

ドキュメントからテキストのみを抽出する

先日の修正版 http://d.hatena.ne.jp/m-tanaka/20080129FilterがNULL文字列を返却したさいに、StringBuilderだとうまく扱えないので、少し修正 //参考 //http://sqljunkies.com/HowTo/C4AC6E97-8D84-411D-8551-08CE63EC99B6.scuk using System; using System…

ドキュメントからテキストのみを抽出する

ちょっと思うところがあって、テキストマイニングに挑戦中。 まずは、対象となるテキストを集める必要があるのだが、多くのドキュメントはWordやExcel、PDFで保存さているのでこれらのドキュメントからテキストを抽出する必要がある。 そこで、http://sqljun…

Visual StudioのWebテストの結果をブラウザで参照可能にする2005版

上のサンプルは、Visual Studio2008のtrxファイル用だったので、2005向けのサンプル trxファイルの構造が若干変わっている using System; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; using System.IO; us…

Visual StudioのWebテストの結果をブラウザで参照可能にする

Visual Studio2005から、Webテストという機能でブラウザの操作を記録し、それをもとにテストケースを作成する機能がある。 負荷テストと組みわせることができたり、データベースやファイルの内容をもとに繰り返しテストをすることができたりと何かと便利だ。…

C#からMeCabを使ってみる

障害管理用のデータベースの内容を解析して、障害原因の傾向を分析するためにMeCabを使ってみた。 参考にしたのは、こちら。 http://mitc.xrea.jp/diary/044 基本的にはこのサイトに書いてあるとおり。 使ってみて気になったのは、 ループの中でTagger.parse…

C#のコードで動的にクラスをコンパイルして使用する

コードの実行中に、ソースコードをランタイムで動的にコンパイルして実行する方法。 using Microsoft.CSharp; using System.CodeDom.Compiler; using System; using System.Collections; using System.ComponentModel; using System.IO; using System.Reflec…