2022年9月

sudo apt install wget g++

2.安装deepin-wine

wget http://packages.deepin.com/deepin/pool/non-free/d/deepin-wine/deepin-wine_2.18-22~rc0_all.deb
# 开始安装
sudo dpkg -i *.deb
# 安装依赖
sudo apt install -fy

3.安装微信

wget http://packages.deepin.com/deepin/pool/non-free/d/deepin.com.wechat/deepin.com.wechat_2.6.8.65deepin0_i386.deb
sudo dpkg -i deepin.com.wechat_2.6.8.65deepin0_i386.deb

其他软件源

https://github.com/zq1997/deepin-wine
完整列表见 https://deepin-wine.i-m.dev/

? 尽量将main restricted universe multiverse这几个系统源都启用(自行百度),免得依赖问题多。
? 安装后需要注销重登录才能显示应用图标。
? 出了问题?先去github主页看README,再看别人提过的issue,再百度搜搜,避免直接就提issue

--> 1.安装必要工具及deepin-wine的依赖sudo apt install wget g++2.安装deepin-winewget http://packages.deepin.com/deepin/pool/non-free/d/deepin-wine/deepin-wine_2.18-22~rc0_all.deb# 开始安装sudo dpkg -i *.deb# 安装依赖sudo a...

 //假设你发现前台运行的一个程序需要很长的时间,但是需要干其他的事情,
//你就可以用 Ctrl-Z ,终止这个程序,然后可以看到系统提示:
[1]+ Stopped /root/bin/rsync.sh

//jobs 显示当前暂停的进程
jobs
[1]+ Running /root/bin/rsync.sh &

// bg N 使第N个任务在后台运行
bg 1

//如果想把它调回到前台运行,可以用fg 
//fg N 使第N个任务在前台运行
fg 1

//默认bg,fg不带 N 时表示对最后一个进程操作

 总结:

    (1) CTRL+Z停止进程并放入后台

    (2) jobs 显示当前暂停的进程

    (3) bg N 使第N个任务在后台运行(%前有空格)

    (4) fg N 使第N个任务在前台运行

    默认bg,fg不带N时表示对最后一个进程操作!

--> linux下:ctrl-c  发送 SIGINT 信号给前台进程组中的所有进程。常用于终止正在运行的程序。ctrl-z  发送 SIGTSTP 信号给前台进程组中的所有进程,常用于挂起一个进程。ctrl-d  不是发送信号,而是表示一个特殊的二进制值,表示 EOF。ctrl-\  发送 SIGQUIT 信号给前台进程组中的所有进程,终止前台进程并生成 ...

#include <stdio.h>
#include <string.h>
char * s_gets(char * st, int n);
#define MAXTITL   40
#define MAXAUTL   40
#define MAXBKS   100              //最大书籍数

struct book {                     //建立book结构声明
    char title[MAXTITL];
    char author[MAXAUTL];
    float value;
};

int main(void)
{
    struct book library[MAXBKS]; //book 类型结构的数组
    int count = 0;
    int index;
    
    printf("Please enter the book title.\n");
    printf("Press [enter] at the start of a line to stop.\n");
    while (count < MAXBKS && s_gets(library[count].title, MAXTITL) != NULL
           && library[count].title[0] != '\0')

//library[count].title[0] != '\0'判断字符串中的首字符是否为空字符
//按下 Enter 键相当于输入了一个字符串
    {
        printf("Now enter the author.\n");
        s_gets(library[count].author, MAXAUTL);
        printf("Now enter the value.\n");
        scanf("%f", &library[count++].value);
        while (getchar() != '\n')
            continue;          //清理输入行
        if (count < MAXBKS)
            printf("Enter the next title.\n");
    }
    
    if (count > 0)
    {
        printf("Here is the list of your books:\n");
        for (index = 0; index < count; index++)
            printf("%s by %s: $%.2f\n", library[index].title,
                   library[index].author, library[index].value);
    }
    else
    	printf("No books? Too bad.\n");
    
    return 0;
}

char * s_gets(char * st, int n)
{
    char * ret_val;
    char * find;
    
    ret_val = fgets(st, n, stdin);
    if (ret_val)
    {
        find = strchr(st, '\n');   // 查找换行符
        if (find)                  //如果地址不是NULL
            *find = '\0';          // 在此处放置一个空字符
        else
            while (getchar() != '\n')
                continue;          // 处理输入行中剩余的字符
    }
    return ret_val;
}

--> #include <stdio.h> #include <string.h> char * s_gets(char * st, int n); #define MAXTITL 40 #define MAXAUTL 40 #define MAXBKS 100 //最大书籍数 struct book { ...