2008/12/30

加速開啟 VS2008 及 SQL Server Management Studio

在捷徑的目標位置後加上 -nosplash

步驟:
  1. 在捷徑圖示上按右鍵選 "內容"
  2. 選擇 "捷徑" 標籤
  3. 在 "目標" 內容最後加上 -nosplash
    例如: "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" -nosplash
  4. 套用/確定, 完成設定

如此在開啟時,便不會顯示開始的歡迎視窗 :)

2008/11/14

Visual Studio - JScript Editor 支援 -vsdoc.js IntelliSense 文件

VS2008 愈來愈聰明了!

KB958502 - JScript Editor support for “-vsdoc.js” IntelliSense documentation files

hotfix 安裝需求:
Visual Studio 2008 SP1
Visual Web Developer 2008 Express edition with SP1

執行:
若在文件中引入 javascript 檔案, 命名如: abc-1.2.3.js
VS2008 將會自動找尋對應的 -vsdoc.js 文件 (如: abc-1.2.3-vsdoc.js) 做為 intellisense 的文件來源

也就是說只要準備 abc-1.2.3.js 及 abc-1.2.3-vsdoc.js 兩個檔案
引入時只需引入 abc-1.2.3.js 檔

在外部的 js 參考也僅需加入原檔的參考, 而不需要輸入完整的 intellisense 參考檔

2008/10/29

[Blend2] Intellisense for Expression Blend 2 SP1

While coding in source code mode, XAMLntellisense is avaliable in VS2008 but not in Blend2. BUT I find a good news, now it's possible to have intellisense in Blend2. Please read articles listed below:

Articles: Intellisense for Expression Blend 2 SP1 working again! (mention details about installation steps)
Code Reference: IntelliSense For Expression Blend

Installing BlendSense in XP is as easy as what the article instructs. Under Vista OS, I have to use cmd console to execute following command:
# cd [Blend Installation Folder]
# Blend.exe -addin:Addins\Expression.Blend.Intellisense.dll

2008/10/23

[iTextSharp] iTextSharp encryption options for PDF document

iTextSharp encryption options for PDF document (setEncryption)

The userPassword and the ownerPassword can be Nothing or have zero length. In this case the ownerPassword is replaced by a random string.

The open permissions for the document can be following:
AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly, and AllowDegradedPrinting

Easy way to choose which permission to use (VS2008 intellisense):
e.g. PdfWriter.AllowPrinting

Related Articles: 循序漸進學習iTextSharp之十一(對文檔進行加密)

2008/10/22

[Silverlight] Silverlight Tools for VS2008 CHT Relased!

Silverlight Tools for VS2008 CHT is available now!!!

http://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&FamilyID=c22d6a7b-546f-4407-8ef6-d60c8ee221ed

2008/10/20

[Linux] Force to stop a running program

List all running programs
$ ps -lA

Kill a running program by PID (-9 is force to stop)
$ kill -9 [PID]









SignalNumberMeaning
HUP1控制中的終端/程序中斷
INT2鍵盤的插入指令 (同 Ctrl + C)
QUIT3鍵盤的中斷指令 (同 Ctrl + \)
TERM15程序的終止指令
KILL9程序的強制終止指令
CONT18程序的再啟動指令 (STOP後再重新啟動)
STOP19程序的停止指令 (同 Ctrl+Z)


Some more info: Process Control

2008/10/12

[jQuery] Visual jQuery

English (Official):
Visual jQuery 1.1.2

Chinese Version:
Visual jQuery API 參考
Visual jQuery 1.1 API 中文版

[jQuery] jQuery Intellisense in VS2008

Some articles about jQuery Intellisense in VS2008


Common Use:
<script src="js/jquery-core.js" type="text/javascript"></script>
<script src="js/jQuery.intellisense.js" type="text/javascript"></script>

While executing js code, it's better command out intellisense script. Otherwise, browser won't diplay correct results.

In separated js file, use:
/// <reference path="js/jQuery.intellisense.js">

[SQL] MSSQL 中文筆劃排序語法

#### 中文筆劃排序語法 (COLLATE Chinese_PRC_Stroke_ci_as) ####

SELECT * FROM [TableName]
ORDER BY [FieldName] COLLATE Chinese_PRC_Stroke_ci_as

#### 以注音符號排序語法 (COLLATE Chinese_Taiwan_bopomofo_CI_AS) ####

SELECT * FROM [TableName]
ORDER BY [FieldName] COLLATE Chinese_Taiwan_bopomofo_CI_AS

Reference: http://www.dotblogs.com.tw/topcat/archive/2008/09/18/5412.aspx

2008/09/12

PHP backend for Silverlight

Using .NET with Silverlight is great choice, and I can do so at work environment. However, I often working with PHP/MySQL at home. I wonder if I can do PHP with Silverlight doing INSERT/UPDATE/DELETE/RETRIEVE data.

Interesting in using PHP backend for Silverlight?
Check PHP backend for Silverlight

Some more links:
Writing Silverlight applications in PHP

2008/09/03

Use WCF in Silverlight 2

I don't know why I have to set BasicHttpBinding, and EndpointAddress parameters while calling WCF.

In silverlight tutorial always use below:
Dim client As New ServiceReference1.SimpleWCFClient ()

BUT, I have to declare like below syntax to make it work. It is not so dynamic coding, since I have to give the WCF file URL.

Dim client As New ServiceReference1.SimpleWCFClient ( _
New BasicHttpBinding, _
New EndpointAddress("http://localhost/SilverlightApp_Web/SimpleWCF.svc") _
)

Event Handler in VB.NET/C#

I am using VB.NET at work, but currently most of the tutorials for learning Silverlight taught in C#. I am not that familiar with C#, although I understand other similar programming language such as Java. As a result, I need to write it down for looking up in the future.

Event Handler Syntax in VB/C#:

Bold: Event Name
Bold Itatlic: Event Function

VB Syntax:

AddHandler wcService.DownloadStringCompleted, AddressOf wcService_DownloadStoriesCompleted


C# Syntax:

wcService.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wcService_DownloadStoriesCompleted);

2008/04/26

VS2008 + PHP

Visual Studio is a great IDE and editor, I use it at work for doing .NET projects. However, I would also like to use it to deal with my PHP projects, since it has better debugging function for JavaScript in VS2008.

I do not really need php IDE but code coloring.

Here is a great tool to help me out!

Visual Studio 2008 and PHP Coloring

Simple tool but great!!