C语言实现一个Window控制台带彩色,且可以用方向键选择并确认的菜单式列表(二)

Stella981
• 阅读 326

http://blog.csdn.net/morixinguan/article/details/77485367

上节,我们写了一个简单的列表框架,是关于学生信息管理系统的,这节,我们来把它尽量的完善一下。

目前,我这边已经除了学生信息修改以及学生信息删除还没有做好,其余功能已经可以正常使用,我们来看看程序的实现,往后更新了这两个接口,会将本文继续修改。

我们来看看代码的实现:

student_project_for_window.c

#include <stdio.h>
#include <Windows.h>
#include <conio.h>
#include <stdlib.h>
#include <unistd.h>
#define   NR(x)   (sizeof(x)/sizeof(x[0]+0))
#define  TITLE  "学生信息管理系统"
#define  AUTHOR "作者:杨源鑫"
#define  DATE   "日期:2017年8月22日"
#define  SIZE   100
//定义枚举Keyboard的键值数据 
enum 
{
    UP = 72,
    DOWN = 80 ,
    LEFT = 75 ,
    RIGHT = 77 ,
    ENTER = 13 ,
    ESC = 27 ,
};

//存储学生信息的结构体
struct student
{
    char name[20] ; //名字
    int  id ;         //学生ID
    float score ;   //分数
};

//学生的个数
int stucount ; 
//定义一个数组,用于存储学生信息  
struct student array[SIZE] = {0}; 

//定义要显示的菜单 
char *menu[] = 
{
    "*学生信息添加*",
    "*学生信息查找*",
    "*学生信息打印*",
    //"*学生信息修改*",
    //"*学生信息删除*",
    "*学生信息保存*",
    "*学生信息导入*",
    "*    退出    *",
};

//定义结构体
CONSOLE_CURSOR_INFO cci; 
//定义默认的坐标位置      
COORD pos = {0,0};
//显示菜单 
void showmenu(HANDLE hOut ,char **menu , int size , int index) ;
//获取用户输入 
int  get_userinput(int *index , int size) ;
//学生信息添加
void stu_add(HANDLE hOut);
//学生信息打印
void stu_show(HANDLE hOut);
//学生信息查找
void stu_search(HANDLE hOut);
//学生信息保存
void stu_save(HANDLE hOut);
//学生信息导入
void stu_load(HANDLE hOut);
//学生信息修改
void stu_modefi(HANDLE hOut);
//学生信息删除
void stu_delete(HANDLE hOut);

int main()
{
    int i;
    int ret ;
    int index = 0 ;
    HANDLE hOut;
    SetConsoleTitleA(TITLE);
    //获取当前的句柄---设置为标准输出句柄 
    hOut = GetStdHandle(STD_OUTPUT_HANDLE);
    //获取光标信息
    GetConsoleCursorInfo(hOut, &cci); 
    //设置光标大小   
    cci.dwSize = 1; 
    //设置光标不可见 FALSE   
    cci.bVisible =  0; 
    //设置(应用)光标信息
    SetConsoleCursorInfo(hOut, &cci);   
    while(1)
    {
        showmenu(hOut , menu , NR(menu) , index);
        ret = get_userinput(&index , NR(menu));
        if(ret == ESC)
            break ;
        if(ret == ENTER)
        {
            switch(index)
            {
                case 0:  stu_add(hOut) ; break ;      //学生信息添加
                case 1:  stu_search(hOut);break ;   //学生信息查找
                case 2:  stu_show(hOut); break ;      //学生信息打印
                //case 3:  stu_modefi(hOut); break ;  //学生信息修改
                //case 4:  stu_delete(hOut); break ;  //学生信息删除
                case 3:  stu_save(hOut); break ;     //学生信息保存
                case 4:  stu_load(hOut); break ;    //学生信息导入
                case 5:  system("cls");return 0 ;   //退出学生信息管理系统
            }
        }
    }
    return 0;
}

