2008年9月3日

記事本

http://picasaweb.google.com/robbin0919/20081031_#

http://picasaweb.google.com/robbin0919/Jasmine_#


http://kate.babyface.com.tw/NetAdmin/08200609Xen/

http://old.vosonic.com.tw/index.php?PA=support&str=firmware&id=26

http://www.wireshark.org/

12.75 * 8 =102
9.45 * 5 =47.25
5.8 * 10 =58
----------------------
9.01087

ruby@csi.com.tw

你週六要一早就到台中嗎?
jeffsu@aptg.com.tw 說:你坐8:00台北-->台中 8:52


有敬茶
依序敬茶後

收茶杯
長輩會押紅包

改稱呼後
開始掛戒指儀式
然後吃湯圓
再來就是準備工作
拍拍工作人員等等


■Google Chart API controls for Asp.NET
http://www.codeplex.com/GoogleChartNet

■東風 http://www.aziotv.tv/sysmanager/scheduleList.asp
■旅遊生活頻道 http://www.travelandliving.com.tw/asia/homepage.htm

■Inside AdSense-Traditional Chinese (中文)
http://zht-adsense.blogspot.com/?utm_source=aso&utm_campaign=ww-zh_TW-et-tipsbox&utm_medium=link

MoneyDJ理財網~技術分析學院
http://www.funddj.com/z/analyst/analyst1.htm

■A flexible charting library for .NET
http://www.codeproject.com/KB/graphics/zedgraph.aspx


■Main Page - ZedGraphWiki
http://zedgraph.org/wiki/index.php?title=Main_Page

■asp.net blog 的 source
http://www.dotnetnuke.com/opensoure

to yuchang660321

因為您這個婚禮拍攝須知問題蠻大的,所以單獨回給你,希望比較有系統,也希望有幫上忙,這一次感謝有那位在網路上很有名的專業婚宴攝影師一起研究,很多事情真的一學就會,所以也一起分享給各位,但記得吉米不是專業,只是連續15小時自HIGH學到一些東西,這只是第一次用閃燈的經驗分享,請務必研讀相關補光文獻,才能在攝影補光學上扎根。

1.事前準備
A.一定要用高容量充電電池,掛上第五電池盒(至少兩組十顆,建議eneloop或Panasonic)
B.準備五顆鹼性電池,雖然回電慢,但至少可以當備品應急(不要金頂和勁量,都有漏液經驗)
C.前一晚確定閃燈和電池都重新充電,不管有沒有滿格。(相機最好有兩顆以上的電池,D200例外)
D.確定你有多張高容量2G或4G記憶卡或兩張記憶卡加一台OTG(邊拍邊存才不怕記憶卡毀損而扼腕)
E.一定要有廣焦段變焦鏡(建議24-120mmVR、18-200mmVR、A09)
F.如果是全天拍攝,可準備24mm或35mm以上之定焦廣角大光圈
(一顆就好,會用不到,沒時間換鏡頭,有休息時間才可以跟新人玩景深遊戲)

2.閃燈使用須知
A.對於SB-800不熟的人,請務必開啟TTL+BL模式,這樣閃燈會自動分析主體與背景
(如果背景比例多餘主體,請另行斟酌。)
B.對於SB-800很熟的人,才使用單TTL(只對主體補光)或M或GN模式等手動模式。
C.戶內低屋頂:現場光源夠亮,打直跳燈加原廠柔光罩,如果光源不夠亮,使用45度或60度跳燈不加柔光罩。
D.戶內高屋頂:現場光源夠亮,打直跳燈拉出散光片與反光版。現場光源不夠亮或混亂,請閃燈直打加柔光罩。
E.戶外無反射頂:想要主體清楚補光,直打加柔光罩,想要均勻補光,請打直閃燈拉出閃光片與反光版。
F.一般不用柔光罩下TTL+BL直打,閃燈會自動分析焦端與光圈,如裝上原廠柔光罩會將閃燈強制設定在14mm。
G.SB-800的可使用範圍為14mm-105mm,太廣會出現暗區,太遠會GN值不夠,請務必確定主體焦段遠近。
H.每閃光完,會有一個高頻率的聲音,當聽到時間拉長時,如有多組電池就必須換電池,這是回電不足的徵兆。
I.不要太相信Ready燈,每一張照片有時間要看閃燈的LCD,如出現-EV訊息,代表回電不足,一定要換電池。
J.可以攜帶充電器,如果是一整天的婚禮,中午會有休息時間可以利用時間充電。
K.如不希望原廠遮光罩強制開啟14mm,可用副場軟式遮光罩來創造更多不同的補光模式。

3.婚宴搶拍原則:
A.婚禮非藝術照,沒有重來機會,寧爛勿缺,寧願無構圖或閃光不足,但是一定搶到畫面。(可全程用光圈先決)
B.確定進行流程,趕在新人前回頭拍攝,不要不好意思,留記錄才是前提,現場混亂要有爬上桌或趴地心理準備。
C.兩位攝影師閃光干擾一定會有,一定要事先溝通好誰構好圖先等第一閃才能再按快門閃第二次。
D.使用RAW檔拍攝,可以救回許多慌張設定錯誤照片。
(如果需要高速搶拍可用高ISO,但是記得要調回最低的ISO值)。
C.回電不足的照片會一片黑,但不要急著刪刪,如果是拍RAW檔,可以事後利用NC或NX來調整EV救回照片。
D.構圖不好的照片不要刪,在後製的過程的中可以利用裁減來重新構圖,所以現場要用最大解析度拍攝。
E.流水席會有現場混亂的缺陷,使用大光圈(F2.8)變焦鏡,利用散景來減低混亂又不失現場氣氛。
F.要有600張以上的心理準備,可以開啟連拍搶鏡頭,本次吉米全程15小時拍了1774張,可用照片約只有7成5。


PS.SB-800拉出的反光版,有另一個菱形透明版,那是讓光源更散的散光片,如果要用反光版建議這個也要拉出,不然反射的光效果會較不佳。

