Time of Update: 2018-12-04
/* 項目名稱:用c語言動態操作sqilite3資料庫 * * 項目成員:張雙喜 * * 編譯環境:gcc * * 項目功能: * 1、動態建立表 * 2、動態實現對錶的基本操作(增、刪、改、查) * 3、清空表資料、刪除表(附加功能) * * 項目總結: * 1、涉及的技術: * * 1、int sqlite3_exec(sqlite3*, const char *sql, sqlite_callback, void*,
Time of Update: 2018-12-04
//求一元二次方程ax2+bx+c=0的根。其中係數a(a≠0)、b、c的值由鍵盤輸入。#include <iostream>#include <math.h>using namespace std;//求根float get_x(float a,float b,float c){ float x1,x2,x; if(b*b-4*a*c<0) { cout<<"該方程無實根!"<<endl; } else if(0==b*b-4*a*c)
Time of Update: 2018-12-04
const string filePath = @"D:/aa/bb/cc.txt"; string strCurentPath = Process.GetCurrentProcess().MainModule.FileName; //運行程式的當前路徑 string strDir = System.IO.Path.GetDirectoryName(filePath); //返迴路徑 "D://aa//bb"
Time of Update: 2018-12-04
using System;using System.Collections.Generic;using System.Web;using System.Runtime.Serialization.Json;using System.Linq;using System.Text;using System.IO;using System.Text.RegularExpressions;namespace JsonHelper{ public class JsonClass {
Time of Update: 2018-12-04
在標頭檔zookeeper.jute.h中,找到Stat這個結構,首先需要明白這個變數的特點:1 存在大部分的zookeeper c api的參數中2 作為znode的節點資訊變數傳遞出去,供外部查詢和使用結構聲明如下:struct Stat { int64_t czxid; int64_t mzxid; int64_t ctime; int64_t mtime; int32_t version; int32_t cversion; int32_t
Time of Update: 2018-12-04
聲明符(declarator )中的基本符號:( ) 返回的類型為……的函數[ ] 元素類型為……的數組* 指向……類型的指標這些符號在聲明符中是有“結合律和優先順序”的;和運算式一樣,你可以通過額外的圓括弧來改變聲明符的含義。翻譯一個聲明符時,要從標識符開始,依次反覆執行下面的步驟,直到把聲明符內所有的符號都翻譯出來:1. 如果左圓括弧(後左方括弧)出現在緊鄰的右邊,那麼翻譯整對的圓括弧(或左方括弧)。2. 否則,如果星號*出現在左邊,則翻譯此星號。你可以嘗試一下,下面的例子:char * (
Time of Update: 2018-12-04
1下載 zookeeper-3.3.6.zip編譯 /zookeeper-3.3.6/src/c./configure --prefix=/hfx/zookeeper makemake install--prefix 類似這種參數有多中,./configure --help編譯好後可以看到如下路徑:[hfx@74 ~]$ cd zookeeper/[hfx@74 zookeeper]$ lltotal 24drwxrwxr-x 2 hfx hfx 4096 Mar 11 16:43
Time of Update: 2018-12-04
#include"stdlib.h"#include"stdio.h"#define max 1000void print(int a[],int n){ int i=0; printf("the last:/n"); while(a[i]!=(-1)){ //print printf("%d/n",a[i]); i++; } }void bubble(int a[],int n){
Time of Update: 2018-12-04
UDP原理就不多說了,網上能搜出一大堆。程式分為用戶端和伺服器端。實現的功能:伺服器端接收用戶端發來的資料並顯示。 1.用戶端 介面如下 各控制項名稱:textBoxIP,textBoxPort,textBoxTxt,buttonSend。 用戶端程式通過伺服器的IP地址和連接埠號碼向伺服器發送資料,IP地址預設為localhost,也可以是127.0.0.1 。 用戶端程式代碼:using System;using System.Text;using
Time of Update: 2018-12-04
using System;//2.輸入一個由若干字元組成的字串,輸出其中的大寫字母、小寫字母、數字和其他字元的個數。 using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] args) {
Time of Update: 2018-12-04
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication2{ public partial class Form1 : Form
Time of Update: 2018-12-04
1.功能:建立(build objects)對象,將一連串的隨意的記憶體位變對象,也分配資源(memory, files, semaphores, sockets等),"ctor" 是建構函式(constructor)典型的縮寫。2.假定List是個類名,List x和 List x()的區別:前者聲明了一個List對象,後者則是一個函數,返回List類型。3.能否在一個建構函式中調用另一個建構函式?答案是否定的。假設類Fro有兩個建構函式Foo::Foo(char
Time of Update: 2018-12-04
文章作者:Slyar 文章來源:Slyar Home (www.slyar.com)
Time of Update: 2018-12-04
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ struct XYZ { public int a; public int b; public int c; bool b1; }; class Program { //
Time of Update: 2018-12-04
實驗程式是用vc6編譯,一定注意副檔名為c,不是cpp,下載前面幾個測試程式(鏈表、表、原子中有下載連結)中直接將下面來源程式覆蓋1.c的內容即可!來源程式如下:#include <stdio.h>#include <stdlib.h>//rand函數使用#include <string.h>#include "include/array.h"#pragma comment(lib, "libcii.lib")//產生一個[M, N]區間上的隨機數int
Time of Update: 2018-12-04
實驗程式是用vc6編譯,一定注意副檔名為c,不是cpp,在下載:http://download.csdn.net/detail/dijkstar/4036742注意事項和遇到的問題都已經在實現程式注釋中,如下:#include <stdio.h>#include <stdlib.h>//rand函數使用#include <string.h>#include "include/table.h"#include "include/atom.h"#pragma
Time of Update: 2018-12-04
實驗程式是用vc6編譯,一定注意副檔名為c,不是cpp,在下載:http://download.csdn.net/detail/dijkstar/4036883如下:#include <stdio.h>#include <stdlib.h>//rand函數使用#include <string.h>#include "include/set.h"#pragma comment(lib, "libcii.lib")//產生一個[M, N]區間上的隨機數int
Time of Update: 2018-12-04
/** * * @author z84002131 * 很久很久以前,在一個森林裡,有獅子,老虎和狼,他們應大象的邀請,要到大象家做客。去的路上被一條小河攔住了,需要過河,只有一個獨木舟。現在已知: * 1.總共有6隻,分別是獅子爸爸,小獅子,老虎爸爸,小老虎,狼爸爸和小狼。 * 2.小傢伙們都比較弱小,如果沒有爸爸罩著就會被旁邊的大傢伙吃掉。 * 3.獨木舟最多能坐2人,無視每隻的大小。 * 4.大傢伙都會划船,小傢伙裡只有小老虎會划船。 * 求:安全過河方法。 *
Time of Update: 2018-12-04
只需增加 dispatchKeyEvent方法 對Ctrl + C 做處理 @Override public boolean dispatchKeyEvent(KeyEvent event){ int keyCode = event.getKeyCode(); if(event.isCtrlPressed() && keyCode == KeyEvent.KEYCODE_C && event.getAction() ==
Time of Update: 2018-12-04
1. 最省事的是 ATL 裡面內建的 CAtlRegExp。不過對 POSIX 標準支援很差,而且非常慢。2. boost,名氣很大,但是過於臃腫,而且速度也不快。3. 以前微軟研究院有個小組搞過一個greta,號稱速度是boost的7倍多,不過03年以後就再也沒更新了。在 VC8 以上版本編譯需要稍作修改。相容性不錯。4.