Time of Update: 2018-12-05
一。學習計劃 C++學習: 1。兩個月內學完一遍C++Primer,前面917頁,平均每天15頁 2。周一到周五60頁,周六日40頁,按照一周學習6天計算每天學習16頁,總計算每天10頁 學習進度如下: 5.31-6.3 學到第2章 P54 6.4-6.10 3章 C++資料類型 P61-p105
Time of Update: 2018-12-05
using System;using System.Security.Cryptography;using System.Text;namespace AttendService{ public static class DESEncrypt { #region ========加密======== private static string txtKey = "PatrickpanP="; private static string
Time of Update: 2018-12-05
int flag=0; Connection.Open(); string sql="insert into MsgInfo(title,content,sendtime) values('"+bVO.Subject+"','"+bVO.Content+"','"+bVO.Fbtime+"')"; SqlCommand sqlComm = new SqlCommand(sql,Connection); flag =
Time of Update: 2018-12-05
最近在做大鵬網的群欄目時,對群成員的實現,想到了2種方法, 第一種方法是:建立一個群成員資料庫,增加一個成員就增加一條資料,但如果這樣的話這個群成員的資料庫資料量將十分巨大,假設每個群有10000的成員,1000個群的話資料量將達到10000000條,
Time of Update: 2018-12-05
1.總是用屬性 (Property) 來代替可訪問的資料成員2.在 readonly 和 const 之間,優先使用 readonly 3.在 as 和 強制類型轉換之間,優先使用 as 操作符 4.使用條件屬性 (Conditional Attributes) 來代替條件編譯語句 #if 5.總是為自訂類重載 ToString 方法 6.區別實值型別和參考型別 7.使用不可變的實值型別(Immutable Atomic Value Types) 8.在實值型別中,確保0是一個合法的資料 9.
Time of Update: 2018-12-05
已知有一個XML檔案(bookstore.xml)如下:<?xml version="1.0" encoding="gb2312"?><bookstore> <book genre="fantasy" ISBN="2-3631-4"> <title>Oberon's Legacy</title> <author>Corets, Eva</author>
Time of Update: 2018-12-05
I really love Ext but coding in javascript just gives me the chills. So I went out and found a way to use my favorite js library (Ext) and my favorite programming language (C#) at the same time. By using a project called Script# I am able to write C#
Time of Update: 2018-12-05
開始學習C#我建立了2個FORMFORM1 HE FORM2在調試的時候包了一個錯誤C:\Documents and Settings\Administrator\My Documents\c\WindowsApplication6\Form1.cs(130): 不可訪問“WindowsApplication6.Form2.label1”,因為它受保護層級限制具體 錯誤行見下面yourForm.label1.Font=new
Time of Update: 2018-12-05
今天遇到客戶說[HttpException (0x80070005): 對“d:\web\web.config”的訪問被拒絕。未能開始監視檔案更改。] System.Web.DirMonCompletion..ctor(DirectoryMonitor dirMon, String dir, Boolean watchSubtree, UInt32 notifyFilter) +139 System.Web.DirectoryMonitor.StartMonitoring()
Time of Update: 2018-12-05
一、抽象類別: 抽象類別是特殊的類,只是不能被執行個體化;除此以外,具有類的其他特性;重要的是抽象類別可以包括抽象方法,這是普通類所不能的。抽象方法只能聲明於抽象類別中,且不包含任何實現,衍生類別必須覆蓋它們。另外,抽象類別可以派生自一個抽象類別,可以覆蓋基類的抽象方法也可以不覆蓋,如果不覆蓋,則其衍生類別必須覆蓋它們。 二、介面: 介面是參考型別的,類似於類,和抽象類別的相似之處有三點: 1、不能執行個體化;
Time of Update: 2018-12-05
StringCollection,Array,ArrayList,IList,Item,Queue,Stack,Hashtable,SortedList 當需要大小可按需動態增加,並希望通過索引來進行訪問的數組的時候,使用ArrayList . 當需要一個能實現後進先出的集合時,使用Stack.
Time of Update: 2018-12-05
在C#程式中使用系統熱鍵 1.首先引入System.Runtime.InteropServicesusing System.Runtime.InteropServices;2.在類內部聲明兩個API函數,它們的位置和類的成員變數等同.[System.Runtime.InteropServices.DllImport("user32.dll")] //申明API函數public static extern bool RegisterHotKey(IntPtr hWnd, // handle to
Time of Update: 2018-12-05
using Microsoft.Win32; Creating SubKeys in the registryWe create a subkey by using the CreateSubKey method. We usually want to create a subkey in HKEY_CURRENT_USER/SOFTWARE that is why we use the following
Time of Update: 2018-12-05
c#讀寫資料庫圖片 //將SQL server2000中儲存的映像顯示在Picture中 private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e) { byte[] buffByte = null; string comm = @"select img from table1 where id = " + this.listBox1.SelectedValue
Time of Update: 2018-12-05
Excel 檔案用C#匯入 Access 數字字元混排的問題Excel 驅動程式讀取指定源中一定數量的行(預設情況下為 8 行)以推測每列的資料類型。如果推測出列可能包含混合資料類型(尤其是混合了文本資料的數值資料時),驅動程式將決定採用佔多數的資料類型,並對包含其他類型資料的單元返回空值。(如果各種資料類型的數量相當,則採用數實值型別。)Excel 工作表中大部分儲存格格式設定選項不會影響此資料類型判斷。可以通過指定匯入模式來修改 Excel
Time of Update: 2018-12-05
using System;using System.IO;using System.Data;using System.Data.OleDb;using System.Collections.Generic;using System.Text; namespace XlsToCsv{ class Program { static void Main(string[] args) { string sourceFile,
Time of Update: 2018-12-05
using System;using System.Web;using System.IO;namespace leo{ /// <summary> /// 檔案上傳類 /// 作者:leo /// 製作時間:2006-2-13 最後修改於2007-6-25 /// </summary> public class UploadFile { public UploadFile(HttpPostedFile PostedFile) {
Time of Update: 2018-12-05
1.命名空間的使用 1.1 命名空間是.net中對代碼邏輯意義上的劃分,類似於java中的包,但是,命名空間不像包對應與物理上的檔案路徑。 1.2 命名空間使用using關鍵字來引出。關於using的更多用法可以參考anytao的using使用。 1.3 命名空間的嵌套使用及別名 namespace LevelOne{ using LT = LevelTwo; // 定義別名 public class LevelOneClass {
Time of Update: 2018-12-05
Wtypes.h 中的非託管類型 非託管C 語言類型 託管類名 說明 HANDLE void* System.IntPtr 32 位 BYTE
Time of Update: 2018-12-05
首先從原理上解釋一下採用Socket介面的網路通訊,這裡以最常用的C/S模式作為範例,首先,服務端有一個進程(或多個進程)在指定的連接埠等待客戶來串連,服務程式等待客戶的串連資訊,一旦串連上之後,就可以按設計的資料交換方法和格式進行資料轉送。用戶端在需要的時刻發出向服務端的串連請求。這裡為了便於理解,提到了一些調用及其大致的功能。使用socket調用後,僅產生了一個可以使用的socket描述符,這時還不能進行通訊,還要使用其他的調用,以使得socket所指的結構中使用的資訊被填寫完。 在使用T