void showmenu(HANDLE hOut ,char **menu , int size , int index)
{
    int i ; 
    system("cls");    
    //设置显示的文本的颜色 
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    //初始化控制台显示的X,Y轴的坐标 
    pos.X = 30;
    pos.Y = 0 ;
    //设置显示到控制台终端的具体位置 
    SetConsoleCursorPosition(hOut,pos);    
    //调用printf在控制台对应的位置上输出 
    printf("%s",TITLE);
    pos.X = 32;
    pos.Y = 1 ;
    SetConsoleCursorPosition(hOut,pos);    
    printf("%s",AUTHOR);
    pos.X = 30;
    pos.Y = 2 ;
    SetConsoleCursorPosition(hOut,pos);    
    printf("%s",DATE);
    for(i = 0 ; i < size ; i++)
    {
        //如果i==index表示在当前选项的位置,默认初始化显示是第一项,显示为红色,
        //当按下上下按键选择的时候,光标会移动,也就看到了列表选择的现象 
        if(i == index)
        {
            //红色 
            SetConsoleTextAttribute(hOut, FOREGROUND_RED | 0x8); 
            pos.X = 30;
            pos.Y = 5+i;
            //设置光标坐标
            SetConsoleCursorPosition(hOut,pos);    
            printf("%s",menu[i]);
        }
        //否则显示为白色 
        else
        {
            //白色 
            SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); 
            pos.X = 30;
            pos.Y = 5+i;
            //设置光标坐标
            SetConsoleCursorPosition(hOut,pos);    //设置光标坐标
            printf("%s",menu[i]);
        }
    }
    //刷新标准输出缓冲区 
    fflush(stdout);
}

//获取用户输入的接口 
int  get_userinput(int *index , int size)
{
    int ch ;
    ch = getch();
    switch(ch)
    {
        //上 
        //如果选择上,那么光标向上移动 
        case UP : if(*index > 0)  *index -= 1 ;  break; 
        //下 
        //如果选择下,那么光标向下移动 
        case DOWN :if(*index < size -1)  *index += 1 ;  break;
        //左 
        case LEFT: 
        case 97:return 0 ;
        //右 
        case RIGHT:return 0 ;
        //回车 
        case ENTER: return ENTER ;
        //ESC
        case ESC: return ESC ;
    }
    return 0 ;
}

//学生信息添加
void stu_add(HANDLE hOut)
{
    system("cls");
    //设置显示的文本的颜色 
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    //初始化控制台显示的X,Y轴的坐标 
    pos.X = 15;
    pos.Y = 0 ;
    //设置显示到控制台终端的具体位置 
    SetConsoleCursorPosition(hOut,pos);   
    printf("                  学生信息添加\n");
    if(stucount >= SIZE)
        printf("学生信息已经满\n");
    printf("学生姓名:");
    scanf("%s" , array[stucount].name);
    printf("\n学生ID:");
    scanf("%d" , &(array[stucount].id));
    printf("\n学生成绩:");
    scanf("%f" , &(array[stucount].score));
    stucount++ ; 
     //清掉输入缓冲区中的\n
    getchar();  
    fflush(NULL);
}
//学生信息打印
void stu_show(HANDLE hOut)
{
    system("cls");
    //设置显示的文本的颜色 
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    //初始化控制台显示的X,Y轴的坐标 
    pos.X = 15;
    pos.Y = 0 ;
    //设置显示到控制台终端的具体位置 
    SetConsoleCursorPosition(hOut,pos); 
    printf("                  学生信息打印\n");
    fflush(stdout);
    int i ; 
    for(i = 0 ; i < stucount ; i++)
    {
        SetConsoleTextAttribute(hOut, FOREGROUND_RED| 0x8); 
        pos.X = 1;
        pos.Y = i+4 ;
        SetConsoleCursorPosition(hOut,pos); 
        printf("ID:%2d ",array[i].id);
        printf("姓名:%s ",array[i].name);
        printf("分数:%f ",array[i].score);
    }
    fflush(stdout);
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 0;
    pos.Y = 20 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("Please press any key to continue ... \n");
    getchar();  //阻塞
}
//查找ID
static void search_id(HANDLE hOut,int id)
{
    system("cls");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 15;
    pos.Y = 0 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("                  查找到学生的信息\n");
    fflush(stdout);
    int i ,j ; 
    for(i = 0 , j = 0 ; i < stucount ; i++)
    {
        if(array[i].id == id)
        {
            SetConsoleTextAttribute(hOut, FOREGROUND_RED| 0x8); 
            pos.X = 1;
            pos.Y = j+4 ;
            SetConsoleCursorPosition(hOut,pos); 
            printf("ID:%2d ",array[i].id);
            printf("姓名:%s ",array[i].name);
            printf("分数:%f ",array[i].score);
            j++ ; 
        }
    }
    fflush(stdout);
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 0;
    pos.Y = 20 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("Please press any key to continue ... \n");
    getchar(); 
}
//查找姓名
static void search_name(HANDLE hOut,const char *name)
{
    system("cls");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 15;
    pos.Y = 0 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("                  查找到学生的信息\n");
    fflush(stdout);
    int i , j; 
    for(i = 0 , j = 0; i < stucount ; i++)
    {
        if(strcmp(array[i].name , name) == 0)
        {
            SetConsoleTextAttribute(hOut, FOREGROUND_RED| 0x8); 
            pos.X = 1;
            pos.Y = j+4 ;
            SetConsoleCursorPosition(hOut,pos); 
            printf("ID:%2d ",array[i].id);
            printf("姓名:%s ",array[i].name);
            printf("分数:%f ",array[i].score);
            j++ ; 
        }
    }
    fflush(stdout);

    
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 0;
    pos.Y = 20 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("Please press any key to continue ... \n");
    getchar();
}

