TimberLandChapel's Tech Blog

TimberLandChapel provide Tips, tech note and scribbling.
Updated my site as English site for APAC users.
TLC.com .Metrix 4.0 Beta1 released

サイトの日本語化方法はこちら

Syndication

News

INETAJ

情報処理関係官公庁

SQL Server

TLC.com

Microsoft

クリエイティブ・コモンズ

http://www3.clustrmaps.com/
Related Resources
Google Libraries API - Developer's Guide
http://code.google.com/apis/libraries/devguide.html#jquery
Microsoft Ajax Content Delivery Network
http://www.asp.net/ajaxlibrary/cdn.ashx
jQuery
http://jquery.com/
Objective

This is technical blog. My objective is to share tips or technique. So disclosing the source code is one of important way for it. There are some technique to show the source code in HTML.
On the one hand, users would like to copy the source code that can be used as is. Drag and copy isn't smart way to use sample source code in web.

Here is a sample having "Copy to clipboard" function. Click [Copy to clipboard], then you get the html code in clipboard that is displayed below.

Code Copy to clipboard
01Private Sub Sample()
02    ' This is sample
03
04    Do something...
05
06End Sub

This topic suggests the implementation of "source code copy" with jQuery. This topic doesn't show how to implement the appearance but it shows only clipboard copying.

Clipboard copy with jQuery

Long story short (not again), here is a code.

Code Copy to clipboard
01<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
02<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
03    <head>
04        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
05        <script src="https://www.google.com/jsapi?key=<!-- Change key to "your key"-->" type="text/javascript"></script>
06        <script type="text/javascript">google.load("jquery", "1.6.1");</script>
07        <title>Copy the source code into the clipboard</title>
08        <style type="text/css">
09[id|=container]{
10    display : none;
11}
12[id|=sourceToClipboard]{
13    color : #333366 !important;
14    float : right;
15    font-weight : bold;
16}
17[id|=sourceToClipboard]:hover{
18    text-decoration : underline;
19    cursor : pointer;
20    color : #333366 !important;
21    float : right;
22    font-weight : bold;
23}
24        </style>
25        <script type="text/javascript">
26$(function(){
27    $("[id^='sourceToClipboard'").click(function () {
28        var source = $("[id^='container'] p." + $(this).attr("class")).text();
29        source = source.replace(/\\n/g, "\r\n");
30        source = source.replace(/\\t/g, "\t");
31        source = source.replace(/\\s/g, " ");
32        clipboardData.setData("Text", source);
33        alert("Now source is in your clipboard.");
34    });
35});
36        </script>
37    </head>
38    <body>
39        <p>Following is sample code.</p>
40        <div class="codeheader">Code <span id="sourceToClipboard-clipboardsample" class="clipboardsample">Copy to clipboard</span></div>
41        <div class="code">
42            <div>Private Sub Sample()</div>
43            <div>    ' This is sample</div>
44            <div></div>
45            <div>    Do something...</div>
46            <div></div>
47            <div>End Sub</div>
48        </div>
49        <div id="container-clipboardsample">
50            <p class="clipboardsample">Private Sub Sample()\n\t' This is sample\n\n\tDo something...\n\nEnd Sub\n</p>
51        </div>
52    </body>
53</html>

Points

1 Contents: Main contents contains only primary html tags.

Code
40        <div class="codeheader">Code <span id="sourceToClipboard-clipboardsample" class="clipboardsample">Copy to clipboard</span></div>
41        <div class="code">
42            <div>Private Sub Sample()</div>
43            <div>    ' This is sample</div>
44            <div></div>
45            <div>    Do something...</div>
46            <div></div>
47            <div>End Sub</div>
48        </div>
49        <div id="container-clipboardsample">
50            <p class="clipboardsample">Private Sub Sample()\n\t' This is sample\n\n\tDo something...\n\nEnd Sub\n</p>
51        </div>

This content contains only [id] attribute and [class] attribute. It's just a HARD html. If you copy the source to your environment, the appearance is different from above one due to cutting out the decoration. The decoration for source code is another topic.

2 Copy: jQuery

Code
25        <script type="text/javascript">
26$(function(){
27    $("[id^='sourceToClipboard'").click(function () {
28        var source = $("[id^='container'] p." + $(this).attr("class")).text();
29        source = source.replace(/\\n/g, "\r\n");
30        source = source.replace(/\\t/g, "\t");
31        source = source.replace(/\\s/g, " ");
32        clipboardData.setData("Text", source);
33        alert("Now source is in your clipboard.");
34    });
35});
36        </script>

This implement has simple fnction.
It handles CLICK EVENT whose ID starts with keyword [sourceToClipboard]; then find a container holding source code that will be copied into clipboard. To find a target container, this code use class attribute. It uses child [p] tag having same class whose parent tag has [id] starts with keyword [container].

3 Container: holding source code [source].

Container is hidden in html. It just has only strings that will be copied into clipboard.
Strings should be escaped (\n to CrLf, \t to tab, \s to blank).

Code
49        <div id="container-clipboardsample">
50            <p class="clipboardsample">Private Sub Sample()\n\t' This is sample\n\n\tDo something...\n\nEnd Sub\n</p>
51        </div>

4 Clickable: UI similar to the [link] with CSS.

This sample uses [span] content as a "button". But [span] itself has no UI which is reminiscent of clickable.
This is implemented with only CSS on the content whose [ID] attribute starts with a keyword "sourceToClipboard".
Also with CSS, the container is hidden.

Code
08        <style type="text/css">
09[id|=container]{
10    display : none;
11}
12[id|=sourceToClipboard]{
13    color : #333366 !important;
14    float : right;
15    font-weight : bold;
16}
17[id|=sourceToClipboard]:hover{
18    text-decoration : underline;
19    cursor : pointer;
20    color : #333366 !important;
21    float : right;
22    font-weight : bold;
23}
24        </style>