2008年8月30日

Formatting the Windows Forms DataGrid Control in Visual Basic

資料來源:http://msdn.microsoft.com/en-us/library/aa289506(VS.71,printer).aspx

©2008 Microsoft Corporation. All rights reserved.


Visual Studio Technical Articles
Formatting the Windows Forms DataGrid Control in Visual Basic

Seth Grossman
Visual Studio Team
Microsoft Corporation

December 2002

Summary: Quite a few basic tasks related to formatting the Windows Forms DataGrid control require you to create and implement your own custom column styles. However, once you are familiar with these objects, you will have a lot of power at your disposal. (11 printed pages)

Requirements

The following software is referenced within this whitepaper:

  • Visual Basic .NET 2002

Contents

Synopsis
Background
Column Styles
Basic Techniques
Advanced Scenarios
Conclusion

Synopsis

In this paper, you will:

  • Create a class that defines a custom column style for the Windows Forms DataGrid control.
  • Implement that class as a column within the DataGrid control.
  • Learn about other possible customizations to columns that will enhance the behavior of the DataGrid control.

Background

A number of tasks you may want to accomplish with the Windows Forms DataGrid control are, surprisingly, more difficult than you might expect. Primarily, this is because the Windows Forms DataGrid control is column-based, rather than cell-based. As a result, to accomplish most tasks, you have to work with the columns, not the cells themselves.

One example of a group of tasks that requires working with columns is changing the display properties of the grid (foreground color, background color, data format, and so on). These display properties are all maintained through column formatting.

Column Styles

To format columns, you need to create a column style. A column style is an object that defines what the column looks and behaves like, including such things as color, font, and the presence of controls, such as check boxes. The .NET Framework includes two types of column-style classes by default: the DataGridTextBoxColumn [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsdatagridtextboxcolumnclasstopic.asp ] and DataGridBoolColumn [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsdatagridboolcolumnclasstopic.asp ] classes. The DataGridTextBoxColumn class exposes very basic "edit box" functionality; users can enter text into it. The DataGridBoolColumn class exposes a column of check boxes within the column to represent Boolean [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystembooleanclasstopic.asp ] values.

Since neither of these column styles enables you to color the cells of the grid, you will have to create your own custom column style.

Basic Techniques

To work with column styles, you need to create a column-style object and then implement the behavior you would like it to display at run time. Specifically, you need to inherit from an existing column style (either the DataGridTextBoxColumn or DataGridBoolColumn) and then override some of its functionality.

After creating the class, you have to tell the grid to use it. Later in the paper, you will find details about how to use the custom column-style class within the grid.

Step I: Creating a Custom ColumnStyle Class

One example of a custom column style would be one that displays a column of text that, when certain criteria have been met (such as a specific value in a cell), the cell's color is set.

The following example illustrates how to implement a column style that colors the cells of a grid when the value displayed in the cell is greater than 1. The code for this class inherits from the .NET Framework's DataGridTextBoxColumn [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsdatagridtextboxcolumnclasstopic.asp ] class and overrides the Paint method, so that you can do custom painting of the cell. Note that this class expects the data in the column to be of type Integer.

Public Class ColoredTextBoxColumn
Inherits DataGridTextBoxColumn

Protected Overloads Overrides Sub Paint(ByVal graph As Graphics, _
ByVal rectbounds As Rectangle, ByVal curmngrSrc As _
CurrencyManager, ByVal RowNumber As Integer, ByVal _
ForeColorBrush As Brush, ByVal BackColorBrush As Brush, _
ByVal AlignmentRight As Boolean)

Dim ObjVal As Object
ObjVal = Me.GetColumnValueAtRow(curmngrSrc, RowNumber)

If Not (IsNothing(ObjVal) Or IsDBNull (ObjVal)) Then
Dim cellValue As Integer
cellValue = CType(ObjVal, Integer)
If (cellValue > 1) Then
' Here is where we are going to do
' the actual painting.
' Color the contents of the cell Red
' and the background of the cell Yellow.
BackColorBrush = Brushes.Yellow
ForeColorBrush = Brushes.Red
Else
BackColorBrush = Brushes.White
ForeColorBrush = Brushes.Black
End If
End If

' Call Paint from the base class to
' accomplish the actual drawing.
MyBase.Paint(graph, rectbounds, curmngrSrc, RowNumber, _
BackColorBrush, ForeColorBrush, AlignmentRight)
End Sub
End Class



In the code above, the cell's value is cast to an integer and the cells of the grid have their ForeColor and BackColor set based on some condition; in this case, the condition is "value is greater than 1". The cell's ForeColor and BackColor are painted using brushes from the System.Drawing namespace.



Step II: Programming with Your Custom Column-Style Class



Now that you have a created a custom column-style class, you can implement it within a DataGrid control.



The Windows Forms DataGrid control maintains a collection of table styles. A table style represents the details about how a specific table is drawn by the DataGrid control (the table is specified by the MappingName [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsdatagridtablestyleclassmappingnametopic.asp ] property). Each table style contains a collection of column styles. For more information about the role of table styles and how they work, see Formatting the Windows Forms DataGrid Control [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskFormattingtheDataGridAtDesignTime.asp ] .



To make use of your custom column-style class, you first instantiate the new column-style and table-style classes. Then, you add the column style to the table style. Finally, you add the table style to the grid.



Note Adding these instances of the table and column styles to your datagrid control overrides all the existing column definitions.


Once you create a custom column definition and add it to the table, you need to define all the column styles in the grid. In order to do that, create instances of the base column style for each column you want to display and add them to the table style you created as well.






Public Sub AddFormattedColoredColumn()
Dim tsProducts As New DataGridTableStyle
tsProducts.MappingName = "Products"

Dim cstbProdName As New DataGridTextBoxColumn
cstbProdName.MappingName = "ProductName"
cstbProdName.HeaderText = "Product Name"

