Time of Update: 2015-04-07
標籤: 地址:http://blog.csdn.net/matrix_laboratory/article/details/136692112. socket()[cpp] view
Time of Update: 2015-04-07
標籤:c程式 萬年曆 // Zeller公式確定星期幾,w=y+[y/4]+[c/4]-2c+[26(m+1)/10]+d-1// y是年份取最後兩位,c是世紀減1,m是月份,如果m是1月和2月,則m換成13和14,d是日期,[]表示取整,w除以7之後的餘數就是星期幾,如果餘數為0,就是星期日#include <stdio.h>int main(){int year, month,
Time of Update: 2015-04-07
標籤:單詞序翻轉 技巧 // 把student a am i 變成 i am a student//思想:把每個單詞翻轉,然後再把整體翻轉#include <stdio.h>#include <string.h>//把每次解析出來的單詞翻轉 void fanw( char *l,char *r ){char* left = l;char* right = r;char temp;while( left &
Time of Update: 2015-04-07
標籤:字串 單詞反轉 c語言 局部反轉 字串翻轉 //將字串順序翻轉//如: I am a student 轉成:student a am I#include <stdio.h>#include <string.h>void fanw( char *left,char *right )
Time of Update: 2015-04-07
標籤:通過apt-get install 安裝nginx和spawn-fcgi/usr/local/nginx/sbin/spawn-fcgi -a 127.0.0.1 -p 9002 -C 25 -f /usr/local/nginx/cgibin/lzgFastCGI參數含義如下:-f 指定調用FastCGI的進程的執行程式位置,根據系統上所裝的PHP的情況具體設定-a 綁定到地址addr-p 綁定到連接埠port-s 綁定到unix socket的路徑path-C
Time of Update: 2015-04-07
標籤:刪除目錄1.介紹 用到shlwapi.h和tchar.h標頭檔。 shlwapi.h是shlwapi.dll標頭檔,shlwapi.dll(Microsoft Shell Light-weight Utility Library)中定義了路徑相關的操作,也包括了部分檔案操作函數。由於shlwapi.dll屬於Microsoft Windows Shell,因此這些檔案操作特點與通過Shell進行檔案操作類似。 下面列出部分常用的檔案操作相關函數。 函數名 作用
Time of Update: 2015-04-07
標籤:間接定址 c++ 演算法 之前學過,資料描述方法中有公式化描述,鏈表描述,間接定址和類比指標,在之前已經將公式化描述和鏈表描述通過代碼的形式展現出來了,現在貼出簡介定址的代碼。其中簡介定址是融合了公式化描述和鏈表描述的有點,使用一個指標表來記錄資料的位置,指標表相當於一個數組,這樣在插入,刪除的時候,其中的資料的位置並沒有發生變化,而僅僅就是指標表的指向發生了變化,同時很多操作又能像公式化
Time of Update: 2015-04-07
標籤:c語言 通訊錄 實現一個通訊錄;通訊錄可以用來儲存1000個人的資訊,每個人的資訊包括:姓名、性別、年齡、電話、住址提供方法:1. 新增連絡人...資訊2. 刪除指定連絡人資訊3. 尋找指定連絡人資訊4. 修改指定連絡人資訊5. 顯示所有連絡人資訊6. 清空所有連絡人定義標頭檔<span style="font-size:18px;">#ifndef
Time of Update: 2015-04-07
標籤:2048遊戲邏輯採用二維數組作為遊戲介面的顯示,2048遊戲邏輯:【1】產生遊戲對象(2個數字)CreatePerson()CreatePerson()【2】更新遊戲視圖介面如果勝利就不相應使用者輸入if(isWin){return;}if(up){ctlfunc()}else if(down){ctlfunc()}else if(left){ctlfunc()}else
Time of Update: 2015-04-07
標籤:個人總結:1.int **p和 int a[M][N]之間的區別: 1) int **指向指標的指標;而後者的類型是數組名,類型為 int (*)[N],即指向的是整個一行。 2) (a+1)
Time of Update: 2015-04-07
標籤:一、 函數的定義目的:封裝一個常用的功能,實現函數的調用。格式:傳回值類型 函數名(形式參數列表) { 函數體}二、函數調用及函數的形參,實參 #include <stdio.h>//形式參數,簡稱形參int sum(int num1,int num2){//函數體內部不能定義和形參一樣的變數//int num1;return num1 + num2;}char test(){ return ‘a‘;}int main(){ int a = 10;
Time of Update: 2015-04-07
標籤:Initializing Array Elements int[] myIntArray = new int[5] { 2, 4, 6, 8, 10 }; // longer syntax int[] myIntArray = { 2, 4, 6, 8, 10 }; // shorter syntax定義2行3列的int 類型的數組int [ , ] myRectangularArray = new int[2,3];The
Time of Update: 2015-04-07
標籤:我想實現:有一引用變數,如Object A; 然後有一個資料區塊,比如用結構體記錄一些資訊,其中包括A的引用資訊。然後一個程式段通過操作這個資料區塊,能夠給A付值。這在C++裡應該比較容易實現,比如用指向指標的指標等,但在C#裡好像沒有實現的方法。C++例子大概如下:class A{}A* a;struct X{ A** P;}程式段int main(){&nbs
Time of Update: 2015-04-07
標籤:使用前需加上: using System.Diagnostics; 同步重新導向代碼如下: 第一步:確定必要成分1 Process process = new Process();2 process.StartInfo.UseShellExecute = false; // 是否使用外殼程式 3 process.StartInfo.CreateNoWindow = true; //是否在新視窗中啟動該進程的值 4
Time of Update: 2015-04-07
標籤:運算子多載看起來與標準靜態方法聲明類似,但它們使用關鍵字operator和運算子本身,而不是一個方法名:public static 傳回型別 operator +(類型1 變數1,類型2 變數2){ //傳回型別,類型1,類型2 ,可以相同,也可以全部不同}如果使用混合類型的話,需要注意的是,不可以將相同的運算子添加到不同的類進行重載。還需要注意,運算元的順序也必須與運算子多載的參數順序保持一致。 class AddClass1 {
Time of Update: 2015-04-07
標籤:An interface is a contract(協定) that guarantees to a client how a class or struct will behave.When a class implements an interface(實現一個介面), it tells any potential(可能的) client “I guarantee I’ll support all the methods, properties,
Time of Update: 2015-04-07
標籤: 一、問題 在一個簡單的閏年問題的判斷中,輸入框擷取的字串,我們希望輸入數字字串,將字串轉換為int整數進行判斷。編寫程式如下 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using
Time of Update: 2015-04-07
標籤: private void btnsuggestinfo_Click(object sender, EventArgs e) { DataTable dt = new DataTable(); dt.Columns.Add("單號", typeof(string)); dt.Columns.Add("項次", typeof(decimal)); dt.Columns.Add(
Time of Update: 2015-04-07
標籤:xml檔案如下:<?xml version="1.0" encoding="utf-8" ?><info> <error> <errorid errorNUM="E00001"> <content>未登入,請登入</content> </errorid> </error> <error> <errorid
Time of Update: 2015-04-07
標籤:String轉int主要有四種方法1. int.Parse()是一種類容轉換;表示將數字內容的字串轉為int類型。 如果字串為空白,則拋出ArgumentNullException異常; 如果字串內容不是數字,則拋出FormatException異常; 如果字串內容所表示數字超出int類型可表示的範圍,則拋出OverflowException異常;2.