//学生信息查找
void stu_search(HANDLE hOut)
{
    char ch ; 
    int id ; 
    char name[30] ; 
repeat:
    system("cls");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 15;
    pos.Y = 0 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("                  学生信息查找\n");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 20;
    pos.Y = 0 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("请选择按什么方式查找学生信息 :\n");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 10;
    pos.Y = 1 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("            1.ID \n");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 10;
    pos.Y = 2 ;
    SetConsoleCursorPosition(hOut,pos);
    printf("            2.NAME \n");
    fflush(stdout);
    //获取要输入的信息
    ch = getchar();  
    if(ch == '1')
    {
        system("cls");
        SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
        pos.X = 0;
        pos.Y = 1 ;
        SetConsoleCursorPosition(hOut,pos); 
        printf("请输入学生ID: ");
        fflush(stdout);
        scanf("%d" , &id);
        getchar();
        if(id < 0)
        {
            getchar();
            SetConsoleTextAttribute(hOut, FOREGROUND_RED | 0x8); 
            pos.X = 0;
            pos.Y = 20 ;
            SetConsoleCursorPosition(hOut,pos); 
            printf("请入ID有误,请按任意键重新选择输入\n");
            getchar();  
            goto repeat;
        }
        search_id(hOut,id);
    }
    if(ch == '2')
    {
        printf("请输入学生NAME: ");
        fflush(stdout);
        scanf("%s" , name);
        getchar();
        search_name(hOut,name);
    }
    if(ch != '1' && ch != '2')
    {
        goto repeat;
    }
}