Dim cscolUnitPrice As New ColoredTextBoxColumn
cscolUnitPrice.MappingName = "UnitPrice"
cscolUnitPrice.HeaderText = "UnitPrice"

tsProducts.GridColumnStyles.Add(cstbProdName)
tsProducts.GridColumnStyles.Add(cscolUnitPrice)
DataGrid1.TableStyles.Add(tsProducts)
End Sub



In the code above, a new table style (tsProducts) and two new column styles (cstbProdName and cscolUnitPrice) are instantiated. The mapping names for all three are set to their respective table and columns. The column styles are added to the table style's collection of column styles; then the table style is added to the DataGrid control's collection of table styles.



Be sure to call the procedure above before the grid is loaded, so that the correct data is displayed by the grid.



Advanced Scenarios



Above is a basic description and implementation of custom column styles, which is intended to give you a general idea of how to manipulate columns and cells within the DataGrid control. At this point, there are a number of options available, if you wish to do more.



Setting Other Cell Properties



You can customize a number of different qualities that the cells of the DataGrid control exhibit. You can set column alignment and column width, and you can format your data for display.



Setting Column Alignment



You can set the alignment of the cell data within columns. The column object itself does not have an Alignment property; rather, a column's alignment is set by the column style.



The following example displays two columns, "Product Name" and "UnitPrice," and sets the alignment of the cells within each. This example assumes a DataGrid control (DataGrid1) displaying the "Products" table from the Northwind database with a ColoredTextBoxColumn column (code example above).






Public Sub AddAlignedColoredColumns()
Dim tsProducts As New DataGridTableStyle
tsProducts.MappingName = "Products"

Dim cstbProdName As New DataGridTextBoxColumn
cstbProdName.MappingName = "ProductName"
cstbProdName.HeaderText = "Product Name"
cstbProdName.Alignment = HorizontalAlignment.Left

Dim cscolUnitPrice As New ColoredTextBoxColumn
cscolUnitPrice.MappingName = "UnitPrice"
cscolUnitPrice.HeaderText = "UnitPrice"
cscolUnitPrice.Alignment = HorizontalAlignment.Center

tsProducts.GridColumnStyles.Add(cstbProdName)
tsProducts.GridColumnStyles.Add(cscolUnitPrice)
DataGrid1.TableStyles.Add(tsProducts)
End Sub



In the code above, once the column styles are created and their mapping names are set to the columns, the Alignment property is set.



Note In Visual Studio .NET 2002, the text of the column headers does not correctly display if the Alignment property is set to Center.


Setting Column Width



As with alignment, width of a column is specified in a column style; the column object itself does not have a Width property. The column object itself does not have a Width property; rather, a column's width is set by the column style.



The following example displays two columns, "Product Name" and "UnitPrice", and sets the size of each. This example assumes a DataGrid control (DataGrid1) displaying the "Products" table from the Northwind database with a BackColor/ForeColor column (code example above).






Public Sub AddSizedColoredColumns()
Dim tsProducts As New DataGridTableStyle
tsProducts.MappingName = "Products"

Dim cstbProdName As New DataGridTextBoxColumn
cstbProdName.MappingName = "ProductName"
cstbProdName.HeaderText= "Product Name"
cstbProdName.Width = 250

Dim cscolUnitPrice As New ColoredTextBoxColumn
cscolUnitPrice.MappingName = "UnitPrice"
cscolUnitPrice.HeaderText = "Unit Price"
cscolUnitPrice.Width = 150

tsProducts.GridColumnStyles.Add(cstbProdName)
tsProducts.GridColumnStyles.Add(cscolUnitPrice)
DataGrid1.TableStyles.Add(tsProducts)
End Sub



In the code above, once the column styles are created and their mapping names are set to the columns, the Width property is set.



Formatting Data For Display



You can format the contents of the cell into commonly recognized formats, such as currency or dates.



Formatting the string displayed within the cell of a grid can also be accomplished with the column style. As with specifying the column's width, it is as simple as setting a property. The Format [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsdatagridtextboxcolumnclassformattopic.asp ] property of the DataGridTextBoxColumn class allows you to set a number of basic formatting types.



Keep in mind that the operating system's culture setting will also determine aspects of how the string is displayed. Markers such as currency type, decimal indicator, and units of measurement are some of the variables determined by the culture being displayed.



There are a few standard formats used by most developers. Here is a table naming the format expression, the original value from the data source (Input), the format expression's practical effect on your data (Output), and a brief description of the formatting type. Note that all of the examples in this table have English-United States (en-US) set as their culture.



Format Expressions: "English/United States" Culture




































































































Format ExpressionCultureInputOutputDescription
den-USFebruary 12, 19762/12/1976Short date: The numerical month, day, and year.
Den-USFebruary 12, 1976Thursday, February 12, 1976Long date: The day of the week, month (spelled-out), day, and year.
Ten-US11:38:00 PM11:38:00 PMLong time: The hour, minute, second, and (in appropriate cultures) AM/PM designator.
ten-US11:38:00 PM11:38 PMShort time: The hour and minute and (in appropriate cultures) AM/PM designator.
Fen-USThursday, February 12, 1976 11:38:16 PMThursday, February 12, 1976 11:38:16 PMFull date (long time): The day of the week, month (spelled-out), day, year, hour, minute, second, and (in appropriate cultures) AM/PM designator.
fen-USThursday, February 12, 1976 11:38:16 PMThursday February 12, 1976 11:38Full date (short time): The day of the week, month (spelled-out), day, year, hour, minute, and (in appropriate cultures) AM/PM designator.
C (or c)en-US32.98$32.98Currency: A string representing a monetary value. The currency, decimal separator, and other numeric information are determined by the NumberFormatInfo [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemGlobalizationNumberFormatInfoClassTopic.asp ] class and the current culture set for that thread. See Setting the Culture and UI Culture for Windows Forms Globalization [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskcustomizingsettingsforspecificcultures.asp ] for more information.



The entries in the table below are a subset of the available format expressions, each with a different culture set.



