tb系統源碼
❶ c語言程序學生成績管理系統源代碼
頭文件:::
#ifndef H_STUDENT_HH
#define H_STUDENT_HH
#include "stdio.h"
#include "string.h"
#include "malloc.h"
#define LEN sizeof(struct message_student) /*一個結構體數組元素的長度*/
#define numsubs 5 /*學科數目*/
typedef struct message_student /*結構體定義*/
{
char number[6];
char name[20];
char sex[4];
float subject[numsubs];
float score;
float average;
int index;
}student;
extern int numstus; /*學生數目*/
extern student *pointer; /*指向結構體數組*/
extern int lens;
int menu_select(); /*函數聲明*/
int openfile(student stu[]);
int findrecord(student stud[]);
int writetotext(student stud[]);
void welcome();
void display1();
void showtable();
void sort(student stu[]);
void deleterecord(student stu[],int i);
void addrecord(student stud[]);
void display(student stud[],int n1,int n2);
void amendrecord(student stud[]);
void count(student stud[]);
void sortnum(student stud[]);
void sortnum2(student stud[]);
void sortname(student stud[]);
void sortname2(student stud[]);
void sortcount(student stud[]);
void sortcount2(student stud[]);
void statistic(student stud[]);
void display1();
#endif
#include "head.h"
int menu_select()
{
char c;
printf("\n\n");
printf(" | 1. 增加學生記錄 5.統計信息 |\n");
printf(" | 2. 查詢學生記錄 6.打開文件 |\n");
printf(" | 3. 修改學生記錄 7.保存文件 |\n");
printf(" | 4. 學生紀錄排序 8.顯示記錄 |\n");
printf(" | 0.退出系統 |\n");
printf("\n\n");
printf("請選擇(0-8):");
c=getchar();
getchar();
return (c-'0');
}
#include "head.h"
int findrecord(student stud[]) /*查找信息*/
{
char str[2];
int i,num;
if(numstus==0)
{
printf("沒有可被查找的記錄\n");
return -1;
}
else
{
printf("以何種方式查找?\n1.學號\t2.姓名\t3.名次\n");
gets(str);
if(str[0]=='1') /*按學號查找*/
{
printf("請輸入學號:");
gets(str);
for(i=0;i<=numstus;i++)
if(strcmp(str,stud[i].number)==0)
{
display(stud,i,i);
break;
}
else continue;
}
else if(str[0]=='2') /*按姓名查找*/
{
printf("請輸入姓名:");
gets(str);
for(i=0;i<=numstus;i++)
if(strcmp(str,stud[i].name)==0)
{
display(stud,i,i);
break;
}
else continue;
}
else if(str[0]=='3') /*按名次查找*/
{
printf("請輸入名次:");
scanf("%d",&num);
getchar();
for(i=0;i<=numstus;i++)
if(num==stud[i].index)
{
display(stud,i,i);
break;
}
else continue;
}
if(i>numstus)
{
printf("沒有查找所要的信息。\n");
return -1;
}
return i;
}
}
#include"head.h"
int openfile(student stu[])
{
int i=0,j;
FILE *fp;
char filename[20],str[2];
if(numstus!=0)
{
printf("已經有記錄存在,是否保存?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y')
writetotext(stu);
}
printf("請輸入文件名:");
gets(filename);
numstus=0;
if((fp=fopen(filename,"rb+"))==NULL)
{
printf("無法打開該文件\n");
return(-1);
}
fscanf(fp,"%d",&numstus);
fgetc(fp);
while(i<numstus)
{
fscanf(fp,"%s",stu[i].number);
fscanf(fp,"%s",stu[i].name);
fscanf(fp,"%s",stu[i].sex);
for(j=0;j<numsubs;j++)
fscanf(fp,"%f",&stu[i].subject[j]);
fscanf(fp,"%f",&stu[i].score);
fscanf(fp,"%f",&stu[i].average);
fscanf(fp,"%d",&stu[i].index);
i++;
}
fclose(fp);
printf("文件讀取成功\n");
printf("是否顯示紀錄?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y')
display(stu,0,numstus-1);
return(0);
}
#include "head.h"
void sort(student stud[])
{
int i,j=0;
char str[5];
student *p;
p=stud;
if(numstus==0)
{
printf("沒有可供查詢的記錄!");
}
while(1)
{
for(i=0;;i++)
{
printf(" 請輸入查詢方式:");
printf("(直接輸入回車則結束查詢操作)\n");
printf("1.按照學號\t");
printf("2.按照姓名\t");
printf("3.按照名次\n");
gets(str);
if(strlen(str)==0) break;
if(str[0]=='1')
{
printf("請輸入排序次序:\n");
printf("1.升序排列\t");
printf("2.降序排列\n");
gets(str);
if(str[0]=='1')
sortnum2(p);
else
sortnum(p);
display(stud,0,numstus-1);
}
else if(str[0]=='2')
{
printf("請輸入排序次序:\n");
printf("1.升序排列\t");
printf("2.降序排列\n");
gets(str);
if(str[0]=='1')
sortname2(p);
else
sortname(p);
display(stud,0,numstus-1);
}
else if(str[0]=='3')
{
printf("請輸入排序次序:\n");
printf("1.升序排列\t");
printf("2.降序排列\n");
gets(str);
if(str[0]=='1')
sortcount2(p);
else
sortcount(p);
display(stud,0,numstus-1);
}
else printf("請輸入1~3");
printf("是否退出排序?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y') break;
}
return;
}
}
void sortnum(student stud[])
{
int i,j;
student temp;
student *p;
p=stud;
for(i=0;i<numstus;i++)
for(j=0;j<numstus-i-1;j++)
{
if(strcmp(stud[j+1].number,stud[j].number)>0)
{
temp=*(p+j);
*(p+j)=*(p+j+1);
*(p+j+1)=temp;
}
}
}
void sortnum2(student stud[])
{
int i,j;
student temp;
student *p;
p=stud;
for(i=0;i<numstus;i++)
for(j=0;j<numstus-i-1;j++)
{
if(strcmp(stud[j].number,stud[j+1].number)>0)
{
temp=*(p+j);
*(p+j)=*(p+j+1);
*(p+j+1)=temp;
}
}
}
void sortname(student stud[])
{
int i,j;
student temp;
student *p;
p=stud;
for(i=0;i<numstus;i++)
for(j=0;j<numstus-i-1;j++)
{
if(strcmp(stud[j+1].name,stud[j].name)>0)
{
temp=*(p+j);
*(p+j)=*(p+j+1);
*(p+j+1)=temp;
}
}
}
void sortname2(student stud[])
{
int i,j;
student temp;
student *p;
p=stud;
for(i=0;i<numstus;i++)
for(j=0;j<numstus-i-1;j++)
{
if(strcmp(stud[j].name,stud[j+1].name)>0)
{
temp=*(p+j);
*(p+j)=*(p+j+1);
*(p+j+1)=temp;
}
}
}
void sortcount(student stud[])
{
int i,j;
student temp;
student *p;
p=stud;
for(i=0;i<numstus;i++)
for(j=0;j<numstus-i-1;j++)
{
if(stud[j+1].index>stud[j].index)
{
temp=*(p+j);
*(p+j)=*(p+j+1);
*(p+j+1)=temp;
}
}
}
void sortcount2(student stud[])
{
int i,j;
student temp;
student *p;
p=stud;
for(i=0;i<numstus;i++)
for(j=0;j<numstus-i-1;j++)
{
if(stud[j].index>stud[j+1].index)
{
temp=*(p+j);
*(p+j)=*(p+j+1);
*(p+j+1)=temp;
}
}
}
#include"head.h"
void statistic(student stud[]) /*新增功能,輸出統計信息*/
{
int i,j=0,k=0;
char c1,str[2];
float average[numsubs],sum=0;
if(numstus==0)
printf("沒有可被查找的記錄\n");
else
{
while(1)
{
printf("下面將統計考試成績\n");
printf("請選擇你要統計哪科的成績 1.A\t2.B\t3.C\t4.D\t5.E\n");
c1=getchar();
printf("\t一共有個%d記錄\n",numstus); /*總共記錄數*/
switch(c1)
{
case '1':
for(i=0;i<numstus;i++) /*循環輸入判斷*/
{
sum+=stud[i].subject[0];
if(stud[k].subject[0]>stud[i].subject[0]) k=i;
if(stud[j].subject[0]<stud[i].subject[0]) j=i;
}
average[0]=sum/numstus;
printf("\t科目A的最高分:\n"); /*最高分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[j].number,stud[j].name,stud[j].subject[0]);
printf("\t科目A的最低分是:\n"); /*最低分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[k].number,stud[k].name,stud[k].subject[0]);
printf("\t科目A的平均分是 %5.2f\n",average[0]); /*平均分*/
break;
case '2':
for(i=0;i<numstus;i++) /*循環輸入判斷*/
{
sum+=stud[i].subject[1];
if(stud[k].subject[1]>stud[i].subject[1]) k=i;
if(stud[j].subject[1]<stud[i].subject[1]) j=i;
}
average[1]=sum/numstus;
printf("\t科目B的最高分:\n"); /*最高分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[j].number,stud[j].name,stud[j].subject[1]);
printf("\t科目B的最低分是:\n"); /*最低分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[k].number,stud[k].name,stud[k].subject[1]);
printf("\t科目B的平均分是 %5.2f\n",average[1]); /*平均分*/
break;
case '3':
for(i=0;i<numstus;i++) /*循環輸入判斷*/
{
sum+=stud[i].subject[2];
if(stud[k].subject[2]>stud[i].subject[2]) k=i;
if(stud[j].subject[2]<stud[i].subject[2]) j=i;
}
average[2]=sum/numstus;
printf("\t科目C的最高分:\n"); /*最高分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[j].number,stud[j].name,stud[j].subject[2]);
printf("\t科目C的最低分是:\n"); /*最低分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[k].number,stud[k].name,stud[k].subject[2]);
printf("\t科目C的平均分是 %5.2f\n",average[2]); /*平均分*/
break;
case '4':
for(i=0;i<numstus;i++) /*循環輸入判斷*/
{
sum+=stud[i].subject[3];
if(stud[k].subject[3]>stud[i].subject[3]) k=i;
if(stud[j].subject[3]<stud[i].subject[3]) j=i;
}
average[3]=sum/numstus;
printf("\t科目D的最高分:\n"); /*最高分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[j].number,stud[j].name,stud[j].subject[3]);
printf("\t科目D的最低分是:\n"); /*最低分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[k].number,stud[k].name,stud[k].subject[3]);
printf("\t科目D的平均分是 %5.2f\n",average[3]); /*平均分*/
break;
case '5':
for(i=0;i<numstus;i++) /*循環輸入判斷*/
{
sum+=stud[i].subject[4];
if(stud[k].subject[4]>stud[i].subject[4]) k=i;
if(stud[j].subject[4]<stud[i].subject[4]) j=i;
}
average[4]=sum/numstus;
printf("\t科目E的最高分:\n"); /*最高分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[j].number,stud[j].name,stud[j].subject[4]);
printf("\t科目E的最低分是:\n"); /*最低分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[k].number,stud[k].name,stud[k].subject[4]);
printf("\t科目E的平均分是 %5.2f\n",average[4]); /*平均分*/
break;
default:printf("輸入錯誤!請輸入1~5之間的數\n");
}
sum=0;
getchar();
printf("是否繼續進行統計?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y') ;
else break;
}
}
}
#include"head.h"
int writetotext(student stud[]) /*將所有記錄寫入文件*/
{
int i=0,j;
FILE *fp;
char filename[20];
printf("輸入文件名稱:");
gets(filename);
fp=fopen(filename,"w");
fprintf(fp,"%d\n",numstus);
while(i<numstus)
{
fprintf(fp,"%s %s %s ",stud[i].number,stud[i].name,stud[i].sex);
for(j=0;j<numsubs;j++)
fprintf(fp,"%f ",stud[i].subject[j]);
fprintf(fp,"%f %f %d ",stud[i].score,stud[i].average,stud[i].index);
i++;
}
fclose(fp);
printf("已成功存儲!\n");
display(stud,0,numstus-1);
numstus=0;
return 0;
}
#include"head.h"
void welcome()
{
printf("\t*************************************************************\n");
printf("\t\t\t\t這是一個學生成績管理系統\n\t\t\t\t 傾情奉獻 歡迎使用!\n");
printf("\t*************************************************************\n");
}
void showtable()
{
printf("---------------------------------------------------------------------------------------\n");
printf("學號\t姓名\t性別\tA\tB\tC\tD\tE\t總分\t平均分\t名次\n");
printf("---------------------------------------------------------------------------------------\n");
}
void display(student stud[],int n1,int n2)
{
int i;
showtable(); /*顯示表頭*/
for(i=n1;i<=n2;i++)
printf("%s\t%s\t%s\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f\t%d\t\n",stud[i].number,stud[i].name,stud[i].sex,stud[i].subject[0],stud[i].subject[1],stud[i].subject[2],stud[i].subject[3],stud[i].subject[4],stud[i].score,stud[i].average,stud[i].index);
/*通過循環輸出數據*/
}
void display1()
{
printf("\t\t本系統由計應精英一組親情製作\n\n");
printf("\t\t製作人員列表: (按比劃)\n");
printf("\t\t王慶斌\t\t\t張威\n\t\t李智\t\t\t周在峰\n\t\t楊凱\t\t\t胡楊\n");
printf("\n\n");
getchar();
}
#include"head.h"
#include<string.h>
void amendrecord(student stud[])
{
char str[5]; /*供用戶輸入*/
int i=-1,j;
if(numstus==0) /*沒有記錄返回*/
printf("沒有可供修改的記錄!");
while(i<0)
{
i=findrecord(stud);
if(i>=0)
{
printf("要刪除這個學生的信息嗎?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y')
{
deleterecord(stud,i);
count(stud);
}
else
{
printf("確定要修改這個學生的信息嗎?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y')
{
printf("下面請重新輸入學生的信息:\n");
printf("請輸入學號:");
gets(stud[i].number);
printf("請輸入姓名:");
gets(stud[i].name);
printf("請輸入性別(男/女 1/0):");
gets(str);
if(str[0]=='0')
strcpy(stud[i].sex,"女");
else
strcpy(stud[i].sex,"男");
stud[i].score=0;
printf("請按順序輸入成績:");
for(j=0;j<numsubs;j++)
{
scanf("%f",&stud[i].subject[j]);
stud[i].score+=stud[i].subject[j];
}
getchar();
stud[i].average=stud[i].score/numsubs;
}
count(stud);
}
display(stud,0,numstus-1);
}
printf("是否繼續進行其他修改?(y/n)\n");
gets(str);
if(str[0]=='y'||str[0]=='Y')
i=-1;
else i=1;
}
}
void deleterecord(student stu[],int i) /*刪除信息*/
{
int j;
while(i>=0)
{
for(j=i;j<numstus;j++)
stu[j]=stu[j+1];
numstus--;
printf("刪除成功!\n");
}
}
void count(student stud[])
{
int i,j;
for(i=0;i<numstus;i++)
{
stud[i].index=1;
for(j=0;j<numstus;j++)
if(stud[j].score>stud[i].score)
stud[i].index++;
}
}
#include "head.h"
void addrecord(student stud[])
{
int i=0,j,num;
char str[5];
if(numstus!=0)
{
printf("已有記錄存在是否覆蓋?(y/n)\n");
gets(str);
if(str[0]=='Y'||str[0]=='y')
i=0;
else i=numstus;
}
printf("請輸入增加的學生信息條目數:");
scanf("%d",&num);
if(i==0)
numstus=num;
else numstus+=num;
if(numstus>lens)
{
lens+=50;
pointer=(student *)realloc(pointer,lens*LEN);
}
printf("請輸入學生信息:\n");
for(;i<numstus;i++)
{
getchar();
printf("請輸入學號:");
gets(pointer[i].number);
printf("請輸入姓名:");
gets(pointer[i].name);
printf("請輸入性別(男/女 1/0):");
gets(pointer[i].sex);
if(pointer[i].sex[0]=='0') strcpy(pointer[i].sex,"女");
else strcpy(pointer[i].sex,"男");
printf("請輸入各科成績:(按ABCDE的順序):");
stud[i].score=0;
for(j=0;j<numsubs;j++)
{
scanf("%f",&stud[i].subject[j]); /*計算總分*/
stud[i].score+=stud[i].subject[j];
}
stud[i].average=stud[i].score/numsubs; /*計算平均分*/
}
count(stud); /*附名次*/
display(stud,0,numstus-1);
getchar();
}#include "head.h"
int numstus;
int lens;
student *pointer;
void main()
{
int i=1;
char str[2];
lens=100;
pointer=(student *)malloc(lens*LEN); /*分配內存*/
numstus=0;
welcome(); /*歡迎界面*/
while(i>0)
{
i=menu_select(); /*控制菜單*/
switch(i)
{
case 1:addrecord(pointer);break; /*增加學生信息*/
case 2:findrecord(pointer);break; /*查詢學生信息*/
case 3:amendrecord(pointer);break; /*修改學生信息*/
case 4:sort(pointer);break; /*學生信息排序*/
case 5:statistic(pointer);break; /*統計信息*/
case 6:openfile(pointer);break; /*打開文件*/
case 7:writetotext(pointer);break; /*保存文件*/
case 8:display(pointer,0,numstus-1);break; /*顯示記錄*/
case 0:
if(numstus!=0) printf("是否保存當前記錄?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y')
writetotext(pointer);
i=-1;break; /*退出系統*/
default:printf("請輸入數字0~8:\n");i=1; /*輸入錯誤*/
}
}
printf("\t\t歡迎再次使用本系統。\n\n");
display1();
}
自己一改就能用,給我加分哈!
❷ TB源碼txt怎麼安裝
摘要 你好,按住Ctrl滑鼠點擊要安裝源碼的類,出來一個類似二進制的東西,點擊按鈕【Attach Source...】出來一個窗口,有三個按鈕,第一個是類源碼所在的工程,
❸ 學生選課系統登錄的源代碼(asp+access)要怎麼寫
string ls_uname,ls_pwd1,ls_pwd2,ls_sno,ls_s1
ls_uname=sle_userid.text
ls_pwd1=sle_password.text
select userName
into :ls_sno
from userTB
where userName=:ls_uname;
if sle_userid.text="" or sle_password.text="" then
messagebox("提示","用戶名或密碼不能為空,請輸入用戶名或密碼!")
//sle_userid.text=""
//sle_password.text=""
return
end if
select password
into :ls_pwd2
from userTB
where userName = :ls_uname ;
//sle_1.text=ls_sno
//sle_2.text=ls_pwd2
if ls_pwd1 = ls_pwd2 then
open(w_main)
close(w_login)
else
messagebox("錯誤","用戶名或密碼錯誤,請重新輸入!")
sle_password.text=""
return
end if
大概的形式就是這樣的
❹ Windows 10源代碼值多少錢的最新相關信息
北京時間6月24日報道,多個微軟內部Windows操作系統版本及內核源代碼泄露到網上。
這些數據——32TB的非公開官方安裝映像和軟體藍圖設計壓縮到了8TB,被上傳到betaarchive.com,最新一批文件是是本周早些時候上傳的。據悉,這些秘密數據是今年3月份前後從微軟內部系統中泄露出來的。
被泄露的代碼是微軟共享代碼工具包(Shared Source Kit)。據見到過泄漏代碼內容的消息人士稱,其中包括Windows 10硬體驅動程序,USB和WiFi功能,支持ARM架構的OneCore內核的源代碼。
獲得這些數據的人或組織,可以查找微軟操作系統中的安全缺陷,然後開發惡意件對全球Windows設備發動攻擊。這些代碼在Windows操作系統核心運行,部分代碼具有最高的許可權。
❺ 基於ASP.NET在線考試系統開發實例源碼,sql Server 2008資料庫
有完整源代碼,附上資料庫部分代碼參考:
CREATE TABLE [dbo].[JudgeProblem](
[ID] [int] IDENTITY(1,1) NOT NULL,
[CourseID] [int] NOT NULL,
[Title] [varchar](1000) NOT NULL,
[Answer] [bit] NOT NULL,
CONSTRAINT [PK_JudgeProblem] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[MultiProblem](
[ID] [int] IDENTITY(1,1) NOT NULL,
[CourseID] [int] NOT NULL,
[Title] [varchar](1000) NOT NULL,
[AnswerA] [varchar](500) NOT NULL,
[AnswerB] [varchar](500) NOT NULL,
[AnswerC] [varchar](500) NOT NULL,
[AnswerD] [varchar](500) NOT NULL,
[Answer] [varchar](50) NOT NULL,
CONSTRAINT [PK_MultiProblem] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[Student](
[ID] [varchar](50) NOT NULL,
[Name] [varchar](20) NULL,
[PWD] [varchar](20) NULL,
[Sex] [varchar](2) NULL,
[JoinTime] [varchar](20) NULL,
[Question] [varchar](50) NULL,
[Answer] [varchar](50) NULL,
[profession] [varchar](50) NULL,
CONSTRAINT [PK_tb_Student] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[Score](
[ID] [int] IDENTITY(1,1) NOT NULL,
[UserID] [varchar](20) NOT NULL,
[PaperID] [int] NOT NULL,
[Score] [int] NOT NULL,
[ExamTime] [datetime] NOT NULL CONSTRAINT [DF_Score_ExamTime] DEFAULT (getdate()),
CONSTRAINT [PK_Score] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[Course](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](200) NOT NULL,
PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
❻ 誰能給我一套期貨程序化交易模型的源碼
你是想要能盈利的還是僅僅用於學習的模型源碼?如果是學慣用,那麼文華,tb論壇全是,如果能穩定盈利的,估計你給錢別人也不會賣。程序化交易,更多的還是自己花時間研究和學習,不用奢望他人的研究成果,人都是趨利的。
❼ 什麼叫TB下載和一般下載有何區別
BitTorrent(簡稱BT,俗稱BT下載、變態下載)是一個多點下載的源碼公開的P2P軟體,使用非常方便,就像一個瀏覽器插件,很適合新發布的熱門下載。其特點簡單的說就是:下載的人越多,速度越快。 BitTorrent 下載工具軟體可以說是一個最新概念 P2P 的下載工具、它採用了多點對多點的原理,一般簡稱 BT(BitTorrent) 也就是大家所說的變態下載。該軟體相當的特殊,一般我們下載檔案或軟體,大都由 HTTP 站點或FTP 站台下載,若同時間下載人數多時,基於該伺服器頻寬的因素,速度會減慢許多,而該軟體卻不同,恰巧相反,同時間下載的人數越多你下載的速度便越快,因為它採用了多點對多點的傳輸原理
❽ TB量化程序化模型源碼好用嗎
不清楚您表達的是TB平台好用還是策略源碼放在TB上走勢怎麼樣?前一個的話,TB極速版挺好用的。如果是後一個的話,還是看你源碼編寫的如何,和TB沒有關系的
❾ 急求java學生信息管理系統源代碼,帶有連接資料庫的,萬分感謝
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Container;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JToolBar;
import javax.swing.SwingConstants;
public class MainFrame extends JFrame implements ActionListener{
InsertPanel ip = null;
SelectPanel sp = null;
JPanel pframe;
JButton jb1,jb2,jb3;
JMenuItem jm11,jm21,jm22,jm23,jm31,jm32,jm41,jm42;
CardLayout clayout;
public MainFrame(String s){
super(s);
JMenuBar mb = new JMenuBar();
this.setJMenuBar(mb);
JMenu m1 = new JMenu("系統");
JMenu m2 = new JMenu("基本信息");
JMenu m3 = new JMenu("成績");
JMenu m4 = new JMenu("獎懲");
mb.add(m1);
mb.add(m2);
mb.add(m3);
mb.add(m4);
jm11 = new JMenuItem("退出系統");
jm21 = new JMenuItem("輸入");
jm22 = new JMenuItem("查詢");
jm23 = new JMenuItem("更改");
jm31 = new JMenuItem("輸入成績");
jm32 = new JMenuItem("查詢成績");
jm41 = new JMenuItem("獎勵");
jm42 = new JMenuItem("處分");
m1.add(jm11);
m2.add(jm21);
m2.add(jm22);
m2.add(jm23);
m3.add(jm31);
m3.add(jm32);
m4.add(jm41);
m4.add(jm42);
Icon i1 = new ImageIcon();
Icon i2 = new ImageIcon();
Icon i3 = new ImageIcon();
jb1 = new JButton(i1);
jb1.setToolTipText("輸入");
jb2 = new JButton(i2);
jb2.setToolTipText("查詢");
jb3 = new JButton(i3);
jb3.setToolTipText("退出");
JToolBar tb = new JToolBar("系統工具");
tb.add(jb1);
tb.add(jb2);
tb.add(jb3);
add(tb,BorderLayout.NORTH);
jm11.addActionListener(this);
jm21.addActionListener(this);
jm22.addActionListener(this);
jb1.addActionListener(this);
jb2.addActionListener(this);
jb3.addActionListener(this);
clayout = new CardLayout();
pframe = new JPanel(clayout);
add(pframe);
JPanel mainp = new JPanel(new BorderLayout());
JLabel mainl = new JLabel("學生信息管理平台",SwingConstants.CENTER);
mainl.setFont(new Font("serif",Font.BOLD,30));
mainp.add(mainl);
pframe.add(mainp,"main");
clayout.show(pframe, "main");
}
public void actionPerformed(ActionEvent e){
if(e.getSource() == jm21 || e.getSource() == jb1){
if(ip == null){
ip= new InsertPanel();
pframe.add(ip,"insert");
}
clayout.show(pframe, "insert");
this.setTitle("輸入學生信息");
}
else if(e.getSource() == jm22 || e.getSource() == jb2){
if(sp == null){
sp= new SelectPanel();
pframe.add(sp,"select");
}
clayout.show(pframe, "select");
this.setTitle("查詢學生信息");
}
else if(e.getSource() == jm11 || e.getSource() == jb3){
System.exit(0);
}
}
}
第二個:
import javax.swing.JFrame;
public class MainTest {
public static void main(String [] args){
MainFrame f = new MainFrame("學生信息管理平台");
f.setSize(400,300);
f.setLocation(350,250);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
}
}
第二個:
import java.sql.Connection;
import java.sql.DriverManager;
public class MySQLConnection {
static Connection getCon(){
Connection con = null;
try{
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost/test","root","123");
}
catch(Exception e){
System.out.println("建立資料庫連接遇到異常!");
}
return con;
}
}
第四個:
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
public class SelectPanel extends JPanel implements ActionListener{
JButton jb;
JTextField jt;
JTextField jt1,jt2,jt3,jt4;
public SelectPanel(){
JLabel jl = new JLabel("請輸入學號:",SwingConstants.CENTER);
jt = new JTextField();
jb = new JButton("確定");
JPanel jp1 = new JPanel(new GridLayout(1,3));
jp1.add(jl);
jp1.add(jt);
jp1.add(jb);
JLabel j1,j2,j3,j4;
j1 = new JLabel("學號:",SwingConstants.CENTER);
j2 = new JLabel("姓名:",SwingConstants.CENTER);
j3 = new JLabel("性別:",SwingConstants.CENTER);
j4 = new JLabel("年齡:",SwingConstants.CENTER);
jt1 = new JTextField(6);
jt1.setEditable(false);
jt2 = new JTextField(6);
jt2.setEditable(false);
jt3 = new JTextField(6);
jt3.setEditable(false);
jt4 = new JTextField(6);
jt4.setEditable(false);
JPanel jp2 = new JPanel(new BorderLayout());
JPanel jp3 = new JPanel(new GridLayout(4,2));
jp2.add(new JLabel(""),BorderLayout.NORTH);
jp3.add(j1);
jp3.add(jt1);
jp3.add(j2);
jp3.add(jt2);
jp3.add(j3);
jp3.add(jt3);
jp3.add(j4);
jp3.add(jt4);
jp2.add(jp3);
this.setLayout(new BorderLayout());
add(jp1,BorderLayout.NORTH);
add(jp2);
jb.addActionListener(this);
}
public void actionPerformed(ActionEvent e){
if(e.getSource() == jb){
String stuNo = jt.getText().trim();
Student s = new Student();
boolean b = true;
try{
b = s.selectByStuNo(stuNo);
}
catch(Exception ex){
System.out.println("查詢學生信息遇到異常!");
}
if(b){
jt1.setText(s.getStuNo());
jt2.setText(s.getName());
jt3.setText(s.getGender());
int a = s.getAge();
Integer i = new Integer(a);
jt4.setText(i.toString());
}
else{
JOptionPane.showMessageDialog(null, "無此學生!");
}
}
}
}
第五個:
import javax.swing.JFrame;
public class SelectTest {
public static void main(String [] args){
JFrame f = new JFrame("查詢學生信息");
SelectPanel p = new SelectPanel();
f.add(p);
f.setSize(400,300);
f.setLocation(300,250);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
}
}
第六個:
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
public class Student {
String stuNo;
String name;
String gender;
int age;
public Student(){}
public Student(String stuNo,String name,String gender, int age){
this.stuNo = stuNo;
this.name = name;
this.gender = gender;
this.age = age;
}
public String getStuNo(){
return stuNo;
}
public void setStuNo(String stuNo){
this.stuNo = stuNo;
}
public String getName(){
return name;
}
public void setName(String name){
this.name = name;
}
public String getGender(){
return gender;
}
public void setGender(String gender){
this.gender = gender;
}
public int getAge(){
return age;
}
public void setAge(int age){
this.age = age;
}
public boolean insertStudent(){
boolean b = true;
try{
Connection con = MySQLConnection.getCon();
Statement statement = con.createStatement();
String sql = "insert into student values('" + stuNo + "','" + name +"','" + gender + "'," + age + ")";
sql = new String(sql.getBytes("gb2312"),"ISO8859_1");
statement.executeUpdate(sql);
con.close();
}
catch(Exception e){
b = false;
System.out.println("插入資料庫遇到異常!");
}
return b;
}
public boolean selectByStuNo(String stuNo)throws Exception{
boolean b = true;
Connection con = MySQLConnection.getCon();
Statement statement = con.createStatement();
String sql = "select * from student where stuNo =" + stuNo;
ResultSet rs = statement.executeQuery(sql);
if(rs != null && rs.next()){
String no = rs.getString(1);
this.setStuNo(no);
String n = rs.getString(2);
n = new String(n.getBytes("ISO8859_1"),"gb2312");
this.setName(n);
String g = rs.getString(3);
g = new String (g.getBytes("ISO8859_1"),"gb2312");
this.setGender(g);
this.setAge(rs.getInt(4));
b = true;
}
rs.close();
statement.close();
con.close();
return b;
}
}
資料庫你自己弄吧,我沒時間弄了!初學得多動手哦