Time of Update: 2015-07-04
標籤: 1 //2015/07/03 2 using System; 3 using System.Collections.Generic; 4 using System.Linq; 5 using System.Text; 6 using System.Threading.Tasks; 7 using System.Data; 8 using System.Data.SqlClient; 9 10 namespace Ado.netstart_111 {12 class
Time of Update: 2015-07-05
標籤:c語言#define N 10int main(int argc, const char * argv[]) { int num[N]; printf("輸入10個整數:"); for (int i=0; i<N; i++) { scanf("%d",&num[i]); } for (int j=N-1; j>=0; j--) { for (int i=0; i<j; i++) {
Time of Update: 2015-07-05
標籤:1 2.reverse迭代器2 a) 在邏輯上,rbegin指向最後一個元素,rend指向第一個元素的前一個位置。3 b) 但是在實際實現上,rbegin指向最後一個元素的下一個位置,rend指向第一個元素。4 c) reverse迭代器的物理位置與邏輯位置差15 d) 邏輯值比物理位置減少了1. 引言:vector<int> vec 我們push_back是十個數 it
Time of Update: 2015-07-05
標籤:如果一個程式中有多個源檔案(.c),編譯成功會產生對應的多個目標檔案(.obj),這些目標檔案還不能單獨運行,因為這些目標檔案之間可能會有關聯,比如a.obj可能會調用c.obj中定義的一個函數。將這些相關聯的目標檔案連結在一起後才能產生可執行檔。外部函數:如果在當前檔案中定義的函數允許其他檔案訪問、調用,就稱為外部函數。C語言規定,不允許有同名的外部函數。內建函式:如果在當前檔案中定義的函數不允許其他檔案訪問、調用,只能在內部使用,就稱為內建函式。C語言規定不同的源檔案可以有同名的內建函
Time of Update: 2015-07-04
標籤://編寫函數實現字串旋轉#include <stdio.h>#include <assert.h>#include <string.h>void reverse(char *left, char *right) {char temp;assert(left);assert(right);while (right > left){temp = *left;*left = *right;*right = temp;left++;right--;}
Time of Update: 2015-07-06
標籤:c++ js crossplatform #include "scripting/js-bindings/manual/ScriptingCore.h"#include <sstream>#include <type_traits>/// args push helpertemplate<typename _Ty>
Time of Update: 2015-07-04
標籤:1、C語言的來源程式的尾碼:.c格式 2、C語言來源程式: 1)由函數構成 2)在一個程式中,只有一個主函數(主函數由系統調用)
Time of Update: 2015-07-04
標籤:一、基本概念#include,它可以將一個檔案的全部內容拷貝另一個檔案中。二、一般形式1.第1種形式#include <檔案名稱>直接到C語言庫函數標頭檔所在的目錄中尋找檔案 2.第2種形式 #include "檔案名稱"系統會先在來源程式目前的目錄下尋找,若找不到,再到作業系統的path路徑中尋找,最後才到C語言庫函數標頭檔所在目錄中尋找三、使用注意#include指令允許嵌套包含,比如a.h包含b.h,b.h包含c.h,但是不允許遞迴包含,比如 a.h 包含 b.
Time of Update: 2015-07-02
標籤: C++對象的私人成員是禁止類外的訪問的。但是我們仍然可以通過指標訪問C++對象的私人成員。#include <iostream>using namespace std;class A{public: A(int i = 0) :m_i(i) {} void print() { cout << "m_i" << this->m_i << endl; }private:
Time of Update: 2015-07-03
標籤:c++ 編譯器 函數模版 本質 思考:為什麼函數模板可以和函數重載放在一塊。C++編譯器是如何提供函數模板機制的?demo 1#include <cstdio>#include <iostream>using namespace std;// 1.cpp// g++ -S 1.cpp -o 1.stemplate
Time of Update: 2015-07-03
標籤:1.條件指示符的作用#ifndef BOOK_H #define BOOK_H /* Book.h的內容 防止標頭檔的重複處理*/#endif 編譯C++程式時,編譯器自動定義了一個前置處理器的名字__cplusplus,因此可以根據它來判斷該程式是否為C++程式#ifdef __cplusplus extern "C"#endif int min(int,
Time of Update: 2015-07-02
標籤:1.C++變數根據定義的位置的不同的生命週期,具有不同的範圍,範圍可分為6種:全域範圍,局部範圍,語句範圍,類範圍,命名空間範圍和檔案範圍。從範圍看:1>全域變數具有全域範圍。全域變數只需在一個源檔案中定義,就可以作用於所有的源檔案。當然,其他不包含全域變數定義的源檔案需要用extern
Time of Update: 2015-07-03
標籤:很簡單,將小彈窗部分寫進一個div,利用div的visible屬性去控制是否顯示,首先預設為false;當背景程式執行到插入資料完成後,設定session狀態值為‘yes’判斷,當session狀態值為空白時,(session狀態值必然不會是‘yes’),此時讓小彈窗div不顯示即可。點擊小彈窗上的關閉按鈕,執行一個按鈕事件,此時將session值再次設定為空白值,至此便完成了全部的操作。C#頁面添加提交資料後跳出小彈窗的功能
Time of Update: 2015-07-03
標籤: 0、常用方法Navigate(string urlString):瀏覽urlString表示的網址Navigate(System.Uri url):瀏覽url表示的網址Navigate(string urlString, string targetFrameName, byte[] postData, string additionalHeaders):
Time of Update: 2015-07-03
標籤:前面兩篇部落格講解了怎麼通過程式控制word的產生,包括產生文字、添加表格、添加圖片等。這篇部落客要說一下怎麼把word圖片轉換成pdf。using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.Office.Core;namespace PDFTest{ class PDFUtil { /// <summary>
Time of Update: 2015-07-02
標籤:將項目的“可編譯不安全的程式碼”屬性設定為true就可以了,方法如下:項目屬性對話方塊->配置屬性->產生->允許不安全的程式碼塊namespace Pointer{ struct XYZ { public int a; public int b; public int c; bool b1; }; class Program {
Time of Update: 2015-07-05
標籤:linux vim vi swap
Time of Update: 2015-07-03
標籤:api delete file archive http://blog.csdn.net/bruce_ecit/article/details/46746007http://blog.csdn.net/bruce_ecit/article/details/46746019http://blog.csdn.net/bruce_
Time of Update: 2015-07-03
標籤:#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;struct cxj{ int a; //a為長度,b為品質 int b; int vis;}e[5010];int cmp(cxj x,cxj y){ if(x.b!=y.b) return x.b<y.b; else return x.a<y.a;}int main(
Time of Update: 2015-07-02
標籤:#include<stdio.h>#include<string.h> int main(){ int a[100],b[100],num,n,i,j; scanf("%d\n",&num); while(num--) { int sum=0; scanf("%d",&n); memset(b,0,sizeof(b)); for(i=0;i<n;i++) scanf("%d",&a[i]);