Format Expressions: Various Cultures




















































Format ExpressionCultureInputOutputDescription
Tes-ES11:38:00 PM23:38:00Long time: The hour, minute, second, and (in appropriate cultures) AM/PM designator.
ffr-FRThursday, February 12, 1976 11:38 PMjeudi 12 febrier 1976 23:38Full date (short time): The day of the week, month (spelled-out), day, year, hour, minute, and (in appropriate cultures) AM/PM designator. Note that ordering of values may change depending on the culture selected.
C (or c)jp-JP12132.98¥12,132.98Currency: A string representing a monetary value. The currency, decimal separator, and other numeric information are determined by the NumberFormatInfo [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemGlobalizationNumberFormatInfoClassTopic.asp ] class and the current culture set for that thread. See Setting the Culture and UI Culture for Windows Forms Globalization [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskcustomizingsettingsforspecificcultures.asp ] for more information.



The format you select for the data in your grid will be driven by the data being displayed. Be sure to consider the local culture of the operating system your application will run on when implementing format expressions.



The following example displays a column ("UnitPrice") formatted as a currency. This example assumes a DataGrid control (DataGrid1) displaying the "Products" table from the Northwind database with a BackColor/ForeColor column (code example above).






Public Sub AddFormattedColumn()
Dim tsProducts As New DataGridTableStyle
tsProducts.MappingName = "Products"

' Create a new column style from the example above.
Dim csUnitPrice As New ColoredTextBoxColumn
csUnitPrice.MappingName = "UnitPrice"
csUnitPrice.HeaderText= "Unit Price"
' Set the format of the column
' NOTE: The data must be of type Integer to for it to be
' formatted correctly as a currency.
csUnitPrice.Format = "c"

tsProducts.GridColumnStyles.Add(csUnitPrice)
DataGrid1.TableStyles.Add(tsProducts)
End Sub



In the code above, once the column style is created and its mapping name is set to a column, the Format property is set to currency, so that the strings representing the price will be displayed in the appropriate format.



More information about formatting strings is available in the Visual Basic documentation. For a discussion of the different types of formatting strings, see Formatting Types [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconformattingtypes.asp ] . For a list of standard date/time and numeric format strings, see Date and Time Format Strings [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcondatetimeformatstrings.asp ] and Standard Numeric Format Strings [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconstandardnumericformatstrings.asp ] .



Implementing Graphics Within Cells



In addition to formatting the contents of the cells, you can tell the grid to paint itself in a variety of fashions. The System.Drawing namespace provides you with some interesting options for customizing columns with graphics.



Creating Textured Backgrounds Using Brushes



If your project calls for something less traditional than the ColoredTextBox class we created earlier, you can use one of the brushes provided in the System.Drawing.Drawing2D namespace. As an example, try replacing the ForeColorBrush and BackColorBrush specified in the code sample in the section "Step I: Creating a custom ColumnStyle class":






BackColorBrush = New SolidBrush(Color.Yellow)
ForeColorBrush = New SolidBrush(Color.Red)



with the following code:






BackColorBrush = New System.Drawing.Drawing2D.HatchBrush _
(Drawing2D.HatchStyle.SolidDiamond, Color.Plum, Color.Thistle)
ForeColorBrush = New SolidBrush(Color.DarkBlue)



This new code uses an instance of the HatchBrush [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingdrawing2dhatchbrushclasstopic.asp ] class to paint the background in a series of filled diamonds (the filled-diamond pattern is a member of the HatchStyle [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingdrawing2dhatchstyleclasstopic.asp ] enumeration). You can experiment with the different brush options available in the Drawing2D namespace to find a combination that is appealing to you.



Note Be sure to call the Dispose method [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingbrushclassdisposetopic.asp ] when your code is finished using a brush.


Conclusion



As you can see, there are number of common tasks related to the Windows Forms DataGrid control that require creating and implementing your own custom column styles. Once you have begun working with these objects, a great deal of power is available to you. You can paint cells with a variety of brushes, set column alignment or width, or use the .NET Framework to format the contents of the grid's cells.





2008年8月25日

Blogspot表格的問題

作者: Shuhaur (D.K.) 看板: Google
標題: Re: [問題] Blogspot表格的問題
時間: Sun Aug 24 21:32:50 2008

※ 引述《rotch512 (孝順行善不能等)》之銘言:
: 因為我不曉得怎麼用 Blogspot 「直接」造出一個表格
: 所以就直接用 HTML 的語法寫
: 結果表格是出來了
: 但是表格上方有一大塊的空白
: 不曉得是否有板友遇過這樣的問題
: 請問該如何解決呢?




table


請用...