//学生信息保存
void stu_save(HANDLE hOut)
{
    FILE *filp = NULL ; 
    char ch ; 
    char Path[30] ; 
repeat1:
    system("cls");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 15;
    pos.Y = 0 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("                  学生信息保存\n");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 20;
    pos.Y = 0 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("请选择按什么方式保存学生信息 :\n");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 10;
    pos.Y = 1 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("            1.追加 \n");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 10;
    pos.Y = 2 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("            2.覆盖 \n");
    fflush(stdout);
    ch = getchar();  
    system("cls");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 0;
    pos.Y = 1 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("请输入保存文件名:\n");
    scanf("%s" , Path);
    getchar();
    if(ch == '1')
    {
        filp = fopen(Path , "a+");
        if(NULL == filp)
        {
            SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
            pos.X = 0;
            pos.Y = 20 ;
            SetConsoleCursorPosition(hOut,pos); 
            fprintf(stderr , "文件打开失败 \n");
            SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
            pos.X = 0;
            pos.Y = 21 ;
            SetConsoleCursorPosition(hOut,pos); 
            printf("请按任意键重新选择输入\n");
            getchar(); 
            goto  repeat1;
        }
    }
    if(ch == '2')
    {
        filp = fopen(Path , "w+");
        if(NULL == filp)
        {
            SetConsoleTextAttribute(hOut, FOREGROUND_RED | 0x8); 
            pos.X = 0;
            pos.Y = 20 ;
            SetConsoleCursorPosition(hOut,pos); 
            fprintf(stderr , "文件打开失败 \n");
            SetConsoleTextAttribute(hOut, FOREGROUND_RED | 0x8); 
            pos.X = 0;
            pos.Y = 21 ;
            SetConsoleCursorPosition(hOut,pos); 
            printf("请按任意键重新选择输入\n");
            getchar(); 
            goto  repeat1;
        }
    }
    if(ch != '1' && ch != '2')
    {
        goto repeat1;
    }

    int i ; 
    for(i = 0 ; i < stucount ; i++)
    {
        fwrite(&(array[i]) , sizeof(struct student) , 1 , filp);
    }
    fclose(filp);
    printf("学生信息保存完毕\n");
    sleep(1) ; 
}
//学生信息装载
void stu_load(HANDLE hOut)
{
    FILE *filp = NULL ; 
    char Path[30] ; 
    system("cls");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 15;
    pos.Y = 0 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("                  学生信息加载\n");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 0;
    pos.Y = 1 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("请输入导入文件名 :\n");
    scanf("%s" , Path);
    getchar();
    int i ; 
    filp = fopen(Path , "r");
    if(NULL == filp)
    {
        SetConsoleTextAttribute(hOut, FOREGROUND_RED | 0x8); 
        pos.X = 0;
        pos.Y = 20 ;
        SetConsoleCursorPosition(hOut,pos); 
        fprintf(stderr , "文件打开失败 \n");
        SetConsoleTextAttribute(hOut, FOREGROUND_RED | 0x8); 
        pos.X = 0;
        pos.Y = 21 ;
        SetConsoleCursorPosition(hOut,pos); 
        printf("请按任意键退出 \n");
        getchar();
        return ;
    }
    char buffer[1024] ; 
    char *p = NULL ; 
    int ret ; 
    while(1)
    {
        ret = fread(&(array[stucount]) , sizeof(struct student) , 1 , filp);
        if(ret != 1)
            break;
        stucount++ ; 
    }
    fclose(filp);
    system("cls");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 0;
    pos.Y = 20 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("学生信息导入完毕\n");
    sleep(1);
}
//学生信息修改
void stu_modefi(HANDLE hOut)
{
    int id ; 
    system("cls");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 15;
    pos.Y = 0 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("                  学生信息修改\n");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 0;
    pos.Y = 1 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("ID:\n");
    fflush(stdout);
    scanf("%d" , &id);
    int i ; 
    system("cls");
    for(i = 0 ; i < stucount ; i++)
    {
        if(array[i].id == id)
        {
            SetConsoleTextAttribute(hOut, FOREGROUND_GREEN| 0x8); 
            pos.X = 0;
            pos.Y = i+1 ;
            SetConsoleCursorPosition(hOut,pos); 
            printf("ID:%2d ",array[i].id);
            printf("姓名:%s ",array[i].name);
            printf("分数:%f ",array[i].score);
            break;
        }
    }
    getchar();
}
//学生信息删除
void stu_delete(HANDLE hOut)
{
    char ch ; 
    int id ; 
    char name[30] ; 
repeat3:
    system("cls");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 15;
    pos.Y = 0 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("                  学生信息删除\n");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 20;
    pos.Y = 1 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("请选择按什么方式删除学生信息 :\n");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 10;
    pos.Y = 1 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("1.ID");
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
    pos.X = 10;
    pos.Y = 2 ;
    SetConsoleCursorPosition(hOut,pos); 
    printf("2.NAME\n");
    fflush(stdout);
    ch = getchar(); 
    system("cls");
    int i ; 
    if(ch == '1')
    {
        SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
        pos.X = 0;
        pos.Y = 1 ;
        SetConsoleCursorPosition(hOut,pos); 
        printf("请输入ID:\n");
        scanf("%d" , &id);
        getchar();
        for(i = 0 ; i < stucount ; i++)
        {
            if(array[i].id == id)
            {
                printf("i:%d \n" , i);
                memmove(array + i , array +i + 1 , stucount-i-1);
                stucount-- ; 
                i-- ; 
            }
        }
    }
    if(ch == '2')
    {
        SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | 0x8); 
        pos.X = 0;
        pos.Y = 1 ;
        SetConsoleCursorPosition(hOut,pos); 
        printf("请输入NAME:\n");
        scanf("%s" , name);
        getchar();
        for(i = 0 ; i < stucount ; i++)
        {
            if(strcmp(array[i].name , name) == 0)
            {
                memmove(array + i , array +i + 1 , stucount-i-1);
                stucount-- ; 
                i-- ; 
            }
        }
    }
    if(ch != '1' && ch != '2')
    {
        goto repeat3;
    }
    sleep(1);
}