5 jQuery: Using hosted jQuery library.

To use jQuery, CDN(Content Distribution Network) is useful.
This sample uses the Google Libraries API.

Code
05        <script src="https://www.google.com/jsapi?key=<!-- Change key to "your key"-->" type="text/javascript"></script>
06        <script type="text/javascript">google.load("jquery", "1.6.1");</script>
For more informations

Private Sub Sample()\n\t' This is sample\n\n\tDo something...\n\nEnd Sub\n

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n\t<head>\n\t\t<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n\t\t<script src="https://www.google.com/jsapi?key=<!-- Change key to "your key"-->" type="text/javascript"></script>\n\t\t<script type="text/javascript">google.load("jquery", "1.6.1");</script>\n\t\t<title>Copy the source code into the clipboard</title>\n\t\t<style type="text/css">\n[id|=container]{\n\tdisplay : none;\n}\n[id|=sourceToClipboard]{\n\tcolor : #333366 !important;\n\tfloat : right;\n\tfont-weight : bold;\n}\n[id|=sourceToClipboard]:hover{\n\ttext-decoration : underline;\n\tcursor : pointer;\n\tcolor : #333366 !important;\n\tfloat : right;\n\tfont-weight : bold;\n}\n\t\t</style>\n\t\t<script type="text/javascript">\n$(function(){\n\t$("[id^='sourceToClipboard'").click(function () {\n\t\tvar source = $("[id^='container'] p." + $(this).attr("class")).text();\n\t\tsource = source.replace(/¥¥n/g, "¥r¥n");\n\t\tsource = source.replace(/¥¥t/g, "¥t");\n\t\tsource = source.replace(/¥¥s/g, " ");\n\t\tclipboardData.setData("Text", source);\n\t\talert("Now source is in your clipboard.");\n\t});\n});\n\t\t</script>\n\t</head>\n\t<body>\n\t\t<p>Following is sample code.</p>\n\t\t<div class="codeheader">Code <span id="sourceToClipboard-clipboardsample" class="clipboardsample">Copy to clipboard</span></div>\n\t\t<div class="code">\n\t\t\t<div>Private Sub Sample()</div>\n\t\t\t<div>\t' This is sample</div>\n\t\t\t<div></div>\n\t\t\t<div>\tDo something...</div>\n\t\t\t<div></div>\n\t\t\t<div>End Sub</div>\n\t\t</div>\n\t\t<div id="container-clipboardsample">\n\t\t\t<p class="clipboardsample">Private Sub Sample()¥n¥t' This is sample¥n¥n¥tDo something...¥n¥nEnd Sub¥n</p>\n\t\t</div>\n\t</body>\n</html>

Posted by timberlandchapel | with no comments
Filed under:
Related Resources
Google Libraries API - Developer's Guide
http://code.google.com/apis/libraries/devguide.html#jquery
Microsoft Ajax Content Delivery Network
http://www.asp.net/ajaxlibrary/cdn.ashx
jQuery
http://jquery.com/
Objective

Using CSS "display: block;" and "display: none", It can provide "visible switch block".
Combined with more complex CSS, "Tab" UI can be implemented in HTML.

In my site, I use visible switch to provide inline translation like following.

in Japanese:
ここに日本語訳が入ります。(The Japanese translation goes here.)

This topic suggests the implementation of "visible switch" with jQuery however without "onClick" and "javascript:void(0);".

Yes it works...

To implement this scenario, there are several ways. Most typical one may be following.
Copy this html code to flatfile and view with browser. Yes it work...

You can switch visibility to click "Switch-1" or "Switch-2". This code uses "javascript:void(0);" or "#" in href. And it uses [onclick] attribute to launch javascript with "target" argument.

Code Copy to clipboard
01<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
02<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
03    <head>
04        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
05        <title>W3C valid visible switch with javascript:void(0); or #</title>
06        <script type="text/javascript">
07function dispswitch(target){
08    var obj = document.getElementById(target);
09    obj.style.display = (obj.style.display === "none") ? "block": "none";
10};
11        </script>
12    </head>
13    <body>
14        <div><a href="javascript:void(0);" onclick="dispswitch('target1');return false;">Switch-1:</a></div>
15        <div id="target1" style="display: none;">
16            This block is controled by "Switch-1".
17        </div>
18        <div><a href="#" onclick="dispswitch('target2');">Switch-2:</a></div>
19        <div id="target2" style="display: none;">
20            This block is controled by "Switch-2".
21        </div>
22        <p>Yes. It works...</p>
23    </body>
24</html>

Points

This typical code also valid as W3C XHTML 1.0 Strict.
However...

1 There is a tricky [href] attribute doing nothing.

"javascript:void(0);" or "#" do nothing. Because "onclick" attribute has main action.

2 There is a tricky [return false;] to interrupt event.

Set of [onclick] and [return false;] can cause environment-dependent problems.

3 This old approach mixes [view] and [control].

We would like to divide html and script also content and action. [onclick] attribute essentially contains script code.

4 [onclick] attribute conflicts with some CMS(Contents Management System).

It is the most troublesome issues for me. Some CMS removes [onclick] attribute automatically to avoid embedded scripts. So onclick action dosen't work.

Visible switch with jQuery

Long story short, here is a code.

Code Copy to clipboard
01<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
02<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
03    <head>
04        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
05        <script src="https://www.google.com/jsapi?key=<!-- Change key to "your key"-->" type="text/javascript"></script>
06        <script type="text/javascript">google.load("jquery", "1.6.1");</script>
07        <title>W3C valid visible switch with jquery</title>
08        <style type="text/css">
09[id|=switcher]{
10    color : #1e90ff; /* dodgerblue */
11}
12
13[id|=switcher]:hover{
14    text-decoration: underline;
15    cursor:pointer;
16    color : #1e90ff; /* dodgerblue */
17}
18        </style>
19        <script type="text/javascript">
20$(function(){
21    $(".defaultNoDisplay").css("display","none");
22    $("[id^='switcher']").click(function(){
23            var target = "[id^='" + $(this).attr("class") + "']";
24            $(target).css("display",($(target).css("display") === "none") ? "block": "none");
25    });
26});
27        </script>
28    </head>
29    <body>
30        <div>
31            <span id="switcher-1" class="target1">Switch-1:</span>
32        </div>
33        <div id="target1" class="defaultNoDisplay">
34            This block is controled by "Switch-1".
35        </div>
36        <div>
37                <span id="switcher-2" class="target2">Switch-2:</span>
38        </div>
39        <div id="target2" class="defaultNoDisplay">
40            This block is controled by "Switch-2".
41        </div>
42        <p>This document was successfully checked as XHTML 1.0 Strict.</p>
43    </body>
44</html>

Points

0 Sample: This sample uses above code.
Switch-1:
This block is controled by "Switch-1".
Switch-2:
This block is controled by "Switch-2".

This document was successfully checked as XHTML 1.0 Strict.

1 Contents: Main contents contains only primary html tags.

Code
30        <div>
31            <span id="switcher-1" class="target1">Switch-1:</span>
32        </div>
33        <div id="target1" class="defaultNoDisplay">
34            This block is controled by "Switch-1".
35        </div>

This content contains only [id] attribute and [class] attribute. It's just a HARD html.

2 Switch: jQuery and CSS

Code
19        <script type="text/javascript">
20$(function(){
21    $(".defaultNoDisplay").css("display","none");
22    $("[id^='switcher']").click(function(){
23            var target = "[id^='" + $(this).attr("class") + "']";
24            $(target).css("display",($(target).css("display") === "none") ? "block": "none");
25    });
26});
27        </script>

This jQuery has 2 blocks.

The first block controls the post-load action. This code hides contents with [defaultNoDisplay] class as a default.
By doing that, The browser with javascript-on can hide additional contents as a default. In the other hand, The browser with javascript-off shows all contents. This approach cares both environments (javascript on/off) and provides an additional experience to javascript-on.

Code
21    $(".defaultNoDisplay").css("display","none");

The second block controls visibility itself.
It handles CLICK EVENT whose ID starts with keyword [switcher]. In this sample, there are two [span] tags having [switcher] keyword.
To find switch target, this code use class attribute. To make a pair with switch and target, the target content ([div] in this case) has id that is same with switch's class attribute ([target1] in this case).

If switch is clicked, associated target content is displayed or is hidden by changing CSS (display: block/none ;).

Code
22    $("[id^='switcher']").click(function(){
23            var target = "[id^='" + $(this).attr("class") + "']";
24            $(target).css("display",($(target).css("display") === "none") ? "block": "none");
25    });

3 Clickable: UI similar to the [link] with CSS.

This sample uses [span] content as a "switch". But [span] itself has no UI which is reminiscent of clickable.
So using CSS to display the content as lightblue (It looks like clickable link, isn't it?). Also if a mouse is over the content, text underline appears.
This is implemented with only CSS on the content whose [ID] attribute starts with a keyword "switcher".

Code
08        <style type="text/css">
09[id|=switcher]{
10    color : #1e90ff; /* dodgerblue */
11}
12
13[id|=switcher]:hover{
14    text-decoration: underline;
15    cursor:pointer;
16    color : #1e90ff; /* dodgerblue */
17}
18        </style>

4 jQuery: Using hosted jQuery library.

To use jQuery, CDN(Content Distribution Network) is useful.
This sample uses the Google Libraries API.

Code
05        <script src="https://www.google.com/jsapi?key=<!-- Change key to "your key"-->" type="text/javascript"></script>
06        <script type="text/javascript">google.load("jquery", "1.6.1");</script>
For more informations
See also
  • Not yet

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n\t<head>\n\t\t<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n\t\t<script src="https://www.google.com/jsapi?key=<!-- Change key to your key-->" type="text/javascript"></script>\n\t\t<script type="text/javascript">google.load("jquery", "1.6.1");</script>\n\t\t<title>W3C valid visible switch with jquery</title>\n\t\t<style type="text/css">\n[id|=switcher]{\n\tcolor : #1e90ff; /* dodgerblue */\n}\n\n[id|=switcher]:hover{\n\ttext-decoration: underline;\n\tcursor:pointer;\n\tcolor : #1e90ff; /* dodgerblue */\n}\n\t\t</style>\n\t\t<script type="text/javascript">\n$(function(){\n\t$(".defaultNoDisplay").css("display","none");\n\t$("[id^='switcher']").click(function(){\n\t\t\tvar target = "[id^='" + $(this).attr("class") + "']";\n\t\t\t$(target).css("display",($(target).css("display") === "none") ? "block": "none");\n\t});\n});\n\t\t</script>\n\t\t<style type="text/css">\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div>\n\t\t\t<span id="switcher-1" class="target1">Switch-1:</span>\n\t\t</div>\n\t\t<div id="target1" class="defaultNoDisplay">\n\t\t\t\tThis block is controled by "Switch-1".\n\t\t</div>\n\t\t<div>\n\t\t\t<span id="switcher-2" class="target2">Switch-2:</span>\n\t\t</div>\n\t\t<div id="target2" class="defaultNoDisplay">\n\t\t\tThis block is controled by "Switch-2".\n\t\t</div>\n\t\t<p>This document was successfully checked as XHTML 1.0 Strict.</p>\n\t</body>\n</html>\n

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n\t<head>\n\t\t<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n\t\t<title>W3C valid visible switch with javascript:void(0); or #</title>\n\t\t<script type="text/javascript">\nfunction dispswitch(target){\n\tvar obj = document.getElementById(target);\n\tobj.style.display = (obj.style.display === "none") ? "block": "none";\n};\n\t\t</script>\n\t</head>\n\t<body>\n\t\t<div><a href="javascript:void(0);" onclick="dispswitch('target1');return false;">Switch-1:</a></div>\n\t\t<div id="target1" style="display: none">\n\t\t\tThis block is controled by "Switch-1".\n\t\t</div>\n\t\t<div><a href="#" onclick="dispswitch('target2');">Switch-2:</a></div>\n\t\t<div id="target2" style="display: none">\n\t\t\tThis block is controled by "Switch-2".\n\t\t</div>\n\t\t<p>Yes. It works...</p>\n\t</body>\n</html>\n

Related Resources

Here is KB from TachNet.

Definitions issues
http://technet.microsoft.com/en-us/library/bb418925.aspx
Scenarios and objectives

Security Essentials is simple solution against viruses, spyware from Microsoft.

It is usuful for, for example, test environments with virtual machine(Virtual PC or Virtual Server). We often manage some test environments in development machine (Sometimes they cover OS variation, others they cover requirement variation).

However, they are rarely connected to web directly. So definitions update fails.

We can update via proxy.

How to do it

Here is a message for update fail.

error message

This concept is very simple: We just can use IE proxy settings.

1Set the IE LAN settings to use proxy server. LAN settings

2Execute following command with [Administrator command prompt]. execute command

Code Copy to clipboard
01netsh winhttp import proxy source=ie

netsh winhttp import proxy source=ie

Posted by timberlandchapel | with no comments
Filed under:

We had a huge earthquake in Japan. It is named 'Tohoku - Pacific Ocean Earthquake'. 'Tohoku' is the name of northeastern region of Japan.

We pray for the repose of disaster victims' soul.

Also we sincerely pray to recover as soon as possible.

Following URL is our government's announcement.

http://www.kantei.go.jp/foreign/index-e.html

関連リソース
Visual Studio Team Foundation Server 2010
http://www.microsoft.com/japan/visualstudio/products/2010-editions/team-foundation-server
Upgrade Visual SourceSafe 2005 to Visual Studio Team Foundation Server 2010
http://www.microsoft.com/visualstudio/en-us/upgrade-visual-sourcesafe
シナリオと目的

Visual Studio Team Foundation Server 2010 はソースコードのバージョン管理機能を含む強力なソリューションですが,今までのバージョン管理ツールである Visual SourceSafe を使っている方も多いんじゃないでしょうか。
Visual SourceSafe はクライアント OS でも稼働したので,個人での使用でも便利でした。
しかし,TFS 2010 は,なんとクライアント OS 上でもサポートされました!(やった!)
なので,TFS 2010 の強力な機能を手軽に利用できるようになっています。

ここで問題になるのが,VSS から TFS への古いコードの移行です。移行ツールが用意されているのですが,ちょっと込み入った操作が必要です。

この記事は,VSS から TFS への移行の一連の流れについて記述しています。

この記事は次のバージョンに基づいて記述しています。 Visual Studio Team Foundation Server 2010 (30319.01.10).

TFS のインストール

TFS のインストールノートを参照したい方は次のリンクをどうぞ。

インストールノート
TFS の初期設定

インストールが完了したばかりの TFS には初期設定が必要です。 [構成センター] の [基本] ウィザードで基本的な機能を有効にすることができます。このウィザードはインストーラーの完了画面からか,[Team Foundation 管理コンソール] から起動できます。

この手順では基本的な機能である,ソースコード管理とチームクエリを有効にします。

1左側のペインで [基本] を選択し,[ウィザードの開始] をクリックします。 basic wizard

2このウィザードの動作に関するフィードバックを送信してもよい場合は,チェックをいれます。[次へ] をクリックします。 feedback

3データベースの設定を選択します。既存の SQL Server を使用する場合は,下の選択肢を,SQL Server Express をこのウィザードで構成する場合は,上の選択肢を選択して,[次へ] をクリックします。 database setting

4既存の SQL Server のインスタンス名を入力して,[次へ] をクリックします。 database instance

5設定内容を確認して,[次へ] をクリックします。 confirm

6まず,システム構成のチェックが走ります。構成チェックにすべてパスしたら,[構成] をクリックします。 validation progress validation result

7構成が実行され,完了したら [次へ] をクリックします。 config progress config result

8基本機能の構成は以上です。 result

VSS から TFS への移行

VSS から TFS への移行はちょっとトリッキーで,概ね次の手順が必要です。
VSSConverter は TFS 2010 のための移行ツールです。
1パッチ KB950185 を適用します。 2新しい移行先の [チーム プロジェクト] を作成します。 3VSSConverter 用の設定ファイル [settings.xml] を作成します。 4VSSConverter で移行設定の検証を実行します。 5VSSConverter で移行する。

ステップバイステップ:移行

パッチ KB950185 の適用

KB950185
http://code.msdn.microsoft.com/KB950185/Wiki/View.aspx http://code.msdn.microsoft.com/KB950185/Release/ProjectReleases.aspx?ReleaseId=1123

KB950185 が適用されていない場合は, 次のメッセージが表示されます。 KB950185 alert

1[VS80-KB947647-X86-INTL.exe] をダウンロードして,(なんで KB947647?) 実行して,[OK] をクリックします。 KB950185 welcome

2ライセンス条項を読んで,回答を選択し,[次へ] をクリックします。 KB950185 EULA

3パッチの適用が実行されます。 KB950185 progress

4パッチの適用は以上です。 KB950185 result

移行先の新規 [チーム プロジェクト] の作成

移行先の [チーム プロジェクト] がない場合は,(この手順書では [fromVSS] が移行先です),次のエラーメッセージが表示されます。 destination lost

1Visual Studio の [チームエクスプローラー] の右クリックメニューで,[新しいチームプロジェクト] をクリックします。
ダイアログが起動したら,チームプロジェクトの名前と説明を入力します。この手順書では,[fromVSS] としています。[次へ] をクリックします。 destination create

2プロセステンプレートを指定して,[次へ] をクリックします。 destination template

3[空のソース管理フォルダーを作成する] を選択して,[次へ] をクリックします。 destination folder

4設定を確認して,[完了] をクリックします。 destination folder

5作成が実行されます。 destination progress

6チームプロジェクトの作成は以上です。 destination result

VSSConverter 用 [settings.xml] の作成

次の XML が VSSConverter 用の設定定義です。この設定ファイルでは,次の項目を設定します。この例の設定ファイルはVSS 内のすべてのソースを [fromVSS] に移行するように記述しています

項目 説明
VSSDatabase.name VSS の ini ファイルのあるパスを指定します。
SQL Server SQL Server のインスタンス名を指定します。TFS 用に SQL Server Express を自動構成した場合はこの項目は不要です。
TeamFoundationServer.name TFS がインストールされたマシン名を指定します。
Output.file 移行結果を出力するファイルパスを指定します。
Code クリップボードへコピー
01<?xml version="1.0" encoding="utf-8"?>
02<SourceControlConverter>
03    <ConverterSpecificSetting>
04        <Source name="VSS">
05            <VSSDatabase name="!!! vss data path !!!"></VSSDatabase>
06            <SQL Server="!!! SQL Server instance name !!!"></SQL>
07        </Source>
08        <ProjectMap>
09            <Project Source="$/" Destination="$/fromVSS"></Project>
10        </ProjectMap>
11    </ConverterSpecificSetting>
12    <Settings>
13        <TeamFoundationServer name="!!! TFS Server name !!!"
14            port="8080"
15            protocol="http"
16            collection="tfs/DefaultCollection" />
17        <Output file="!!! analysis output path !!!"></Output>
18    </Settings>
19</SourceControlConverter>
参照

VSSConverter での移行設定の検証

VSSConverter は移行用のコマンドラインツールで,既定では次のパスにインストールされています。

%Program Files%Microsoft Visual Studio 10.0\Common7\IDE

移行設定の検証を行う場合は,[analyze] を使います。

Code クリップボードへコピー
01vssconverter analyze [settings.xml path]

VSSConverter での移行

検証後,移行を実行します。

Code クリップボードへコピー
01vssconverter migrate [settings.xml path]

1[ y ] を入力します。 migration start

2[VSS 管理者パスワード] を入力します。(管理者パスワードを知らない場合は,おそらく空白です。単に [Enter] で) [ y ] を入力します。 migration password

3移行が実行されます。 migration progress

4移行は以上です。 migration result

移行済みソース管理の確認

移行後は,[チームエクスプローラー] 内にすべてのプロジェクトが表示されます(この手順書では [fromVSS] が移行先です)migration result

参考情報

<?xml version="1.0" encoding="utf-8"?>\n<SourceControlConverter>\n\t<ConverterSpecificSetting>\n\t\t<Source name="VSS">\n\t\t\t<VSSDatabase name="!path!"></VSSDatabase>\n\t\t\t <SQL Server="!SQL Server!"></SQL>\n\t\t</Source>\n\t\t<ProjectMap>\n\t\t\t<Project Source="$/" Destination="$/fromVSS"></Project>\n\t\t</ProjectMap>\n\t</ConverterSpecificSetting>\n\t<Settings>\n\t\t<TeamFoundationServer name="!TFS!"\n\t\t\tport="8090"\n\t\t\tprotocol="http"\n\t\t\tcollection="tfs/DefaultCollection" />\n\t\t<Output file="!path!"></Output>\n\t</Settings>\n</SourceControlConverter>

Posted by timberlandchapel | with no comments
関連リソース
シナリオと目的

Visual Studio Team Foundation Server 2010 のインストール手順です。

この記事は次のバージョンに基づいて記述しています。 Visual Studio Team Foundation Server 2010 (30319.01.10).

1setup exe を起動して, [次へ] をクリックします。 welcome

2ライセンス条項を読んで,回答を選択し, [次へ] をクリックします。 license

3インストール先とインストールするコンポーネントを選択して, [次へ] をクリックします。(一般的にはデフォルトで充分です) components

4インストールが開始されます。 installation

5インストール完了です。 result

Related Resources
Visual Studio Team Foundation Server 2010
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/team-foundation-server
Upgrade Visual SourceSafe 2005 to Visual Studio Team Foundation Server 2010
http://www.microsoft.com/visualstudio/en-us/upgrade-visual-sourcesafe
Scenarios and objectives

Visual Studio Team Foundation Server 2010 powerful version-control features. But we already have an existing version-control facility: Visual SourceSafe.
Visual SourceSafe was very convenient for personal use. Because it is able to be installed on desktop OS.
In the other hand, current version of TFS supports client OSs with only few limitations [Fantastic!!]. Now we can use advantaged functions with TFS.

However, we have to migrate old archives from VSS to TFS. We have a tool for migration but this progress is a little bit tricky.

This article shows how to migrate archives from VSS to TFS.

This article is based on Visual Studio Team Foundation Server 2010 (30319.01.10).

Instration of TFS

If you would like to review installation notes, a link is below.

Visual Studio Team Foundation Server 2010 Installation notes
Configuration and initial setings for TFS

Originally installed TFS needs initial settings. The [Basic Configuration Wizard] helps us to configure the basic features of TFS. This wizard can be launched by install result form or you can launch from TFS management console.

This process open the TFS main functions; source control, team query.

1Select [Basic] in left pane, click [Start Wizard]. basic wizard

2If you would like to feedback, Check [Yes]. Click [Next]. feedback

3Select your database setting. If you have existing instance of SQL Server, lower one. If you have no SQL Server, you can compose SQL Server Express. In this case, we choose a more complex scenario using existing SQL Server. Click [Next]. database setting

4Fill in the existing SQL Server instance name. Click [Next]. database instance

5Confirm the settings: database, web, collections, etc. Click [Next]. confirm

6At first, the validation for setting is launched. If your system passes all checks, you can click [Configure]. validation progress validation result

7Configurations will progress. After all configurations finished, click [Next]. config progress config result

8That's all for configuration. You can check the result. result

Migration from VSS to TFS

Migration from VSS to TFS is a little bit tricky. The correct procedure is as follows.
VSSConverter is a migration tool for TFS 2010.
1Apply a patch; KB950185. 2Create a new destination [Team project]. 3Create a new VSSConverter settings.xml 4Analyze settings with VSSConverter. 5Migrate with VSSConverter.

Step by step migration

Apply a patch; KB950185

KB950185
http://code.msdn.microsoft.com/KB950185/Wiki/View.aspx http://code.msdn.microsoft.com/KB950185/Release/ProjectReleases.aspx?ReleaseId=1123

If your vss has not been applied KB950185, following alert is shown during migration. KB950185 alert

1Download [VS80-KB947647-X86-INTL.exe] file(Why KB947647?) and double click it. And Click [OK]. KB950185 welcome

2Read the EULA and choose your answer. KB950185 EULA

3The installation starts immediately. KB950185 progress

4That's all for applying a patch. KB950185 result

Create a new destination [Team project].

If you have not created a destination [Team project] ([fromVSS] is a destination in this procedure), following alert is shown during migration. destination lost

1Click [Create new team project] on right click menu in VS Team Explorer, [New Team Project] dialog is launched.
Fill up team project name and description. In this procedure, the name is [fromVSS]. Click [Next]. destination create

2Select a process template you would like to use. Click [Next]. destination template

3Choose [Create an empty source control folder]. Click [Next]. destination folder

4Confirm the settings. Click [Finish]. destination folder

5The creation starts immediately. destination progress

6That's all for team project creation. destination result

Create a new VSSConverter settings.xml

The following XML is a setting definition for VSSConverter. In this settings.xml, following item should be included. This settings.xml migrates all VSS source controls into [fromVSS] team protect's source control.

item description
VSSDatabase.name Describe a VSS's ini file path.
SQL Server Describe a SQL Server instance name. If you use SQL Server Express, this element doesn't need.
TeamFoundationServer.name Describe a TFS machine name.
Output.file Describe an Output file path.
Code Copy to clipboard
01<?xml version="1.0" encoding="utf-8"?>
02<SourceControlConverter>
03    <ConverterSpecificSetting>
04        <Source name="VSS">
05            <VSSDatabase name="!!! vss data path !!!"></VSSDatabase>
06            <SQL Server="!!! SQL Server instance name !!!"></SQL>
07        </Source>
08        <ProjectMap>
09            <Project Source="$/" Destination="$/fromVSS"></Project>
10        </ProjectMap>
11    </ConverterSpecificSetting>
12    <Settings>
13        <TeamFoundationServer name="!!! TFS Server name !!!"
14            port="8080"
15            protocol="http"
16            collection="tfs/DefaultCollection" />
17        <Output file="!!! analysis output path !!!"></Output>
18    </Settings>
19</SourceControlConverter>
See also

Analyze settings with VSSConverter.

VSSConverter is a command line tool. The default installation path is following;

%Program Files%Microsoft Visual Studio 10.0\Common7\IDE

To analyze the migration, you can use [analyze] option as following;

Code Copy to clipboard
01vssconverter analyze [settings.xml path]

Migrate with VSSConverter.

After analyzing the migration, you can migrate. Commandline is following;

Code Copy to clipboard
01vssconverter migrate [settings.xml path]

1Type [ y ] to continue. migration start

2Type [VSS administrator password]. If you have no password, it may be [blank] (just hit [Enter]). Type [ y ] to continue. migration password

3The migration starts immediately. migration progress

4That's all for migration. You can check analysis.xml file. migration result

Check migrated projects.

After migration, you can get all migrated projects in destination [Team project]([fromVSS] is a destination in this procedure). migration result

For more informations

<?xml version="1.0" encoding="utf-8"?>\n<SourceControlConverter>\n\t<ConverterSpecificSetting>\n\t\t<Source name="VSS">\n\t\t\t<VSSDatabase name="!path!"></VSSDatabase>\n\t\t\t <SQL Server="!SQL Server!"></SQL>\n\t\t</Source>\n\t\t<ProjectMap>\n\t\t\t<Project Source="$/" Destination="$/fromVSS"></Project>\n\t\t</ProjectMap>\n\t</ConverterSpecificSetting>\n\t<Settings>\n\t\t<TeamFoundationServer name="!TFS!"\n\t\t\tport="8090"\n\t\t\tprotocol="http"\n\t\t\tcollection="tfs/DefaultCollection" />\n\t\t<Output file="!path!"></Output>\n\t</Settings>\n</SourceControlConverter>

Posted by timberlandchapel | with no comments
Related Resources
Scenarios and objectives

Here is a installation notes for Visual Studio Team Foundation Server 2010.

This article is based on Visual Studio Team Foundation Server 2010 (30319.01.10).

1Launch setup exe file. Just click [Next]. welcome

2Read the license agreement and choose your answer. Click [Next]. license

3Set destination folders and check components you would like to install. Normally, default is enough. Click [Next]. components

4The installation starts immediately. installation

5That's all for installation. You can check the release notes. result

For more informations
Related Resources

Here are posts for Microsoft Connect.

SQL Server 2005 Tools Windows Installer dialog runs and errors when building a Setup project (VS 2008)
http://connect.microsoft.com/VisualStudio/feedback/details/327997
Windows Installer dialog runs and errors when building a Setup project
http://connect.microsoft.com/VisualStudio/feedback/details/113155
Scenarios and objectives

Even if you use Visual Studio 2010, the phenomenon is completely same. Probably the same reason causes this same result.

Also, fortunately, the workaround still affect.

Microsoft said:
Installing a later version of mergemod.dll seems to fix the issue. You can install a later mergemod.dll by installing Orca:
http://connect.microsoft.com/VisualStudio/feedback/details/113155

So, I downloaded a newest Windows 7 SDK which contains ORCA and installed it. Success!

Windows 7 SDK

Here is a installation note for Windows 7 SDK.

Microsoft Windows SDK for Windows 7 and .NET Framework 4

1Download web setup exe file and double click it. Just click [Next]. welcome

2Read the license agreement and choose your answer. Click [Next]. license

3Set destination folders. Click [Next]. destinations

4Check components you would like to install. Normally, default is enough. Click [Next]. components

5Confirm and click [Next]. confirm

6The installation starts immediately. installation

7That's all for installation. You can check the release notes. result

Orca

Next step is a installation of Orca.

hint
Default path of Orca (Windows 7 SDK)

%Program Files%Microsoft SDKs\Windows\v7.1\Bin\Orca.Msi

1Double click .msi file. Just click [Next]. welcomeOrca

2Read the license agreement and choose your answer. Click [Next]. licenseOrca

3Choose installation type. [Complete] is best. Click [Next]. installationType

4Confirm and click [Next]. confirmOrca

5The installation starts immediately. installationOrca

6That's all for installation. resultOrca

Posted by timberlandchapel | with no comments
Filed under:
Related Resources
Objective

Our final goal is to catch the history and growth curve of the source code. .Metrix has two main features. codehistory

How to use [History commenter]

One of main feature is code history commenter. In [TLC.com .Metrix Options], there are 4 types of code history keyword. tools option menu

Revising a code

1 If you'd like to revise your code, type ['&U] (by default) and hit enter. original revised

2 Then you get special comment clip. special clip

3 Put old source codes into the clip and commentize it then add new codes inside of the clip. move into clip

It will be revise mark for analyzer. In option setting, you can change a keyword for each comment type. Also you can change a comment string and start-end mark, too.

Reason for change

If you turn on [Ask the reason for each change] option, .Metrix asks you a reason of change automatically and add it into comment. reason dialog ckip with reason

Bug tracking

Bug mark helps you to log a bug.

If you would like to log a bug, just add bug mark after keyword (for example, ['&U@] will be bug fix revising). bug mark

How to use [History commenter]

Code analyzer analyzes your code's basic metrix.

Growth curve

It shows all code, code (body), comment and blank. Also it shows history of code change marked with history commenter. codehistory

Here is an example which is marked last commenter's example. There is 4 lines updated code. history example1 history example2

Bug tracking

Also it shows history of bug count marked with history commenter. bug count

Options

Options are in [Analyzer] tab.
If you turn on [Analyze code on Build], .Metrix walk-through your code and save metrixes.
If you turn on [Ignore generated code], analyzer skips [.designer.vb] files.
If [Display report after build] is on, metrix report will be shown automatically.
At last, [Target date] filters a start point of history and bug count on next analyze.
analyze option

Additional function: [Code snippet]

[Use code snippet] provides simple method to resist and use a snippet.

Insert a code snippet

1 If you'd like to insert code snippet, type ['&S] (by default) and hit enter.

2 You can select which code should be inserted. Click [OK]. select snippet

3 Selected code snippet will be insert. code snippet

Add new code snippet

1 In [TLC.com .Metrix Options], click [Edit] button.

2 You can [Add], [Edit] and [Delete]. edit snippet

3 You should fill [Keyword] and [Code snippet] at least. code snippet editor

For more informations
Posted by timberlandchapel | 1 comment(s)
Filed under:
Scenarios and objectives

This article describes installation of TLC.com dotMetrix 4.0 Beta1.
This article based on TLC.com dotMetrix 4.0 Beta1 version.

Related Resources
Enum

Here is a step-by-step installation for TLC.com .Metrix 4.0 Beta1. The installation requires administrator login.

1 Download .msi file and double click it. Just click [Next]. welcome

2 Select installation folder and choose user it will be installed. Then click [Next]. folder

3 Confirm and click [Next]. confirm

4 The installation starts immediately. start

5 If you face UAC window, click [yes]. uac

6 That's all for installation. finish

Check

If successfully installed, you will see a .Metrix menu on [Tools] option. tools

See also
TLC.com .Metrix 4.0 Beta1
Posted by timberlandchapel | 1 comment(s)
Filed under:

TLC.com .Metrix 4.0 Beta1 release note

[Installation notes]

The installation requires administrator login. If you get UAC window, permit it. If a previous version of .Metrix is already installed, please remove it. If you receive notification that the installation failed, refer to the following log file.

%Program Files%\TimberLandChapel.com\.Metrix4.0.log

[Requirement and support]

  • .Metrix 4.0 requires Visual Studio 2010.
  • .Metrix supports for Visual Studio 2010 and Visual Basic.NET.
Visual Studio is product of Microsoft.

[End user license agreement]

1. AGREEMENT.
You may install .Metrix on a single computer. If you do not agree to the terms of this Agreement, you may not use .Metrix.

2. COPYRIGHT.
.Metrix is owned by TimberLandChapel.

3. "AS IS"
TimberLandChapel provides .Metrix "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

4. Version
.Metrix 4.0 is currently in beta version. If you encounter a bug, please wait later version or feedback to me. This version supports only primitive syntaxes based on VB.NET 2005.

[How to use]

.Metrix has two main features. Our final goal is to catch source code history and curve of growth.

1. History commenter

One of main feature is code history commenter. In [TLC.com .Metrix Options], there are 4 types of code history keyword. If you revise your code, type ['&U] (by default) and hit enter. Then you get special comment clip. Put old source code into clip and commentize it and add new code inside of clip. It will be revise mark for analyzer. In option setting, you can change a keyword for each comment type. Also you can change a comment string and start-end mark, too.

If you turn on [Ask the reason for each change] option, .Metrix asks you reason of change automatically and add it into comment.

Bug mark helps you to log a bug. If you would like to log a bug, just add bug mark after keyword (for example, ['&U@] will be bug fix revising).

2. Code analyzer

Code analyzer analyzes your code's basic metrix. It shows all code, code (body), comment and blank. Also it shows history of code change marked with history commenter and bug count.

Options are in [Analyzer] tab.

If you turn on [Analyze code on Build], .Metrix walk-through your code and save metrixes.

If you turn on [Ignore generated code], analyzer skips [.designer.vb] files.

If [Display report after build] is on, metrix report will be shown automatically.

At last, [Target date] filters a start point of history and bug count on next analyze.

3. Others

[Use code snippet] provides simple method to resist and use a snippet.

[Contact]

Posted by timberlandchapel | 2 comment(s)
Filed under:

サイトの表示言語を日本語に設定したい方は,次の手順に従ってください。

1. 登録ユーザーとしてログインして,[Edit Profile] をクリックします。

Edit Profile

2. プロファイルページで,[About] タブをクリックします。

Edit Profile

3. 中段の言語設定を,[Japanese] に変更します。

Edit Profile

4. プロファイルページの下のほうにある,[Save] をクリックして設定を保存します。

Edit Profile

5. 以降はサイトの設定が日本語に変更されます。

Edit Profile

注意:サイトの共通機能の設定を日本語化するだけですので,既に英語で提供されているコンテンツを日本語化するわけではありません。

Posted by timberlandchapel | with no comments

This policy was written in Japanese. If the English version of this policy conflicts with the Japanese version, the Japanese version overrrides the English one.

利用規約

Date of Last Revision: February 13, 2011.

This policy applies to all users of TimberLandChapel.com. By using or accessing TimberLandChapel.com, you agree to this policy.

!!! Please respect this at least !!!

Please observe the following provisions for the effective operation of the forum in 'TimberLandChapel.com Community Stage Forums'


■General manner

The community is society. Please observe general manners (civility, polite language etc.).
Please do not post advertising or publicity unrelated to community activities.

 


■Posting questions etiquette

If you do a Multi-post (same question to multiple boards, etc.), please mention that your post is a multi-post.
However, other community sites in most cases prohibits a multi-post. So please refrain from multi posts in other communities.
If you get a reply, please provide feedback (the results report, reply, thank you).
Question status information ('closed', 'additional info' etc.) put into top of the title makes life easy for other viewers.

!!! When finding out about the multiple posts
If someone made a multi-post, please refrain from posting "This post is a multi-post".
In TLC.com CS, we would like to ask you to simply not reply to multi posts.

 


■Posting answers etiquette

If you feel that some post isn't well-mannered (Inappropriate questions, likely to be found by searching, Incoherent question etc.), 'just don't reply to it'.

1. End-User License Agreement

Please see End-User License Agreement.

2. Protecting the rights of others

The user shall not make posts that violate or interfere the rights of others or that violate the law.

3. Limitation Of Liability

We shall not be liable any problems happened at this site between users.

TimberLandChapel.com tries to improve our site; however users USE IT AT YOUR OWN RISK.

We provide TimberLandChapel.com "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

4. Disputes

Litigation related to this Agreement or Litigation arising out of or related to us or dispute against us shall be resolved in the courts in Tokyo, Japan.

Posted by timberlandchapel | with no comments

Office 2007 用 2003 互換リボン を更新しました。

  • すべてのインストーラで,「すべてのユーザー」にアドインをインストールする機能を追加しました。

インストール手順の詳細はこちらを参照してください。(ベータ時のものです)

【Office Excel】Excel 2007 に Excel 2003 に似せたメニューを追加する
http://blogs.timberlandchapel.com/blogs/timberlandchapel/archive/2007/09/06/office-excel-excel-2007-excel-2003.aspx

ダウンロードはこちら 

【Office 2007】TLC.com Office 2007 用 「Office 2003 互換メニュー」 アドイン Release 1.1
※ 統合パッケージ
http://blogs.timberlandchapel.com/files/folders/officesystem/entry2255.aspx
【Office 2007】TLC.com PowerPoint 2007 用 「PowerPoint 2003 互換メニュー」 アドイン Release 1.1
http://blogs.timberlandchapel.com/files/folders/officesystem/entry2254.aspx
【Office 2007】TLC.com Excel 2007 用 「Excel 2003 互換メニュー」 アドイン Release 1.1
http://blogs.timberlandchapel.com/files/folders/officesystem/entry2186.aspx
【Office 2007】TLC.com Word 2007 用 「Word 2003 互換メニュー」 アドイン Release 1.1
http://blogs.timberlandchapel.com/files/folders/officesystem/entry2187.aspx

 

既存のベータパッケージや Release 1.0 をアンインストールして,新しいパッケージを導入してください。

大変お手数をおかけいたします。

powered by TimberLandChapel

More Posts Next page »