--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.121.23.220
※ 編輯: Shuhaur 來自: 122.121.23.220 (08/24 21:33)
[1;37m推 [33mChampionHare [m [33m:推 +1 [m 08/24 21:41

2008年8月8日

INFO: OleDbType 列舉型別與 Microsoft Access 資料類型

資料來源處: http://support.microsoft.com/kb/320435/zh-tw
本文說明 Microsoft . NET 平台 OLE DB 型別如何對應至 Microsoft Access 資料型別之資料行。


其他相關資訊


當您使用 Access 介面來設計資料表, 您看到選擇數個可設定到資料庫資料型別不相符的欄位型別。 這是因為這些 「 類型 」 是只要顯示格式和不會決定資料型別。 存取使用其他屬性不一定會公開 (Expose) 透過 Microsoft OLE DB Provider for Jet 來決定如何格式化資料。



這些屬性的範例如下:
一般日期 Long Date 長時間 中型時間 Short 時間 中型日期 Short Date 是顯示格式為 DateTime 資料型別。
超連結 是一種針對存取 文字 資料型別的顯示格式。
True / False 開 / 關 兩者都對應至 Access 是 / 否 資料類型。

最常見的資料型別對應的清單


下表列出最常見的資料類型中使用 Microsoft Access 和這些資料型別如何關聯到 OleDbType 列舉型別與 Microsoft . NET Framework 資料型別。



存取類型名稱資料庫資料類型OLE DB 型別. NET Framework 型別 成員名稱 ]
文字VarWCharDBTYPE_WSTRSystem . StringOleDbType.VarWChar
備忘LongVarWCha rDBTYPE_WSTRSystem . StringOleDbType.LongVarWChar
位元組數目:UnsignedTinyIntDBTYPE_UI1System . ByteOleDbType.UnsignedTinyInt
是 / 否布林值DBTYPE_BOOLSystem . BooleanOleDbType.Boolean
日期 / 時間DateTimeDBTYPE_DATESystem . DateTimeOleDbType.date
貨幣十進位DBTYPE_NUMERICSystem . DecimalOleDbType.numeric
十進位數:十進位DBTYPE_NUMERICSystem . DecimalOleDbType.numeric
Double 數目:雙精度浮點數DBTYPE_R 8System . DoubleOleDbType.Double
Autonumber 複寫 (ID)GUIDDBTYPE_GUIDSystem.GuidOleDbType.guid
複寫 (ID) 數目:GUIDDBTYPE_GUIDSystem.GuidOleDbType.guid
Autonumber (長整數)整數DBTYPE_I4System . Int 32OleDbType.integer
(Long Integer) 數目:整數DBTYPE_I4System . Int 32OleDbType.integer
OLE 物件LongVarBinaryDBTYPE_BYTESSystem . Byte 陣列OleDbType.LongVarBinary
單一數目:單一DBTYPE_R4System . SingleOleDbType.single
整數數目:SmallIntDBTYPE_I2System . Int 16OleDbType.SmallInt
二進位VarBinary *DBTYPE_BYTESSystem . Byte 陣列OleDbType.binary
超連結VarWCharDBTYPE_WSTRSystem . StringOleDbType.VarWChar


* 此資料型別是無法使用 Access 設計工具使用者介面中。 您必須建立這個資料型別透過程式碼。

参考



如需資料型別, 請造訪下列 MSDN 網站:

OLE DB Provider for Microsoft Jet 資料型別支援:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/oledbprovjet_data_type_support.asp


OLE DB Provider for Microsoft Jet DBPROPSET_JETOLEDB_COLUMN 中的提供者特有的屬性:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/oledbprovjet_provider_specific_properties_in_dbpropset_jetoledb_column.asp
OleDbType 列舉型別
這篇文章中的資訊適用於:
•Microsoft ADO.NET 1.0
•Microsoft ADO.NET 1.1
•Microsoft Visual Studio .NET 2002 Professional Edition
•Microsoft Visual Studio .NET 2003 Professional Edition
•Microsoft Visual Studio .NET 2002 Enterprise Architect
•Microsoft Visual Studio .NET 2003 Enterprise Architect
•Microsoft Visual Studio .NET 2002 Enterprise Developer
•Microsoft Visual Studio .NET 2003 Enterprise Developer
•Microsoft Visual Studio .NET 2002 Academic Edition
•Microsoft Visual Studio .NET 2003 Academic Edition

2008年8月5日

[楓之谷]法師加點心得

法師加點心得
基本設置
創新人物之前要先知道各屬性對楓之谷法師的影響.
法師最重要的是智力.其次才是幸運.為什麼幸運跟法師有關係?
因為許多法師裝備要求幸運數值.幸運不夠可是連裝備都不能穿.況且幸運可是會增加命中率的喔!
除非玩家想走(全智法).那就可以不點幸運.最普遍法師的配點方式還是智力加幸運.
升級時智力加4幸運加1.
而力量和敏捷都維持不變~初心者配點:力量4,敏捷4, 幸運隨機, 智力隨機
1.升級後配點:智力:幸運 =4:1
2.幸運=角色等級加2
3.其餘全加智力

各型法師優缺點

(僧侶)
要練僧侶的玩家可要有點耐心,因為僧侶不是攻擊力很強的職業,而是個聖職者,所以沒有什麼破壞力高的技能,如果你想要秒殺怪物並且快速升級,那還是請你放棄這個念頭吧!僧侶最大的優點就是省水錢,又被稱為「賺錢機器」,因為可以一邊打怪一邊自補,不像其他職業還得花藥水錢來衝等!以攻擊威力來看,僧侶算是法師中2轉最差的,但是他在三轉後擁有威力強大的技能,例如聖龍召喚、神聖祈禱,那可是連三轉後的火毒巫跟冰雷巫都無法相比的呢!況且近戰職業往往會爭先恐後的跟僧侶組隊練功,組隊時搶手,自己單練也不成問題,僧侶可說是單練組隊兩相宜的多功能角色

(火毒巫師)
強調破壞力至上的火毒巫師,擁有最強大的火屬性破壞魔法,對於冰屬性的敵人可以發揮1.5倍的威力,但是面對火屬性敵人,殺傷力卻會減弱,甚至沒有效果!至於毒屬性魔法可以讓敵人中毒,讓敵人再一定時間內HP逐漸降低,不過這需要一些時間去發酵,通常用於戰鬥時間長的敵人身上!這類型的巫師非常喜歡單槍匹馬深入敵陣,「火焰箭」是二轉巫師傷害最高的技能,只要打怪時以火焰箭為主攻,毒霧為輔助,想獨自單挑單體的高等怪物,絕對不成問題!不過巫師的體力與防禦力較單薄,面對BOSS級的怪物時記得注意自己的血量,不要砲轟怪物轟的太爽,怪物也砲轟你轟的很爽!

(冰雷巫師)
冰雷巫師的威力再法師二轉職業裡算中等,雖然單體攻擊效率不佳,卻可以藉由範圍攻擊來彌補效率上的不足,高等級之後只要把冰跟雷點滿,同時把魔心開下去,就可以全楓之谷走透透!冰雷巫師主修冰屬性魔法,基本威力比火屬性魔法若一些,但是會附加一定時間內的冰凍狀態,對於火屬性的敵人,更可以發揮1.5倍的傷害,至於基本傷害就弱的雷屬性法術,可以同時對周圍的敵人發動範圍攻擊,但是MP消耗量過大,而且使用前玩家得深陷敵陣,才能施放技能,等於是讓自己暴露在危險之中,因此玩家必須具備更多閃怪技巧,可別傻傻的衝進敵陣放煙火,結果自己跟怪物一起躺光光!

楓之谷衝等方法(一轉法師技能配點)
配點建議
1:魔靈彈(1)=>魔力淨化(5)=>魔力擴展(10)=>魔力爪(10)=>魔力淨化(16)=>魔力爪(20)=>魔力防禦(20)

配點建議
2:魔靈彈(1)=>魔力淨化(5)=>魔力擴展(10)=>魔力爪(20)=>魔力防禦(20)
PS:1.魔力擴展修滿之後.如果覺得自己魔力不足.可以先練滿魔力淨化.以增加魔力回復量.之後再修滿魔力爪.反正初期魔力爪的威力沒有比魔靈彈高.魔靈彈1級耗魔量少.初期勉強用也不錯.只要魔靈彈不要點高.只要點1級做為魔力爪的其置點即可.2.魔力之盾的效用和劍士的自身強化相同.都是暫時增加物理防禦40.但時際換算到打怪上卻只有抵消14點左右的傷害值.因此捨棄魔力之盾.修滿實用性較高魔心防禦!

楓之谷衝等方法(二轉僧侶技能配點) 配點建議:(單練型)魔力吸收(1).或.瞬間移動(1)=>群體治療(15)=>群體治療(30)=>瞬間移動(20)=>魔力吸收(20)=>神聖之光(20)=>神聖之箭(30)=>天使祝福(1)配點建議:(輔助型)魔力吸收(1).或.瞬間移動(1)=>群體治療(15)=>神聖之光(5)=>天使祝福(20) =>群體治療(15)=>群體治療(30)=>瞬間移動(20)=>魔力吸收(20)=>神聖之光(20)=>神聖之箭(11)PS:1.瞬間移動跟魔力吸收可以因人而異而去增減點數.畢竟那不是必要的點數.僧侶必點的技能就是群體治療.因為三轉後會成為團隊支柱的重要人物之一.點到滿等於可補hp的300%.假設hp為1000.點滿可補滿3000.組隊若組5人.則一人可平分補600hp.若只點到技能10級.則為1000x5=200.所以群體治療以點滿為佳.2.或許有人會問.單練型又不用跟人組隊.為何群體治療要點滿呢?其實這是見人見智.你能保證永遠不會跟其他人組隊嗎?就算撇開這例子不講.等級到了一定程度.可以打大幽靈跟猴子來快速升級時.這可是僧侶獨一無二的快訴升級練法.所以建議還是點滿比較ok~

二轉火毒巫師技能配點 配點建議:(專精火系)魔力吸收(1).或.瞬間移動(1)=>火燄箭(15)=>火燄箭(30)=>魔力吸收(3)=>精神強力(20)=>瞬間移動(20)=>魔力吸收(20)=>毒霧(15)=>緩速術(1).(剩餘1點看自己喜好)配點建議:(專精毒系)魔力吸收(1).或.瞬間移動(1)=>毒霧(15)=>毒霧(30)=>瞬間移動(20)=>魔力吸收(20)=>精神強力(20)=>火燄箭(15)=>火燄箭(30)=>緩速術(1) .(剩餘1點看自己喜好)

配點建議:(火毒雙修)魔力吸收(1).或.瞬間移動(1)=>火燄箭(15)=>火燄箭(30)=>毒霧(15)=>毒霧(30)=>瞬間移動(20)=>魔力吸收(20) =>精神強力(20)=>緩速術(1).(剩餘1點看自己喜好) 二轉冰雷巫師技能配點

配點建議:(專精冰系)<方法1>魔力吸收(1).或.瞬間移動(1)=>冰錐術(15)=>冰錐術(30)=>魔力吸收(3)=>精神強力(20)=>瞬間移動(20)<方法2>瞬間移動(20)=>電閃雷鳴(15)=>電閃雷鳴(30)=>緩速術(1)(剩餘1點看自己喜好)

配點建議:(專精雷系)魔力吸收(1).或.瞬間移動(1)=>電閃雷鳴(15)=>電閃雷鳴(30)=>瞬間移動(20)=>魔力吸收(3)=>精神強力(20)=>瞬間移動(20)=>魔力吸收(20)=>冰錐術(15)=>冰錐術(30)=> 精神強力(20)

配點建議:(冰雷雙修)魔力吸收(1).或.瞬間移動(1)=>冰錐術(15)=>冰錐術(30)=>電閃雷鳴(15)=>電閃雷鳴(30)=>瞬間移動(20)=>魔力吸收(20)=>精神強力(20)=>緩速術(1). (剩餘1點看自己喜好) 三轉祭師技能配點 配點建議:(單練型)聖光(30)=>神聖祈禱(30)=>魔法抵抗(30)=>淨化(3)=>時空門(1)=>聖龍召喚(30).(其他自行分配)

配點建議:(組隊型)淨化(3)=>時空門(1)=>神聖祈禱(30)=>聖光(30)=>聖龍召喚(30) =>魔法抵抗(30) .(其他自行分配) 三轉火毒魔導士技能配點 魔力激發(3)=>極速詠唱(3)=>魔力激發(30)=>火毒合擊(30)=>極速詠唱(10)=>末日烈燄(30) 三轉冰雷魔導士技能配點 魔力激發(3)=>極速詠唱(3)=>魔力激發(30)=>冰風暴(15)=>冰雷合擊(30)=>冰風暴(30)=>極速詠唱(10)=>落雷凝聚(30) (其餘自行分配)

2008年7月28日

笨小孩

笨小孩 - 劉德華/柯受良/吳宗憲
曲︰高楓
詞︰劉德華
編︰江建民

哦 寧靜的小村外 有一個笨小孩
出生在陸零年代
十來歲到城市 不怕那太陽曬
努力在柒零年代
發現呀城市裡 朋友們不用去灌溉
花自然會開

哦 轉眼間那麼快 這一個笨小孩
又到了捌零年代
三十歲到頭來 不算好也不壞
經過了玖零年代
最無奈他自己 總是會慢人家一拍
沒有錢在那口袋

*哎喲往著胸口拍一拍呀 勇敢站起來
不用心情太壞
哎喲向著天空拜一拜呀 別想不開
老天自有安排

哦 他們說城市裡 男不壞女不愛
怎麼想也不明白
媽媽說真心愛 會愛得很精彩
結果我沒有女孩
笨小孩依然是堅強得像石頭一塊
只是晚上寂寞難耐

重唱 *

哎喲往著胸口拍一拍呀 勇敢站起來
管它上山下海
哎喲向著天空拜一拜呀 別想不開
老天自有安排
老天愛笨小孩

2008年7月22日

一杯奶茶150元的啟示

資料來源處: http://tw.money.yahoo.com/special_article/adbf/d_a_071105_41_od47

一杯奶茶150元的啟示
( 2007/11/05 王鈺棻 )
鄰居小女孩佳佳是家中的獨生女,爸媽對她疼愛有加,從牙牙學語到現在已是小一的學生,對於想買的東西,爸媽多是應許。有回我們全家、和佳佳及另一隔壁鄰居三家人一同出遊,到了一個遊樂區附近的餐廳吃飯,一看菜單,一份小火鍋要280元,心想不便宜也就沒再點其他飲料及點心了。



吃完了中餐,大夥正聊得起勁,怎見五個小孩人手一杯飲料喝得津津有味的走過來,當佳佳把10元硬幣放到她爸爸手中時,只見一向闊手的爸爸一臉疑惑的問:「給妳1000元買飲料,怎麼只剩10元回來?」佳佳回答說:「買了五杯奶茶和四塊蛋糕,總共990元。奶茶一杯150元,蛋糕一個60元。」當下六個為人父母者都瞪大眼睛說:「一杯奶茶150元!」會令人吃驚的原因是因為,這杯150元的奶茶和早餐店一杯15元的奶茶沒有差別,連杯子都一樣,一點也看不出有比較高級的感覺。

錢付出去了,奶茶也喝下肚了,除了責備孩子亂花錢之外,我想如何讓孩子更有金錢概念,才不枉費那一杯奶茶150元的代價。平時雖然已教導小孩買東西時要分辨「需要」與「想要」,但缺乏消費實務經驗的孩子在面對誘惑和集體消費時,就沒了克制力;而且對於金錢價值也常有模糊的概念。

為了避免重蹈覆轍,我給孩子設計了認識金錢三部曲的活動。這三部曲活動最好在孩子上小學前就做,讓小孩儘早發現金錢的價值。首部曲叫「一元小小功用大」,當你給孩子一元時,可能有不少孩子會說「少」或根本不屑拿,這時要設計些活動,讓孩子體驗一元的妙用。有回假日我上市場買菜,就特地帶著兩個孩子一同前往,並給他們每人2個1元銅板帶在身上,買到最後一樣的雞肉是156元,我就跟孩子說,媽媽只剩155元,不夠1元怎麼辦,這時孩子口袋裡的1元可以發揮作用了,老大馬上說「我這裡有1元。」於是我拿了哥哥的1元付給了老板,把雞肉放進菜藍裡,還不忘跟孩子說「幸好有你那一塊錢,不然就買不成雞肉了。」後來我又跟孩子說,媽媽買了很多菜提不回去,要請爸爸來接我們,但卻忘了帶手機,要打公用電話才行,打公用電話要2塊錢,剛看過哥哥表現的弟弟這時馬上說「我有2塊。」我讓老二撥了電話回家請爸爸開車來接,還跟老二說「幸好有你的2塊錢,要不然我們就回不去了。」兩兄弟幫了媽媽的忙,心情好得很,上車時,老大還不忘說:「媽,我口袋裡還有一塊,還有什麼要我幫忙嗎?」我的心情也好極了。

二部曲是「10元逛超商」,有了首部曲的經驗後,過了幾天我給兩個孩子一人10元,讓他們去便利商店買自己喜歡的東西,有了首部曲的欣喜,兩兄弟拿著比1元硬幣大的10元銅板,興高采烈地前往商店,先前我已叮嚀他們買東西前要看清楚標價,看看自己的錢夠不夠,不能喜歡就拿。這回他們到便利商店流連了快半個小時,原因是看了很多喜歡的東西但比10元貴不能買,10元以下的東西雖不多,但還要從中選擇較喜歡的。我看到兩個孩子比價、思索什麼能買什麼不能買、到互相討論商量買什麼,這樣的過程才是值得的。

三部曲「150元有多大」,用意是讓孩子了解「等量」的觀念。當兩個小孩高高興興地吃著用10元買來的「乖乖」和「飛壘口香糖」時,我拿出了15個10元銅板,跟兩個小孩說,「這些錢可以買15包乖乖或15條飛壘口香糖或你們剛看到的玩具,可是你們上次跟佳佳出去玩買的是一杯奶茶」,哥哥馬上說:「哇!奶茶好貴喔!」我想我的目的達到了。

2008年7月21日

長期投資不等於高檔套牢

資料來源處: http://tw.money.yahoo.com/special_article/adbf/d_a_080721_41_122qx


長期投資不等於高檔套牢
( 2008/07/21 Yahoo!奇摩理財特約作家 王鈺棻 )
最近常聽到在520總統就職前進場的股民及基民說:「套牢了,只好當作長期投資。」其實說這話是透露著無奈、沒辦法,只能出此下策的心情。



長期投資之所以被鼓勵,主要的目的是要運用「時間」優勢來獲取報酬,但卻是很多投資人被套牢後不得不的作為。我們要用時間來「賺錢」,不是用時間來「解套」。

當你有了長期投資的概念,做法也要正確,雖然理財文章常說,只要進行長期投資多半會獲利。既然投入了時間,當然就要獲取相對高的報酬才值得,因此進行長期投資的投入時點就非常重要,判斷的方式其實很簡單,就是當你週遭的人或媒體都看壞後市的時候,就是長期投資的進場時機;還有一點要注意,就是如果您抱定長期投資的理念,只要投資標的的前景及投資價值依舊看好,遇到市場下殺時,一定要沉住氣,不然鐡定破功。

長期投資最常被運用於投資共同基金,舉一個例子來說,台灣於2003年時發生SARS危機,股市重挫,如果當年初進場投資統一大滿貫基金,且無懼SARS威脅,則2007年底贖回時,報酬率可達244.16%,若因害怕股市持續下挫而於當年中贖回,反而倒賠2.52%,所以說獲利的果實是留給堅持的投資人。

或許您會問,若市場持續下挫,能進場嗎?我想連股神巴菲特都沒法買在最低點,所以投資人千萬不要抱持著要買到最低點的想法,因為長期投資並不是要獲取短線利益,只要進場的時點不是市場火熱時刻,長期下來的報酬率差別不會太大。

近來股市受到油價上漲及通膨升高的影響而下挫,讓許多投資人住進套房,也嚷著不要看盤了,眼不見為淨。其實投資人應把握這個機會,檢視手中的投資標的,企業體質是否良好,在逆境時最容易顯現出來,所以要先判斷手中套牢的股票還有沒有續抱的價值,也就是有沒有長期投資的空間,有的話就續抱;如果沒有的話,就等待反彈時出脫持股,轉進其他更具投資價值的標的,如此才不會鄉愿的把高檔套牢當作長期投資。

若您是空手的投資人,在這時更要積極尋找投資標的,現階段台股已超跌,在上市上櫃的1200多家企業中,有近400家的公司股價低於淨值,是進場檢便宜的時機。以長期投資來說,投資人要從基本面著手,對產業特性及產業景氣循環有所了解,並設定停損、停利點,跌到停損點就賣出、漲到停利點就賣掉,不必為了短期的價差波動而傷神。本人比較推薦選擇高殖利率的股票,不僅可享股市上漲時的資本利得,即使股市不佳,每年的股股配息也能讓財富「增增日上」。

2008年7月2日

景深的 sample






2008年6月28日

[.NET] 圓餅圖

作者 MOONRAKER (㊣烏笨禿,又笨又禿) 看板 Visual_Basic
標題 Re: [.NET] 圓餅圖
時間 Sat Jun 28 00:57:43 2008
───────────────────────────────────────

一時興起寫了以下的code,就算是範例吧
獻醜了

http://dpaste.com/hold/59527/

---

NAME

drawpie - 簡易圓餅圖繪製工具

SYNOPSIS

drawpie(g, pieLeft, pieTop, pieWidth, pieHeight, colors(), slices())

PARAMETERS

g 要畫圖的graphics
pieLeft 圓餅圖的左上角X座標(想像一個圓的外接正方形的左上方頂點)
pieTop 圓餅圖的左上角Y座標
pieWidth 圓餅圖寬度
pieHeight 圓餅圖高度
colors() brush陣列,畫圓餅圖各塊要用的顏色
slices() integer陣列,圓餅圖各塊的百分比。是百分比喔!不是角度喔!

REMARKS

* 本sub不檢查slices()中各項總和是否為100,所以使用者要自己注意。
(不過這樣可以玩點花樣,例如畫不從正上方開始的圓餅圖)

* colors可以包含任意數量的brush,不會發生錯誤。如果brush比slice多,
那麼多出來的就不會用到;如果brush比slice少,那麼slice會重覆使用
顏色。如果colors中只有一個brush那麼所有的slice都是同一個顏色。

* 本sub會自動給每個slice加白邊,還沒有寫給每個slice畫不同邊的code,
但是很容易改出來。

* 還有以前很多商業圖範例都會做的某一塊pie外推若干pixels,目前也沒
寫,不過自己寫也很容易,用一點cos()和sin()就可以了。
 


Public Class Form1
Private Sub drawpie(ByRef g As Graphics, ByVal pieLeft As Integer, ByVal pieTop As Integer, _
ByVal pieWidth As Integer, ByVal pieHeight As Integer, _
ByRef colors As Brush(), ByRef slices As Integer())
Dim i As Integer, j As Integer, startAngle As Integer = -90
Dim borderPen As Pen = New Pen(Color.AntiqueWhite, 2.5)
Dim sliceDeg As Integer
Try
j = LBound(colors)
For i = LBound(slices) To UBound(slices)
sliceDeg = slices(i) * 360 / 100
g.FillPie(colors(j), pieLeft, pieTop, pieWidth, pieHeight, startAngle, sliceDeg)
g.DrawPie(borderPen, pieLeft, pieTop, pieWidth, pieHeight, startAngle, sliceDeg)
startAngle += sliceDeg
j += 1
If j > UBound(colors) Then j = LBound(colors)
Next i
Catch ex As Exception
End Try
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim b As Bitmap = New Bitmap(Pic1.Width, Pic1.Height)
Dim g As Graphics = Graphics.FromImage(b)
g.Clear(Color.Gray)
g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias

Dim pieleft As Integer = 10, pieTop As Integer = 10
Dim pieWidth As Integer = Pic1.Width - pieleft - 10
Dim pieHeight As Integer = Pic1.Height - pieTop - 10
Dim piecolors As Brush() = {Brushes.RoyalBlue, Brushes.Lime, Brushes.Turquoise, Brushes.SaddleBrown}
Dim pieslices As Integer() = {34, 19, 16, 10, 9, 7, 5}
drawpie(g, pieleft, pieTop, pieWidth, pieHeight, piecolors, pieslices)

Pic1.Image = b
End Sub
End Class