运行结果:

C语言实现一个Window控制台带彩色,且可以用方向键选择并确认的菜单式列表(二)

学生信息添加过程演示:

C语言实现一个Window控制台带彩色,且可以用方向键选择并确认的菜单式列表(二)

学生信息查找:

C语言实现一个Window控制台带彩色,且可以用方向键选择并确认的菜单式列表(二)

学生信息打印流程:

C语言实现一个Window控制台带彩色,且可以用方向键选择并确认的菜单式列表(二)

学生信息保存流程:

C语言实现一个Window控制台带彩色,且可以用方向键选择并确认的菜单式列表(二)

学生信息导入流程:(实验这个过程,需要先关闭程序,再重新执行一遍方可以看到效果)

C语言实现一个Window控制台带彩色,且可以用方向键选择并确认的菜单式列表(二)

好了,这就是整个程序的实现,是不是觉得比许多大学的课设,关于学生信息管理系统的要高大上很多呢?哈哈,后面还有精彩内容,敬请期待!

如有兴趣,请持续关注本博客,本博客将为你带来源源不断的干货!

http://blog.csdn.net/morixinguan

本文同步分享在 博客“Engineer-Bruce_Yang”(CSDN)。
如有侵权,请联系 support@oschina.cn 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一起分享。

点赞
收藏
评论区
推荐文章
blmius blmius
2年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
Jacquelyn38 Jacquelyn38
2年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
皕杰报表之UUID
​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为
Easter79 Easter79
2年前
Twitter的分布式自增ID算法snowflake (Java版)
概述分布式系统中,有一些需要使用全局唯一ID的场景,这种时候为了防止ID冲突可以使用36位的UUID,但是UUID有一些缺点,首先他相对比较长,另外UUID一般是无序的。有些时候我们希望能使用一种简单一些的ID,并且希望ID能够按照时间有序生成。而twitter的snowflake解决了这种需求,最初Twitter把存储系统从MySQL迁移
Wesley13 Wesley13
2年前
mysql设置时区
mysql设置时区mysql\_query("SETtime\_zone'8:00'")ordie('时区设置失败,请联系管理员!');中国在东8区所以加8方法二:selectcount(user\_id)asdevice,CONVERT\_TZ(FROM\_UNIXTIME(reg\_time),'08:00','0
Wesley13 Wesley13
2年前
00:Java简单了解
浅谈Java之概述Java是SUN(StanfordUniversityNetwork),斯坦福大学网络公司)1995年推出的一门高级编程语言。Java是一种面向Internet的编程语言。随着Java技术在web方面的不断成熟,已经成为Web应用程序的首选开发语言。Java是简单易学,完全面向对象,安全可靠,与平台无关的编程语言。
Stella981 Stella981
2年前
Django中Admin中的一些参数配置
设置在列表中显示的字段,id为django模型默认的主键list_display('id','name','sex','profession','email','qq','phone','status','create_time')设置在列表可编辑字段list_editable
Wesley13 Wesley13
2年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Python进阶者 Python进阶者
3个月前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这