#if !defined(AFX_GAQUEEN_H__C26AE0A3_F9B4_426F_A324_B460CC7946CB__INCLUDED_) #define AFX_GAQUEEN_H__C26AE0A3_F9B4_426F_A324_B460CC7946CB__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class CGAQueen { public: CGAQueen(int nPopulation,int nIteration,float Mutation,int mChBoard) virtual ~CGAQueen() void Clear() // to clear chess board with 0 value void InitialPopulation() // to create the first and initial randompopulation void FillArea(int index) // to fill chess board with desired chromosome int CostFunc(int index) // determine the cost of matrix[index][index] void PopulationSort() // to sort population from the best to the worst void GenerateCrossOverMatrix() // a way to create children from parent is CcrossOver void Mating() // to create children from parents void Ap
標簽: AFX_GAQUEEN_H INCLUDED defined define
上傳時間: 2015-12-27
上傳用戶:wuyuying
Dijkstra算法求最短路徑(C#版) using System using System.Collections using System.Text namespace Greedy { class Marx { private int[] distance private int row private ArrayList ways = new ArrayList() public Marx(int n,params int[] d) { this.row = n distance = new int[row * row] for (int i = 0 i < row * row i++) { this.distance[i] = d[i]
標簽: System using Collections namespace
上傳時間: 2013-12-29
上傳用戶:liglechongchong
設計一個程序,通過重載求兩個數中最大數的函數max(),分別實現求兩個實數和兩個整數以及兩個字符的最大數
標簽: 程序
上傳時間: 2014-01-24
上傳用戶:nanxia
Analog Device ARM-7 系列之 ADuC_7020 Evaluation Board 內多個學習范例全都是基于 Keil 工程版的 范例,附 ADuC_7020 Evaluation Board 原理圖,而范例內容如下: 1.ADC 2.Comparator 3.DAC 4.FlashEE 5.FuncRam 6.INT 7.Mics 8.PLA 9.Pulse 10.S&C 11.TimerTrig 12.UART 13.Varplace
標簽: ADuC 7020 Evaluation Evaluati
上傳時間: 2014-07-04
上傳用戶:lps11188
Analog Device ARM-7 系列之 ADuC_7024 Evaluation Board 內多個學習范例全都是基于 Keil 工程版的 范例,附 ADuC_7024 Evaluation Board 原理圖,而范例內容如下: 1.ADC 2.Comp 3.DAC 4.FlashEE 5.FuncRam 6.INT 7.Mics 8.PLA 9.Pulse 10.PWM 11.S&C 12.TimerTrig 13.UART 14.Varplace
標簽: ADuC 7024 Evaluation Evaluati
上傳時間: 2016-01-01
上傳用戶:lo25643
這個是一個用Keil C51編寫的16位串行AD芯片ADS1100的驅動程序示例,程序中含有寫好的ADS1100.H標準驅動函數和LCD1602.H液晶驅動函數,用51模擬IIC總線進行數據采集。提供API式外部函數接口:void Init_ads1100(unsigned char mdata) unsigned int Rd_ads1100(void) 具體功能見程序中的*.C測試文件。
上傳時間: 2014-06-25
上傳用戶:onewq
學會對文件的記錄鎖定,及解鎖。#include <stdio.h> #include <unistd.h> #include <fcntl.h> int main() { int fd int i struct { char name[20] uint ID int age } myrec fd =open("name", O_RDWR|O_CREAT, 0755) if (fd == -1) return -1 printf("Input your name:") scanf("%s", myrec.name) printf("Inpute your ID :") scanf("%d", &myrec.ID) printf("Input your age :") scanf("%d", &myrec.age) lseek(fd, 0,SEEK_END) lockf(fd, 1, 0) write(fd, (void *)&myrec, sizeof(myrec)) lockf(fd, 0 ,0) return 0 } 執行命令cc lock.c –o lock.out Chmod +x lock.out ./lock.out
標簽: 記錄
上傳時間: 2016-01-04
上傳用戶:亞亞娟娟123
使用說明: 雙擊Demo.bat文件便可以執行 (需要配置好jre||JDK環境) 請輸入sql語法關鍵字來測試改程序謝謝 目前支持的語法關鍵字如下設置: text.getSettings().setCase_Insensitive(false) // 不區分大小寫 text.getSettings().addKeyWord1("select") text.getSettings().addKeyWord1("commit") text.getSettings().addKeyWord1("from") text.getSettings().addKeyWord1("AND") text.getSettings().addKeyWord1("WHERE") text.getSettings().addKeyWord1("with ur") text.getSettings().addKeyWord1("VARCHAR") text.getSettings().addKeyWord2("inSert") text.getSettings().addKeyWord2("DECLARE") text.getSettings().addKeyWord2("distinct") text.getSettings().addKeyWord2("SET") text.getSettings().addFunctionKeyWord("int") text.getSettings().addFunctionKeyWord("COUNT") text.getSettings().setComment("--") //設置行注釋 當前版本主要改進塊注釋的算法 塊注釋示例: /* 12312334 "測試字符串" select count(*) from where with ur */
上傳時間: 2016-01-10
上傳用戶:l254587896
Linux 2.4.18 s3c2440 led driver 使用dev-C++撰寫,需要linux 2.4.18 kernel include,編譯完成後產生led module。 insmod main.o //安裝模組 mknod /dev/leds c 221 0 使用方法: int main(int argc, char *argv[]) { int testdev //led test... testdev = open("/dev/QuickMarkLed",O_RDWR) ioctl(testdev, 2, 1) //ioctl(device, led number, open/close) open=1 ioctl(testdev, argv[1][0]- 0 , argv[2][0]- 0 ) //ioctl(device, led number, open/close) open=1 close(testdev) return 0 }
標簽: s3c2440 driver Linux dev-C
上傳時間: 2014-01-01
上傳用戶:qlpqlq
* first open client.cpp and search for that USER_MSG_INTERCEPT(TeamInfo) over it u add this Code: USER_MSG_INTERCEPT(Health) { BEGIN_READ(pbuf,iSize) me.iHealth = READ_BYTE() return USER_MSG_CALL(Health) } * then we search for int HookUserMsg (char *szMsgName, pfnUserMsgHook pfn) and add this Code: REDIRECT_MESSAGE( Health ) *k now we have the health registered and can read it out i stop this hear know cuz i must thanks panzer and w00t.nl that they helped me with it first time! *ok now we go to int HUD_Redraw (float x, int y) and packing this draw code in it Code:
標簽: USER_MSG_INTERCEPT TeamInfo client search
上傳時間: 2016-01-22
上傳用戶:ynzfm