此時只能按下"Ignore all"來告訴EndNote不要把該筆資料視為參考文獻,但是每次都要這麼做總是十分的魯洨...
那要如何避免這種情形呢? 只要在設定中把「暫時參考文獻格式」改掉就好,如下圖︰
要改成什麼都可以,只要不要與文件中會出現的符號衝突就可以,比如此處我是改為「<<......}」,如此一來只有被這樣的符號包圍的文字,EndNote才會將之視為參考文獻,就再也不會誤判了。
Public Class Class1 Public Event ShowMsg(ByVal text As String) '宣告事件,觸發該事件即可傳出參數 Private sum As Integer '執行緒執行時傳入的參數 Property Num As Integer '設成屬性存取 Get Return sum End Get Set(value As Integer) sum = value End Set End Property Public Sub calcd() '該執行緒要執行的方法 For I = 0 To 1000 sum += I RaiseEvent aa(sum) '觸發事件 Threading.Thread.Sleep(100) Next End Sub End Class
Public Class Form1 Private Delegate Sub InvokeDelegate(ByVal text As String) Private t As Threading.Thread Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim c As Class1 = New Class1 '建立一個Class1的執行個體 c.Num = 10 '設定要傳入的參數(也可在建立執行個體時以建構式設定) '新建一個執行緒,指向Class1的執行個體中要執行的方法(該方法必須為Public) t = New Threading.Thread(AddressOf c.calcd) AddHandler c.ShowMsg, AddressOf ShowMsg '設定事件的處理方式,將事件指向Form1的ShowMsg() t.Start() End Sub Private Sub ShowMsg(ByVal text As String) '若呼叫端不是建立該控制項(Me)的執行緒,則以委派方式呼叫 If Me.InvokeRequired Then Invoke(New InvokeDelegate(AddressOf ShowMsg), text) Else TextBox1.Text = text '顯示訊息 End If End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click t.Abort() End Sub End Class
Using cmd As New OleDbCommand("CREATE TABLE [test] ([ID] INTEGER,[Username] VarChar,[UserPwd] VarChar)", CalcdConnection) cmd.ExecuteNonQuery() cmd.CommandText = "INSERT INTO [test$] VALUES(1,'elmer','password')" cmd.ExecuteNonQuery() End Using可寫成如下表示︰
Dim cmd As New OleDbCommand("CREATE TABLE [test] ([ID] INTEGER,[Username] VarChar,[UserPwd] VarChar)", CalcdConnection) Try cmd.ExecuteNonQuery() cmd.CommandText = "INSERT INTO [test$] VALUES(1,'elmer','password')" cmd.ExecuteNonQuery() Finally If cmd <> vbNull Then cmd.Dispose() End If End Try事實上並不包含錯誤處理,也就是Catch區塊;因此需自行添加錯誤處理方式
Structure TotalTime Dim tt As String End Structure Dim result(100) as TotalTime '定義result為TotalTime陣列 For Each a As TotalTime In result a.tt=a.tt+1 Next此時,result陣列中的數值並不會改變,因為Structure是Value type,所以For...Each時是複製一個result的副本。
'Access資料庫之連接位址 Public DBLocation As String = "Provider=Microsoft.ACE.Oledb.12.0;Data Source=檔案位址" 'Excel資料表之連接位址 Public DBLocation As String = "Provider=Microsoft.ACE.Oledb.12.0;Data Source=檔案位址;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1,ReadOnly=0"""屬性意義
DBConnection = New OleDbConnection(DBLocation) DBConnection.Open() '打開連接
Dim objCmd As OleDbCommand = New OleDbCommand("SELECT * FROM 資料表", DBConnection)此處資料表即為Access中的資料表,或是Excel中的工作表
Dim thread1 As Thread = New Thread(AddressOf MyThread); thread1.Start(); Dim thread2 As Thread = New Thread(New ThreadStart(AddressOf MyThread)); thread2.Start(); Dim thread3 As Thread = New Thread(AddressOf MyThreadWithParameter); thread3.Start(myClass); Dim thread4 As Thread = New Thread(New ParameterizedThreadStart(AddressOf MyThreadWithParameter)); thread4.Start(myClass);以上四種方法都是可行的。
Public Function Serialize(ByVal objType As Type, ByVal obj As Object) As String '將元件進行序列化 Dim XMLString As String = String.Empty Dim mySerializer As XmlSerializer = New XmlSerializer(objType) '以objType建立XML序列化元件 Dim writer As New IO.StringWriter '建立資料流 mySerializer.Serialize(writer, obj) 'XML序列化 XMLString = writer.ToString '轉為字串 writer.Close() '關閉資料流 Return XMLString '回傳 End Function Public Function Deserialize(ByVal objType As Type, ByVal XMLString As String) As Object '將取得的內容進行反序列化 Dim mySerializer As XmlSerializer = New XmlSerializer(objType) '以objType建立XML序列化元件 Dim reader As New IO.StringReader(XMLString) '以序列化後的XMLString建立資料流 Return mySerializer.Deserialize(reader) '回傳反序列化後的物件 End Function
<input type="submit" name="button" value="Choose" onclick="document.form.action='sign.php?no=1' "/>
<input type="submit" name="button" value="Choose" onclick="document.form.action='sign.php?no=2' "/>
SELECT what_to_select FROM which_table WHERE conditions_to_satisfy
what_to_select表示要搜尋的目標,也可以「*」表示所有的列
which_table表示要搜尋的資料表
conditions_to_satisfy是選擇性參數,代表搜尋條件
<?php ob_start(); echo "test"; session_start(); ob_end_flush(); ?>Reference:
copy /b *.vcf all.vcf
Public x0, y0, x1, y1 As Integer '視窗四角座標 Public Client_x0, Client_y0 As Integer '視窗左上座標(不含標題邊框) Public ClientX, ClientY As Integer '視窗長寬(不含標題邊框) Public Border As Integer '視窗邊框寬度 Public Title As Integer '視窗標題高度 Public hwnd As Integer '視窗hwnd '取得視窗大小(含邊框,功能表) Declare Function GetWindowRect Lib "user32" (ByVal hWnd As Integer, ByRef rectangle As RECT) As Integer '取得視窗大小(不含邊框,功能表,左上角為0,0) Public Declare Function GetClientRect Lib "user32 " (ByVal hwnd As Integer, ByRef lpRect As RECT) As Integer Structure RECT '視窗大小資料結構 Dim x1 As Integer Dim y1 As Integer Dim x2 As Integer Dim y2 As Integer End Structure '取得特定視窗資訊 Sub GetWindowInfo(hwnd As Integer) Dim R As RECT Dim RetVal As Integer RetVal = GetWindowRect(hwnd, R) x0 = R.x1 x1 = R.x2 y0 = R.y1 y1 = R.y2 RetVal = GetClientRect(hwnd, R) ClientX = R.x2 ClientY = R.y2 Border = ((x1 - x0) - ClientX) / 2 Title = (y1 - y0) - ClientY - Border Client_x0 = x0 + Border Client_y0 = y0 + Title End Sub
Dim hWndShell, hWndTray, hWndPager, hWndToolBar As Integer '系統用hwnd '抹除通知區域圖示 hWndShell = FindWindow("Shell_TrayWnd", "") '取得系統圖示區hwnd '取得通知區域hwnd If Environment.OSVersion.Version.Major = 5 AndAlso Environment.OSVersion.Version.Minor = 0 Then hWndTray = FindWindowEx(hWndShell, 0, "TrayNotifyWnd", "") hWndToolBar = FindWindowEx(hWndTray, 0, "ToolbarWindow32", "") Else hWndTray = FindWindowEx(hWndShell, 0, "TrayNotifyWnd", "") hWndPager = FindWindowEx(hWndTray, 0, "SysPager", "") hWndToolBar = FindWindowEx(hWndPager, 0, "ToolbarWindow32", "使用者升級的通知區域") End If '取得邊界 GetWindowInfo(hWndToolBar) '以自訂函數GetWindowInfo取得視窗資訊 Dim ibx, iby As Integer iby = CInt(ClientY / 2) * 65536 '以WM_MOUSEMOVE消去無效圖示(將通知區域全部掃過一次) For ibx = 1 To ClientX Step 1 PostMessage(hWndToolBar, WM_MOUSEMOVE, 0, iby + ibx) Next **********以下為API宣告********** '發送訊息到執行緒佇列 Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer '定義常數 Public Const WM_KEYDOWN As Integer = &H100 Public Const WM_KEYUP As Integer = &H101 Public Const VK_C As Integer = &H43 Public Const WM_CLOSE As Integer = &H10 Public Const WM_LBUTTONDBLCLK As Integer = &H203 Public Const WM_LBUTTONDOWN As Integer = &H201 Public Const WM_LBUTTONUP As Integer = &H202 Public Const WM_MBUTTONDBLCLK As Integer = &H209 Public Const WM_MBUTTONDOWN As Integer = &H207 Public Const WM_MBUTTONUP As Integer = &H208 Public Const WM_RBUTTONDBLCLK As Integer = &H206 Public Const WM_RBUTTONDOWN As Integer = &H204 Public Const WM_RBUTTONUP As Integer = &H205 Public Const WM_MOUSEACTIVATE As Integer = &H21 Public Const WM_MOUSEWHEEL As Integer = &H20A Public Const WM_MOUSEFIRST As Integer = &H200 Public Const WM_MOUSELAST As Integer = &H209 Public Const WM_MOUSEMOVE As Integer = &H200 Public Const WM_SETCURSOR As Integer = &H20
Dim saveFileDialog1 As New SaveFileDialog() '儲存檔案公用視窗 Try '預設錯誤處理方式 '定義存檔格式 saveFileDialog1.Filter = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|EMF (*.emf)|*.emf|PNG (*.png)|*.png|GIF (*.gif)|*.gif|TIFF (*.tif)|*.tif" saveFileDialog1.FilterIndex = 2 '預設為第二種(JPG) If saveFileDialog1.ShowDialog() = DialogResult.OK Then '使用者按下確認之後紀錄檔名 GetWindowInfo(Me.Handle) '以自訂函數GetWindowInfo取得視窗資訊 '建立一個Bitmap作為存檔目標 Dim Screenshot As Bitmap = New Bitmap(ClientX, ClientY - 50, PixelFormat.Format32bppArgb) Dim picOutput As Graphics = Graphics.FromImage(Screenshot) '建立儲存影像的Graphic Dim picSource As Graphics = Graphics.FromHdc(GetDC(Me.Handle)) '建立獲取來源影像的Graphic '以Bitbit將來源影像轉存到目標影像 BitBlt(picOutput.GetHdc(), 0, 0, ClientX, ClientY - 50, picSource.GetHdc(), 0, 50, CopyPixelOperation.SourceCopy) '把來源影像複製到儲存影像中 '釋放hdc picSource.ReleaseHdc() picOutput.ReleaseHdc() '存為圖片 Screenshot.Save(saveFileDialog1.FileName) End If Catch ex As Exception MsgBox(ex.Message) '錯誤訊息 End Try **********以下為API宣告********** '重繪圖檔用API Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal hSrcDC As Integer, ByVal xSrc As Integer, ByVal ySrc As Integer, ByVal dwRop As Integer) As Integer