Time of Update: 2018-12-04
using System;using System.Reflection;namespace CExcel1{ class Class1 { [STAThread] static voidMain(string[] args) {//建立Application對象 Excel.Application xApp=new Excel.ApplicationClass(); xApp.Visible=true; //得到WorkBook對象, 可以用兩種方式之一:
Time of Update: 2018-12-04
繼承是個麻煩的問題,現在用一個表來總結一下:子類從父類中所繼承到的屬性工作表: 父類成員屬性 公有繼承 保護繼承 私人繼承private 不可繼承 不可繼承 不可繼承proteceted proteceted protect private
Time of Update: 2018-12-04
只展示部分說明性代碼取系統的硬碟分區的盤符,用API函數:GetDriveType [DllImport("kernel32.dll", EntryPoint="GetDriveType")]public static extern int GetDriveType (string nDrive);調用:string [] dirs = Environment.GetLogicalDrives(); //取得所有的盤符foreach(string dir in dirs){?if (
Time of Update: 2018-12-04
1.微軟支援 在你學習VS.NET的過程中,有疑問首先要向MicroSoft求助。如果你不懂得利用MicroSoft提供的龐大的學習資源,我要告訴你,你很不幸,你捨近求遠了。 (1)首先,你要安裝MSDN,他比所有VS.NET書籍詳細。我為了裝MSDN,可是犧犧了我的98和XP雙啟動,改成WindowsXP單系統。裝了MSDN後,你要學習Regex,VS.NET
Time of Update: 2018-12-04
SQLDMO For C#By Kevin Goss Download SQLDMO.zip Many times I have had a need to get at SQL Server details in my applications. Until recently I had to use API calls and bastardized ADO calls to get the information I needed. Now we have SQLDMO (SQL
Time of Update: 2018-12-04
用C++寫Dll需要很多規範,而在.Net平台下通過c#實現的Dll則要方便許多。但在c++中調用c#寫的Dll就得注意一下。不能像引用C++本身的DLL一樣。這裡講一下應該注意的細節:(以VS2005為例,VS2008類似)1.因為用c++本身
Time of Update: 2018-12-04
C++大學基礎教程http://download.chinaitlab.com/program/files/11283.htmlC語言核心編程http://download.chinaitlab.com/program/files/9251.htmlBorland
Time of Update: 2018-12-04
bcmp(比較記憶體內容) 相關函數 bcmp,strcasecmp,strcmp,strcoll,strncmp,strncasecmp表標頭檔 #include<string.h>定義函數 int bcmp ( const void *s1,const void * s2,int n);函數說明 bcmp()用來比較s1和s2所指的記憶體區間前n個位元組,若參數n為0,則返回0。傳回值 若參數s1 和s2 所指的記憶體內容都完全相同則返回0 值,否則返回非零值。附加說明
Time of Update: 2018-12-04
c#數字化格式輸出 收藏 int a = 12345678; //格式為sring輸出 Label1.Text = string.Format("asdfadsf{0}adsfasdf",a); Label2.Text = "asdfadsf"+a.ToString()+"adsfasdf"; Label1.Text = string.Format("asdfadsf{0:C}adsfasdf",a);//asdfadsf¥1,234.00adsfasdf Label2.Text =
Time of Update: 2018-12-04
關於%c的用法,c Primer Plus 第80頁裡這樣解釋:如果使用%c說明符,那麼所有的輸入字元都是平等的。如果下一個輸入字元是一個空格或者分行符號,將會把這個空格或換行賦給指定的變數;不會跳過空白字元。 所以在使用%c時,最好前面使用 getchar()來規避掉不必要的空格、分行符號、定位字元。 實際的應用: #include <stdio.h>#include <string.h>void main(){ char ch = 'y';
Time of Update: 2018-12-04
#include< iostream >using namespace std;bool fibo( int pos, int & elem );bool fibo_display( int pos );int main(){ int pos; int elem=0; bool bl = true; char ch; while( bl ) { cout<<" input the pos : "; cin>>pos; if(fibo(
Time of Update: 2018-12-04
第12章 類12.4.1 建構函式初始化式 1 初始化const或參考型別資料成員的唯一機會是在建構函式初始化列表中。 2 在建構函式初始化列表中,成員初始化的次序最好是按各個成員變數在類中聲明的順序初始化。不然會造成用一個未初始化的成員變數去初始化另外一個成員變數。當然也要儘可能的避免使用成員變數來初始化其它成員變數。12.4.2 預設實參與建構函式 1 最好在建構函式時提供一個預設實參。12.4.3 預設建構函式 1
Time of Update: 2018-12-04
在C#中, 雖然編譯器沒有單獨的前置處理器,但在處理預先處理指令時如同存在一個單獨的前置處理器;這些指令用於輔助條件編譯。與 C 和 C++ 指令不同,不能使用這些指令建立宏。前置處理器指令必須是行上的唯一指令。 C# 語言的前置處理器指令: #if #else #elif #endif # define #undef #warning #error #line #region #endregion #pragma #pragma warning #pragma checksum
Time of Update: 2018-12-04
1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace InsertionSort 6{ 7 class Program 8 { 9 static void Main(string[] args)10 {11 int[] a = new int[] { 2, 1, 4, 3 , 1, -4, 7, 11, 9,3,0};12
Time of Update: 2018-12-04
/* linux/arch/arm/plat-samsung/dev-uart.c * originally from arch/arm/plat-s3c24xx/devs.c *x * Copyright (c) 2004 Simtec Electronics * Ben Dooks <ben@simtec.co.uk> * * Base S3C24XX platform device definitions * * This program is free
Time of Update: 2018-12-04
c-kermit是Linux下簡單易用的串口工具,配置簡單,現說說我的安裝使用方法,我用的USB轉串口+VM,環境不同可能裝置名稱不一樣1.安裝: sudo apt-get install ckermit2.設定設定檔 c-kermit啟動時會從目前使用者下尋找.kermrc設定檔,所以我們先寫好一個設定檔,全名為 ~/.kermrc,內容為:set line /dev/ttyUSB0 #如果使用電腦本身的串口,這裡可能是ttyS0之類的 set speed 115200 set
Time of Update: 2018-12-04
1.函數原型聲明時,是忽略形參的名字的,形參只起到注釋的作用,函數原型聲明的另一個作用就是強制類型轉換,實參資料類型會自動轉換成形參的資料類型,這個類型轉換必須符合c語言的型別提升規則,否則會導致數值變化。 2.按值調用和按引用調用 3.auto和register用於聲明自動儲存周期的變數,局部變數預設是自動儲存周期,register只能用在自動儲存周期的變數上,但有時編譯器在編譯器的時候可能會忽略register聲明,例如:在沒有足夠多的寄存器空間時。事實上,今天的編譯器已經有很好的最佳化
Time of Update: 2018-12-04
1.單片機在系統複位或者上電之後,會在執行main()函數之前先執行一小段由maplab c32連接器自動插入的初始化程式,即所謂的starup(啟動)代碼或者crt0()代碼。啟動代碼負責基本的內務操作,包括棧的所有重要初始化等。 2.隨便調用一個庫函數,比如printf(),就可能增加數KB的執行代碼,所以要慎用庫函數。
Time of Update: 2018-12-04
1.假設hi和low是兩個整數,他們的值介於0到15之間,r是一個八位整數,想要r的低四位和low一致,高四位和hi一致,很自然會這樣寫: r = hi《4+low;很不幸這樣是錯誤的,因為加法的運算層級要比移位元運算符高,因此實際上相當於,r=hi《(4+low); 所以正確的寫法是,r=(hi《4)+low或者r = hi《4 | low; 2.int
Time of Update: 2018-12-04
#include <iostream>using namespace std;//預設情況下動態數組的長度為2template <class DataType>class Array{public: Array(int size = 2); Array(const Array<DataType> ©); Array<DataType>& operator=(const Array<DataType>