Time of Update: 2018-12-07
使用OTL來訪問資料庫 - 牽著老婆滿街逛 - C++部落格使用OTL來訪問資料庫來源:http://read.newbooks.com.cn/info/157869.htmlOTL介紹:OTL 是 Oracle, Odbc and DB2-CLI Template Library 的縮寫,是一個C++編譯中操控關聯式資料庫的模板庫,它目前幾乎支援所有的當前各種主流資料庫,例如Oracle, MS SQL Server, Sybase, Informix, MySQL, DB2,
Time of Update: 2018-12-07
C++03:使用Boost-用Asio實現簡易Echo ServerC++03:使用Boost-用Asio實現簡易Echo Server 2009-10-29 11:27 一、編寫代碼註:以下代碼取自boost 1.40的範例程式碼://// async_tcp_echo_server.cpp// ~~~~~~~~~~~~~~~~~~~~~~~~~//// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff
Time of Update: 2018-12-07
string::swap - huycwork的日誌 - 網易部落格string::swap 2010-04-13 18:55:53| 分類: CPPREFERENCE私房 | 標籤: |字型大小大中小 訂閱swap原型: #include <string> void swap( string& from );函數swap()置換當前字串與from的元素. 此函數以常量時間(constant time)運行. 例如,
Time of Update: 2018-12-07
C#系統熱鍵類using System;using System.Runtime.InteropServices;namespace SystemHotKey{ public delegate void HotkeyEventHandler(int HotKeyID); public class Hotkey : System.Windows.Forms.IMessageFilter { System.Collections.Hashtable keyIDs =
Time of Update: 2018-12-07
在Form_Load中輸入如下代碼:foreach(Control ctrl in this.Controls) { if ((ctrl is TextBox) || (ctrl is ComboBox)) //如果文字框或下拉框放在組合框中,你應該用如groupBox1.TextBox { ctrl.KeyDown += new System.Windows.Forms.KeyEventHandler(this.EnterKeyDown); } }然後在
Time of Update: 2018-12-07
interface用來聲明介面1.只提供一些方法規約,不提供方法主體 如 public interface IPerson { void getName();//不包含方法主體 }2.方法不能用public abstract等修飾,無欄位變數,無建構函式。3.方法可包含參數 如 public interface IPerson { void getAge(string s); } 一個例子(例1): public interface IPerson {
Time of Update: 2018-12-07
The Common Programming Interface for CommunicationsIntroducing CPI-CThis is a brief overview of the Common Programming Interface for Communications (CPI-C), giving basic information about its purpose, the rationale for its development, some idea of
Time of Update: 2018-12-07
隨著 Visual Studio 2005 的發布,C# 語言已更新為 2.0 版,它支援下列新功能:泛型 該語言中添加了一些泛型型別,使得程式員能夠實現程度很高的代碼重用,獲得更高的集合類效能。泛型型別只存在 arity 上的不同。也可以將參數強製為特定的類型。迭代器 迭代器使得規定 foreach 迴圈將如何逐一查看集合的內容變得更加容易。部分類別 部份型別定義允許將單個類型(比如某個類)拆分為多個檔案。Visual Studio 設計器使用此功能將它產生的程式碼與使用者代碼分離。可空類型
Time of Update: 2018-12-07
1級(左結合) () 圓括弧;[]下標運算子;->指向結構體成員運算子;. 結構體成員運算子。 2級(右結合) !邏輯非運算子;~按位取反運算子;++首碼遞增運算子;--首碼遞減運算子;-負號運算子;(類型)類型轉換運算子;*指標運算子;&地址運算子;sizeof長度運算子。 3級(左結合) *乘法運算子;/除法運算子;%取餘運算子。 4級(左結合) +加法運算子;-減法運算子。 5級(左結合) <<左移運算子;>>
Time of Update: 2018-12-07
XX老師:
Time of Update: 2018-12-07
添加引用using System.Reflection;using System.Runtime.InteropServices;using System.Diagnostics;調用DLL檔案[DllImport("User32.dll")]private static extern bool ShowWindowAsync(IntPtr hWnd, int cmdShow);[DllImport("User32.dll")]private static extern bool SetFore
Time of Update: 2018-12-07
建立一個工程,在工具箱上單擊右鍵,選擇"添加/移除項",在com組件列表中選擇Shockwave Flash
Time of Update: 2018-12-07
添加引用using System;using System.Text;using System.Security.Cryptography;using System.IO;//預設密鑰向量private static byte[] Keys = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };/// <summary>/// DES加密字串/// </summary>/// <param name="encryp
Time of Update: 2018-12-07
在表單中加入如下代碼private static 表單 instance = null;//添加一個屬性public static 表單 Instance{ set{ } get{ if(instance == null){ new 表單(); } return instance; }}在表單的建構函式中加入如下代碼instance = this;建立表單Closed事件private voi
Time of Update: 2018-12-07
註:本文中出現的代碼均在.net Framework RC3環境中運行通過 一.多線程的概念 Windows是一個多任務的系統,如果你使用的是windows
Time of Update: 2018-12-07
大家可以看到,在上面的常式中,同步是通過等待Monitor.Pulse()來完成的。首先生產者生產了一個值,而同一時刻消費者處於等待狀態,直到收到生產者的“脈衝(Pulse)”通知它生產已經完成,此後消費者進入消費狀態,而生產者開始等待消費者完成操作後將調用Monitor.Pulese()發出的“脈衝”。它的執行結果很簡單:Produce: 1 Consume: 1 Produce: 2 Consume: 2
Time of Update: 2018-12-07
反射的概述: 反射的定義:審查中繼資料並收集關於它的類型資訊的能力。中繼資料(編譯以後的最基本資料單元)就是一大堆的表,當編譯器集或者模組時,編譯器會建立一個類定義表,一個欄位定義表,和一個方法定義表等,。System.reflection命名空間包含的幾個類,允許你反射(解析)這些中繼資料表的代碼 System.Reflection.AssemblySystem.Reflection.MemberInfo
Time of Update: 2018-12-07
枚舉提供成組的常數值,它們有助於使成員成為強型別以及提高代碼的可讀性。在 C# 中,使用 enum 來聲明枚舉。 枚舉分為簡單枚舉和標誌枚舉兩種。基本文法樣本enum Day { Sun, Mon, Tue, Wed, Thu, Fri, Sat };以下格式也可以:enum Day{ Sun, Mon, Tue, Wed, Thu, Fri,
Time of Update: 2018-12-07
使用CreateRemoteThread和LoadLibrary技術的步驟如下:1. 得到遠程進程的HANDLE(使用OpenProcess)。2. 在遠程進程中為DLL檔案名稱分配記憶體(VirtualAllocEx)。3. 把DLL的檔案名稱(全路徑)寫到分配的記憶體中(WriteProcessMemory)4. 使用CreateRemoteThread和LoadLibrary把你的DLL映射近遠程進程。5.
Time of Update: 2018-12-07
#include <stdlib.h>#include <iostream>using namespace std;class CLS{public:int m_i; CLS( int i ) : m_i(i){} CLS() { CLS(0); }};int main(){ CLS obj; cout << obj.m_i << endl; system("PAUSE");return 0;