-
#include<stdio.h>
#include<string.h>
#include<limits.h>
#include<unistd.h>
#include<sys/types.h>
#define PROMPT_STRING "[myshell]$"
#define QUIT_STRING "exit\n"
static char inbuf[MAX_CANON]
char * g_ptr
char * g_lim
extern void yylex()
int main (void){
for( ){
if(fputs(PROMPT_STRING,stdout)==EOF)
continue
if(fgets(inbuf,MAX_CANON,stdin)==NULL)
continue
if(strcmp(inbuf,QUIT_STRING)==0)
break
g_ptr = inbuf
g_lim = inbuf + strlen(inbuf)
yylex()
}
return 0
}
標(biāo)簽:
include
gt
lt
limits
上傳時(shí)間:
2016-12-31
上傳用戶:colinal
-
//順序表的建立、查找、插入與刪除
#include <stdio.h>
#include <malloc.h>
#include <stdlib.h>
#define ListSize 100 //表最大長度
//結(jié)構(gòu)定義
typedef struct SeqList
{
int node[ListSize] //存放表結(jié)點(diǎn)
int length //當(dāng)前表長度
} SeqList
//插入元素
insertList(SeqList *list, int e)
{
int i=list->length-1 //先將i指定為最后一項(xiàng)
if(i>=ListSize-1) //表已經(jīng)達(dá)到最大長度ListSize
{
printf("表已滿,不能增加新的項(xiàng)!\n")
標(biāo)簽:
include
gt
lt
malloc
上傳時(shí)間:
2014-01-17
上傳用戶:dongqiangqiang
-
s document describe davicom ic dm9000 DM9000_h.h . this ic can be used in the embedded systems and network lan cards. its is 10/100Mpbs ic.
標(biāo)簽:
9000
document
describe
embedded
上傳時(shí)間:
2013-12-10
上傳用戶:xyipie
-
//初始化
initscr()
//獲得屏幕尺寸
getmaxyx(stdscr, h, w)
//畫背景
for(i=0 i<h i++)
for(j=0 j<w j++){
mvaddch(i, j, ACS_CKBOARD)
}
refresh()
//建立窗口
pad = newpad(80, 128)
for(i=0 i<80 i++){
char line[128]
sprintf(line, "This line in pad is numbered d\n", i)
mvwprintw(pad, i, 0, line)
}
//刷新屏幕
refresh()
prefresh(pad, 0, 1, 5, 10, 20, 45)
for(i=0 i<50 i++){
prefresh(pad, i+1, 1, 5, 10, 20, 45)
usleep(30000)
}
//等待按鍵
getch()
標(biāo)簽:
getmaxyx
initscr
stdscr
for
上傳時(shí)間:
2014-08-30
上傳用戶:龍飛艇
-
跨數(shù)據(jù)庫平臺:
n 支持 oracle 的OCI
n 支持DB2的CLI,
n 支持ODBC(通過ODBC,可支持SQL SERVER,MySQL等)
Ø 跨OS平臺:
n 標(biāo)準(zhǔn)C++語言,支持 unix/linux/windows
Ø 使用簡單:
n 只有一個(gè)頭文件
n 接口簡潔.otl_stream, otl_connect, otl_exception等就可以完成大部分工作
n 相對 ProC等嵌入式開發(fā),代碼能相應(yīng)減少
Ø 性能:
n 直接訪問數(shù)據(jù)庫API接口,具有API接口的高效率,可靠性
Ø 穩(wěn)定性:
n 開源代碼,唯一的代碼文件otlv4.h,可以了解所有基于數(shù)據(jù)庫API的實(shí)現(xiàn)細(xì)節(jié)
n 從1996年開始,到今已10余年.
Ø 可讀性及可維護(hù)性:
n 標(biāo)準(zhǔn)C++代碼,不需要任何預(yù)處理
n 使用流的形式,輸入輸出異常簡潔
n 減少大量代碼,
n 代碼結(jié)構(gòu)更加簡潔
參考資料:
http://otl.sourceforge.net/
標(biāo)簽:
ODBC
oracle
SERVE
OCI
上傳時(shí)間:
2017-06-14
上傳用戶:cainaifa
-
BP神經(jīng)網(wǎng)絡(luò)程序,C語言源代碼
如下:
#include "iostream.h"
#include "iomanip.h"
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
#include "time.h"
#include "fstream.h"
#define N 120 //學(xué)習(xí)樣本個(gè)數(shù)
#define IN 3 //輸入層神經(jīng)元數(shù)目
#define HN 2 //隱層神經(jīng)元數(shù)目
#define ON 2 //輸出層神經(jīng)元數(shù)目
#define Z 20000 //舊權(quán)值保存-》每次study的權(quán)值都保存下來
double P[IN] //單個(gè)樣本輸入數(shù)據(jù)
double T[ON] //單個(gè)樣本教師數(shù)據(jù)
double U11[IN][HN] //輸入層至第一隱層權(quán)值
double V[HN][ON] //隱層至輸出層權(quán)值
double X1[HN] //第一隱層的輸入
double Y[ON] //輸出層的輸入
double H1[HN] //第一隱層的輸出
double O[ON] //輸出層的輸出
double YU_HN1[HN] //第一隱層的閾值
double YU_ON[ON] //輸出層的閾值
double err_m[N] //第m個(gè)樣本的總誤差
double a //學(xué)習(xí)效率
double alpha //動(dòng)量因子
標(biāo)簽:
include
iostream
iomanip
stdlib
上傳時(shí)間:
2017-06-15
上傳用戶:xinzhch
-
LDPC 譯碼器
function [vhat]=decode_ldpc(rx_waveform,No,amp,h,scale)
[vhat]=decode_ldpc(rx_waveform,No,amp,h,scale)
標(biāo)簽:
decode_ldpc
rx_waveform
vhat
function
上傳時(shí)間:
2014-01-13
上傳用戶:fxf126@126.com
-
g a w k或GNU awk是由Alfred V. A h o,Peter J.We i n b e rg e r和Brian W. K e r n i g h a n于1 9 7 7年為U N I X創(chuàng)建的a w k編程語言的較新版本之一。a w k出自創(chuàng)建者姓的首字母。a w k語言(在其所有的版本中)是一種具有很強(qiáng)能力的模式匹配和過程語言。a w k獲取一個(gè)文件(或多個(gè)文件)來查找匹配特定模式的記錄。當(dāng)查到匹配后,即執(zhí)行所指定的動(dòng)作。作為一個(gè)程序員,你不必操心通過文件打開、循環(huán)讀每個(gè)記錄,控制文件的結(jié)束,或執(zhí)行完后關(guān)閉文件。
標(biāo)簽:
V.
Alfred
GNU
awk
上傳時(shí)間:
2014-01-02
上傳用戶:hwl453472107
-
client socket
include <sys/types.h>
include <sys/socket.h>
include <stdio.h>
include <netinet/in.h>
include <arpa/inet.h>
include <unistd.h>
int main()
{
int sockfd
int len
struct sockaddr_in address
int result
char ch = A
sockfd = socket(AF_INET, SOCK_STREAM, 0)
address.sin_family = AF_INET
address.sin_addr.s_addr = inet_addr("127.0.0.1")
address.sin_port = 9734
len = sizeof(address)
result = connect(sockfd, (struct sockaddr *)&address, len)
if(result == -1) {
perror("oops: client")
exit(1)
}
write(sockfd, &ch, 1)
read(sockfd, &ch, 1)
printf("char from server = c\n", ch)
close(sockfd)
exit(0)
}
標(biāo)簽:
include
socket
sys
gt
上傳時(shí)間:
2017-07-29
上傳用戶:wab1981
-
learningMatlab
PhÇ n 1
c¬ së Mat lab
Ch ¬ ng 1:
Cµ i ® Æ t matlab
1.1.Cµ i ® Æ t ch ¬ ng tr×nh:
Qui tr×nh cµ i ® Æ t Matlab còng t ¬ ng tù nh viÖ c cµ i ® Æ t c¸ c ch ¬ ng tr×nh phÇ n mÒ m kh¸ c, chØ cÇ n theo c¸ c h íng dÉ n vµ bæ xung thª m c¸ c th« ng sè cho phï hî p.
1.1.1 Khë i ® éng windows.
1.1.2 Do ch ¬ ng tr×nh ® î c cÊ u h×nh theo Autorun nª n khi g¾ n dÜ a CD vµ o æ ® Ü a th× ch ¬ ng tr×nh tù ho¹ t ® éng, cö a sæ
標(biāo)簽:
learningMatlab
172
199
173
上傳時(shí)間:
2013-12-20
上傳用戶:lanwei