diff --git "a/2020/04/06/\345\277\203\350\213\245\346\230\216\351\225\234-\345\223\210\345\270\214\344\273\216\345\256\271/index.html" "b/2020/04/06/\345\277\203\350\213\245\346\230\216\351\225\234-\345\223\210\345\270\214\344\273\216\345\256\271/index.html" new file mode 100644 index 0000000..efb6bde --- /dev/null +++ "b/2020/04/06/\345\277\203\350\213\245\346\230\216\351\225\234-\345\223\210\345\270\214\344\273\216\345\256\271/index.html" @@ -0,0 +1,285 @@ +心若明镜,哈希从容 | Barry + + + + + + + + + + + + +
加载中...

心若明镜,哈希从容

实现哈希表的构造和查找算法,要求:用除留余数法构造哈希函数,分别用一次探测再散列、二次探测再散列解决冲突。

想法:有构造哈希表,查找元素,插入一个元素,如果查找到一个哈希表里面没有的元素应该插入到哈希表中。

小小希望:如果你的题目与我的完全一样!!!就不要完全照抄,对你对我都不好!!!函数功能都是完整的。。。

    +
  1. 线性探测
    H(i)=(H(key)+di)%m (di = 1 2 3 4 - - - m-1.)
      从发生冲突的位置开始,依次继续向后探测,直到有空位置。
    插入时:使用哈希函数找到待插入元素在哈希表中的位置,如果该位置没有元素则直接插入,如果该位置有元素但不是待插入元素则发生哈希冲突,使用线性探测找到下一个空位置,在找空位置的路上如果遇到元素与待插入元素相同则不插入(即哈希表中不允许有相同的元素),没有遇到等找到空位置就插入。
  2. +
  3. .二次探测
      发生哈希冲突时,二次探测寻找下一个空位置的公式为:H(i)=(H(key)+di)%m
    di = 1^2 , -1^2, 2^2 ,.-2^2, - - -(+-)k^2.(K<=m/2),其中m都是表示表长。
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    #include<stdio.h>
    #include<stdlib.h>
    #include<math.h>
    #define max 14
    #define casue 13
    #define DataType int
    typedef struct Hash{
    int findnum;
    DataType key;
    }Hash;

    void Createhash(Hash *hash,int kind)
    {
    printf("How many data you want to input ? \n");
    int num,data;
    int j,count=0;
    scanf("%d",&num);
    while(num>max){
    printf("out of the hash list's max capacity !\n");
    printf("please input again !\n");
    scanf("%d",&num);
    };
    getchar();
    int p=1,q=1;
    for(int i=0;i<num;i++){
    printf("input the %d data\n",i+1);
    scanf("%d",&data);
    getchar();
    if(kind==1){//一次探测再散列
    do{
    j = (data+count)%casue;
    count++;
    if(hash[j].key == 0){
    hash[j].key=data;
    hash[j].findnum=count;
    count=0;
    }
    }while(count!=0);
    }else{//二次探测再散列解决冲突
    do{
    j=data%casue;
    if(count>0){//有冲突
    if(count%2==1){
    j+=pow(q,2);
    q++;
    }else{
    j-=pow(p,2);
    p++;
    }
    }
    count++;
    if(j<0){
    j += max;
    }else if(j>max){
    j %= max;
    }
    else{
    if(hash[j].key == 0){
    hash[j].key=data;
    hash[j].findnum=count;
    count=0;
    }
    }
    }while(count!=0);
    }
    }
    }

    void insert(Hash *hash,int data,int insert,int count){
    hash[insert].key = data;
    hash[insert].findnum = count;
    }

    int findkey(Hash *hash , int k,int kind)
    {
    int j,i=0;
    bool find = true;
    if(kind == 1){
    do{
    j = (k+i)%casue;
    if(hash[j].key == k){
    find = false;
    }else if(hash[j].key == 0){
    find = false;////没有找到
    insert(hash,k,j,i+1);//插入
    j=-1;
    }
    i++;
    if(i>max){
    printf("hash list is full\n");
    exit(0);
    }
    }while(find);
    }else{
    int p=1,q=1,count=0;
    do{
    j=k%casue;
    //奇偶判断
    if(count>0){//有冲突
    if(count%2==1){
    j+=pow(q,2);
    q++;
    }else{
    j-=pow(p,2);
    p++;
    }
    }
    count++;
    if(j<0){
    j+=max;
    }else if(j>max){
    j %= max;
    }else{
    if(hash[j].key == k){
    find = false;
    }else if(hash[j].key == 0){
    find = false;//没有找到
    insert(hash,k,j,count);
    j=-1;//查找不成功 没有该元素
    }
    }
    if(count>max){
    printf("hash list is full\n");
    exit(0);
    }
    }while(find);
    }
    return j;
    }

    int main()
    {
    Hash hash[max];
    int kind;
    printf("1.一次探测再散列 2.二次探测再散列解决冲突\n");
    scanf("%d",&kind);
    Createhash(hash,kind);
    printf("which key do you want find ?\n");
    scanf("%d",&k);
    getchar();
    int i = findkey(hash,k,kind);//i=-1则就是没有该元素这里的判断被我删了
    printf("address: %d data: %d findnum: %d \n",i,hash[i].key,hash[i].findnum);
    return 0;
    }

    +

    这里我删除了一些代码我怕有人直接照着我的抄那就不好。如果你看懂了就不能增加了,因为我只在主函数删了一些。其他的函数还是很完整的。

    在这里插入图片描述
  4. +
+

最后再输入一个数据你想查找的数据。

在这里插入图片描述

+
文章作者: Barry
文章链接: http://barry04.github.io/2020/04/06/%E5%BF%83%E8%8B%A5%E6%98%8E%E9%95%9C-%E5%93%88%E5%B8%8C%E4%BB%8E%E5%AE%B9/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry

评论
\ No newline at end of file diff --git "a/2020/04/06/\346\234\211\344\270\200\347\247\215\345\226\234\346\254\242\357\274\214\346\230\257\345\257\271javafx\347\232\204\345\226\234\346\254\242\357\274\214\344\275\240\351\201\207\350\247\201\346\210\221\357\274\214\346\234\211\344\272\206\345\274\271\345\207\272\347\252\227\345\217\243\347\232\204\346\226\260\347\224\250\346\263\225\343\200\202/index.html" "b/2020/04/06/\346\234\211\344\270\200\347\247\215\345\226\234\346\254\242\357\274\214\346\230\257\345\257\271javafx\347\232\204\345\226\234\346\254\242\357\274\214\344\275\240\351\201\207\350\247\201\346\210\221\357\274\214\346\234\211\344\272\206\345\274\271\345\207\272\347\252\227\345\217\243\347\232\204\346\226\260\347\224\250\346\263\225\343\200\202/index.html" new file mode 100644 index 0000000..d6770e4 --- /dev/null +++ "b/2020/04/06/\346\234\211\344\270\200\347\247\215\345\226\234\346\254\242\357\274\214\346\230\257\345\257\271javafx\347\232\204\345\226\234\346\254\242\357\274\214\344\275\240\351\201\207\350\247\201\346\210\221\357\274\214\346\234\211\344\272\206\345\274\271\345\207\272\347\252\227\345\217\243\347\232\204\346\226\260\347\224\250\346\263\225\343\200\202/index.html" @@ -0,0 +1,299 @@ +有一种喜欢,是对javafx的喜欢,你遇见我,有了弹出窗口的新用法。 | Barry + + + + + + + + + + + + +
加载中...

有一种喜欢,是对javafx的喜欢,你遇见我,有了弹出窗口的新用法。

scene builder 入门使用方法

废话不多说,先看效果图,看看是不是你们想要的那种效果:

+

在这里插入图片描述

+

图片中有两个不同的提示,都在点击了某一个事件后消失了,但是这两种看上去的效果一样呀!
其实只是看上去一样,其实并不一样,是两种不同的机制,处理起来也是不同的。

+

1.其实第一个要实现相对会简单一些。
*在这里插入图片描述
那些文字我是使用了一个VBOX再加上一些label组成。

+
    +
  1. 首先我将这些控件的==Visible==属性默认设置为==true==.
  2. +
  3. 当我点击了Get it,我就通过调用一个方法将这些==Visible==的属性设置为==false==,这样就可以起到一个隐藏效果了
  4. +
+
1
2
3
4
5
6
7
8
//让提示消失
public void Hideknow(ActionEvent event) {

//对应的是将说明的那个VBOX给隐藏
explain.setVisible(false);
//将Get it 按钮给隐藏
GetButton.setVisible(false);
}
+ +

上面的方法虽然实现起来不能,效果也还行。但是有一个缺点,如果我想做到,如果你不点击Get it,就不能进行其他的操作,这个方法就无法做到了。(可能有其他的方法可以做到。。。)

+

如何解决这个缺点呢?下面我有另外一种方法可以做到。

2. 第二种是通过弹出新的窗口实现
通过方法一个方法调用,然后弹出另外一个窗口。再弹出另外一个窗口的同时,将当前的窗口的==MouseTransparent==属性为==true==这样当前的窗口就不能进行任何的点击操作了。当关闭弹出的窗口又可以设置为==false== 。这样就达到了上面方法所说的无法做到的功能了。

+
    +
  1. 先通过调用方法将mainpane.setMouseTransparent(false);将mainpane的窗口设置为鼠标不可操作
  2. +
  3. 再通过方法弹出另一个窗口。
  4. +
  5. 当关闭弹出的窗口同时将==mainpane.setMouseTransparent(true)==
  6. +
+

** 还有一个重要的问题是如何做到只关闭当前的窗口!!!
有一个方法:==((Node) (event.getSource())).getScene().getWindow().hide()== 只是关闭当前的窗口的方法。
**

+
1
2
3
4
5
6
7
8
9
10
public void ok(ActionEvent event) {
//将mainpane的窗口设置为鼠标可操作
new MyController().contron();
//只是关闭当前的窗口的方法
((Node) (event.getSource())).getScene().getWindow().hide();
}
/*
primaryStage.initStyle(StageStyle.UNDECORATED);//设置成一个无边框的stage
primaryStage.initStyle(StageStyle.TRANSPARENT);//将边框设置成透明的
*/
+

在这里插入图片描述
上面那两种去框的方法实际的效果并没有什么太大的区别。

+
文章作者: Barry
文章链接: http://barry04.github.io/2020/04/06/%E6%9C%89%E4%B8%80%E7%A7%8D%E5%96%9C%E6%AC%A2%EF%BC%8C%E6%98%AF%E5%AF%B9javafx%E7%9A%84%E5%96%9C%E6%AC%A2%EF%BC%8C%E4%BD%A0%E9%81%87%E8%A7%81%E6%88%91%EF%BC%8C%E6%9C%89%E4%BA%86%E5%BC%B9%E5%87%BA%E7%AA%97%E5%8F%A3%E7%9A%84%E6%96%B0%E7%94%A8%E6%B3%95%E3%80%82/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry

评论
\ No newline at end of file diff --git "a/2020/04/06/\347\233\256\344\271\213\346\211\200\345\217\212\357\274\214\347\232\206\346\230\257Java\343\200\202\345\277\203\344\271\213\346\211\200\346\203\263\357\274\214\347\232\206\346\230\257exe\347\232\204\345\235\221/index.html" "b/2020/04/06/\347\233\256\344\271\213\346\211\200\345\217\212\357\274\214\347\232\206\346\230\257Java\343\200\202\345\277\203\344\271\213\346\211\200\346\203\263\357\274\214\347\232\206\346\230\257exe\347\232\204\345\235\221/index.html" new file mode 100644 index 0000000..7a0915d --- /dev/null +++ "b/2020/04/06/\347\233\256\344\271\213\346\211\200\345\217\212\357\274\214\347\232\206\346\230\257Java\343\200\202\345\277\203\344\271\213\346\211\200\346\203\263\357\274\214\347\232\206\346\230\257exe\347\232\204\345\235\221/index.html" @@ -0,0 +1,287 @@ +目之所及,皆是Java。心之所想,皆是exe的坑 | Barry + + + + + + + + + + + + +
加载中...

目之所及,皆是Java。心之所想,皆是exe的坑

相信大部分的同学都会有一个想法,想让自己的写的java程序能在别人的电脑运行!!!本人就是这样。。。

网上也有很多的教程,这里就列举几个。。。

+

如何打包/运行jar包,及生成exe文件

如何Inno Setup打包可执行的软件,其实就是在没有安装jdk电脑上安装jre

==为什么说这是一些坑???==
起初我是这么想的:就是在一个没有jdk环境的电脑也能运行的文件。然后我也在网上找到了一些方法,就是上面三个的链接的方法。但是我使用完后,发现有问题,并不是我想要的方法。

+
    +
  • 第一个方法不能再没有jdk环境的电脑上运行。。
  • +
  • 第二个方法其实就是把jre文件一起给打包,然后再新的电脑上安装一个jre文件,这样就可以运行我们的java程序。。
  • +
  • ==为什么说这些都不是我想要的呢?==
  • +
+

因为我最开始学的C语言,使用的工具是DEV C++,这个工具生成的.exe文件却可以在任何的电脑上运行,所以我就想把自己写的java程序也弄成一样。最后才发现java做不到,除非你的电脑自带jdk环境就可以。。。

+

==写这篇文章就是想纪念一下此时此刻我的无知想法。。。==

文章作者: Barry
文章链接: http://barry04.github.io/2020/04/06/%E7%9B%AE%E4%B9%8B%E6%89%80%E5%8F%8A%EF%BC%8C%E7%9A%86%E6%98%AFJava%E3%80%82%E5%BF%83%E4%B9%8B%E6%89%80%E6%83%B3%EF%BC%8C%E7%9A%86%E6%98%AFexe%E7%9A%84%E5%9D%91/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry

评论
\ No newline at end of file diff --git "a/2020/04/06/\347\250\200\347\226\217\347\237\251\351\230\265A\343\200\201B\345\235\207\351\207\207\347\224\250\344\270\211\345\205\203\347\273\204\351\241\272\345\272\217\350\241\250\350\241\250\347\244\272\357\274\214\351\252\214\350\257\201\345\256\236\347\216\260\347\237\251\351\230\265A\345\277\253\351\200\237\350\275\254\347\275\256\347\256\227\346\263\225\357\274\214\345\271\266\350\256\276\350\256\241\343\200\201\351\252\214\350\257\201\347\237\251\351\230\265A\343\200\201B\347\233\270\345\212\240\345\276\227\345\210\260\347\237\251\351\230\265C\347\232\204\347\256\227\346\263\225\343\200\202/index.html" "b/2020/04/06/\347\250\200\347\226\217\347\237\251\351\230\265A\343\200\201B\345\235\207\351\207\207\347\224\250\344\270\211\345\205\203\347\273\204\351\241\272\345\272\217\350\241\250\350\241\250\347\244\272\357\274\214\351\252\214\350\257\201\345\256\236\347\216\260\347\237\251\351\230\265A\345\277\253\351\200\237\350\275\254\347\275\256\347\256\227\346\263\225\357\274\214\345\271\266\350\256\276\350\256\241\343\200\201\351\252\214\350\257\201\347\237\251\351\230\265A\343\200\201B\347\233\270\345\212\240\345\276\227\345\210\260\347\237\251\351\230\265C\347\232\204\347\256\227\346\263\225\343\200\202/index.html" new file mode 100644 index 0000000..b6e0998 --- /dev/null +++ "b/2020/04/06/\347\250\200\347\226\217\347\237\251\351\230\265A\343\200\201B\345\235\207\351\207\207\347\224\250\344\270\211\345\205\203\347\273\204\351\241\272\345\272\217\350\241\250\350\241\250\347\244\272\357\274\214\351\252\214\350\257\201\345\256\236\347\216\260\347\237\251\351\230\265A\345\277\253\351\200\237\350\275\254\347\275\256\347\256\227\346\263\225\357\274\214\345\271\266\350\256\276\350\256\241\343\200\201\351\252\214\350\257\201\347\237\251\351\230\265A\343\200\201B\347\233\270\345\212\240\345\276\227\345\210\260\347\237\251\351\230\265C\347\232\204\347\256\227\346\263\225\343\200\202/index.html" @@ -0,0 +1,296 @@ +稀疏矩阵A、B均采用三元组顺序表表示,验证实现矩阵A快速转置算法,并设计、验证矩阵A、B相加得到矩阵C的算法。 | Barry + + + + + + + + + + + + +
加载中...

稀疏矩阵A、B均采用三元组顺序表表示,验证实现矩阵A快速转置算法,并设计、验证矩阵A、B相加得到矩阵C的算法。

数据结构实验题目:

稀疏矩阵A、B均采用三元组顺序表表示,验证实现矩阵A快速转置算法,并设计、验证矩阵A、B相加得到矩阵C的算法。

(1)从键盘输入矩阵的行数和列数,随机生成稀疏矩阵。
(2) 设计算法将随机生成的稀疏矩阵转换成三元组顺序表形式存储。
(3) 设计算法将快速转置得到的与相加得到的三元组顺序表分别转换成矩阵形式。
(4) 输出随机生成的稀疏矩阵A、B及其三元组顺序表、快速转置得到的与相加得到的三元组顺序表及其矩阵形式。

+
    +
  1. 从键盘输入矩阵的行数和列数,随机生成稀疏矩阵。(老师要求不能用二维数组去贮存矩阵)
    也就是说直接生成三元组

    +
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    //动态随机生成三元组
    TSMatrix Romand(int m,int n){
    TSMatrix M;
    int t=1;
    int num[100]={0};//记录数组位置是否是非0元
    M.mu=m;
    M.nu=n;
    M.tu=(int)(m*n*factor)+1;//factor为稀疏因子
    srand((unsigned)time(0));
    while(t!=M.tu+1){
    M.data[t].i = rand() % m+1;
    M.data[t].j = rand() % n+1;
    if(num[(M.data[t].i-1)*n+M.data[t].j] == 0){//如果该位置没有数据,属于0元
    M.data[t].v = rand() % 10+1;
    t++;
    num[(M.data[t].i-1)*n+M.data[t].j] = 1;
    }
    }
    //对三元组排序
    for(int i=1;i<=M.tu;i++){
    for(int j = i+1;j<=M.tu;j++){
    if((M.data[i].i > M.data[j].i)||(M.data[i].i == M.data[j].i&&M.data[i].j > M.data[j].j)){
    Triple a;
    a = M.data[i];
    M.data[i] = M.data[j] ;
    M.data[j] = a;
    }
    }
    }
    return M;
    }
    +
  2. +
  3. 算法将快速转置得到的与相加得到的三元组顺序表分别转换成矩阵形式。
    这一步呢我们就按照矩阵形式输出就行了,不用实际转。

    +
  4. +
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//打印矩阵 
void printMatrix(TSMatrix M,int m,int n){
int t=1,k=0;
for(int i= 1; i<=m;i++){
for(int j=1; j<=n;j++){
if(M.data[t].i == i&&M.data[t].j == j){
printf("%d\t", M.data[t].v );
t++;
}else{
printf("0\t");
}
}
printf("\n");
}
}
+ +

3.快速转置算法

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/快速转置
void fastTSMatrix(TSMatrix M,TSMatrix *T){
//初始化T(行数、列数、元素个数)
int q,p,col;
int num[100];
int cpot[100];
T->mu=M.nu;
T->nu=M.mu;
T->tu=M.tu;
if(T->tu>0){
for(col=1;col<=M.nu;col++) num[col]=0;//初始化求num[] 为0
for(p=1;p<=M.tu;p++) num[M.data[p].j]++;//求每一列的num[],即求出每一列的有值元素的个数
//求cpot[]
cpot[1]=1;
for(col=2;col<=M.nu;col++)//求出每一列的第一个元素在顺序表中的位置
cpot[col]=cpot[col-1]+num[col-1];
//这一列首元素的存放位置等于上一列的首元素的存放位置+上一列的元素个数
for(p=1;p<=M.tu;p++){//元素的转置
col=M.data[p].j;
q=cpot[col];
T->data[q].i=M.data[p].j;
T->data[q].j=M.data[p].i;
T->data[q].v=M.data[p].v;
cpot[col]++;//把当前一列元素的位置后移一个单位
}
}
}
+

4.三元组相加
三元组相加是行与列相同既相加,不同则就不用相加,自己把其赋值给新数组。

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
int cmp(Triple c1,Triple c2){
if(c1.i==c2.i){
if(c1.j==c2.j){//位置相同
return 0;
}
else if(c1.j<c2.j){
return -1;//A在B的前
}
else{
return 1;//B在A的前
}
}
else if(c1.i<c2.i){
return -1;//A在B的前
}
else{
return 1;//B在A的前
}
}
//三元组相加
int addTSMatrix(TSMatrix A,TSMatrix B,TSMatrix *C){
int i,j;
int p=1,q=1;
C->tu=1;
while((p<=A.tu)&&(q<=B.tu)){
if(cmp(A.data[p],B.data[q])==-1){//A在B的前
C->data[C->tu].i=A.data[p].i;
C->data[C->tu].j=A.data[p].j;
C->data[C->tu++].v=A.data[p].v;
p++;
}
if(cmp(A.data[p],B.data[q])==1){//B在A的前
C->data[C->tu].i=B.data[q].i;//
C->data[C->tu].j=B.data[q].j;//
C->data[C->tu++].v=B.data[q].v;
q++;
}
if(cmp(A.data[p],B.data[q])==0){//i,j 相同
if(A.data[p].v+B.data[q].v != 0){
C->data[C->tu].i=A.data[p].i;
C->data[C->tu].j=A.data[p].j;
C->data[C->tu++].v=A.data[p].v+B.data[q].v;
}
p++;
q++;
}
}
//将剩下的三元组的合并
C->mu=A.mu;
C->nu=A.nu;
while((p<=A.tu)){
C->data[C->tu].i=A.data[p].i;
C->data[C->tu].j=A.data[p].j;
C->data[C->tu++].v=A.data[p].v;
p++;
C->mu=A.mu;
C->nu=A.nu;
}
while((q<=B.tu)){
C->data[C->tu].i=B.data[q].i;
C->data[C->tu].j=B.data[q].j;
C->data[C->tu++].v=B.data[q].v;
q++;
C->mu=B.mu;
C->nu=B.nu;
}
C->tu--;
return 0;
}
+

5.三元组的数据结构:

+
1
2
3
4
5
6
7
8
9
10
11
#define maxsize 1250
typedef struct{
int i;//元素的行下标
int j;//元素的列下标
int v;//元素的值
}Triple;
//定义三元组
typedef struct{
Triple data[maxsize+1]; // data[0]未用
int mu,nu,tu;//元素的总行数,总列数,不为0元素个数
}TSMatrix;
+

6.测试结果:
请输入A矩阵的行数,列数
2
2
A矩阵为:
0 5
0 0
三元组顺序表形式A为:
1 2 5
请输入B矩阵的行数,列数
2
2
B矩阵为:
0 0
0 5
三元组顺序表形式B为:
2 2 5
转置后的TA:
2 1 5
转置后的TA的矩阵形式:
0 0
5 0
A+B矩阵三元组表示:
1 2 5
2 1 5
TC的矩阵形式:
0 5
5 0

+
文章作者: Barry
文章链接: http://barry04.github.io/2020/04/06/%E7%A8%80%E7%96%8F%E7%9F%A9%E9%98%B5A%E3%80%81B%E5%9D%87%E9%87%87%E7%94%A8%E4%B8%89%E5%85%83%E7%BB%84%E9%A1%BA%E5%BA%8F%E8%A1%A8%E8%A1%A8%E7%A4%BA%EF%BC%8C%E9%AA%8C%E8%AF%81%E5%AE%9E%E7%8E%B0%E7%9F%A9%E9%98%B5A%E5%BF%AB%E9%80%9F%E8%BD%AC%E7%BD%AE%E7%AE%97%E6%B3%95%EF%BC%8C%E5%B9%B6%E8%AE%BE%E8%AE%A1%E3%80%81%E9%AA%8C%E8%AF%81%E7%9F%A9%E9%98%B5A%E3%80%81B%E7%9B%B8%E5%8A%A0%E5%BE%97%E5%88%B0%E7%9F%A9%E9%98%B5C%E7%9A%84%E7%AE%97%E6%B3%95%E3%80%82/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry

评论
\ No newline at end of file diff --git "a/2021/04/06/\351\235\242\345\220\221\345\257\271\350\261\241\350\257\276\347\250\213\350\256\276\350\256\241\345\256\236\351\252\214\346\212\245\345\221\212/index.html" "b/2020/04/06/\351\235\242\345\220\221\345\257\271\350\261\241\350\257\276\347\250\213\350\256\276\350\256\241\345\256\236\351\252\214\346\212\245\345\221\212/index.html" similarity index 66% rename from "2021/04/06/\351\235\242\345\220\221\345\257\271\350\261\241\350\257\276\347\250\213\350\256\276\350\256\241\345\256\236\351\252\214\346\212\245\345\221\212/index.html" rename to "2020/04/06/\351\235\242\345\220\221\345\257\271\350\261\241\350\257\276\347\250\213\350\256\276\350\256\241\345\256\236\351\252\214\346\212\245\345\221\212/index.html" index a74f114..072df08 100644 --- "a/2021/04/06/\351\235\242\345\220\221\345\257\271\350\261\241\350\257\276\347\250\213\350\256\276\350\256\241\345\256\236\351\252\214\346\212\245\345\221\212/index.html" +++ "b/2020/04/06/\351\235\242\345\220\221\345\257\271\350\261\241\350\257\276\347\250\213\350\256\276\350\256\241\345\256\236\351\252\214\346\212\245\345\221\212/index.html" @@ -1,17 +1,17 @@ -面向对象课程设计实验报告 | Barry +面向对象课程设计实验报告 | Barry - + - - - + + + -
加载中...

心若明镜,哈希从容

实现哈希表的构造和查找算法,要求:用除留余数法构造哈希函数,分别用一次探测再散列、二次探测再散列解决冲突。

想法:有构造哈希表,查找元素,插入一个元素,如果查找到一个哈希表里面没有的元素应该插入到哈希表中。

小小希望:如果你的题目与我的完全一样!!!就不要完全照抄,对你对我都不好!!!函数功能都是完整的。。。

    -
  1. 线性探测
     H(i)=(H(key)+di)%m (di = 1 2 3 4 - - - m-1.)
    -
    -  从发生冲突的位置开始,依次继续向后探测,直到有空位置。
    插入时:使用哈希函数找到待插入元素在哈希表中的位置,如果该位置没有元素则直接插入,如果该位置有元素但不是待插入元素则发生哈希冲突,使用线性探测找到下一个空位置,在找空位置的路上如果遇到元素与待插入元素相同则不插入(即哈希表中不允许有相同的元素),没有遇到等找到空位置就插入。
  2. -
  3. .二次探测
      发生哈希冲突时,二次探测寻找下一个空位置的公式为:H(i)=(H(key)+di)%m
    di = 1^2 , -1^2, 2^2 ,.-2^2, - - -(+-)k^2.(K<=m/2),其中m都是表示表长。
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    #include<stdio.h>
    #include<stdlib.h>
    #include<math.h>
    #define max 14
    #define casue 13
    #define DataType int
    typedef struct Hash{
    int findnum;
    DataType key;
    }Hash;

    void Createhash(Hash *hash,int kind)
    {
    printf("How many data you want to input ? \n");
    int num,data;
    int j,count=0;
    scanf("%d",&num);
    while(num>max){
    printf("out of the hash list's max capacity !\n");
    printf("please input again !\n");
    scanf("%d",&num);
    };
    getchar();
    int p=1,q=1;
    for(int i=0;i<num;i++){
    printf("input the %d data\n",i+1);
    scanf("%d",&data);
    getchar();
    if(kind==1){//一次探测再散列
    do{
    j = (data+count)%casue;
    count++;
    if(hash[j].key == 0){
    hash[j].key=data;
    hash[j].findnum=count;
    count=0;
    }
    }while(count!=0);
    }else{//二次探测再散列解决冲突
    do{
    j=data%casue;
    if(count>0){//有冲突
    if(count%2==1){
    j+=pow(q,2);
    q++;
    }else{
    j-=pow(p,2);
    p++;
    }
    }
    count++;
    if(j<0){
    j += max;
    }else if(j>max){
    j %= max;
    }
    else{
    if(hash[j].key == 0){
    hash[j].key=data;
    hash[j].findnum=count;
    count=0;
    }
    }
    }while(count!=0);
    }
    }
    }

    void insert(Hash *hash,int data,int insert,int count){
    hash[insert].key = data;
    hash[insert].findnum = count;
    }

    int findkey(Hash *hash , int k,int kind)
    {
    int j,i=0;
    bool find = true;
    if(kind == 1){
    do{
    j = (k+i)%casue;
    if(hash[j].key == k){
    find = false;
    }else if(hash[j].key == 0){
    find = false;////没有找到
    insert(hash,k,j,i+1);//插入
    j=-1;
    }
    i++;
    if(i>max){
    printf("hash list is full\n");
    exit(0);
    }
    }while(find);
    }else{
    int p=1,q=1,count=0;
    do{
    j=k%casue;
    //奇偶判断
    if(count>0){//有冲突
    if(count%2==1){
    j+=pow(q,2);
    q++;
    }else{
    j-=pow(p,2);
    p++;
    }
    }
    count++;
    if(j<0){
    j+=max;
    }else if(j>max){
    j %= max;
    }else{
    if(hash[j].key == k){
    find = false;
    }else if(hash[j].key == 0){
    find = false;//没有找到
    insert(hash,k,j,count);
    j=-1;//查找不成功 没有该元素
    }
    }
    if(count>max){
    printf("hash list is full\n");
    exit(0);
    }
    }while(find);
    }
    return j;
    }

    int main()
    {
    Hash hash[max];
    int kind;
    printf("1.一次探测再散列 2.二次探测再散列解决冲突\n");
    scanf("%d",&kind);
    Createhash(hash,kind);
    printf("which key do you want find ?\n");
    scanf("%d",&k);
    getchar();
    int i = findkey(hash,k,kind);//i=-1则就是没有该元素这里的判断被我删了
    printf("address: %d data: %d findnum: %d \n",i,hash[i].key,hash[i].findnum);
    return 0;
    }

    -

    这里我删除了一些代码我怕有人直接照着我的抄那就不好。如果你看懂了就不能增加了,因为我只在主函数删了一些。其他的函数还是很完整的。

    在这里插入图片描述
  4. -
-

最后再输入一个数据你想查找的数据。

在这里插入图片描述

-
文章作者: Barry
文章链接: http://barry04.github.io/2021/04/06/%E5%BF%83%E8%8B%A5%E6%98%8E%E9%95%9C-%E5%93%88%E5%B8%8C%E4%BB%8E%E5%AE%B9/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry
打赏
  • wechat
    wechat
  • alipay
    alipay
\ No newline at end of file diff --git "a/2021/04/06/\346\234\211\344\270\200\347\247\215\345\226\234\346\254\242\357\274\214\346\230\257\345\257\271javafx\347\232\204\345\226\234\346\254\242\357\274\214\344\275\240\351\201\207\350\247\201\346\210\221\357\274\214\346\234\211\344\272\206\345\274\271\345\207\272\347\252\227\345\217\243\347\232\204\346\226\260\347\224\250\346\263\225\343\200\202/index.html" "b/2021/04/06/\346\234\211\344\270\200\347\247\215\345\226\234\346\254\242\357\274\214\346\230\257\345\257\271javafx\347\232\204\345\226\234\346\254\242\357\274\214\344\275\240\351\201\207\350\247\201\346\210\221\357\274\214\346\234\211\344\272\206\345\274\271\345\207\272\347\252\227\345\217\243\347\232\204\346\226\260\347\224\250\346\263\225\343\200\202/index.html" deleted file mode 100644 index 9ce3126..0000000 --- "a/2021/04/06/\346\234\211\344\270\200\347\247\215\345\226\234\346\254\242\357\274\214\346\230\257\345\257\271javafx\347\232\204\345\226\234\346\254\242\357\274\214\344\275\240\351\201\207\350\247\201\346\210\221\357\274\214\346\234\211\344\272\206\345\274\271\345\207\272\347\252\227\345\217\243\347\232\204\346\226\260\347\224\250\346\263\225\343\200\202/index.html" +++ /dev/null @@ -1,184 +0,0 @@ -有一种喜欢,是对javafx的喜欢,你遇见我,有了弹出窗口的新用法。 | Barry - - - - - - - - - - - - -
加载中...

有一种喜欢,是对javafx的喜欢,你遇见我,有了弹出窗口的新用法。

scene builder 入门使用方法

废话不多说,先看效果图,看看是不是你们想要的那种效果:

-

在这里插入图片描述

-

图片中有两个不同的提示,都在点击了某一个事件后消失了,但是这两种看上去的效果一样呀!
其实只是看上去一样,其实并不一样,是两种不同的机制,处理起来也是不同的。

-

1.其实第一个要实现相对会简单一些。
*在这里插入图片描述
那些文字我是使用了一个VBOX再加上一些label组成。

-
    -
  1. 首先我将这些控件的==Visible==属性默认设置为==true==.
  2. -
  3. 当我点击了Get it,我就通过调用一个方法将这些==Visible==的属性设置为==false==,这样就可以起到一个隐藏效果了
  4. -
-
1
2
3
4
5
6
7
8
//让提示消失
public void Hideknow(ActionEvent event) {

//对应的是将说明的那个VBOX给隐藏
explain.setVisible(false);
//将Get it 按钮给隐藏
GetButton.setVisible(false);
}
- -

上面的方法虽然实现起来不能,效果也还行。但是有一个缺点,如果我想做到,如果你不点击Get it,就不能进行其他的操作,这个方法就无法做到了。(可能有其他的方法可以做到。。。)

-

如何解决这个缺点呢?下面我有另外一种方法可以做到。

2. 第二种是通过弹出新的窗口实现
通过方法一个方法调用,然后弹出另外一个窗口。再弹出另外一个窗口的同时,将当前的窗口的==MouseTransparent==属性为==true==这样当前的窗口就不能进行任何的点击操作了。当关闭弹出的窗口又可以设置为==false== 。这样就达到了上面方法所说的无法做到的功能了。

-
    -
  1. 先通过调用方法将mainpane.setMouseTransparent(false);将mainpane的窗口设置为鼠标不可操作
  2. -
  3. 再通过方法弹出另一个窗口。
  4. -
  5. 当关闭弹出的窗口同时将==mainpane.setMouseTransparent(true)==
  6. -
-

** 还有一个重要的问题是如何做到只关闭当前的窗口!!!
有一个方法:==((Node) (event.getSource())).getScene().getWindow().hide()== 只是关闭当前的窗口的方法。
**

-
1
2
3
4
5
6
7
8
9
10
public void ok(ActionEvent event) {
//将mainpane的窗口设置为鼠标可操作
new MyController().contron();
//只是关闭当前的窗口的方法
((Node) (event.getSource())).getScene().getWindow().hide();
}
/*
primaryStage.initStyle(StageStyle.UNDECORATED);//设置成一个无边框的stage
primaryStage.initStyle(StageStyle.TRANSPARENT);//将边框设置成透明的
*/
-

在这里插入图片描述
上面那两种去框的方法实际的效果并没有什么太大的区别。

-
文章作者: Barry
文章链接: http://barry04.github.io/2021/04/06/%E6%9C%89%E4%B8%80%E7%A7%8D%E5%96%9C%E6%AC%A2%EF%BC%8C%E6%98%AF%E5%AF%B9javafx%E7%9A%84%E5%96%9C%E6%AC%A2%EF%BC%8C%E4%BD%A0%E9%81%87%E8%A7%81%E6%88%91%EF%BC%8C%E6%9C%89%E4%BA%86%E5%BC%B9%E5%87%BA%E7%AA%97%E5%8F%A3%E7%9A%84%E6%96%B0%E7%94%A8%E6%B3%95%E3%80%82/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry
打赏
  • wechat
    wechat
  • alipay
    alipay
\ No newline at end of file diff --git "a/2021/04/06/\347\233\256\344\271\213\346\211\200\345\217\212\357\274\214\347\232\206\346\230\257Java\343\200\202\345\277\203\344\271\213\346\211\200\346\203\263\357\274\214\347\232\206\346\230\257exe\347\232\204\345\235\221/index.html" "b/2021/04/06/\347\233\256\344\271\213\346\211\200\345\217\212\357\274\214\347\232\206\346\230\257Java\343\200\202\345\277\203\344\271\213\346\211\200\346\203\263\357\274\214\347\232\206\346\230\257exe\347\232\204\345\235\221/index.html" deleted file mode 100644 index 4dcce1b..0000000 --- "a/2021/04/06/\347\233\256\344\271\213\346\211\200\345\217\212\357\274\214\347\232\206\346\230\257Java\343\200\202\345\277\203\344\271\213\346\211\200\346\203\263\357\274\214\347\232\206\346\230\257exe\347\232\204\345\235\221/index.html" +++ /dev/null @@ -1,172 +0,0 @@ -目之所及,皆是Java。心之所想,皆是exe的坑 | Barry - - - - - - - - - - - - -
加载中...

目之所及,皆是Java。心之所想,皆是exe的坑

相信大部分的同学都会有一个想法,想让自己的写的java程序能在别人的电脑运行!!!本人就是这样。。。

网上也有很多的教程,这里就列举几个。。。

-

如何打包/运行jar包,及生成exe文件

如何Inno Setup打包可执行的软件,其实就是在没有安装jdk电脑上安装jre

==为什么说这是一些坑???==
起初我是这么想的:就是在一个没有jdk环境的电脑也能运行的文件。然后我也在网上找到了一些方法,就是上面三个的链接的方法。但是我使用完后,发现有问题,并不是我想要的方法。

-
    -
  • 第一个方法不能再没有jdk环境的电脑上运行。。
  • -
  • 第二个方法其实就是把jre文件一起给打包,然后再新的电脑上安装一个jre文件,这样就可以运行我们的java程序。。
  • -
  • ==为什么说这些都不是我想要的呢?==
  • -
  • 因为我最开始学的C语言,使用的工具是DEV C++,这个工具生成的.exe文件却可以在任何的电脑上运行,所以我就想把自己写的java程序也弄成一样。最后才发现java做不到,除非你的电脑自带jdk环境就可以。。。*

    ==写这篇文章就是想纪念一下此时此刻我的无知想法。。。==

  • -
-
文章作者: Barry
文章链接: http://barry04.github.io/2021/04/06/%E7%9B%AE%E4%B9%8B%E6%89%80%E5%8F%8A%EF%BC%8C%E7%9A%86%E6%98%AFJava%E3%80%82%E5%BF%83%E4%B9%8B%E6%89%80%E6%83%B3%EF%BC%8C%E7%9A%86%E6%98%AFexe%E7%9A%84%E5%9D%91/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry
打赏
  • wechat
    wechat
  • alipay
    alipay
\ No newline at end of file diff --git "a/2021/04/06/\347\234\274\350\213\245\346\230\237\350\276\260-\347\224\250\346\255\243\345\210\231\346\243\200\351\252\214\345\233\233\345\210\231\350\277\220\347\256\227/index.html" "b/2021/04/06/\347\234\274\350\213\245\346\230\237\350\276\260-\347\224\250\346\255\243\345\210\231\346\243\200\351\252\214\345\233\233\345\210\231\350\277\220\347\256\227/index.html" index 6011914..24c795d 100644 --- "a/2021/04/06/\347\234\274\350\213\245\346\230\237\350\276\260-\347\224\250\346\255\243\345\210\231\346\243\200\351\252\214\345\233\233\345\210\231\350\277\220\347\256\227/index.html" +++ "b/2021/04/06/\347\234\274\350\213\245\346\230\237\350\276\260-\347\224\250\346\255\243\345\210\231\346\243\200\351\252\214\345\233\233\345\210\231\350\277\220\347\256\227/index.html" @@ -1,17 +1,17 @@ -眼若星辰,用正则检验四则运算 | Barry +眼若星辰,用正则检验四则运算 | Barry - + - + -
加载中...

稀疏矩阵A、B均采用三元组顺序表表示,验证实现矩阵A快速转置算法,并设计、验证矩阵A、B相加得到矩阵C的算法。

数据结构实验题目:

稀疏矩阵A、B均采用三元组顺序表表示,验证实现矩阵A快速转置算法,并设计、验证矩阵A、B相加得到矩阵C的算法。

(1)从键盘输入矩阵的行数和列数,随机生成稀疏矩阵。
(2) 设计算法将随机生成的稀疏矩阵转换成三元组顺序表形式存储。
(3) 设计算法将快速转置得到的与相加得到的三元组顺序表分别转换成矩阵形式。
(4) 输出随机生成的稀疏矩阵A、B及其三元组顺序表、快速转置得到的与相加得到的三元组顺序表及其矩阵形式。

-
    -
  1. 从键盘输入矩阵的行数和列数,随机生成稀疏矩阵。(老师要求不能用二维数组去贮存矩阵)
    也就是说直接生成三元组

    -
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    //动态随机生成三元组
    TSMatrix Romand(int m,int n){
    TSMatrix M;
    int t=1;
    int num[100]={0};//记录数组位置是否是非0元
    M.mu=m;
    M.nu=n;
    M.tu=(int)(m*n*factor)+1;//factor为稀疏因子
    srand((unsigned)time(0));
    while(t!=M.tu+1){
    M.data[t].i = rand() % m+1;
    M.data[t].j = rand() % n+1;
    if(num[(M.data[t].i-1)*n+M.data[t].j] == 0){//如果该位置没有数据,属于0元
    M.data[t].v = rand() % 10+1;
    t++;
    num[(M.data[t].i-1)*n+M.data[t].j] = 1;
    }
    }
    //对三元组排序
    for(int i=1;i<=M.tu;i++){
    for(int j = i+1;j<=M.tu;j++){
    if((M.data[i].i > M.data[j].i)||(M.data[i].i == M.data[j].i&&M.data[i].j > M.data[j].j)){
    Triple a;
    a = M.data[i];
    M.data[i] = M.data[j] ;
    M.data[j] = a;
    }
    }
    }
    return M;
    }
  2. -
  3. 算法将快速转置得到的与相加得到的三元组顺序表分别转换成矩阵形式。
    这一步呢我们就按照矩阵形式输出就行了,不用实际转。

    -
  4. -
-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//打印矩阵 
void printMatrix(TSMatrix M,int m,int n){
int t=1,k=0;
for(int i= 1; i<=m;i++){
for(int j=1; j<=n;j++){
if(M.data[t].i == i&&M.data[t].j == j){
printf("%d\t", M.data[t].v );
t++;
}else{
printf("0\t");
}
}
printf("\n");
}
}
- -

3.快速转置算法

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/快速转置
void fastTSMatrix(TSMatrix M,TSMatrix *T){
//初始化T(行数、列数、元素个数)
int q,p,col;
int num[100];
int cpot[100];
T->mu=M.nu;
T->nu=M.mu;
T->tu=M.tu;
if(T->tu>0){
for(col=1;col<=M.nu;col++) num[col]=0;//初始化求num[] 为0
for(p=1;p<=M.tu;p++) num[M.data[p].j]++;//求每一列的num[],即求出每一列的有值元素的个数
//求cpot[]
cpot[1]=1;
for(col=2;col<=M.nu;col++)//求出每一列的第一个元素在顺序表中的位置
cpot[col]=cpot[col-1]+num[col-1];
//这一列首元素的存放位置等于上一列的首元素的存放位置+上一列的元素个数
for(p=1;p<=M.tu;p++){//元素的转置
col=M.data[p].j;
q=cpot[col];
T->data[q].i=M.data[p].j;
T->data[q].j=M.data[p].i;
T->data[q].v=M.data[p].v;
cpot[col]++;//把当前一列元素的位置后移一个单位
}
}
}
-

4.三元组相加
三元组相加是行与列相同既相加,不同则就不用相加,自己把其赋值给新数组。

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
int cmp(Triple c1,Triple c2){
if(c1.i==c2.i){
if(c1.j==c2.j){//位置相同
return 0;
}
else if(c1.j<c2.j){
return -1;//A在B的前
}
else{
return 1;//B在A的前
}
}
else if(c1.i<c2.i){
return -1;//A在B的前
}
else{
return 1;//B在A的前
}
}
//三元组相加
int addTSMatrix(TSMatrix A,TSMatrix B,TSMatrix *C){
int i,j;
int p=1,q=1;
C->tu=1;
while((p<=A.tu)&&(q<=B.tu)){
if(cmp(A.data[p],B.data[q])==-1){//A在B的前
C->data[C->tu].i=A.data[p].i;
C->data[C->tu].j=A.data[p].j;
C->data[C->tu++].v=A.data[p].v;
p++;
}
if(cmp(A.data[p],B.data[q])==1){//B在A的前
C->data[C->tu].i=B.data[q].i;//
C->data[C->tu].j=B.data[q].j;//
C->data[C->tu++].v=B.data[q].v;
q++;
}
if(cmp(A.data[p],B.data[q])==0){//i,j 相同
if(A.data[p].v+B.data[q].v != 0){
C->data[C->tu].i=A.data[p].i;
C->data[C->tu].j=A.data[p].j;
C->data[C->tu++].v=A.data[p].v+B.data[q].v;
}
p++;
q++;
}
}
//将剩下的三元组的合并
C->mu=A.mu;
C->nu=A.nu;
while((p<=A.tu)){
C->data[C->tu].i=A.data[p].i;
C->data[C->tu].j=A.data[p].j;
C->data[C->tu++].v=A.data[p].v;
p++;
C->mu=A.mu;
C->nu=A.nu;
}
while((q<=B.tu)){
C->data[C->tu].i=B.data[q].i;
C->data[C->tu].j=B.data[q].j;
C->data[C->tu++].v=B.data[q].v;
q++;
C->mu=B.mu;
C->nu=B.nu;
}
C->tu--;
return 0;
}
-

5.三元组的数据结构:

-
1
2
3
4
5
6
7
8
9
10
11
#define maxsize 1250
typedef struct{
int i;//元素的行下标
int j;//元素的列下标
int v;//元素的值
}Triple;
//定义三元组
typedef struct{
Triple data[maxsize+1]; // data[0]未用
int mu,nu,tu;//元素的总行数,总列数,不为0元素个数
}TSMatrix;
-

6.测试结果:
请输入A矩阵的行数,列数
2
2
A矩阵为:
0 5
0 0
三元组顺序表形式A为:
1 2 5
请输入B矩阵的行数,列数
2
2
B矩阵为:
0 0
0 5
三元组顺序表形式B为:
2 2 5
转置后的TA:
2 1 5
转置后的TA的矩阵形式:
0 0
5 0
A+B矩阵三元组表示:
1 2 5
2 1 5
TC的矩阵形式:
0 5
5 0

-
文章作者: Barry
文章链接: http://barry04.github.io/2021/04/06/%E7%A8%80%E7%96%8F%E7%9F%A9%E9%98%B5A%E3%80%81B%E5%9D%87%E9%87%87%E7%94%A8%E4%B8%89%E5%85%83%E7%BB%84%E9%A1%BA%E5%BA%8F%E8%A1%A8%E8%A1%A8%E7%A4%BA%EF%BC%8C%E9%AA%8C%E8%AF%81%E5%AE%9E%E7%8E%B0%E7%9F%A9%E9%98%B5A%E5%BF%AB%E9%80%9F%E8%BD%AC%E7%BD%AE%E7%AE%97%E6%B3%95%EF%BC%8C%E5%B9%B6%E8%AE%BE%E8%AE%A1%E3%80%81%E9%AA%8C%E8%AF%81%E7%9F%A9%E9%98%B5A%E3%80%81B%E7%9B%B8%E5%8A%A0%E5%BE%97%E5%88%B0%E7%9F%A9%E9%98%B5C%E7%9A%84%E7%AE%97%E6%B3%95%E3%80%82/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry
打赏
  • wechat
    wechat
  • alipay
    alipay
\ No newline at end of file diff --git "a/2021/04/06/\350\207\252\345\210\266\346\225\260\346\215\256\351\233\206\357\274\214\346\220\255\345\273\272\345\205\253\350\202\241\347\245\236\347\273\217\347\275\221\347\273\234\350\256\255\347\273\203\346\250\241\345\236\213\345\271\266\345\256\236\347\216\260\345\233\276\347\211\207\347\232\204\351\242\204\346\265\213/index.html" "b/2021/04/06/\350\207\252\345\210\266\346\225\260\346\215\256\351\233\206\357\274\214\346\220\255\345\273\272\345\205\253\350\202\241\347\245\236\347\273\217\347\275\221\347\273\234\350\256\255\347\273\203\346\250\241\345\236\213\345\271\266\345\256\236\347\216\260\345\233\276\347\211\207\347\232\204\351\242\204\346\265\213/index.html" index fbea274..5dfcec3 100644 --- "a/2021/04/06/\350\207\252\345\210\266\346\225\260\346\215\256\351\233\206\357\274\214\346\220\255\345\273\272\345\205\253\350\202\241\347\245\236\347\273\217\347\275\221\347\273\234\350\256\255\347\273\203\346\250\241\345\236\213\345\271\266\345\256\236\347\216\260\345\233\276\347\211\207\347\232\204\351\242\204\346\265\213/index.html" +++ "b/2021/04/06/\350\207\252\345\210\266\346\225\260\346\215\256\351\233\206\357\274\214\346\220\255\345\273\272\345\205\253\350\202\241\347\245\236\347\273\217\347\275\221\347\273\234\350\256\255\347\273\203\346\250\241\345\236\213\345\271\266\345\256\236\347\216\260\345\233\276\347\211\207\347\232\204\351\242\204\346\265\213/index.html" @@ -1,17 +1,17 @@ -自制数据集,搭建八股神经网络训练模型并实现图片的预测 | Barry +自制数据集,搭建八股神经网络训练模型并实现图片的预测 | Barry - + - + -
加载中...

行为模式-访问-策略模式

@TOC

+

什么是行为模式?

行为型模式涉及到算法和对象间职责的分配,行为模式描述了对象和类的模式,以及它们之间的通信模式,行为模式刻划了在程序运行时难以跟踪的复杂的控制流可分为行为类模式和行为对象模式。1. 行为类模式使用继承机制在类间分派行为。2. 行为对象模式使用对象聚合来分配行为。一些行为对象模式描述了一组对等的对象怎样相互协作以完成其中任何一个对象都无法单独完成的任务。

+

访问模式

访问模式|菜鸟教程

+

介绍

意图:主要将数据结构与数据操作分离。

+

主要解决:稳定的数据结构和易变的操作耦合问题。

+

何时使用:需要对一个对象结构中的对象进行很多不同的并且不相关的操作,而需要避免让这些操作”污染”这些对象的类,使用访问者模式将这些封装到类中。

+

如何解决:在被访问的类里面加一个对外提供接待访问者的接口。

+

关键代码:在数据基础类里面有一个方法接受访问者,将自身引用传入访问者。

+

应用实例:您在朋友家做客,您是访问者,朋友接受您的访问,您通过朋友的描述,然后对朋友的描述做出一个判断,这就是访问者模式。

+
    +
  • 优点:

    +
      +
    • 增加新的访问操作很方便
    • +
    • 将有关元素对象的访问行为集中到一个访问者对象中,而不是分散在一个个的元素类中,类的职责更加清晰
    • +
    • 让用户能够在不修改现有元素类层次结构的情况下,定义作用于该层次结构的操作
    • +
    +
  • +
  • 缺点:

    +
      +
    • 具体元素对访问者公布细节,违反了迪米特原则。
    • +
    • 具体元素变更比较困难。
    • +
    • 违反了依赖倒置原则,依赖了具体类,没有依赖抽象。
    • +
    +
  • +
  • 使用场景:

    +
      +
    • 对象结构中对象对应的类很少改变,但经常需要在此对象结构上定义新的操作。
    • +
    • 需要对一个对象结构中的对象进行很多不同的并且不相关的操作,而需要避免让这些操作”污染”这些对象的类,也不希望在增加新操作时修改这些类。
    • +
    • 一个对象结构包含多个类型的对象,希望对这些对象实施一些依赖其具体类型的操作
    • +
    +
  • +
+

注意事项:访问者可以对功能进行统一,可以做报表、UI、拦截器与过滤器。

+

具体一个应用场景

在这里插入图片描述

+

分析

    +
  • 药品信息的集合,包含一种或多种不同类型的药品信息
  • +
  • 不同类型的工作人员(例如划价人员和药房工作人员)在操作同一个药品信息集合时将提供不同的处理方式
  • +
  • 可能会增加新类型的工作人员来操作处方单
  • +
  • 对象结构中存储了多种不同类型的对象信息
  • +
  • 对同一对象结构中的元素的操作方式并不唯一,可能需要提供多种不同的处理方式
  • +
  • 还有可能需要增加新的处理方式

    类图

    在这里插入图片描述

    访问者结构

  • +
  • 访问者模式包含以下5个角色:
      +
    • Visitor(抽象访问者)
    • +
    • ConcreteVisitor(具体访问者)
    • +
    • Element(抽象元素)
    • +
    • ConcreteElement(具体元素)
    • +
    • ObjectStructure(对象结构)

      结构图

      在这里插入图片描述
    • +
    +
  • +
+

策略模式

策略模式|菜鸟教程

+

策略模式的定义

    +
  • 又称为政策(Policy)模式
  • +
  • 每一个封装算法的类称之为策略(Strategy)类
  • +
  • 策略模式提供了一种可插入式(Pluggable)算法的实现方案

    介绍

    意图:定义一系列的算法,把它们一个个封装起来, 并且使它们可相互替换。
  • +
+

主要解决:在有多种算法相似的情况下,使用 if…else 所带来的复杂和难以维护。

+

何时使用:一个系统有许多许多类,而区分它们的只是他们直接的行为。

+

如何解决:将这些算法封装成一个一个的类,任意地替换。

+

关键代码:实现同一个接口。

+

应用实例:

+
    +
  1. 诸葛亮的锦囊妙计,每一个锦囊就是一个策略。
  2. +
  3. 旅行的出游方式,选择骑自行车、坐汽车,每一种旅行方式都是一个策略。
  4. +
  5. JAVA AWT 中的 LayoutManager。
  6. +
+
    +
  • 优点

    +
      +
    • 提供了对开闭原则的完美支持,用户可以在不修改原有系统的基础上选择算法或行为,也可以灵活地增加新的算法或行为
    • +
    • 提供了管理相关的算法族的办法
    • +
    • 提供了一种可以替换继承关系的办法
    • +
    • 可以避免多重条件选择语句
    • +
    • 提供了一种算法的复用机制,不同的环境类可以方便地复用策略类
    • +
    +
  • +
  • 缺点

    +
      +
    • 客户端必须知道所有的策略类,并自行决定使用哪一个策略类
    • +
    • 将造成系统产生很多具体策略类
    • +
    • 无法同时在客户端使用多个策略类
    • +
    +
  • +
  • 使用场景:

    +
      +
    • 如果在一个系统里面有许多类,它们之间的区别仅在于它们的行为,那么使用策略模式可以动态地让一个对象在许多行为中选择一种行为。
    • +
    • 一个系统需要动态地在几种算法中选择一种。
    • +
    • 如果一个对象有很多的行为,如果不用恰当的模式,这些行为就只好使用多重的条件选择语句来实现。
    • +
    +
  • +
+

注意事项:如果一个系统的策略多于四个,就需要考虑使用混合模式,解决策略类膨胀的问题。

+

具体应用场景

旅游出行方式示意图

在这里插入图片描述

+
分析
    +
  • 实现某个目标的途径不止一条,可根据实际情况选择一条合适的途径
    策略模式的结构
  • +
  • 策略模式包含以下3个角色:
      +
    • Context(环境类)
    • +
    • Strategy(抽象策略类)
    • +
    • ConcreteStrategy(具体策略类)
      在这里插入图片描述

      策略模式的应用实例

      实例说明

      某软件公司为某电影院开发了一套影院售票系统,在该系统中需要为不同类型的用户提供不同的电影票打折方式,具体打折方案如下:
      (1) 学生凭学生证可享受票价8折优惠。
      (2) 年龄在10周岁及以下的儿童可享受每张票减免10元的优惠(原始票价需大于等于20元)。
      (3) 影院VIP用户除享受票价半价优惠外还可进行积分,积分累计到一定额度可换取电影院赠送的奖品。
      该系统在将来可能还要根据需要引入新的打折方式。现使用策略模式设计该影院售票系统的打折方案。

      实例类图

      在这里插入图片描述

      总结

      为什么将这两个类放在一起来进行讨论,因为我觉得它们在单从类的结构很像,实现起来也有点像,但是实际的业务逻辑是两回事。
    • +
    +
  • +
  • 访问模式是在不改变原来的元素的情况下进行对元素的操作,说人话,就是你去博物馆参观,展览品并不会因为你去参观而会发生变化,它该怎么样还是怎么样。
  • +
  • 策略模式是将一系列的操作都独立封装起来,可以独立使用并且使元素发生变化。它就类似于你吃饭付款,你既可以选择微信支付也可以选择支付宝支付,还可以选择现金支付等方式。
  • +
+
文章作者: Barry
文章链接: http://barry04.github.io/2021/05/03/%E8%A1%8C%E4%B8%BA%E6%A8%A1%E5%BC%8F-%E8%AE%BF%E9%97%AE-%E7%AD%96%E7%95%A5%E6%A8%A1%E5%BC%8F/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry

评论
\ No newline at end of file diff --git "a/2021/05/17/\345\244\217\346\227\245\347\251\272\350\260\203/index.html" "b/2021/05/17/\345\244\217\346\227\245\347\251\272\350\260\203/index.html" new file mode 100644 index 0000000..4265eaa --- /dev/null +++ "b/2021/05/17/\345\244\217\346\227\245\347\251\272\350\260\203/index.html" @@ -0,0 +1,278 @@ +夏日空调 | Barry + + + + + + + + + + +
加载中...

夏日空调

+
文章作者: Barry
文章链接: http://barry04.github.io/2021/05/17/%E5%A4%8F%E6%97%A5%E7%A9%BA%E8%B0%83/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry

评论
\ No newline at end of file diff --git "a/2021/05/20/\344\270\200\346\226\207\346\225\231\344\275\240\345\205\250\350\207\252\345\212\250\346\224\257\344\273\230\345\256\235\346\211\223\345\215\241\357\274\214\346\261\237\350\245\277\345\255\246\345\255\220\346\234\211\347\246\217\357\274\201/index.html" "b/2021/05/20/\344\270\200\346\226\207\346\225\231\344\275\240\345\205\250\350\207\252\345\212\250\346\224\257\344\273\230\345\256\235\346\211\223\345\215\241\357\274\214\346\261\237\350\245\277\345\255\246\345\255\220\346\234\211\347\246\217\357\274\201/index.html" new file mode 100644 index 0000000..17aee9a --- /dev/null +++ "b/2021/05/20/\344\270\200\346\226\207\346\225\231\344\275\240\345\205\250\350\207\252\345\212\250\346\224\257\344\273\230\345\256\235\346\211\223\345\215\241\357\274\214\346\261\237\350\245\277\345\255\246\345\255\220\346\234\211\347\246\217\357\274\201/index.html" @@ -0,0 +1,424 @@ +一文教你全自动打卡,解放你的双手!!! | Barry + + + + + + + + + + + +
加载中...

一文教你全自动打卡,解放你的双手!!!

@TOC

+

起因

在这里插入图片描述
你还在为这种消息而烦恼吗???
反正我很烦这种,然后我就在网上搜索自动化脚本。唉!找到了。本文基本上都是搬运,我自己修改并优化了一下原作者的一些小小的功能。
原作者的项目地址

+

秃头过程

+

去年疫情期间,根据学校的,在 支付宝 -> 江西省终身学习卡 -> 小程序 -> 校园防疫 -> 健康签到 进行签到

+

结果老是忘记被班主任点名

+

本身也就是软件专业,直接上手干他!

+

iPhone使用Thor软件抓包,走一遍流程,发现这个小程序就是个套壳网页。

+

测试中发现cookie不会过期,登陆都省了,图方便直接使用苹果的快捷指令app做了一个发送签到请求的POST,再配合苹果的自动化,完成每日签到。

+

到了21年寒假,在家闲的胃疼,再加上由于需要帮妹子们(手动狗头)签到,使用快捷指令因为步骤太多很容易失败,于是便有了做程序脚本的想法。再加上个学期的Java学摸鱼摸的有点多,下学期还要学j2ee,就打算使用Java来制作签到脚本。

+

但是程序员懂得都懂,Java做脚本。。。。。。蛋疼,虽然没学过python,但是寒假帮闺蜜抢华为手机摸索写了个python脚本,也就啥都不怕了,肝就完事了。

+

写之前在gayhub随手搜了一下,居然发现已经有一位大佬@PrintNow已经使用PHP制作了一个同款脚本Jiangxi-University-Health-Check-in。所以本python脚本除了使用python来实现以外,还进行了一些功能上的优化,同时,这个脚本给了我很多的思路和帮助,包括但不限于:

+
    +
  • 免登陆进入系统
  • +
  • URL中那串数字
  • +
  • 关于street参数的描述(@ChiuJun
  • +
  • 这个README文档也是从Jiangxi-University-Health-Check-in扒过来修改的哈哈哈哈哈
  • +
+
+

🧀 食用方法

+

很乐意解决你在使用过程中遇到的问题,但我也没系统学过python,只能尽力帮忙,欢迎 issues,尽量把整个程序以及产生的log文件全部上传。

+
+

A . 部署到自己的服务器 🐂 (适合自己有服务器的童鞋)

    +
  1. 克隆或者下载本项目到本地

    +
  2. +
  3. 修改 sign.py第4 行签到模式,0表示单人签到 1表示多人签到

    +
  4. +
  5. 如果使用单人签到模式,即第一步signs = 0,则修改 第8 行 的yourID为你的学号。

    +

    否则,如果使用多人签到模式,即第上一步signs = 0,则11 行的 IDs,每个学号之间同英文 , 分隔开,形如以下的模式:

    +
    1
    IDs = '学号1,学号2,学号3,学号4'
    + +

    *Ps:部分学校可能用一卡通号等代替。可以到 https://fxgl.jx.edu.cn/你的高校代码/ 自己尝试一下,(你的高校代码 详见后文 江西省100所高校代码)*

    +
  6. +
  7. 修改第15 行 学校代码(详见后文 江西省100所高校代码

    +
  8. +
  9. 修改第18 行 身份类型(0表示学生 1表示教职工)(暂不支持教职工,部分细节有差异,如果有老师需要可以提交issues我再修改

    +
  10. +
  11. 修改第21 行 是否为毕业班级(0表示是毕业班的学生 1表示不是毕业班的学生)

    +
  12. +
  13. 修改第28 行 签到模式 (0表示获取前一日的签到定位,1表示使用输入的经纬度)

    +
    +

    因为为了使签到位置产生一点点差异,每次签到都会随机偏移一点。

    +

    如果获取前一日的签到定位进行签到,长时间签到可能会偏差较大,适合多人签到且时间跨度不是不长。每次签到会在上一次签到的基础上随机偏移1.1m以内,理论上连续签到一年会偏移200m左右

    +

    使用输入的经纬度,单人签到推荐,会在你输入的经纬度定位上随机偏移11.1m以内

    +
    +
  14. +
  15. 如果使用输入的经纬度模式,即上一步中的参数 signType = 1,则还需要配置32行和34行的经纬度、36行的地址,建议在百度拾取坐标系统找到自己的位置。经度是较大的那个。

    +
  16. +
  17. 如果需要server酱推送,可在第38-46行了解详情并配置

    +
  18. +
  19. 部署到虚拟主机或者本机,然后cd到相关文件夹,运行命令 python3 sign.py 即可

    +
    1
    2
    3
    4
    5
    # Ubuntu 安装 python3 方法,其它如 CentOS 可以网上搜
    sudo apt install python3
    sudo apt install python3-pip
    #安装完成后继续配置python
    pip3 install requests
    +
  20. +
  21. 对于liunx系统,建议使用 crontab 定时运行上述命令。Windows可以使用定时任务,macOS也有定时。

    +
    +

    crontab 使用方法可以网上查找资料

    +
    +
  22. +
+

B . 部署免费GITHUB服务器(Github Workflows)🔥 (!!推荐!!)(适合自己没有服务器的童鞋)

    +
  1. 克隆/派生本项目到你自己的仓库

    +
  2. +
  3. 克隆你的项目到本地,在本地编辑sign.py,同A方案的2-9步骤,然后提交回去

    +

    或者直接在GitHub上编辑sign.py并保存

    +
  4. +
+

在这里插入图片描述

+
    +
  1. 点开你项目的Actions,点击左侧Workflows-All workflows-Auto ZFB XiaoYuanFangYi Sign,点击黄色警示⚠️条右边的Enable workflow

    +
  2. +
  3. 至此,GitHub workflow已经成功开启。默认理想情况下将会在每天的凌晨0点半、9点半、18点半进行三次签到。如果想修改定时时间,可以看下一部分。

    +
  4. +
+

C . 部署到腾讯云云函数(免费) 🦄

自己研究咯,只是以前知道这玩意也能免费定时运行代码。

+

🏪关于GitHub workflow的更多说明

测试一下,怎么知道自己的能不能正常运行呢?

在成功编辑完sign.py和打开workflow后,每次 提交一次push,就可以手动出发运行workflow。此时打开项目的Action,就会发现出了一个新的workflow正在运行或刚刚运行完毕,点击即可查看详情。

+

点击Do sign可以查看运行详情,当然,每次运行,你的仓库log文件夹下也会自动生成了日志文件,可以进行查看。

+

如果你配置了SERVER酱,也会将签到日志一起推送。

+

如果运行失败,你的GitHub绑定的邮箱会收到相关提醒。

+

以上不仅适用于手动出发的action,每天自动运行的action也是一样的。

+

怎么修改定时运行的时间?

打开Action,找到一个运行的记录,点击右侧的三个点,再点击View workflow file(推荐)

+

或者在项目中打开文件夹.github/workflows/autosign.yml
在这里插入图片描述

+

然后点击右上角的笔进入编辑,在第十二行找到:

+
1
- cron: '30 */9 * * *'
+ +

至于cron的用法,大家具体百度。要注意的是,这里的时间是UTC协调世界时,简单的说,就是要在你理解的北京时间上减去8小事。比如凌晨一点,这里你要输入17点(|1点-8小时|),凌晨十二点,这里你要输入16点(|0点-8小时|),随后右上角提交即可。

+

注意!github action存在一定的延迟,测试发现可能是几分钟,也可能是几十分钟,也可能是一个多小时。所以到了定时时间却没有运行请不必担心,等一天你再看看。

+

❗ 关于 street 参数与 zddlwz 参数(平常使用支付宝和微信进行签到的童鞋直接略过)

原项目文档描述:

+

基于对签到数据的改动较以往数据尽量小的原则,作详细说明(感谢原项目 @ChiuJun >
issues: street参数确定是可选项吗?
定位部分为三个环境:

+
+
    +
  1. 支付宝环境
    支付宝环境需要 street 参数,参考支付宝H5开放文档
    street 参数由返回结果的 pois[0].addresspois[0].name 拼接而成,最后再拼接成 address.zddlwz

    +
    1
    2
    3
    address.street = result.pois[0].address + result.pois[0].name;
    //...
    var zddlwz =address.province+address.city+address.district+address.street;
    +

    Singleton.php$street 为空,并且没有将 $street 拼接至 zddlwz ,所以造成了本签到程序提交的签到记录中缺失具体的街道信息
    考虑到大部分人的环境都是支付宝,建议将具体的街道信息加入到POST参数中
    修改 Singleton.php 第 92 行为

    +
    1
    "zddlwz" => $province . $city . $district . $street,//自动地理位置:省市县(区)街道 拼接结果
  2. +
  3. 微信环境
    微信环境中同样需要 street 参数,并且不同于支付宝环境,微信环境中 street 参数不包含 streetNumber 信息,拼接地理位置时 zddlwz 同样需要详细到街道号。
    至于 street 参数中具体填什么,建议自行查看微信小程序开发者文档。

    +
    1
    2
    3
    address.street = addComp.street;
    //...
    address.zddlwz = addComp.province+addComp.city+addComp.district+addComp.street+addComp.streetNumber;
    +
  4. +
  5. H5环境
    H5环境 street 参数为可选项,对于H5环境的同学,不需要对 Singleton.php 做额外更改。

    +
    1
    var addressStr = address.province + address.city + address.district;
    +

    备注:由于据了解大家基本上都是使用的支付宝环境,所以本脚本不对H5环境,也就是通过浏览器进行签到的情况不做适配。(我感觉没有使用浏览器签到的,大家应该都是用的支付宝吧,如果有,提交issues,我再进行适配。)

  6. +
+

🎨 相关 API 说明

    +
  1. 登录 API

    +

    https://fxgl.jx.edu.cn/学校标识码/public/homeQd?loginName=你的学号&loginType=0

    +
  2. +
  3. 签到 API

    +

    https://fxgl.jx.edu.cn/学校标识码/studentQd/saveStu

    +
  4. +
  5. 签到记录页面

    +

    https://fxgl.jx.edu.cn/学校标识码/public/xslby

    +
  6. +
  7. 是否签到

    +

    https://fxgl.jx.edu.cn/学校标识码/studentQd/studentIsQd

    +

    data为1即为已经签到

    +
  8. +
  9. 签到记录API

    +

    https://fxgl.jx.edu.cn/学校标识码/studentQd/pageStudentQdInfoByXh

    +
  10. +
  11. 百度地图API

    +

    http://api.map.baidu.com/reverse_geocoding/v3/ak=80smLnoLWKC9ZZWNLL6i7boKiQeVNEbq&output=json&coordtype=wgs84ll&location=纬度,经度

    +

    从这个签到系统里提取出的ak,正好省了我们去申请

    +
  12. +
+

🙇‍ 感谢名单

+

感谢它们对本文做出的巨大贡献

+
+ +

💻测试环境

系统:macOS Big Sur 11.3 BETA ubuntu18.04

+

python版本:Python 3.9

+

🙋‍♀️ 未来计划

+

可能会有,可能不会有

+
+
    +
  • 加入多人签到的完整支持
  • +
  • 支持通过server酱进行签到成功/失败通知
  • +
  • 配合GitHub Action达到利用GitHub来做服务器免费进行签到
  • +
  • 通过获取上一次的签到记录进行签到,并进行随机偏移
  • +
  • 支持通过QQ机器人(httpAPI)插件进行签到成功/失败通知
  • +
+

我优化的功能

在sign.py下加入的代码
我优化的主要是原作者是每一天都会重复打卡三次,所以我的手机每一天都重复收到三次消息,就很麻烦。而且使用多人打卡的话,每一个间隔时间就只有几秒钟,长时间有点危险,我就被坑,被辅导员发现了,然后我就优化了。
在这里插入图片描述
==这里的意思是每一天太平洋时间4点8点和0点运行本程序,由于太平洋时间和北京时间相差8个小时==
在这里插入图片描述
在这里插入图片描述
==我所优化的功能一定要按照我三张图片去添加,不然的话还是用原作者的。当然最好是自己主动打卡。==
放心食用,我已经食用了一两个月了。。👨‍🍳👨‍🍳👨‍🍳

+
文章作者: Barry
文章链接: http://barry04.github.io/2021/05/20/%E4%B8%80%E6%96%87%E6%95%99%E4%BD%A0%E5%85%A8%E8%87%AA%E5%8A%A8%E6%94%AF%E4%BB%98%E5%AE%9D%E6%89%93%E5%8D%A1%EF%BC%8C%E6%B1%9F%E8%A5%BF%E5%AD%A6%E5%AD%90%E6%9C%89%E7%A6%8F%EF%BC%81/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry

评论
\ No newline at end of file diff --git a/2022/02/18/XmlUtil/index.html b/2022/02/18/XmlUtil/index.html new file mode 100644 index 0000000..40104dc --- /dev/null +++ b/2022/02/18/XmlUtil/index.html @@ -0,0 +1,286 @@ +XmlUtil.readObjectFromXml的坑及解决方法 | Barry + + + + + + + + + + + + + +
加载中...

XmlUtil.readObjectFromXml的坑及解决方法

@TOC

+

Java辅助类工具箱Hutool

关于Hutool的使用参考官方文档 官方文档

+

XML工具-XmlUtil

在这里插入图片描述
XmlUtil工具前面几个用的都挺好的,就是关于XML与对象的转换那里,我懵逼了。
readObjectFromXml 从XML中读取对象。
这个介绍就有点敷衍了吧,用的时候果然我就出行问题。

+

上代码,描述问题

1
2
3
4
Student student = new Student("asd","asd");
Document document = XmlUtil.beanToXml(student);
String str = XmlUtil.toStr(document);
Student student2 = XmlUtil.readObjectFromXml(str);
+

然后就报错了
在这里插入图片描述

+

解决方案

就不用 readObjectFromXml()
==官方给的解释==在这里插入图片描述
在这里插入图片描述
通过下面的操作去一个一个读取,或者是用xmlToMap的方法。。
在这里插入图片描述
解决:

+
1
2
3
4
Student student = new Student("asd","asd");
Document document = XmlUtil.beanToXml(student);
Element root = XmlUtil.getRootElement(document);
student2.setName(XmlUtil.elementText(root, "Name", null));
文章作者: Barry
文章链接: http://barry04.github.io/2022/02/18/XmlUtil/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry

评论
\ No newline at end of file diff --git "a/2022/02/18/\345\273\266\346\227\266\351\230\237\345\210\227/index.html" "b/2022/02/18/\345\273\266\346\227\266\351\230\237\345\210\227/index.html" new file mode 100644 index 0000000..c69bca6 --- /dev/null +++ "b/2022/02/18/\345\273\266\346\227\266\351\230\237\345\210\227/index.html" @@ -0,0 +1,313 @@ +DelayingQueue | Barry + + + + + + + + + + + + +
加载中...

DelayingQueue

DelayingQueue

基于Redis实现延时消息队列

+

运行前需要IDEA安装lombok

@TOC

+
+ + + + + +

一、基本原理

将延迟任务加到Sorted Set,将延迟时间设为score;启动一个线程不断判断Sorted Set中第一个元素的score是否小于当前时间,如果小于,从Sorted Set中移除任务并添加到执行队列中;如果大于,进行短暂休眠后,重复上诉操作。

+
+ +

二、实现步骤

+
    +
  1. 在对于一个消息的创建进入Redis缓存之中,消息的元素的score设置为当前的时间戳或发布时间戳或过期时间。

    +
  2. +
  3. 开启执行轮询Redis的延时队列操作,获取队列的订单的标识,判断当前订单的score如果小于当前时间毫秒值,移除Redis队列中该消息。

    +
  4. +
  5. 一直重复上诉操作。

    +
  6. +
+

消息订单类:

1
2
3
4
5
6
7
8
9
public class Msg {
// 消息id
private String id;
// 消息分数
private double score;
// 消息内容
private String msg;

}
+ +

存入消息数据

1
2
3
4
5
6
7
8
9
10
11
12
13
14
public static void putMSG(Jedis jedis){
//将信息存入redis的消息zsorted队列 (分数自定义)分数 == (当前时间 + 多少秒 = 过期时间)
Msg msg0 = new Msg(UUID.randomUUID().toString(),System.currentTimeMillis()+1006,"0");
Msg msg1 = new Msg(UUID.randomUUID().toString(), System.currentTimeMillis() + 9000000,"1");
Msg msg2 = new Msg(UUID.randomUUID().toString(), System.currentTimeMillis() + 5040000,"2");
Msg msg3 = new Msg(UUID.randomUUID().toString(), System.currentTimeMillis() + 7040000,"3");
// 将消息放入key 为 q 队列
// System.out.println("===========MSG=====");
jedis.zadd("q",msg0.getScore(), JSON.toJSONString(msg0));
jedis.zadd("q",msg1.getScore(), JSON.toJSONString(msg1));
jedis.zadd("q",msg2.getScore(), JSON.toJSONString(msg2));
jedis.zadd("q",msg3.getScore(), JSON.toJSONString(msg3));
// System.out.println("===========MSG=====");
}
+

消费信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
public class PushMsg {


public void pushMSG(Jedis jedis) {

System.out.println("=========pushMSG=======");
System.out.println("q nums: " + jedis.zcard("q"));
// 当前时间
long now = System.currentTimeMillis();
// 删除过期的消息
jedis.zremrangeByScore("q", 0, now);
// 获取未过期的信息
Set<String> values = jedis.zrevrange("q", 0, -1 );
System.out.println(values.size());
System.out.println("未发布的消息:");
for (String v: values
) {
System.out.println(v);
}
System.out.println("=========pushMSG=======");
}
}


+

主函数

1
2
3
4
5
6
7
8
9
10
11
12
13
14
    public static void main(String[] args) {

//连接redis
Jedis jedis = new Jedis("127.0.0.1", 6379);
// 设置连接密码
// jedis.auth("123");
// 放入消息
putMSG(jedis);
// 消费消息
PushMsg pushMsg = new PushMsg();
pushMsg.pushMSG(jedis);
// System.out.println("========");
}

+ + +

运行前后的redis服务器的数据

在这里插入图片描述

+

控制台输出

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-oELfpUxB-1645161085442)(https://github.com/Barry04/DelayingQueue/raw/main/image/3.png)]

+

总结

应该一直运行的,然后效果会好些,然后消息过期时间设置合理一些。更加直观一些。

+
+ + + +
文章作者: Barry
文章链接: http://barry04.github.io/2022/02/18/%E5%BB%B6%E6%97%B6%E9%98%9F%E5%88%97/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Barry

评论
\ No newline at end of file diff --git a/404.html b/404.html index 930b0b9..34f7df6 100644 --- a/404.html +++ b/404.html @@ -1,12 +1,12 @@ -页面没有找到 | Barry +页面没有找到 | Barry - + -
加载中...
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/archives/2020/index.html b/archives/2020/index.html new file mode 100644 index 0000000..8cbd1e6 --- /dev/null +++ b/archives/2020/index.html @@ -0,0 +1,238 @@ +时间轴 | Barry + + + + + + + +
加载中...
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/archives/2021/04/index.html b/archives/2021/04/index.html index 3f0594e..cc6640c 100644 --- a/archives/2021/04/index.html +++ b/archives/2021/04/index.html @@ -1,12 +1,12 @@ -归档 | Barry +时间轴 | Barry - + -
加载中...
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/archives/2021/index.html b/archives/2021/index.html index be3d283..7077453 100644 --- a/archives/2021/index.html +++ b/archives/2021/index.html @@ -1,12 +1,12 @@ -归档 | Barry +时间轴 | Barry - + -
加载中...
文章总览 - 22
2022
XmlUtil.readObjectFromXml的坑及解决方法
XmlUtil.readObjectFromXml的坑及解决方法
DelayingQueue
DelayingQueue
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/archives/2022/index.html b/archives/2022/index.html new file mode 100644 index 0000000..dd8325b --- /dev/null +++ b/archives/2022/index.html @@ -0,0 +1,238 @@ +时间轴 | Barry + + + + + + + +
加载中...
文章总览 - 22
2022
XmlUtil.readObjectFromXml的坑及解决方法
XmlUtil.readObjectFromXml的坑及解决方法
DelayingQueue
DelayingQueue
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/archives/index.html b/archives/index.html index 0cac8e2..64c7152 100644 --- a/archives/index.html +++ b/archives/index.html @@ -1,12 +1,12 @@ -归档 | Barry +时间轴 | Barry - + -
加载中...
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/categories/2020/index.html b/categories/2020/index.html new file mode 100644 index 0000000..f8d5632 --- /dev/null +++ b/categories/2020/index.html @@ -0,0 +1,238 @@ +分类: 2020 | Barry + + + + + + + +
加载中...
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/categories/2021/index.html b/categories/2021/index.html new file mode 100644 index 0000000..0a24d72 --- /dev/null +++ b/categories/2021/index.html @@ -0,0 +1,238 @@ +分类: 2021 | Barry + + + + + + + +
加载中...
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/categories/2021/page/2/index.html b/categories/2021/page/2/index.html new file mode 100644 index 0000000..805b490 --- /dev/null +++ b/categories/2021/page/2/index.html @@ -0,0 +1,238 @@ +分类: 2021 | Barry + + + + + + + +
加载中...
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/categories/2022/index.html b/categories/2022/index.html new file mode 100644 index 0000000..d6583e7 --- /dev/null +++ b/categories/2022/index.html @@ -0,0 +1,238 @@ +分类: 2022 | Barry + + + + + + + +
加载中...
分类 - 2022
2022
DelayingQueue
DelayingQueue
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/categories/Java/index.html b/categories/Java/index.html new file mode 100644 index 0000000..f2c489a --- /dev/null +++ b/categories/Java/index.html @@ -0,0 +1,238 @@ +分类: Java | Barry + + + + + + + +
加载中...
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/css/index.css b/css/index.css index 62a1c49..e7f0690 100644 --- a/css/index.css +++ b/css/index.css @@ -179,14 +179,14 @@ template { display: none } .limit-one-line, -#article-container .flink .flink-list > .flink-list-item a .flink-item-name, -#article-container .flink .flink-list > .flink-list-item a .flink-item-desc, +#article-container .flink .flink-item-name, +#article-container .flink .flink-item-desc, #aside-content .card-info .card-info-data > .card-info-data-item a .headline, #aside-content .card-archives ul.card-archive-list > .card-archive-list-item a span, #aside-content .card-categories ul.card-category-list > .card-category-list-item a span, #pagination .prev_info, #pagination .next_info, -#sidebar #sidebar-menus .site-data .data-item .data-item-link > a > div, +#sidebar #sidebar-menus .site-data .data-item > a > div, #sidebar #sidebar-menus .menus_items .site-page { overflow: hidden; -o-text-overflow: ellipsis; @@ -194,34 +194,144 @@ template { white-space: nowrap; } .limit-more-line, +.error404 #error-wrap .error-content .error-info .error_subtitle, .article-sort-item-title, #recent-posts > .recent-post-item >.recent-post-info > .article-title, #recent-posts > .recent-post-item >.recent-post-info > .content, -#error-wrap .error-content .error-info .error_subtitle, #aside-content .aside-list > .aside-list-item .content > .name, #aside-content .aside-list > .aside-list-item .content > .title, #aside-content .aside-list > .aside-list-item .content > .comment, #post-info .post-title, .relatedPosts > .relatedPosts-list .content .title, -figure.gallery-group p, -figure.gallery-group .gallery-group-name { +#article-container figure.gallery-group p, +#article-container figure.gallery-group .gallery-group-name { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; } .fontawesomeIcon, hr:before, +#article-container a.headerlink:after, #post .post-copyright:before, #post .post-outdate-notice:before, .note:not(.no-icon)::before { display: inline-block; font-weight: 600; - font-style: normal; - font-variant: normal; - font-family: 'Font Awesome 5 Free'; + font-family: 'Font Awesome 6 Free'; text-rendering: auto; -webkit-font-smoothing: antialiased; } +.cardHover, +.error404 #error-wrap .error-content, +.layout > div:first-child:not(.recent-posts), +#recent-posts > .recent-post-item, +#aside-content .card-widget, +.layout > .recent-posts .pagination > *:not(.space) { + border-radius: 8px; + background: var(--card-bg); + -webkit-box-shadow: var(--card-box-shadow); + box-shadow: var(--card-box-shadow); + -webkit-transition: all 0.3s; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -ms-transition: all 0.3s; + transition: all 0.3s; +} +.cardHover:hover, +.error404 #error-wrap .error-content:hover, +.layout > div:first-child:not(.recent-posts):hover, +#recent-posts > .recent-post-item:hover, +#aside-content .card-widget:hover, +.layout > .recent-posts .pagination > *:not(.space):hover { + -webkit-box-shadow: var(--card-hover-box-shadow); + box-shadow: var(--card-hover-box-shadow); +} +.imgHover, +.error404 #error-wrap .error-content .error-img img, +.article-sort-item-img img, +#recent-posts > .recent-post-item .post_cover img.post_bg, +#aside-content .aside-list > .aside-list-item .thumbnail > img { + width: 100%; + height: 100%; + -webkit-transition: filter 375ms ease-in 0.2s, -webkit-transform 0.6s; + -moz-transition: filter 375ms ease-in 0.2s, -moz-transform 0.6s; + -o-transition: filter 375ms ease-in 0.2s, -o-transform 0.6s; + -ms-transition: filter 375ms ease-in 0.2s, -ms-transform 0.6s; + transition: filter 375ms ease-in 0.2s, transform 0.6s; + object-fit: cover; +} +.imgHover:hover, +.error404 #error-wrap .error-content .error-img img:hover, +.article-sort-item-img img:hover, +#recent-posts > .recent-post-item .post_cover img.post_bg:hover, +#aside-content .aside-list > .aside-list-item .thumbnail > img:hover { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -o-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); +} +.postImgHover:hover img, +#pagination .prev-post:hover img, +#pagination .next-post:hover img, +.relatedPosts > .relatedPosts-list > div:hover img { + opacity: 0.8; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; + filter: alpha(opacity=80); + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -o-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); +} +.postImgHover img, +#pagination .prev-post img, +#pagination .next-post img, +.relatedPosts > .relatedPosts-list > div img { + position: absolute; + width: 100%; + height: 100%; + opacity: 0.4; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; + filter: alpha(opacity=40); + -webkit-transition: all 0.6s, filter 375ms ease-in 0.2s; + -moz-transition: all 0.6s, filter 375ms ease-in 0.2s; + -o-transition: all 0.6s, filter 375ms ease-in 0.2s; + -ms-transition: all 0.6s, filter 375ms ease-in 0.2s; + transition: all 0.6s, filter 375ms ease-in 0.2s; + object-fit: cover; +} +.list-beauty, +.category-lists ul { + list-style: none; +} +.list-beauty li, +.category-lists ul li { + position: relative; + padding: 0.12em 0.4em 0.12em 1.4em; +} +.list-beauty li:hover:before, +.category-lists ul li:hover:before { + border-color: var(--pseudo-hover); +} +.list-beauty li:before, +.category-lists ul li:before { + position: absolute; + top: 0.67em; + left: 0; + width: 0.43em; + height: 0.43em; + border: 0.215em solid #49b1f5; + border-radius: 0.43em; + background: transparent; + content: ''; + cursor: pointer; + -webkit-transition: all 0.3s ease-out; + -moz-transition: all 0.3s ease-out; + -o-transition: all 0.3s ease-out; + -ms-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} #content-inner, #footer { -webkit-animation: bottom-top 1s; @@ -239,11 +349,11 @@ hr:before, } #site-title, #site-subtitle { - -webkit-animation: titlescale 1s; - -moz-animation: titlescale 1s; - -o-animation: titlescale 1s; - -ms-animation: titlescale 1s; - animation: titlescale 1s; + -webkit-animation: titleScale 1s; + -moz-animation: titleScale 1s; + -o-animation: titleScale 1s; + -ms-animation: titleScale 1s; + animation: titleScale 1s; } #nav.show { -webkit-animation: headerNoOpacity 1s; @@ -268,40 +378,32 @@ canvas:not(#ribbon-canvas), animation: ribbon_to_show 4s; } #sidebar-menus.open > :nth-child(1) { - -webkit-animation: sidebarItem 0.2s; - -moz-animation: sidebarItem 0.2s; - -o-animation: sidebarItem 0.2s; - -ms-animation: sidebarItem 0.2s; - animation: sidebarItem 0.2s; + -webkit-animation: sidebarItem 0.2 s; + -moz-animation: sidebarItem 0.2 s; + -o-animation: sidebarItem 0.2 s; + -ms-animation: sidebarItem 0.2 s; + animation: sidebarItem 0.2 s; } #sidebar-menus.open > :nth-child(2) { - -webkit-animation: sidebarItem 0.4s; - -moz-animation: sidebarItem 0.4s; - -o-animation: sidebarItem 0.4s; - -ms-animation: sidebarItem 0.4s; - animation: sidebarItem 0.4s; + -webkit-animation: sidebarItem 0.4 s; + -moz-animation: sidebarItem 0.4 s; + -o-animation: sidebarItem 0.4 s; + -ms-animation: sidebarItem 0.4 s; + animation: sidebarItem 0.4 s; } #sidebar-menus.open > :nth-child(3) { - -webkit-animation: sidebarItem 0.6s; - -moz-animation: sidebarItem 0.6s; - -o-animation: sidebarItem 0.6s; - -ms-animation: sidebarItem 0.6s; - animation: sidebarItem 0.6s; + -webkit-animation: sidebarItem 0.6 s; + -moz-animation: sidebarItem 0.6 s; + -o-animation: sidebarItem 0.6 s; + -ms-animation: sidebarItem 0.6 s; + animation: sidebarItem 0.6 s; } #sidebar-menus.open > :nth-child(4) { - -webkit-animation: sidebarItem 0.8s; - -moz-animation: sidebarItem 0.8s; - -o-animation: sidebarItem 0.8s; - -ms-animation: sidebarItem 0.8s; - animation: sidebarItem 0.8s; -} -.card-announcement-animation { - color: #f00; - -webkit-animation: announ_animation 0.8s linear infinite; - -moz-animation: announ_animation 0.8s linear infinite; - -o-animation: announ_animation 0.8s linear infinite; - -ms-animation: announ_animation 0.8s linear infinite; - animation: announ_animation 0.8s linear infinite; + -webkit-animation: sidebarItem 0.8 s; + -moz-animation: sidebarItem 0.8 s; + -o-animation: sidebarItem 0.8 s; + -ms-animation: sidebarItem 0.8 s; + animation: sidebarItem 0.8 s; } .scroll-down-effects { -webkit-animation: scroll-down-effect 1.5s infinite; @@ -558,61 +660,61 @@ canvas:not(#ribbon-canvas), } @-moz-keyframes bottom-top { 0% { + margin-top: 50px; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); - margin-top: 50px; } 100% { + margin-top: 0; opacity: 1; -ms-filter: none; filter: none; - margin-top: 0; } } @-webkit-keyframes bottom-top { 0% { + margin-top: 50px; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); - margin-top: 50px; } 100% { + margin-top: 0; opacity: 1; -ms-filter: none; filter: none; - margin-top: 0; } } @-o-keyframes bottom-top { 0% { + margin-top: 50px; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); - margin-top: 50px; } 100% { + margin-top: 0; opacity: 1; -ms-filter: none; filter: none; - margin-top: 0; } } @keyframes bottom-top { 0% { + margin-top: 50px; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); - margin-top: 50px; } 100% { + margin-top: 0; opacity: 1; -ms-filter: none; filter: none; - margin-top: 0; } } -@-moz-keyframes titlescale { +@-moz-keyframes titleScale { 0% { opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; @@ -634,7 +736,7 @@ canvas:not(#ribbon-canvas), transform: scale(1); } } -@-webkit-keyframes titlescale { +@-webkit-keyframes titleScale { 0% { opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; @@ -656,7 +758,7 @@ canvas:not(#ribbon-canvas), transform: scale(1); } } -@-o-keyframes titlescale { +@-o-keyframes titleScale { 0% { opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; @@ -678,7 +780,7 @@ canvas:not(#ribbon-canvas), transform: scale(1); } } -@keyframes titlescale { +@keyframes titleScale { 0% { opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; @@ -1172,70 +1274,6 @@ canvas:not(#ribbon-canvas), transform: translateY(0); } } -@-moz-keyframes announ_animation { - 0%, to { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -o-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - 50% { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); - } -} -@-webkit-keyframes announ_animation { - 0%, to { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -o-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - 50% { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); - } -} -@-o-keyframes announ_animation { - 0%, to { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -o-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - 50% { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); - } -} -@keyframes announ_animation { - 0%, to { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -o-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - 50% { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); - } -} @-moz-keyframes sidebarItem { 0% { -webkit-transform: translateX(200px); @@ -1321,20 +1359,20 @@ canvas:not(#ribbon-canvas), --btn-hover-color: #ff7242; --btn-color: #fff; --btn-bg: #49b1f5; - --text-bg-hover: #49b1f5; + --text-bg-hover: rgba(73,177,245,0.7); --light-grey: #eee; + --dark-grey: #cacaca; --white: #fff; --text-highlight-color: #1f2d3d; --blockquote-color: #6a737d; --blockquote-bg: rgba(73,177,245,0.1); --reward-pop: #f5f5f5; --toc-link-color: #666261; - --card-box-shadow: 0 3px 8px 6px rgba(7,17,27,0.06); - --card-hover-box-shadow: 0 3px 8px 6px rgba(7,17,27,0.15); -} -html { - height: 100%; - font-size: 20px; + --card-box-shadow: 0 3px 8px 6px rgba(7,17,27,0.05); + --card-hover-box-shadow: 0 3px 8px 6px rgba(7,17,27,0.09); + --pseudo-hover: #ff7242; + --headline-presudo: #a0a0a0; + --scrollbar-color: #49b1f5; } body { position: relative; @@ -1342,7 +1380,7 @@ body { background: var(--global-bg); color: var(--font-color); font-size: var(--global-font-size); - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Lato, Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif; + font-family: sleek; line-height: 2; -webkit-tap-highlight-color: rgba(0,0,0,0); } @@ -1351,11 +1389,15 @@ body { height: 8px; } *::-webkit-scrollbar-thumb { - background: var(--btn-bg); + background: var(--scrollbar-color); } *::-webkit-scrollbar-track { background-color: transparent; } +* { + scrollbar-width: thin; + scrollbar-color: var(--scrollbar-color) transparent; +} input::placeholder { color: var(--font-color); } @@ -1366,7 +1408,7 @@ h4, h5, h6 { position: relative; - margin: 1rem 0 0.7rem; + margin: 20px 0 14px; color: var(--text-highlight-color); font-weight: bold; } @@ -1385,7 +1427,7 @@ h6 code { } hr { position: relative; - margin: 2rem auto; + margin: 40px auto; border: 2px dashed var(--hr-border); width: calc(100% - 4px); } @@ -1409,7 +1451,7 @@ hr:before { } .table-wrap { overflow-x: scroll; - margin: 0 0 1rem; + margin: 0 0 20px; } table { display: table; @@ -1423,7 +1465,7 @@ table thead { } table th, table td { - padding: 0.3rem 0.6rem; + padding: 6px 12px; border: 1px solid var(--light-grey); vertical-align: middle; } @@ -1437,6 +1479,7 @@ button { border: none; background: none; cursor: pointer; + touch-action: manipulation; } a { color: #99a9bf; @@ -1467,60 +1510,6 @@ a:hover { .pull-right { float: right; } -.button--animated { - position: relative; - z-index: 1; - -webkit-transition: color 1s; - -moz-transition: color 1s; - -o-transition: color 1s; - -ms-transition: color 1s; - transition: color 1s; -} -.button--animated:before { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: -1; - background: var(--btn-hover-color); - content: ''; - -webkit-transition: -webkit-transform 0.5s ease-out; - -moz-transition: -moz-transform 0.5s ease-out; - -o-transition: -o-transform 0.5s ease-out; - -ms-transition: -ms-transform 0.5s ease-out; - transition: transform 0.5s ease-out; - -webkit-transform: scaleX(0); - -moz-transform: scaleX(0); - -o-transform: scaleX(0); - -ms-transform: scaleX(0); - transform: scaleX(0); - -webkit-transform-origin: 0 50%; - -moz-transform-origin: 0 50%; - -o-transform-origin: 0 50%; - -ms-transform-origin: 0 50%; - transform-origin: 0 50%; -} -.button--animated:hover:before { - -webkit-transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66); - -moz-transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66); - -o-transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66); - -ms-transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66); - transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66); - -webkit-transform: scaleX(1); - -moz-transform: scaleX(1); - -o-transform: scaleX(1); - -ms-transform: scaleX(1); - transform: scaleX(1); -} -img { - max-width: 100%; - -webkit-transition: all 0.2s; - -moz-transition: all 0.2s; - -o-transition: all 0.2s; - -ms-transition: all 0.2s; - transition: all 0.2s; -} img[src=''], img:not([src]) { opacity: 0; @@ -1528,12 +1517,26 @@ img:not([src]) { filter: alpha(opacity=0); } .img-alt { - margin: -0.5rem 0 0.5rem; + margin: -10px 0 10px; color: #858585; } .img-alt:hover { text-decoration: none !important; } +blockquote { + margin: 0 0 20px; + padding: 12px 15px; + border-left: 3px solid #49b1f5; + background-color: var(--blockquote-bg); + color: var(--blockquote-color); +} +blockquote footer cite:before { + padding: 0 5px; + content: '—'; +} +blockquote > :last-child { + margin-bottom: 0 !important; +} :root { --hl-color: #90a4ae; --hl-bg: #f6f8fa; @@ -1544,6 +1547,9 @@ img:not([src]) { --hlscrollbar-bg: #dce4eb; --hlexpand-bg: linear-gradient(180deg, rgba(246,248,250,0.6), rgba(246,248,250,0.9)); } +figure.highlight table { + scrollbar-color: var(--hlscrollbar-bg) transparent; +} figure.highlight table::-webkit-scrollbar-thumb { background: var(--hlscrollbar-bg); } @@ -1632,54 +1638,33 @@ figure.highlight pre .javascript .function { border: none; } #article-container figure.highlight .gutter pre { - padding-right: 0.5rem; - padding-left: 0.5rem; + padding-right: 10px; + padding-left: 10px; background-color: var(--hlnumber-bg); color: var(--hlnumber-color); text-align: right; } #article-container figure.highlight .code pre { - padding-right: 0.5rem; - padding-left: 0.5rem; + padding-right: 10px; + padding-left: 10px; width: 100%; } #article-container pre, #article-container figure.highlight { overflow: auto; - margin: 0 0 1rem; + margin: 0 0 20px; padding: 0; background: var(--hl-bg); color: var(--hl-color); line-height: 1.6; } -blockquote { - margin: 0 0 1rem; - padding: 0.1rem 0.8rem; - border-left: 0.2rem solid #49b1f5; - background-color: var(--blockquote-bg); - color: var(--blockquote-color); -} -blockquote a { - word-break: break-all; -} -blockquote p { - margin: 0 !important; - padding: 0.5rem 0; -} -blockquote footer { - padding: 0 0 0.5rem; -} -blockquote footer cite:before { - padding: 0 0.3em; - content: '—'; -} #article-container pre, #article-container code { font-size: var(--global-font-size); - font-family: consolas, Menlo, 'PingFang SC', 'Microsoft YaHei', sans-serif !important; + font-family: sleek !important; } #article-container code { - padding: 0.1rem 0.2rem; + padding: 2px 4px; background: rgba(27,31,35,0.05); color: #f47466; } @@ -1702,7 +1687,7 @@ blockquote footer cite:before { } #article-container figure.highlight figcaption, #article-container figure.highlight .caption { - padding: 0.3rem 0 0.1rem 0.7rem; + padding: 6px 0 2px 14px; font-size: var(--global-font-size); line-height: 1em; } @@ -1731,18 +1716,18 @@ blockquote footer cite:before { -webkit-align-items: center; align-items: center; overflow: hidden; - min-height: 1.2rem; + min-height: 24px; height: 2.15em; background: var(--hltools-bg); color: var(--hltools-color); font-size: var(--global-font-size); } -#article-container .highlight-tools.closed + table { +#article-container .highlight-tools.closed ~ * { display: none; } #article-container .highlight-tools .expand { position: absolute; - padding: 0.4rem 0.7rem; + padding: 0.57em 0.7em; cursor: pointer; -webkit-transition: -webkit-transform 0.3s; -moz-transition: -moz-transform 0.3s; @@ -1751,7 +1736,7 @@ blockquote footer cite:before { transition: transform 0.3s; } #article-container .highlight-tools .expand + .code-lang { - left: 1.7rem; + left: 1.7em; } #article-container .highlight-tools .expand.closed { -webkit-transition: all 0.3s; @@ -1767,7 +1752,7 @@ blockquote footer cite:before { } #article-container .highlight-tools .code-lang { position: absolute; - left: 0.7rem; + left: 14px; text-transform: uppercase; font-weight: bold; font-size: 1.15em; @@ -1778,7 +1763,7 @@ blockquote footer cite:before { } #article-container .highlight-tools .copy-notice { position: absolute; - right: 1.7rem; + right: 2.4em; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); @@ -1790,7 +1775,7 @@ blockquote footer cite:before { } #article-container .highlight-tools .copy-button { position: absolute; - right: 0.7rem; + right: 14px; cursor: pointer; -webkit-transition: color 0.2s; -moz-transition: color 0.2s; @@ -1881,33 +1866,124 @@ blockquote footer cite:before { filter: alpha(opacity=60); } } +.error404 #error-wrap { + position: absolute; + top: 50%; + right: 0; + left: 0; + margin: 0 auto; + padding: 60px 20px 0; + max-width: 1000px; + -webkit-transform: translate(0, -50%); + -moz-transform: translate(0, -50%); + -o-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + transform: translate(0, -50%); +} +.error404 #error-wrap .error-content { + overflow: hidden; + margin: 0 20px; + height: 360px; +} +@media screen and (max-width: 768px) { + .error404 #error-wrap .error-content { + margin: 0; + height: 500px; + } +} +.error404 #error-wrap .error-content .error-img { + display: inline-block; + overflow: hidden; + width: 50%; + height: 100%; +} +@media screen and (max-width: 768px) { + .error404 #error-wrap .error-content .error-img { + width: 100%; + height: 45%; + } +} +.error404 #error-wrap .error-content .error-img img { + background-color: #49b1f5; +} +.error404 #error-wrap .error-content .error-info { + display: -webkit-inline-box; + display: -moz-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-box; + display: inline-flex; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -o-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: center; + -moz-box-pack: center; + -o-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -ms-flex-line-pack: center; + -webkit-align-content: center; + align-content: center; + width: 50%; + height: 100%; + vertical-align: top; + text-align: center; +} +@media screen and (max-width: 768px) { + .error404 #error-wrap .error-content .error-info { + width: 100%; + height: 55%; + } +} +.error404 #error-wrap .error-content .error-info .error_title { + margin-top: -0.6em; + font-size: 9em; +} +@media screen and (max-width: 768px) { + .error404 #error-wrap .error-content .error-info .error_title { + font-size: 8em; + } +} +.error404 #error-wrap .error-content .error-info .error_subtitle { + margin-top: -3em; + word-break: break-word; + font-size: 1.6em; + -webkit-line-clamp: 2; +} +.error404 + #rightside { + display: none; +} .article-sort { - margin-left: 0.5rem; - padding-left: 1rem; + margin-left: 10px; + padding-left: 20px; border-left: 2px solid #aadafa; } .article-sort-title { position: relative; - margin-left: 0.5rem; - padding-bottom: 1rem; - padding-left: 1rem; + margin-left: 10px; + padding-bottom: 20px; + padding-left: 20px; font-size: 1.72em; } .article-sort-title:hover:before { - border-color: #ff7242; + border-color: var(--pseudo-hover); } .article-sort-title:before { position: absolute; - top: calc(((100% - 1.8rem) / 2)); - left: -0.45rem; + top: calc(((100% - 36px) / 2)); + left: -9px; z-index: 1; - width: 0.5rem; - height: 0.5rem; - border: 0.25rem solid #49b1f5; - border-radius: 0.5rem; + width: 10px; + height: 10px; + border: 5px solid #49b1f5; + border-radius: 10px; background: var(--card-bg); content: ''; - line-height: 0.5rem; + line-height: 10px; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; @@ -1919,7 +1995,7 @@ blockquote footer cite:before { bottom: 0; left: 0; z-index: 0; - width: 0.1rem; + width: 2px; height: 1.5em; background: #aadafa; content: ''; @@ -1938,7 +2014,7 @@ blockquote footer cite:before { -ms-flex-align: center; -webkit-align-items: center; align-items: center; - margin: 0 0 1rem 0.5rem; + margin: 0 0 20px 10px; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; @@ -1946,15 +2022,15 @@ blockquote footer cite:before { transition: all 0.2s ease-in-out; } .article-sort-item:hover:before { - border-color: #ff7242; + border-color: var(--pseudo-hover); } .article-sort-item:before { position: absolute; - left: calc(-1rem - 17px); - width: 0.3rem; - height: 0.3rem; - border: 0.15rem solid #49b1f5; - border-radius: 0.3rem; + left: calc(-20px - 17px); + width: 6px; + height: 6px; + border: 3px solid #49b1f5; + border-radius: 6px; background: var(--card-bg); content: ''; -webkit-transition: all 0.2s ease-in-out; @@ -1976,14 +2052,14 @@ blockquote footer cite:before { border-color: #49b1f5; } .article-sort-item.year:before { - border-color: #ff7242; + border-color: var(--pseudo-hover); } .article-sort-item-time { color: #858585; font-size: 95%; } .article-sort-item-time time { - padding-left: 0.3rem; + padding-left: 6px; cursor: default; } .article-sort-item-title { @@ -2009,23 +2085,6 @@ blockquote footer cite:before { width: 80px; height: 80px; } -.article-sort-item-img img { - width: 100%; - height: 100%; - -webkit-transition: all 0.6s; - -moz-transition: all 0.6s; - -o-transition: all 0.6s; - -ms-transition: all 0.6s; - transition: all 0.6s; - object-fit: cover; -} -.article-sort-item-img img:hover { - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -o-transform: scale(1.1); - -ms-transform: scale(1.1); - transform: scale(1.1); -} .article-sort-item-info { -webkit-box-flex: 1; -moz-box-flex: 1; @@ -2034,73 +2093,60 @@ blockquote footer cite:before { -webkit-flex: 1; -ms-flex: 1; flex: 1; - padding: 0 0.8rem; -} -#page .category-lists { - padding: 1rem 0 1.5rem; -} -@media screen and (max-width: 768px) { - #page .category-lists { - padding: 0; - } + padding: 0 16px; } -#page .category-lists .category-title { +.category-lists .category-title { font-size: 2.57em; } @media screen and (max-width: 768px) { - #page .category-lists .category-title { + .category-lists .category-title { font-size: 2em; } } -#page .category-lists .category-list a { +.category-lists .category-list { + margin-bottom: 0; +} +.category-lists .category-list a { color: var(--font-color); } -#page .category-lists .category-list a:hover { +.category-lists .category-list a:hover { color: #49b1f5; } -#page .category-lists .category-list .category-list-count { - margin-left: 0.4rem; +.category-lists .category-list .category-list-count { + margin-left: 8px; color: #858585; } -#page .category-lists .category-list .category-list-count:before { +.category-lists .category-list .category-list-count:before { content: '('; } -#page .category-lists .category-list .category-list-count:after { +.category-lists .category-list .category-list-count:after { content: ')'; } -#page .category-lists ul { - margin-top: 0.4rem; - padding: 0 0 0 1rem; - list-style: none; - counter-reset: li; +.category-lists ul { + padding: 0 0 0 20px; } -#page .category-lists ul ul { - padding-left: 0.2rem; +.category-lists ul ul { + padding-left: 4px; } -#page .category-lists ul li { +.category-lists ul li { position: relative; - margin: 0.3rem 0; + margin: 6px 0; padding: 0.12em 0.4em 0.12em 1.4em; } -#page .category-lists ul li:before { - position: absolute; - left: 0; - cursor: pointer; - -webkit-transition: all 0.3s ease-out; - -moz-transition: all 0.3s ease-out; - -o-transition: all 0.3s ease-out; - -ms-transition: all 0.3s ease-out; - transition: all 0.3s ease-out; - top: 0.7em; - width: 0.43em; - height: 0.43em; - border: 0.215em solid #49b1f5; - border-radius: 0.43em; - background: transparent; - content: ''; -} -#page .category-lists ul li:hover:before { - border-color: #ff7242; +#body-wrap { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: box; + display: flex; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -o-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + min-height: 100vh; } .layout { display: -webkit-box; @@ -2109,9 +2155,17 @@ blockquote footer cite:before { display: -ms-flexbox; display: box; display: flex; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; + -webkit-flex: 1 auto; + -ms-flex: 1 auto; + flex: 1 auto; margin: 0 auto; - padding: 2rem 15px; + padding: 40px 15px; max-width: 1200px; + width: 100%; } @media screen and (max-width: 900px) { .layout { @@ -2125,7 +2179,7 @@ blockquote footer cite:before { } @media screen and (max-width: 768px) { .layout { - padding: 1rem 5px; + padding: 20px 5px; } } @media screen and (min-width: 2000px) { @@ -2138,22 +2192,14 @@ blockquote footer cite:before { align-self: flex-start; -ms-flex-item-align: start; padding: 50px 40px; - border-radius: 8px; - background: var(--card-bg); - -webkit-box-shadow: var(--card-box-shadow); - box-shadow: var(--card-box-shadow); -} -.layout > div:first-child:not(.recent-posts):hover { - -webkit-box-shadow: var(--card-hover-box-shadow); - box-shadow: var(--card-hover-box-shadow); } @media screen and (max-width: 768px) { .layout > div:first-child:not(.recent-posts) { - padding: 1.8rem 0.7rem !important; + padding: 36px 14px; } } .layout > div:first-child { - width: 75%; + width: 74%; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -o-transition: all 0.3s; @@ -2176,8 +2222,20 @@ blockquote footer cite:before { .layout.hide-aside > div { width: 100% !important; } -#article-container .flink .flink-desc { - margin: 0.2rem 0 0.5rem; +.apple #page-header.full_page { + background-attachment: scroll !important; +} +.apple .recent-post-item, +.apple .avatar-img, +.apple .flink-item-icon { + -webkit-transform: translateZ(0); + -moz-transform: translateZ(0); + -o-transform: translateZ(0); + -ms-transform: translateZ(0); + transform: translateZ(0); +} +#article-container .flink { + margin-bottom: 20px; } #article-container .flink .flink-list { overflow: auto; @@ -2205,12 +2263,9 @@ blockquote footer cite:before { width: calc(100% - 15px) !important; } } -#article-container .flink .flink-list > .flink-list-item:hover img { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -o-transform: rotate(360deg); - -ms-transform: rotate(360deg); - transform: rotate(360deg); +#article-container .flink .flink-list > .flink-list-item:hover .flink-item-icon { + margin-left: -10px; + width: 0; } #article-container .flink .flink-list > .flink-list-item:before { position: absolute; @@ -2245,36 +2300,50 @@ blockquote footer cite:before { color: var(--font-color); text-decoration: none; } -#article-container .flink .flink-list > .flink-list-item a img { +#article-container .flink .flink-list > .flink-list-item a .flink-item-icon { float: left; + overflow: hidden; margin: 15px 10px; width: 60px; height: 60px; border-radius: 35px; - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; - -ms-transition: all 0.3s; - transition: all 0.3s; + -webkit-transition: width 0.3s ease-out; + -moz-transition: width 0.3s ease-out; + -o-transition: width 0.3s ease-out; + -ms-transition: width 0.3s ease-out; + transition: width 0.3s ease-out; +} +#article-container .flink .flink-list > .flink-list-item a .flink-item-icon img { + width: 100%; + height: 100%; + -webkit-transition: filter 375ms ease-in 0.2s, -webkit-transform 0.3s; + -moz-transition: filter 375ms ease-in 0.2s, -moz-transform 0.3s; + -o-transition: filter 375ms ease-in 0.2s, -o-transform 0.3s; + -ms-transition: filter 375ms ease-in 0.2s, -ms-transform 0.3s; + transition: filter 375ms ease-in 0.2s, transform 0.3s; + object-fit: cover; } #article-container .flink .flink-list > .flink-list-item a .img-alt { display: none; } -#article-container .flink .flink-list > .flink-list-item a .flink-item-name { - display: block; +#article-container .flink .flink-item-name { padding: 16px 10px 0 0; height: 40px; font-weight: bold; font-size: 1.43em; } -#article-container .flink .flink-list > .flink-list-item a .flink-item-desc { - display: block; +#article-container .flink .flink-item-desc { padding: 16px 10px 16px 0; height: 50px; font-size: 0.93em; } +#article-container .flink .flink-name { + margin-bottom: 5px; + font-weight: bold; + font-size: 1.5em; +} #recent-posts > .recent-post-item:not(:first-child) { - margin-top: 1rem; + margin-top: 20px; } #recent-posts > .recent-post-item { display: -webkit-box; @@ -2295,26 +2364,20 @@ blockquote footer cite:before { -ms-flex-align: center; -webkit-align-items: center; align-items: center; - height: 20em; - border-radius: 12px 8px 8px 12px; - background: var(--card-bg); - -webkit-box-shadow: var(--card-box-shadow); - box-shadow: var(--card-box-shadow); - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; - -ms-transition: all 0.3s; - transition: all 0.3s; + overflow: hidden; + height: 18em; } @media screen and (max-width: 768px) { #recent-posts > .recent-post-item { - border-radius: 12px 12px 8px 8px; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -o-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + height: auto; } } -#recent-posts > .recent-post-item:hover { - -webkit-box-shadow: var(--card-hover-box-shadow); - box-shadow: var(--card-hover-box-shadow); -} #recent-posts > .recent-post-item:hover img.post_bg { -webkit-transform: scale(1.1); -moz-transform: scale(1.1); @@ -2322,56 +2385,58 @@ blockquote footer cite:before { -ms-transform: scale(1.1); transform: scale(1.1); } -#recent-posts > .recent-post-item .left_radius { - border-radius: 8px 0 0 8px; -} -#recent-posts > .recent-post-item .right_radius { - -webkit-box-ordinal-group: 2; - -moz-box-ordinal-group: 2; - -o-box-ordinal-group: 2; - -ms-flex-order: 2; - -webkit-order: 2; - order: 2; - border-radius: 0 8px 8px 0; -} #recent-posts > .recent-post-item.ads-wrap { display: block !important; height: auto !important; } #recent-posts > .recent-post-item .post_cover { overflow: hidden; - width: 45%; + width: 44%; height: 100%; - -webkit-mask-image: -webkit-radial-gradient(#fff, #000); } -#recent-posts > .recent-post-item .post_cover img.post_bg { - width: 100%; - height: 100%; - -webkit-transition: all 0.6s; - -moz-transition: all 0.6s; - -o-transition: all 0.6s; - -ms-transition: all 0.6s; - transition: all 0.6s; - object-fit: cover; +@media screen and (max-width: 768px) { + #recent-posts > .recent-post-item .post_cover { + width: 100%; + height: 230px; + } } -#recent-posts > .recent-post-item .post_cover img.post_bg:hover { - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -o-transform: scale(1.1); - -ms-transform: scale(1.1); - transform: scale(1.1); +#recent-posts > .recent-post-item .post_cover.right { + -webkit-box-ordinal-group: 1; + -moz-box-ordinal-group: 1; + -o-box-ordinal-group: 1; + -ms-flex-order: 1; + -webkit-order: 1; + order: 1; +} +@media screen and (max-width: 768px) { + #recent-posts > .recent-post-item .post_cover.right { + -webkit-box-ordinal-group: 0; + -moz-box-ordinal-group: 0; + -o-box-ordinal-group: 0; + -ms-flex-order: 0; + -webkit-order: 0; + order: 0; + } } #recent-posts > .recent-post-item >.recent-post-info { - display: inline-block; - overflow: hidden; padding: 0 40px; - width: 55%; + width: 57%; +} +@media screen and (max-width: 768px) { + #recent-posts > .recent-post-item >.recent-post-info { + padding: 20px 20px 30px; + width: 100%; + } } #recent-posts > .recent-post-item >.recent-post-info.no-cover { width: 100%; } +@media screen and (max-width: 768px) { + #recent-posts > .recent-post-item >.recent-post-info.no-cover { + padding: 30px 20px; + } +} #recent-posts > .recent-post-item >.recent-post-info > .article-title { - margin-bottom: 0.3rem; color: var(--text-highlight-color); font-size: 1.72em; line-height: 1.4; @@ -2382,10 +2447,16 @@ blockquote footer cite:before { transition: all 0.2s ease-in-out; -webkit-line-clamp: 2; } +@media screen and (max-width: 768px) { + #recent-posts > .recent-post-item >.recent-post-info > .article-title { + font-size: 1.43em; + } +} #recent-posts > .recent-post-item >.recent-post-info > .article-title:hover { color: #49b1f5; } #recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap { + margin: 6px 0; color: #858585; font-size: 90%; } @@ -2396,19 +2467,16 @@ blockquote footer cite:before { color: #ff7242; } #recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap i { - margin: 0 0.2rem 0 0; + margin: 0 4px 0 0; } #recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap .article-meta-label { - padding-right: 0.2rem; -} -#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap .article-meta__separator { - margin: 0 0.3rem; + padding-right: 4px; } -#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap .article-meta__link { - margin: 0 0.2rem; +#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap .article-meta-separator { + margin: 0 6px; } -#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap .fa-angle-right { - margin: 0 0.2rem; +#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap .article-meta-link { + margin: 0 4px; } #recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap a { color: #858585; @@ -2418,53 +2486,11 @@ blockquote footer cite:before { text-decoration: underline; } #recent-posts > .recent-post-item >.recent-post-info > .content { - margin-top: 0.3rem; - -webkit-line-clamp: 3; -} -@media screen and (max-width: 768px) { - #recent-posts .recent-post-item { - -webkit-box-orient: vertical; - -moz-box-orient: vertical; - -o-box-orient: vertical; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - height: auto !important; - } - #recent-posts .recent-post-item .post_cover { - -webkit-box-ordinal-group: 1 !important; - -moz-box-ordinal-group: 1 !important; - -o-box-ordinal-group: 1 !important; - -ms-flex-order: 1 !important; - -webkit-order: 1 !important; - order: 1 !important; - width: 100%; - height: 230px; - border-radius: 8px 8px 0 0; - } - #recent-posts .recent-post-item .recent-post-info { - -webkit-box-ordinal-group: 2 !important; - -moz-box-ordinal-group: 2 !important; - -o-box-ordinal-group: 2 !important; - -ms-flex-order: 2 !important; - -webkit-order: 2 !important; - order: 2 !important; - padding: 1rem 1rem 1.5rem; - width: 100%; - } - #recent-posts .recent-post-item .recent-post-info.no-cover { - padding: 1.5rem 1rem; - } - #recent-posts .recent-post-item .recent-post-info .article-title { - font-size: 1.43em; - } - #recent-posts .recent-post-item .recent-post-info .content { - height: auto; - } + -webkit-line-clamp: 2; } .tag-cloud-list a { display: inline-block; - padding: 0 0.4rem; + padding: 0 8px; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -o-transition: all 0.3s; @@ -2492,155 +2518,11 @@ blockquote footer cite:before { font-size: 2em; } } -#error-wrap { - position: absolute; - top: 50%; - right: 0; - left: 0; - margin: 0 auto; - padding: 0 1rem; - max-width: 1000px; - -webkit-transform: translate(0, -50%); - -moz-transform: translate(0, -50%); - -o-transform: translate(0, -50%); - -ms-transform: translate(0, -50%); - transform: translate(0, -50%); -} -#error-wrap .error-content { - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; - -webkit-box-orient: horizontal; - -moz-box-orient: horizontal; - -o-box-orient: horizontal; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-box-pack: center; - -moz-box-pack: center; - -o-box-pack: center; - -ms-flex-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -moz-box-align: center; - -o-box-align: center; - -ms-flex-align: center; - -webkit-align-items: center; - align-items: center; - margin: 0 1rem; - height: 18rem; - border-radius: 8px; - background: var(--card-bg); - -webkit-box-shadow: var(--card-box-shadow); - box-shadow: var(--card-box-shadow); - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; - -ms-transition: all 0.3s; - transition: all 0.3s; -} -#error-wrap .error-content:hover { - -webkit-box-shadow: var(--card-hover-box-shadow); - box-shadow: var(--card-hover-box-shadow); -} -@media screen and (max-width: 768px) { - #error-wrap .error-content { - -webkit-box-orient: vertical; - -moz-box-orient: vertical; - -o-box-orient: vertical; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - margin: 0; - height: 25rem; - } -} -#error-wrap .error-content .error-img { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -o-box-flex: 1; - box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - height: 100%; - border-top-left-radius: 8px; - border-bottom-left-radius: 8px; - background-color: #49b1f5; - background-position: center; - -webkit-background-size: cover; - -moz-background-size: cover; - background-size: cover; -} -@media screen and (max-width: 768px) { - #error-wrap .error-content .error-img { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -o-box-flex: 1; - box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - width: 100%; - border-top-right-radius: 8px; - border-bottom-left-radius: 0; - } -} -#error-wrap .error-content .error-info { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -o-box-flex: 1; - box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - padding: 0.5rem; - text-align: center; - font-size: 14px; -} -@media screen and (max-width: 768px) { - #error-wrap .error-content .error-info { - -webkit-box-flex: 1.1; - -moz-box-flex: 1.1; - -o-box-flex: 1.1; - box-flex: 1.1; - -webkit-flex: 1.1; - -ms-flex: 1.1; - flex: 1.1; - width: 100%; - } -} -#error-wrap .error-content .error-info .error_title { - margin-top: -4rem; - font-size: 9em; -} -@media screen and (max-width: 768px) { - #error-wrap .error-content .error-info .error_title { - margin-top: -3rem; - } -} -#error-wrap .error-content .error-info .error_subtitle { - margin-top: -3.5rem; - word-break: break-word; - font-size: 1.6em; - -webkit-line-clamp: 2; -} -#error-wrap .error-content .error-info a { - display: inline-block; - margin-top: 0.5rem; - padding: 0.3rem 1.5rem; - background: var(--btn-bg); - color: var(--btn-color); -} -#error-wrap .error-content .error-info a i { - padding-right: 0.3rem; +h1.page-title + .tag-cloud-list { + text-align: left; } #aside-content { - width: 25%; + width: 26%; } @media screen and (min-width: 900px) { #aside-content { @@ -2657,55 +2539,25 @@ blockquote footer cite:before { } @media screen and (max-width: 900px) { #aside-content > .card-widget:first-child { - margin-top: 1rem; + margin-top: 20px; } } #aside-content .card-widget { position: relative; overflow: hidden; - margin-top: 1rem; - padding: 1rem 1.2rem; - border-radius: 8px; - background: var(--card-bg); - -webkit-box-shadow: var(--card-box-shadow); - box-shadow: var(--card-box-shadow); - -webkit-transition: box-shadow 0.3s; - -moz-transition: box-shadow 0.3s; - -o-transition: box-shadow 0.3s; - -ms-transition: box-shadow 0.3s; - transition: box-shadow 0.3s; -} -#aside-content .card-widget:hover { - -webkit-box-shadow: var(--card-hover-box-shadow); - box-shadow: var(--card-hover-box-shadow); -} -#aside-content .card-info img { - width: 110px; - height: 110px; - border-radius: 70px; - -webkit-transition: all 0.5s; - -moz-transition: all 0.5s; - -o-transition: all 0.5s; - -ms-transition: all 0.5s; - transition: all 0.5s; -} -#aside-content .card-info img:hover { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -o-transform: rotate(360deg); - -ms-transform: rotate(360deg); - transform: rotate(360deg); + margin-top: 20px; + padding: 20px 24px; } #aside-content .card-info .author-info__name { font-weight: 500; font-size: 1.57em; } #aside-content .card-info .author-info__description { - margin-top: -0.3rem; + margin-top: -0.42em; } #aside-content .card-info .card-info-data { display: table; - margin: 0.7rem 0 0.2rem; + margin: 14px 0 4px; width: 100%; table-layout: fixed; } @@ -2717,18 +2569,17 @@ blockquote footer cite:before { font-size: 1em; } #aside-content .card-info .card-info-data > .card-info-data-item a .length-num { - margin-top: -0.3rem; + margin-top: -0.42em; color: var(--text-highlight-color); font-size: 1.4em; } #aside-content .card-info .card-info-social-icons { - margin: 0.3rem 0 -0.3rem; + margin: 6px 0 -6px; } #aside-content .card-info .card-info-social-icons .social-icon { - margin: 0 0.5rem; + margin: 0 10px; color: var(--font-color); font-size: 1.4em; - cursor: pointer; } #aside-content .card-info .card-info-social-icons i { -webkit-transition: all 0.3s; @@ -2746,21 +2597,24 @@ blockquote footer cite:before { } #aside-content .card-info #card-info-btn { display: block; - margin-top: 0.7rem; + margin-top: 14px; background-color: var(--btn-bg); color: var(--btn-color); text-align: center; line-height: 2.4; } +#aside-content .card-info #card-info-btn:hover { + background-color: var(--btn-hover-color); +} #aside-content .card-info #card-info-btn span { - padding-left: 0.5rem; + padding-left: 10px; } #aside-content .item-headline { - padding-bottom: 0.3rem; + padding-bottom: 6px; font-size: 1.2em; } #aside-content .item-headline span { - margin-left: 0.5rem; + margin-left: 6px; } @media screen and (min-width: 900px) { #aside-content .sticky_layout { @@ -2776,14 +2630,14 @@ blockquote footer cite:before { } #aside-content .card-tag-cloud a { display: inline-block; - padding: 0 0.2rem; + padding: 0 4px; } #aside-content .card-tag-cloud a:hover { color: #49b1f5 !important; } #aside-content .aside-list > span { display: block; - margin-bottom: 0.5rem; + margin-bottom: 10px; text-align: center; } #aside-content .aside-list > .aside-list-item { @@ -2799,7 +2653,7 @@ blockquote footer cite:before { -ms-flex-align: center; -webkit-align-items: center; align-items: center; - padding: 0.3rem 0; + padding: 6px 0; } #aside-content .aside-list > .aside-list-item:first-child { padding-top: 0; @@ -2815,23 +2669,6 @@ blockquote footer cite:before { width: 4.2em; height: 4.2em; } -#aside-content .aside-list > .aside-list-item .thumbnail > img { - width: 100%; - height: 100%; - -webkit-transition: all 0.6s; - -moz-transition: all 0.6s; - -o-transition: all 0.6s; - -ms-transition: all 0.6s; - transition: all 0.6s; - object-fit: cover; -} -#aside-content .aside-list > .aside-list-item .thumbnail > img:hover { - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -o-transform: scale(1.1); - -ms-transform: scale(1.1); - transform: scale(1.1); -} #aside-content .aside-list > .aside-list-item .content { -webkit-box-flex: 1; -moz-box-flex: 1; @@ -2874,9 +2711,19 @@ blockquote footer cite:before { } #aside-content .card-archives ul.card-archive-list > .card-archive-list-item a, #aside-content .card-categories ul.card-category-list > .card-category-list-item a { - display: inline-block; - padding: 0.15rem 0.5rem; - width: 100%; + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: box; + display: flex; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -o-box-orient: horizontal; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + padding: 3px 10px; color: var(--font-color); -webkit-transition: all 0.4s; -moz-transition: all 0.4s; @@ -2886,25 +2733,21 @@ blockquote footer cite:before { } #aside-content .card-archives ul.card-archive-list > .card-archive-list-item a:hover, #aside-content .card-categories ul.card-category-list > .card-category-list-item a:hover { - padding: 0.15rem 0.85rem; + padding: 3px 17px; background-color: var(--text-bg-hover); } -#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a span, -#aside-content .card-categories ul.card-category-list > .card-category-list-item a span { - display: inline-block; - vertical-align: bottom; -} #aside-content .card-archives ul.card-archive-list > .card-archive-list-item a span:first-child, #aside-content .card-categories ul.card-category-list > .card-category-list-item a span:first-child { - width: 80%; -} -#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a span:last-child, -#aside-content .card-categories ul.card-category-list > .card-category-list-item a span:last-child { - width: 20%; - text-align: right; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; } #aside-content .card-categories .card-category-list.child { - padding: 0 0 0 0.8rem; + padding: 0 0 0 16px; } #aside-content .card-categories .card-category-list > .parent > a .card-category-list-name { width: 70% !important; @@ -2915,8 +2758,8 @@ blockquote footer cite:before { } #aside-content .card-categories .card-category-list > .parent i { float: right; - margin-right: -0.35rem; - padding: 0.35rem; + margin-right: -0.5em; + padding: 0.5em; -webkit-transition: -webkit-transform 0.3s; -moz-transition: -moz-transform 0.3s; -o-transition: -o-transform 0.3s; @@ -2948,7 +2791,7 @@ blockquote footer cite:before { -ms-flex-align: center; -webkit-align-items: center; align-items: center; - padding: 0.1rem 0.5rem 0; + padding: 2px 10px 0; } #aside-content .card-webinfo .webinfo .webinfo-item div:first-child { -webkit-box-flex: 1; @@ -2958,7 +2801,7 @@ blockquote footer cite:before { -webkit-flex: 1; -ms-flex: 1; flex: 1; - padding-right: 1rem; + padding-right: 20px; } @media screen and (min-width: 901px) { #aside-content #card-toc { @@ -2971,11 +2814,17 @@ blockquote footer cite:before { right: -100%; bottom: 30px; z-index: 100; + max-width: 380px; max-height: calc(100% - 60px); - width: 300px; + width: calc(100% - 80px); opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); + -webkit-transition: initial; + -moz-transition: initial; + -o-transition: initial; + -ms-transition: initial; + transition: initial; -webkit-transform-origin: right bottom; -moz-transform-origin: right bottom; -o-transform-origin: right bottom; @@ -2983,8 +2832,17 @@ blockquote footer cite:before { transform-origin: right bottom; } } +#aside-content #card-toc .toc-percentage { + float: right; + margin-top: -9px; + color: #a9a9a9; + font-style: italic; + font-size: 140%; +} #aside-content #card-toc .toc-content { - overflow-y: auto; + overflow-y: scroll; + overflow-y: overlay; + margin: 0 -24px; max-height: calc(100vh - 120px); } @media screen and (max-width: 900px) { @@ -2992,15 +2850,23 @@ blockquote footer cite:before { max-height: calc(100vh - 140px); } } -#aside-content #card-toc .toc-content .toc-child { +#aside-content #card-toc .toc-content > * { + margin: 0 20px !important; +} +#aside-content #card-toc .toc-content > * > .toc-item > .toc-child { + margin-left: 10px; + padding-left: 10px; + border-left: 1px solid var(--dark-grey); +} +#aside-content #card-toc .toc-content:not(.is-expand) .toc-child { display: none; } @media screen and (max-width: 900px) { - #aside-content #card-toc .toc-content .toc-child { + #aside-content #card-toc .toc-content:not(.is-expand) .toc-child { display: block !important; } } -#aside-content #card-toc .toc-content .toc-item.active .toc-child { +#aside-content #card-toc .toc-content:not(.is-expand) .toc-item.active .toc-child { display: block; } #aside-content #card-toc .toc-content ol, @@ -3012,12 +2878,12 @@ blockquote footer cite:before { } #aside-content #card-toc .toc-content ol { margin: 0; - padding-left: 0.4rem; + padding-left: 18px; } #aside-content #card-toc .toc-content .toc-link { display: block; - padding-left: 0.3rem; - border-left: 3px solid transparent; + margin: 4px 0; + padding: 1px 6px; color: var(--toc-link-color); -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; @@ -3025,20 +2891,13 @@ blockquote footer cite:before { -ms-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } +#aside-content #card-toc .toc-content .toc-link:hover { + color: #49b1f5; +} #aside-content #card-toc .toc-content .toc-link.active { - border-left-color: #009d92; background: #00c4b6; color: #fff; } -#aside-content #card-toc .toc-content:before { - position: absolute; - top: 0.6rem; - right: 1.2rem; - color: #a9a9a9; - content: attr(progress-percentage); - font-style: italic; - font-size: 1.2rem; -} #aside-content :only-child > .card-widget { margin-top: 0; } @@ -3053,6 +2912,33 @@ blockquote footer cite:before { -ms-animation: more-btn-move 1s infinite; animation: more-btn-move 1s infinite; } +#aside-content .card-announcement .item-headline i { + color: #f00; +} +.avatar-img { + overflow: hidden; + margin: 0 auto; + width: 110px; + height: 110px; + border-radius: 70px; +} +.avatar-img img { + width: 100%; + height: 100%; + -webkit-transition: filter 375ms ease-in 0.2s, -webkit-transform 0.3s; + -moz-transition: filter 375ms ease-in 0.2s, -moz-transform 0.3s; + -o-transition: filter 375ms ease-in 0.2s, -o-transform 0.3s; + -ms-transition: filter 375ms ease-in 0.2s, -ms-transform 0.3s; + transition: filter 375ms ease-in 0.2s, transform 0.3s; + object-fit: cover; +} +.avatar-img img:hover { + -webkit-transform: rotate(360deg); + -moz-transform: rotate(360deg); + -o-transform: rotate(360deg); + -ms-transform: rotate(360deg); + transform: rotate(360deg); +} @media screen and (min-width: 900px) { html.hide-aside .layout { -webkit-box-pack: center; @@ -3276,7 +3162,7 @@ blockquote footer cite:before { } } #post-comment .comment-head { - margin-bottom: 1rem; + margin-bottom: 20px; } #post-comment .comment-head .comment-headline { display: inline-block; @@ -3287,8 +3173,8 @@ blockquote footer cite:before { #post-comment .comment-head #comment-switch { display: inline-block; float: right; - margin: 0.1rem auto 0; - padding: 0.2rem 0.8rem; + margin: 2px auto 0; + padding: 4px 16px; width: max-content; border-radius: 8px; background: #f6f8fa; @@ -3302,7 +3188,7 @@ blockquote footer cite:before { #post-comment .comment-head #comment-switch .switch-btn { position: relative; display: inline-block; - margin: -4px 0.4rem 0; + margin: -4px 8px 0; width: 42px; height: 22px; border-radius: 34px; @@ -3346,15 +3232,22 @@ blockquote footer cite:before { #footer { position: relative; background: #49b1f5; - background-attachment: local; + background-attachment: scroll; background-position: bottom; -webkit-background-size: cover; -moz-background-size: cover; background-size: cover; } +#footer:before { + position: absolute; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,0.5); + content: ''; +} #footer-wrap { position: relative; - padding: 2rem 1rem; + padding: 40px 20px; color: var(--light-grey); text-align: center; } @@ -3365,13 +3258,13 @@ blockquote footer cite:before { text-decoration: underline; } #footer-wrap .footer-separator { - margin: 0 0.2rem; + margin: 0 4px; } #footer-wrap .icp-icon { padding: 0 4px; - vertical-align: text-bottom; max-height: 1.4em; width: auto; + vertical-align: text-bottom; } #page-header { position: relative; @@ -3388,6 +3281,13 @@ blockquote footer cite:before { -ms-transition: all 0.5s; transition: all 0.5s; } +#page-header:not(.not-top-img):before { + position: absolute; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,0.3); + content: ''; +} #page-header.full_page { height: 100vh; background-attachment: fixed; @@ -3395,14 +3295,14 @@ blockquote footer cite:before { #page-header.full_page #site-info { position: absolute; top: 43%; - padding: 0 0.5rem; + padding: 0 10px; width: 100%; } #page-header #site-title, #page-header #site-subtitle, #page-header #scroll-down .scroll-down-effects { text-align: center; - text-shadow: 0.1rem 0.1rem 0.2rem rgba(0,0,0,0.15); + text-shadow: 2px 2px 4px rgba(0,0,0,0.15); line-height: 1.5; } #page-header #site-title { @@ -3427,7 +3327,7 @@ blockquote footer cite:before { #page-header #site_social_icons { display: none; margin: 0 auto; - width: 15rem; + width: 300px; text-align: center; } @media screen and (max-width: 768px) { @@ -3436,11 +3336,10 @@ blockquote footer cite:before { } } #page-header #site_social_icons .social-icon { - margin: 0 0.5rem; + margin: 0 10px; color: var(--light-grey); - text-shadow: 0.1rem 0.1rem 0.2rem rgba(0,0,0,0.15); + text-shadow: 2px 2px 4px rgba(0,0,0,0.15); font-size: 1.43em; - cursor: pointer; } #page-header #scroll-down { position: absolute; @@ -3455,63 +3354,56 @@ blockquote footer cite:before { font-size: 30px; } #page-header.not-home-page { - height: 20rem; + height: 400px; } @media screen and (max-width: 768px) { #page-header.not-home-page { - height: 14rem; + height: 280px; } } #page-header #page-site-info { position: absolute; - top: 10rem; - padding: 0 0.5rem; + top: 200px; + padding: 0 10px; width: 100%; } @media screen and (max-width: 768px) { #page-header #page-site-info { - top: 7rem; + top: 140px; } } #page-header.post-bg { - height: 20rem; + height: 400px; } @media screen and (max-width: 768px) { #page-header.post-bg { - height: 18rem; + height: 360px; } } #page-header.post-bg:before { - position: absolute; - top: 0; - left: 0; - display: block; - width: 100%; - height: 100%; background-color: rgba(0,0,0,0.5); - content: ''; } #page-header #post-info { position: absolute; - bottom: 5rem; + bottom: 100px; padding: 0 8%; width: 100%; text-align: center; } @media screen and (max-width: 900px) { #page-header #post-info { - bottom: 1.5rem; + bottom: 30px; text-align: left; } } @media screen and (max-width: 768px) { #page-header #post-info { - bottom: 1.1rem; - padding: 0 1.1rem; + bottom: 22px; + padding: 0 22px; } } #page-header.not-top-img { - margin-bottom: 0.5rem; + margin-bottom: 10px; height: 60px; background: 0; } @@ -3568,19 +3460,14 @@ blockquote footer cite:before { -ms-transition: top 0.5s; transition: top 0.5s; } -_::-webkit-full-page-media, -_:future, -:root #page-header.full_page { - background-attachment: scroll !important; -} #page h1.page-title { - margin: 0.4rem 0 1rem; + margin: 8px 0 20px; } #post > #post-info { - margin-bottom: 1.5rem; + margin-bottom: 30px; } #post > #post-info .post-title { - padding-bottom: 0.2rem; + padding-bottom: 4px; border-bottom: 1px solid var(--light-grey); color: var(--text-highlight-color); } @@ -3592,7 +3479,7 @@ _:future, color: #78818a; } #post-info .post-title { - margin-bottom: 0.4rem; + margin-bottom: 8px; color: var(--white); font-weight: normal; font-size: 2.5em; @@ -3601,11 +3488,11 @@ _:future, } @media screen and (max-width: 768px) { #post-info .post-title { - font-size: 1.72em; + font-size: 2.1em; } } #post-info .post-title .post-edit-link { - padding-left: 0.5rem; + padding-left: 10px; } #post-info #post-meta { color: var(--light-grey); @@ -3626,13 +3513,13 @@ _:future, } } #post-info #post-meta .post-meta-separator { - margin: 0 0.25rem; + margin: 0 5px; } #post-info #post-meta .post-meta-icon { - margin-right: 0.2rem; + margin-right: 4px; } #post-info #post-meta .post-meta-label { - margin-right: 0.2rem; + margin-right: 4px; } #post-info #post-meta a { color: var(--light-grey); @@ -3656,12 +3543,6 @@ _:future, display: -ms-flexbox; display: box; display: flex; - -webkit-box-lines: multiple; - -moz-box-lines: multiple; - -o-box-lines: multiple; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; -webkit-box-align: center; -moz-box-align: center; -o-box-align: center; @@ -3702,7 +3583,7 @@ _:future, } #nav #toggle-menu { display: none; - padding: 0.1rem 0 0 0.3rem; + padding: 2px 0 0 6px; vertical-align: top; } #nav #toggle-menu:hover { @@ -3715,7 +3596,7 @@ _:future, color: var(--white); } #nav #site-name { - text-shadow: 0.1rem 0.1rem 0.2rem rgba(0,0,0,0.15); + text-shadow: 2px 2px 4px rgba(0,0,0,0.15); font-weight: bold; cursor: pointer; } @@ -3725,19 +3606,19 @@ _:future, #nav .menus_items .menus_item { position: relative; display: inline-block; - padding: 0 0 0 0.7rem; + padding: 0 0 0 14px; } #nav .menus_items .menus_item:hover .menus_item_child { display: block; } -#nav .menus_items .menus_item:hover i.expand { - -webkit-transform: rotate(180deg) !important; - -moz-transform: rotate(180deg) !important; - -o-transform: rotate(180deg) !important; - -ms-transform: rotate(180deg) !important; - transform: rotate(180deg) !important; +#nav .menus_items .menus_item:hover > a > i:last-child { + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -o-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); } -#nav .menus_items .menus_item i.expand { +#nav .menus_items .menus_item > a > i:last-child { padding: 4px; -webkit-transition: -webkit-transform 0.3s; -moz-transition: -moz-transform 0.3s; @@ -3760,6 +3641,7 @@ _:future, -o-animation: sub_menus 0.3s 0.1s ease both; -ms-animation: sub_menus 0.3s 0.1s ease both; animation: sub_menus 0.3s 0.1s ease both; + border-radius: 5px; } #nav .menus_items .menus_item .menus_item_child:before { position: absolute; @@ -3775,9 +3657,15 @@ _:future, #nav .menus_items .menus_item .menus_item_child li:hover { background: var(--text-bg-hover); } +#nav .menus_items .menus_item .menus_item_child li:first-child { + border-radius: 5px 5px 0 0; +} +#nav .menus_items .menus_item .menus_item_child li:last-child { + border-radius: 0 0 5px 5px; +} #nav .menus_items .menus_item .menus_item_child li a { display: inline-block; - padding: 0.3rem 0.7rem; + padding: 8px 16px; width: 100%; color: var(--font-color) !important; text-shadow: none !important; @@ -3789,24 +3677,19 @@ _:future, font-size: inherit; } #nav.hide-menu .menus_items { - position: absolute; - left: 0; - visibility: hidden; - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); + display: none; } #nav.hide-menu #search-button span { - display: none !important; + display: none; } #nav #search-button { display: inline; - padding: 0 0 0 0.7rem; + padding: 0 0 0 14px; } #nav .site-page { position: relative; - padding-bottom: 0.3rem; - text-shadow: 0.05rem 0.05rem 0.1rem rgba(0,0,0,0.3); + padding-bottom: 6px; + text-shadow: 1px 1px 2px rgba(0,0,0,0.3); font-size: 0.78em; cursor: pointer; } @@ -3896,7 +3779,7 @@ _:future, #loading-box .spinner-box .loading-word { position: absolute; color: var(--preloader-color); - font-size: 0.8rem; + font-size: 16px; } #loading-box .spinner-box .configure-core { width: 100%; @@ -4226,47 +4109,18 @@ _:future, transform: rotate(-315deg); } } -#pagination { - overflow: hidden; - margin-top: 1rem; - width: 100%; -} #pagination .pagination { + margin-top: 20px; text-align: center; } -#pagination .page-number { - display: inline-block; - margin: 0 0.2rem; - min-width: 1.2rem; - height: 1.2rem; - text-align: center; - line-height: 1.2rem; - cursor: pointer; -} #pagination .page-number.current { background: #00c4b6; color: var(--white); - cursor: default; -} -#pagination img.prev-cover, -#pagination img.next-cover { - position: absolute; - width: 100%; - height: 100%; - opacity: 0.4; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; - filter: alpha(opacity=40); - -webkit-transition: all 0.6s; - -moz-transition: all 0.6s; - -o-transition: all 0.6s; - -ms-transition: all 0.6s; - transition: all 0.6s; - object-fit: cover; } #pagination .pagination-info { position: absolute; top: 50%; - padding: 1rem 2rem; + padding: 20px 40px; width: 100%; -webkit-transform: translate(0, -50%); -moz-transform: translate(0, -50%); @@ -4308,23 +4162,32 @@ _:future, overflow: hidden; height: 150px; } -#pagination .prev-post:hover img.prev-cover, -#pagination .next-post:hover img.prev-cover, -#pagination .prev-post:hover img.next-cover, -#pagination .next-post:hover img.next-cover { - opacity: 0.8; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; - filter: alpha(opacity=80); - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -o-transform: scale(1.1); - -ms-transform: scale(1.1); - transform: scale(1.1); -} #pagination.pagination-post { - margin-top: 2rem; + overflow: hidden; + margin-top: 40px; + width: 100%; background: #000; } +.layout > .recent-posts .pagination > * { + display: inline-block; + margin: 0 6px; + width: 2.5em; + height: 2.5em; + line-height: 2.5em; +} +.layout > .recent-posts .pagination > *:not(.space):hover { + background: var(--btn-hover-color); + color: var(--btn-color); +} +.layout > div:not(.recent-posts) .pagination .page-number { + display: inline-block; + margin: 0 4px; + min-width: 24px; + height: 24px; + text-align: center; + line-height: 24px; + cursor: pointer; +} #article-container { word-wrap: break-word; overflow-wrap: break-word; @@ -4337,13 +4200,19 @@ _:future, } #article-container img { display: block; - margin: 0 auto 0.8rem; + margin: 0 auto 20px; + max-width: 100%; + -webkit-transition: filter 375ms ease-in 0.2s; + -moz-transition: filter 375ms ease-in 0.2s; + -o-transition: filter 375ms ease-in 0.2s; + -ms-transition: filter 375ms ease-in 0.2s; + transition: filter 375ms ease-in 0.2s; } #article-container p { - margin: 0 0 0.8rem; + margin: 0 0 16px; } #article-container iframe { - margin: 0 0 1rem; + margin: 0 0 20px; } #article-container kbd { margin: 0 3px; @@ -4360,36 +4229,60 @@ _:future, font-family: Monaco, 'Ubuntu Mono', monospace; line-height: 1em; } -#article-container ol, -#article-container ul { - margin-top: 0.4rem; +#article-container a.headerlink:after { + float: right; + color: var(--headline-presudo); + content: '\f0c1'; + font-size: 0.95em; + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -webkit-transition: all 0.3s; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -ms-transition: all 0.3s; + transition: all 0.3s; +} +#article-container a.headerlink:hover:after { + color: var(--pseudo-hover); } -#article-container ol p, -#article-container ul p { - margin: 0 0 0.5rem; +#article-container h1:hover a.headerlink:after, +#article-container h2:hover a.headerlink:after, +#article-container h3:hover a.headerlink:after, +#article-container h4:hover a.headerlink:after, +#article-container h5:hover a.headerlink:after, +#article-container h6:hover a.headerlink:after { + opacity: 1; + -ms-filter: none; + filter: none; } #article-container ol ol, #article-container ul ol, #article-container ol ul, #article-container ul ul { - padding-left: 0.5rem; + padding-left: 20px; } #article-container ol li, #article-container ul li { - position: relative; - margin: 0.3rem 0; - padding-left: 0.3rem; + margin: 4px 0; +} +#article-container ol p, +#article-container ul p { + margin: 0 0 8px; +} +#article-container > :last-child { + margin-bottom: 0 !important; } #post .tag_share .post-meta__tag-list { display: inline-block; } #post .tag_share .post-meta__tags { display: inline-block; - margin: 0.4rem 0.4rem 0.4rem 0; - padding: 0 0.6rem; + margin: 8px 8px 8px 0; + padding: 0 12px; width: fit-content; border: 1px solid #49b1f5; - border-radius: 0.6rem; + border-radius: 12px; color: #49b1f5; font-size: 0.85em; -webkit-transition: all 0.2s ease-in-out; @@ -4405,7 +4298,7 @@ _:future, #post .tag_share .post_share { display: inline-block; float: right; - margin: 0.4rem 0; + margin: 8px 0 20px; width: fit-content; } #post .tag_share .post_share .social-share { @@ -4420,8 +4313,8 @@ _:future, } #post .post-copyright { position: relative; - margin: 2rem 0 0.5rem; - padding: 0.5rem 0.8rem; + margin: 40px 0 10px; + padding: 10px 16px; border: 1px solid var(--light-grey); -webkit-transition: box-shadow 0.3s ease-in-out; -moz-transition: box-shadow 0.3s ease-in-out; @@ -4431,11 +4324,11 @@ _:future, } #post .post-copyright:before { position: absolute; - top: 0.1rem; - right: 0.6rem; + top: 2px; + right: 12px; color: #49b1f5; content: '\f1f9'; - font-size: 1rem; + font-size: 1.3em; } #post .post-copyright:hover { -webkit-box-shadow: 0 0 8px 0 rgba(232,237,250,0.6), 0 2px 4px 0 rgba(232,237,250,0.5); @@ -4446,7 +4339,7 @@ _:future, font-weight: bold; } #post .post-copyright .post-copyright-info { - padding-left: 0.3rem; + padding-left: 6px; } #post .post-copyright .post-copyright-info a { text-decoration: underline; @@ -4457,7 +4350,7 @@ _:future, } #post .post-outdate-notice { position: relative; - margin: 0 0 1rem; + margin: 0 0 20px; padding: 0.5em 1.2em; border-radius: 3px; background-color: #ffe6e6; @@ -4478,10 +4371,10 @@ _:future, transform: translateY(-50%); } #post .ads-wrap { - margin: 2rem 0; + margin: 40px 0; } .relatedPosts { - margin-top: 2rem; + margin-top: 40px; } .relatedPosts > .headline { margin-bottom: 5px; @@ -4494,19 +4387,9 @@ _:future, overflow: hidden; margin: 3px; width: calc(33.333% - 6px); - height: 200px; - background: #000; - vertical-align: bottom; -} -.relatedPosts > .relatedPosts-list > div:hover .cover { - opacity: 0.8; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; - filter: alpha(opacity=80); - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -o-transform: scale(1.1); - -ms-transform: scale(1.1); - transform: scale(1.1); + height: 200px; + background: #000; + vertical-align: bottom; } @media screen and (max-width: 768px) { .relatedPosts > .relatedPosts-list > div { @@ -4520,23 +4403,10 @@ _:future, width: calc(100% - 4px); } } -.relatedPosts > .relatedPosts-list .cover { - width: 100%; - height: 100%; - opacity: 0.4; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; - filter: alpha(opacity=40); - -webkit-transition: all 0.6s; - -moz-transition: all 0.6s; - -o-transition: all 0.6s; - -ms-transition: all 0.6s; - transition: all 0.6s; - object-fit: cover; -} .relatedPosts > .relatedPosts-list .content { position: absolute; top: 50%; - padding: 0 1rem; + padding: 0 20px; width: 100%; -webkit-transform: translate(0, -50%); -moz-transform: translate(0, -50%); @@ -4554,21 +4424,23 @@ _:future, } .post-reward { position: relative; - margin-top: 4rem; + margin-top: 80px; width: 100%; text-align: center; + pointer-events: none; +} +.post-reward > * { + pointer-events: auto; } .post-reward .reward-button { display: inline-block; - padding: 0.2rem 1.2rem; + padding: 4px 24px; background: var(--btn-bg); color: var(--btn-color); cursor: pointer; - -webkit-transition: all 0.4s; - -moz-transition: all 0.4s; - -o-transition: all 0.4s; - -ms-transition: all 0.4s; - transition: all 0.4s; +} +.post-reward:hover .reward-button { + background: var(--btn-hover-color); } .post-reward:hover > .reward-main { display: block; @@ -4585,7 +4457,7 @@ _:future, .post-reward .reward-main .reward-all { display: inline-block; margin: 0; - padding: 1rem 0.5rem; + padding: 20px 10px; border-radius: 4px; background: var(--reward-pop); } @@ -4621,13 +4493,12 @@ _:future, height: 130px; } .post-reward .reward-main .reward-all .reward-item .post-qr-code-desc { - padding-top: 0.4rem; width: 130px; color: #858585; } #rightside { position: fixed; - right: -38px; + right: -48px; bottom: 40px; z-index: 100; opacity: 0; @@ -4640,34 +4511,50 @@ _:future, transition: all 0.5s; } #rightside #rightside-config-hide { + height: 0; + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); -webkit-transition: -webkit-transform 0.4s; -moz-transition: -moz-transform 0.4s; -o-transition: -o-transform 0.4s; -ms-transition: -ms-transform 0.4s; transition: transform 0.4s; - -webkit-transform: translate(35px, 0); - -moz-transform: translate(35px, 0); - -o-transform: translate(35px, 0); - -ms-transform: translate(35px, 0); - transform: translate(35px, 0); + -webkit-transform: translate(45px, 0); + -moz-transform: translate(45px, 0); + -o-transform: translate(45px, 0); + -ms-transform: translate(45px, 0); + transform: translate(45px, 0); } #rightside #rightside-config-hide.show { - -webkit-transform: translate(0, 0) !important; - -moz-transform: translate(0, 0) !important; - -o-transform: translate(0, 0) !important; - -ms-transform: translate(0, 0) !important; - transform: translate(0, 0) !important; + height: auto; + opacity: 1; + -ms-filter: none; + filter: none; + -webkit-transform: translate(0, 0); + -moz-transform: translate(0, 0); + -o-transform: translate(0, 0); + -ms-transform: translate(0, 0); + transform: translate(0, 0); +} +#rightside #rightside-config-hide.status { + height: auto; + opacity: 1; + -ms-filter: none; + filter: none; } #rightside > div > button, #rightside > div > a { display: block; - margin-bottom: 2px; - width: 30px; - height: 30px; + margin-bottom: 5px; + width: 35px; + height: 35px; + border-radius: 5px; background-color: var(--btn-bg); color: var(--btn-color); text-align: center; font-size: 16px; + line-height: 35px; } #rightside > div > button:hover, #rightside > div > a:hover { @@ -4717,112 +4604,88 @@ _:future, -ms-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); } -#sidebar #sidebar-menus > .author-avatar { - padding: 1.3rem 1.5rem 0; - text-align: center; -} -#sidebar #sidebar-menus > .author-avatar img { - width: 110px; - height: 110px; - border-radius: 70px; - -webkit-transition: all 0.5s; - -moz-transition: all 0.5s; - -o-transition: all 0.5s; - -ms-transition: all 0.5s; - transition: all 0.5s; -} -#sidebar #sidebar-menus > .author-avatar img:hover { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -o-transform: rotate(360deg); - -ms-transform: rotate(360deg); - transform: rotate(360deg); +#sidebar #sidebar-menus > .avatar-img { + margin: 20px auto; } #sidebar #sidebar-menus .site-data { display: table; - padding: 0.6rem 0.5rem 0; + padding: 0 10px; width: 100%; table-layout: fixed; } #sidebar #sidebar-menus .site-data .data-item { display: table-cell; } -#sidebar #sidebar-menus .site-data .data-item .data-item-link .length-num { +#sidebar #sidebar-menus .site-data .data-item .length-num { color: var(--text-highlight-color); font-size: 1.28em; } -#sidebar #sidebar-menus .site-data .data-item .data-item-link .headline { +#sidebar #sidebar-menus .site-data .data-item .headline { color: var(--font-color); } #sidebar #sidebar-menus hr { - margin: 1rem auto; + margin: 20px auto; } #sidebar #sidebar-menus .menus_items { - padding: 0 0.5rem 2rem; + padding: 0 10px 40px; } #sidebar #sidebar-menus .menus_items .site-page { position: relative; display: block; - padding: 0.3rem 1.5rem; + padding: 6px 30px 6px 22px; color: var(--font-color); font-size: 1.15em; - cursor: pointer; +} +#sidebar #sidebar-menus .menus_items .site-page:hover { + background: var(--text-bg-hover); } #sidebar #sidebar-menus .menus_items .site-page i:first-child { - width: 25%; + width: 15%; text-align: left; } -#sidebar #sidebar-menus .menus_items .site-page span { - width: 75%; -} -#sidebar #sidebar-menus .menus_items .site-page span:hover { - color: #49b1f5; -} -#sidebar #sidebar-menus .menus_items .expand { +#sidebar #sidebar-menus .menus_items .site-page.group > i:last-child { position: absolute; top: 0.78em; - right: 0.4rem; + right: 18px; -webkit-transition: -webkit-transform 0.3s; -moz-transition: -moz-transform 0.3s; -o-transition: -o-transform 0.3s; -ms-transition: -ms-transform 0.3s; transition: transform 0.3s; } -#sidebar #sidebar-menus .menus_items .expand.hide { - -webkit-transform: rotate(90deg) !important; - -moz-transform: rotate(90deg) !important; - -o-transform: rotate(90deg) !important; - -ms-transform: rotate(90deg) !important; - transform: rotate(90deg) !important; +#sidebar #sidebar-menus .menus_items .site-page.group.hide > i:last-child { + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -o-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +#sidebar #sidebar-menus .menus_items .site-page.group.hide + .menus_item_child { + display: none; } #sidebar #sidebar-menus .menus_items .menus_item_child { margin: 0; list-style: none; } -#vcomment, -#waline { +#vcomment { font-size: 1.1em; } -#vcomment .vbtn, -#waline .vbtn { +#vcomment .vbtn { border: none; background: var(--btn-bg); color: var(--btn-color); } -#vcomment .vbtn:hover, -#waline .vbtn:hover { +#vcomment .vbtn:hover { background: var(--btn-hover-color); } -#vcomment .vimg, -#waline .vimg { +#vcomment .vimg { -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -o-transition: all 0.3s; -ms-transition: all 0.3s; transition: all 0.3s; } -#vcomment .vimg:hover, -#waline .vimg:hover { +#vcomment .vimg:hover { -webkit-transform: rotate(360deg); -moz-transform: rotate(360deg); -o-transform: rotate(360deg); @@ -4830,11 +4693,28 @@ _:future, transform: rotate(360deg); } #vcomment .vcards .vcard .vcontent.expand:before, -#waline .vcards .vcard .vcontent.expand:before, -#vcomment .vcards .vcard .vcontent.expand:after, -#waline .vcards .vcard .vcontent.expand:after { +#vcomment .vcards .vcard .vcontent.expand:after { z-index: 22; } +#waline-wrap { + --waline-font-size: 1.1em; + --waline-theme-color: #49b1f5; + --waline-active-color: #ff7242; +} +#waline-wrap .vuser { + -webkit-transition: all 0.5s; + -moz-transition: all 0.5s; + -o-transition: all 0.5s; + -ms-transition: all 0.5s; + transition: all 0.5s; +} +#waline-wrap .vuser:hover { + -webkit-transform: rotate(360deg); + -moz-transform: rotate(360deg); + -o-transform: rotate(360deg); + -ms-transform: rotate(360deg); + transform: rotate(360deg); +} .fireworks { position: fixed; top: 0; @@ -4849,24 +4729,12 @@ _:future, .medium-zoom-overlay { z-index: 99999 !important; } -.mermaid { - overflow: auto; - margin: 0 0 1rem; - background: #fff; +.mermaid-wrap { + margin: 0 0 20px; text-align: center; - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; - -ms-transition: all 0.3s; - transition: all 0.3s; } -.mermaid[data-processed] { - opacity: 1; - -ms-filter: none; - filter: none; +.mermaid-wrap > svg { + height: 100%; } .utterances, .fb-comments iframe { @@ -4874,7 +4742,7 @@ _:future, } #gitalk-container .gt-meta { margin: 0 0 0.8em; - padding: 0.3rem 0 0.8em; + padding: 6px 0 16px; } .katex-wrap { overflow: auto; @@ -4882,148 +4750,106 @@ _:future, .katex-wrap::-webkit-scrollbar { display: none; } -.mathjax-overflow { - overflow-x: auto; - overflow-y: hidden; -} -mjx-container[jax='CHTML'][display='true'] { +mjx-container[display], +.has-jax { overflow-x: auto; overflow-y: hidden; - padding-bottom: 0.3rem; } .aplayer { color: #4c4948; } #article-container .aplayer { - margin: 0 0 1rem; + margin: 0 0 20px; +} +.snackbar-css { + border-radius: 5px !important; } #article-container .btn-center { - margin: 0 0 1rem; + margin: 0 0 20px; text-align: center; } #article-container .btn-beautify { display: inline-block; - margin: 0 0.2rem 0.3rem; - padding: 0 1rem; - background-color: #777; + margin: 0 4px 6px; + padding: 0 15px; + background-color: var(--btn-beautify-color, #777); color: #fff; line-height: 2; } +#article-container .btn-beautify.blue { + --btn-beautify-color: #428bca; +} +#article-container .btn-beautify.pink { + --btn-beautify-color: #ff69b4; +} +#article-container .btn-beautify.red { + --btn-beautify-color: #f00; +} +#article-container .btn-beautify.purple { + --btn-beautify-color: #6f42c1; +} +#article-container .btn-beautify.orange { + --btn-beautify-color: #ff8c00; +} +#article-container .btn-beautify.green { + --btn-beautify-color: #5cb85c; +} +#article-container .btn-beautify:hover { + background-color: var(--btn-hover-color); +} +#article-container .btn-beautify i + span { + margin-left: 6px; +} #article-container .btn-beautify:not(.block) + .btn-beautify:not(.block) { - margin: 0 0.2rem 1rem; + margin: 0 4px 20px; } #article-container .btn-beautify.block { display: block; - margin: 0 0 1rem; + margin: 0 0 20px; width: fit-content; width: -moz-fit-content; } #article-container .btn-beautify.block.center { - margin: 0 auto 1rem; + margin: 0 auto 20px; } #article-container .btn-beautify.block.right { - margin: 0 0 1rem auto; + margin: 0 0 20px auto; } #article-container .btn-beautify.larger { - padding: 0.3rem 1.3rem; + padding: 6px 15px; } #article-container .btn-beautify:hover { text-decoration: none; } -#article-container .btn-beautify.blue { - background-color: #428bca; -} -#article-container .btn-beautify.pink { - background-color: #ff69b4; -} -#article-container .btn-beautify.red { - background-color: #f00; -} -#article-container .btn-beautify.purple { - background-color: #6f42c1; -} -#article-container .btn-beautify.orange { - background-color: #ff8c00; -} -#article-container .btn-beautify.green { - background-color: #5cb85c; -} #article-container .btn-beautify.outline { border: 1px solid transparent; - border-color: #777; + border-color: var(--btn-beautify-color, #777); background-color: transparent; - color: #777; - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; - -ms-transition: all 0.3s; - transition: all 0.3s; + color: var(--btn-beautify-color, #777); } -#article-container .btn-beautify.outline.button--animated:before { - background: #777; +#article-container .btn-beautify.outline:hover { + background-color: var(--btn-beautify-color, #777); } #article-container .btn-beautify.outline:hover { color: #fff !important; } -#article-container .btn-beautify.outline.blue { - border-color: #428bca; - color: #428bca; -} -#article-container .btn-beautify.outline.blue.button--animated:before { - background: #428bca; -} -#article-container .btn-beautify.outline.pink { - border-color: #ff69b4; - color: #ff69b4; -} -#article-container .btn-beautify.outline.pink.button--animated:before { - background: #ff69b4; -} -#article-container .btn-beautify.outline.red { - border-color: #f00; - color: #f00; -} -#article-container .btn-beautify.outline.red.button--animated:before { - background: #f00; -} -#article-container .btn-beautify.outline.purple { - border-color: #6f42c1; - color: #6f42c1; -} -#article-container .btn-beautify.outline.purple.button--animated:before { - background: #6f42c1; -} -#article-container .btn-beautify.outline.orange { - border-color: #ff8c00; - color: #ff8c00; -} -#article-container .btn-beautify.outline.orange.button--animated:before { - background: #ff8c00; -} -#article-container .btn-beautify.outline.green { - border-color: #5cb85c; - color: #5cb85c; -} -#article-container .btn-beautify.outline.green.button--animated:before { - background: #5cb85c; -} -figure.gallery-group { +#article-container figure.gallery-group { position: relative; float: left; overflow: hidden; - margin: 0.3rem 0.2rem; - width: calc(50% - 0.4rem); + margin: 6px 4px; + width: calc(50% - 8px); height: 250px; border-radius: 8px; background: #000; -webkit-transform: translate3d(0, 0, 0); } @media screen and (max-width: 600px) { - figure.gallery-group { - width: calc(100% - 0.4rem); + #article-container figure.gallery-group { + width: calc(100% - 8px); } } -figure.gallery-group:hover img { +#article-container figure.gallery-group:hover img { opacity: 0.4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: alpha(opacity=40); @@ -5033,14 +4859,14 @@ figure.gallery-group:hover img { -ms-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } -figure.gallery-group:hover .gallery-group-name::after { +#article-container figure.gallery-group:hover .gallery-group-name::after { -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); -o-transform: translate3d(0, 0, 0); -ms-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } -figure.gallery-group:hover p { +#article-container figure.gallery-group:hover p { opacity: 1; -ms-filter: none; filter: none; @@ -5050,9 +4876,9 @@ figure.gallery-group:hover p { -ms-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } -figure.gallery-group img { +#article-container figure.gallery-group img { position: relative; - margin: 0 !important; + margin: 0; max-width: none; width: calc(100% + 20px); height: 250px; @@ -5063,11 +4889,11 @@ figure.gallery-group img { opacity: 0.8; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter: alpha(opacity=80); - -webkit-transition: opacity 0.35s, -webkit-transform 0.35s; - -moz-transition: opacity 0.35s, -moz-transform 0.35s; - -o-transition: opacity 0.35s, -o-transform 0.35s; - -ms-transition: opacity 0.35s, -ms-transform 0.35s; - transition: opacity 0.35s, transform 0.35s; + -webkit-transition: all 0.3s, filter 375ms ease-in 0.2s; + -moz-transition: all 0.3s, filter 375ms ease-in 0.2s; + -o-transition: all 0.3s, filter 375ms ease-in 0.2s; + -ms-transition: all 0.3s, filter 375ms ease-in 0.2s; + transition: all 0.3s, filter 375ms ease-in 0.2s; -webkit-transform: translate3d(-10px, 0, 0); -moz-transform: translate3d(-10px, 0, 0); -o-transform: translate3d(-10px, 0, 0); @@ -5075,11 +4901,11 @@ figure.gallery-group img { transform: translate3d(-10px, 0, 0); object-fit: cover; } -figure.gallery-group figcaption { +#article-container figure.gallery-group figcaption { position: absolute; top: 0; left: 0; - padding: 1.5rem; + padding: 30px; width: 100%; height: 100%; color: #fff; @@ -5089,7 +4915,7 @@ figure.gallery-group figcaption { -ms-backface-visibility: hidden; backface-visibility: hidden; } -figure.gallery-group figcaption > a { +#article-container figure.gallery-group figcaption > a { position: absolute; top: 0; right: 0; @@ -5100,9 +4926,9 @@ figure.gallery-group figcaption > a { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); } -figure.gallery-group p { +#article-container figure.gallery-group p { margin: 0; - padding: 0.4rem 0 0; + padding: 8px 0 0; letter-spacing: 1px; font-size: 1.1em; line-height: 1.5; @@ -5121,16 +4947,16 @@ figure.gallery-group p { transform: translate3d(100%, 0, 0); -webkit-line-clamp: 4; } -figure.gallery-group .gallery-group-name { +#article-container figure.gallery-group .gallery-group-name { position: relative; margin: 0; - padding: 0.4rem 0; + padding: 8px 0; font-weight: bold; font-size: 1.65em; line-height: 1.5; -webkit-line-clamp: 2; } -figure.gallery-group .gallery-group-name:after { +#article-container figure.gallery-group .gallery-group-name:after { position: absolute; bottom: 0; left: 0; @@ -5149,25 +4975,19 @@ figure.gallery-group .gallery-group-name:after { -ms-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); } -.gallery-group-main { +#article-container .gallery-group-main { overflow: auto; - padding: 0 0 0.8rem; + padding: 0 0 16px; } -.justified-gallery { - margin: 0 0 0.8rem; -} -.justified-gallery img { +#article-container .fj-gallery { + margin: 0 0 16px; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); } -.justified-gallery .img-alt { +#article-container .fj-gallery .img-alt { display: none; } -.justified-gallery .fancybox { - width: auto; - text-align: inherit; -} blockquote.pullquote { position: relative; max-width: 45%; @@ -5179,12 +4999,12 @@ blockquote.pullquote.left { } blockquote.pullquote.right { float: right; - margin: 1em 0 0 0.5rem; + margin: 1em 0 0 0.5em; } .video-container { position: relative; overflow: hidden; - margin-bottom: 0.8rem; + margin-bottom: 16px; padding-top: 56.25%; height: 0; } @@ -5199,10 +5019,14 @@ blockquote.pullquote.right { .hide-inline > .hide-button, .hide-block > .hide-button { display: inline-block; - padding: 0.3rem 1rem; + padding: 5px 18px; background: #49b1f5; color: var(--white); } +.hide-inline > .hide-button:hover, +.hide-block > .hide-button:hover { + background-color: var(--btn-hover-color); +} .hide-inline > .hide-button.open, .hide-block > .hide-button.open { display: none; @@ -5220,45 +5044,26 @@ blockquote.pullquote.right { display: none; } .hide-inline > .hide-button { - margin: 0 0.3rem; + margin: 0 6px; } .hide-inline > .hide-content { - margin: 0 0.3rem; + margin: 0 6px; } .hide-block { - margin: 0 0 0.8rem; + margin: 0 0 16px; } -.hide-toggle { - margin-bottom: 1rem; +.toggle { + margin-bottom: 20px; border: 1px solid #f0f0f0; } -.hide-toggle > .hide-button { - padding: 0.3rem 0.5rem; +.toggle > .toggle-button { + padding: 6px 15px; background: #f0f0f0; color: #1f2d3d; cursor: pointer; } -.hide-toggle > .hide-button > i { - font-size: 1.2em; - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; - -ms-transition: all 0.3s; - transition: all 0.3s; -} -.hide-toggle > .hide-button.open i { - -webkit-transform: rotate(90deg); - -moz-transform: rotate(90deg); - -o-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); -} -.hide-toggle > .hide-button.open + div { - display: block; -} -.hide-toggle > .hide-content { - display: none; - margin: 1.5rem 1.2rem; +.toggle > .toggle-content { + margin: 30px 24px; } #article-container .inline-img { display: inline; @@ -5266,19 +5071,45 @@ blockquote.pullquote.right { height: 1.1em; vertical-align: text-bottom; } +.hl-label { + padding: 2px 4px; + border-radius: 3px; + color: #fff; +} +.hl-label.default { + background-color: #777; +} +.hl-label.blue { + background-color: #428bca; +} +.hl-label.pink { + background-color: #ff69b4; +} +.hl-label.red { + background-color: #f00; +} +.hl-label.purple { + background-color: #6f42c1; +} +.hl-label.orange { + background-color: #ff8c00; +} +.hl-label.green { + background-color: #5cb85c; +} .note { position: relative; - margin: 0 0 1rem; + margin: 0 0 20px; padding: 15px; border-radius: 3px; } .note.icon { - padding-left: 2.25rem; + padding-left: 3em; } .note > .note-icon { position: absolute; - top: calc(50% - 0.4rem); - left: 0.7rem; + top: calc(50% - 0.5em); + left: 0.8em; font-size: larger; } .note.blue:not(.disabled) { @@ -5403,12 +5234,12 @@ blockquote.pullquote.right { margin-bottom: 0 !important; } .note:not(.no-icon) { - padding-left: 2.25rem; + padding-left: 3em; } .note:not(.no-icon)::before { position: absolute; - top: calc(50% - 0.8rem); - left: 0.7rem; + top: calc(50% - 0.95em); + left: 0.8em; font-size: larger; } .note.default.flat { @@ -5593,7 +5424,7 @@ blockquote.pullquote.right { } #article-container .tabs { position: relative; - margin: 0 0 1rem; + margin: 0 0 20px; border-right: 1px solid var(--tab-border-color); border-bottom: 1px solid var(--tab-border-color); border-left: 1px solid var(--tab-border-color); @@ -5633,7 +5464,7 @@ blockquote.pullquote.right { } #article-container .tabs > .nav-tabs > .tab button { display: block; - padding: 0.5rem 1rem; + padding: 8px 18px; width: 100%; border-top: 2px solid var(--tab-border-color); background: var(--tab-botton-bg); @@ -5660,11 +5491,11 @@ blockquote.pullquote.right { #article-container .tabs > .tab-contents .tab-item-content { position: relative; display: none; - padding: 1.8rem 1.2rem; + padding: 36px 24px; } @media screen and (max-width: 768px) { #article-container .tabs > .tab-contents .tab-item-content { - padding: 1.2rem 0.7rem; + padding: 24px 14px; } } #article-container .tabs > .tab-contents .tab-item-content.active { @@ -5745,6 +5576,93 @@ blockquote.pullquote.right { transform: translateY(0); } } +#article-container .timeline { + margin: 0 0 20px 10px; + padding: 14px 20px 5px; + border-left: 2px solid var(--timeline-color, #49b1f5); +} +#article-container .timeline.blue { + --timeline-color: #428bca; + --timeline-bg: rgba(66,139,202, 0.2); +} +#article-container .timeline.pink { + --timeline-color: #ff69b4; + --timeline-bg: rgba(255,105,180, 0.2); +} +#article-container .timeline.red { + --timeline-color: #f00; + --timeline-bg: rgba(255,0,0, 0.2); +} +#article-container .timeline.purple { + --timeline-color: #6f42c1; + --timeline-bg: rgba(111,66,193, 0.2); +} +#article-container .timeline.orange { + --timeline-color: #ff8c00; + --timeline-bg: rgba(255,140,0, 0.2); +} +#article-container .timeline.green { + --timeline-color: #5cb85c; + --timeline-bg: rgba(92,184,92, 0.2); +} +#article-container .timeline .timeline-item { + margin: 0 0 15px; +} +#article-container .timeline .timeline-item:hover .item-circle:before { + border-color: var(--timeline-color, #49b1f5); +} +#article-container .timeline .timeline-item.headline .timeline-item-title .item-circle > p { + font-weight: 600; + font-size: 1.2em; +} +#article-container .timeline .timeline-item.headline .timeline-item-title .item-circle:before { + left: -28px; + border: 4px solid var(--timeline-color, #49b1f5); +} +#article-container .timeline .timeline-item.headline:hover .item-circle:before { + border-color: var(--pseudo-hover); +} +#article-container .timeline .timeline-item .timeline-item-title { + position: relative; +} +#article-container .timeline .timeline-item .item-circle:before { + position: absolute; + top: 50%; + left: -27px; + width: 6px; + height: 6px; + border: 3px solid var(--pseudo-hover); + border-radius: 50%; + background: var(--card-bg); + content: ''; + -webkit-transition: all 0.3s; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -ms-transition: all 0.3s; + transition: all 0.3s; + -webkit-transform: translate(0, -50%); + -moz-transform: translate(0, -50%); + -o-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + transform: translate(0, -50%); +} +#article-container .timeline .timeline-item .item-circle > p { + margin: 0 0 8px; + font-weight: 500; +} +#article-container .timeline .timeline-item .timeline-item-content { + position: relative; + padding: 12px 15px; + border-radius: 8px; + background: var(--timeline-bg, #e4f3fd); + font-size: 0.93em; +} +#article-container .timeline .timeline-item .timeline-item-content > :last-child { + margin-bottom: 0; +} +#article-container .timeline + .timeline { + margin-top: -20px; +} [data-theme='dark'] { --global-bg: #0d0d0d; --font-color: rgba(255,255,255,0.7); @@ -5767,6 +5685,7 @@ blockquote.pullquote.right { --btn-bg: #1f1f1f; --text-bg-hover: #383838; --light-grey: rgba(255,255,255,0.7); + --dark-grey: rgba(255,255,255,0.2); --white: rgba(255,255,255,0.9); --text-highlight-color: rgba(255,255,255,0.9); --blockquote-color: rgba(255,255,255,0.7); @@ -5781,6 +5700,8 @@ blockquote.pullquote.right { --hlnumber-color: rgba(255,255,255,0.4); --hlscrollbar-bg: #1f1f1f; --hlexpand-bg: linear-gradient(180deg, rgba(23,23,23,0.6), rgba(23,23,23,0.9)); + --scrollbar-color: #1f1f1f; + --timeline-bg: #1f1f1f; } [data-theme='dark'] #web_bg:before, [data-theme='dark'] #footer:before, @@ -5829,15 +5750,17 @@ blockquote.pullquote.right { } [data-theme='dark'] .hide-button, [data-theme='dark'] .btn-beautify, -[data-theme='dark'] .mermaid, +[data-theme='dark'] .hl-label, [data-theme='dark'] .post-outdate-notice, [data-theme='dark'] .error-img, [data-theme='dark'] #article-container iframe, -[data-theme='dark'] img, [data-theme='dark'] .gist, [data-theme='dark'] .ads-wrap { filter: brightness(0.8); } +[data-theme='dark'] img { + filter: brightness(0.8); +} [data-theme='dark'] #aside-content .aside-list > .aside-list-item:not(:last-child) { border-bottom: 1px dashed rgba(255,255,255,0.1); } @@ -5870,6 +5793,11 @@ blockquote.pullquote.right { [data-theme='dark'] #operare_artitalk .c2 { background: #121212; } +@media screen and (max-width: 900px) { + [data-theme='dark'] #card-toc { + background: #1f1f1f; + } +} .read-mode { --font-color: #4c4948; --readmode-light-color: #fff; @@ -5882,6 +5810,7 @@ blockquote.pullquote.right { --exit-btn-bg: #c0c0c0; --exit-btn-color: #fff; --exit-btn-hover: #8d8d8d; + --pseudo-hover: none; } [data-theme='dark'] .read-mode { --font-color: rgba(255,255,255,0.7); @@ -5903,6 +5832,7 @@ blockquote.pullquote.right { position: fixed; top: 30px; right: 30px; + z-index: 100; width: 40px; height: 40px; border-radius: 8px; @@ -5915,6 +5845,12 @@ blockquote.pullquote.right { -ms-transition: background 0.3s; transition: background 0.3s; } +@media screen and (max-width: 768px) { + .read-mode .exit-readmode { + top: initial; + bottom: 30px; + } +} .read-mode .exit-readmode:hover { background: var(--exit-btn-hover); } @@ -6020,7 +5956,7 @@ blockquote.pullquote.right { color: var(--font-color) !important; } .read-mode #article-container ul >li:before { - border: 0.15rem solid var(--gray) !important; + border-color: var(--gray) !important; } .read-mode #article-container .tabs { border: 2px solid var(--tab-border-color); @@ -6052,7 +5988,7 @@ blockquote.pullquote.right { color: var(--font-color); } .read-mode #article-container blockquote { - border-left: 0.2rem solid var(--gray); + border-color: var(--gray); background-color: var(--readmode-light-color); } .read-mode #article-container kbd { @@ -6066,23 +6002,11 @@ blockquote.pullquote.right { border: 1px solid var(--gray) !important; } .read-mode #article-container .hide-button, -.read-mode #article-container .btn-beautify { - background: var(--readmode-light-color) !important; - color: var(--font-color) !important; -} -.read-mode #article-container .btn-beautify { +.read-mode #article-container .btn-beautify, +.read-mode #article-container .hl-label { border: 1px solid var(--gray) !important; -} -.read-mode #article-container .button--animated:before { background: var(--readmode-light-color) !important; -} -.read-mode #article-container .hide-inline >.hide-button, -.read-mode #article-container .hide-block >.hide-button { - border: 1px solid var(--gray); -} -.read-mode #article-container .hide-inline > .button--animated:before, -.read-mode #article-container .hide-block > .button--animated:before { - background: var(--readmode-light-color); + color: var(--font-color) !important; } .read-mode #article-container .note { border: 2px solid var(--gray); diff --git a/img/1.jpg b/img/1.jpg deleted file mode 100644 index d6cfea8..0000000 Binary files a/img/1.jpg and /dev/null differ diff --git a/img/1.png b/img/1.png deleted file mode 100644 index 90fb856..0000000 Binary files a/img/1.png and /dev/null differ diff --git a/img/10.jpg b/img/10.jpg deleted file mode 100644 index 575b09f..0000000 Binary files a/img/10.jpg and /dev/null differ diff --git a/img/11.jpg b/img/11.jpg deleted file mode 100644 index c54f733..0000000 Binary files a/img/11.jpg and /dev/null differ diff --git a/img/13.jpg b/img/13.jpg deleted file mode 100644 index e6ec80e..0000000 Binary files a/img/13.jpg and /dev/null differ diff --git a/img/2.ico b/img/2.ico deleted file mode 100644 index b217a27..0000000 Binary files a/img/2.ico and /dev/null differ diff --git a/img/2.jpg b/img/2.jpg deleted file mode 100644 index d0bc6e0..0000000 Binary files a/img/2.jpg and /dev/null differ diff --git a/img/3.jpg b/img/3.jpg deleted file mode 100644 index 59b32bc..0000000 Binary files a/img/3.jpg and /dev/null differ diff --git a/img/4.jpg b/img/4.jpg deleted file mode 100644 index cd15dd6..0000000 Binary files a/img/4.jpg and /dev/null differ diff --git a/img/404.jpg b/img/404.jpg index 4bab3c3..2504634 100644 Binary files a/img/404.jpg and b/img/404.jpg differ diff --git a/img/5.jpg b/img/5.jpg deleted file mode 100644 index cda3620..0000000 Binary files a/img/5.jpg and /dev/null differ diff --git a/img/7.jpg b/img/7.jpg deleted file mode 100644 index f01739a..0000000 Binary files a/img/7.jpg and /dev/null differ diff --git a/img/9.jpg b/img/9.jpg deleted file mode 100644 index d06dcb7..0000000 Binary files a/img/9.jpg and /dev/null differ diff --git a/img/algolia.svg b/img/algolia.svg index 4702423..1299c4c 100644 --- a/img/algolia.svg +++ b/img/algolia.svg @@ -1,9 +1 @@ - - - - - - - - - + \ No newline at end of file diff --git a/img/friend_404.gif b/img/friend_404.gif index 91dd56a..b2b3dce 100644 Binary files a/img/friend_404.gif and b/img/friend_404.gif differ diff --git a/img/index.jpg b/img/index.jpg deleted file mode 100644 index 877b336..0000000 Binary files a/img/index.jpg and /dev/null differ diff --git a/img/post.jpg b/img/post.jpg index 49a812c..caa4a70 100644 Binary files a/img/post.jpg and b/img/post.jpg differ diff --git a/img/post_loadding.svg b/img/post_loadding.svg index ef01327..ed90d7e 100644 --- a/img/post_loadding.svg +++ b/img/post_loadding.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/index.html b/index.html index b2e7f4c..1469d90 100644 --- a/index.html +++ b/index.html @@ -1,12 +1,12 @@ -Barry +Barry - + -
加载中...
目之所及,皆是Java。心之所想,皆是exe的坑
面向对象课程设计实验报告
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/self/duotone.css b/self/duotone.css new file mode 100644 index 0000000..912745a --- /dev/null +++ b/self/duotone.css @@ -0,0 +1,364 @@ +/* +Name: Duotone Light +Author: Simurai, adapted from DuoTone themes for Atom (http://simurai.com/projects/2016/01/01/duotone-themes) + +Conversion: Bram de Haan (http://atelierbram.github.io/Base2Tone-prism/output/prism/prism-base2tone-morning-light.css) +Generated with Base16 Builder (https://github.com/base16-builder/base16-builder) +*/ + +code[class*="language-"], +pre[class*="language-"] { + font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace; + font-size: 14px; + line-height: 1.375; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + background: #faf8f5; + color: #728fcb; +} + +pre > code[class*="language-"] { + font-size: 1em; +} + +pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, +code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { + text-shadow: none; + background: #faf8f5; +} + +pre[class*="language-"]::selection, pre[class*="language-"] ::selection, +code[class*="language-"]::selection, code[class*="language-"] ::selection { + text-shadow: none; + background: #faf8f5; +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: .5em 0; + overflow: auto; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: .1em; + border-radius: .3em; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #b6ad9a; +} + +.token.punctuation { + color: #b6ad9a; +} + +.token.namespace { + opacity: .7; +} + +.token.tag, +.token.operator, +.token.number { + color: #063289; +} + +.token.property, +.token.function { + color: #b29762; +} + +.token.tag-id, +.token.selector, +.token.atrule-id { + color: #2d2006; +} + +code.language-javascript, +.token.attr-name { + color: #896724; +} + +code.language-css, +code.language-scss, +.token.boolean, +.token.string, +.token.entity, +.token.url, +.language-css .token.string, +.language-scss .token.string, +.style .token.string, +.token.attr-value, +.token.keyword, +.token.control, +.token.directive, +.token.unit, +.token.statement, +.token.regex, +.token.atrule { + color: #728fcb; +} + +.token.placeholder, +.token.variable { + color: #93abdc; +} + +.token.deleted { + text-decoration: line-through; +} + +.token.inserted { + border-bottom: 1px dotted #2d2006; + text-decoration: none; +} + +.token.italic { + font-style: italic; +} + +.token.important, +.token.bold { + font-weight: bold; +} + +.token.important { + color: #896724; +} + +.token.entity { + cursor: help; +} + +pre > code.highlight { + outline: .4em solid #896724; + outline-offset: .4em; +} + +/* overrides color-values for the Line Numbers plugin + * http://prismjs.com/plugins/line-numbers/ + */ +.line-numbers .line-numbers-rows { + border-right-color: #ece8de; +} + +.line-numbers-rows > span:before { + color: #cdc4b1; +} + +/* overrides color-values for the Line Highlight plugin + * http://prismjs.com/plugins/line-highlight/ + */ +.line-highlight { + background: rgba(45, 32, 6, 0.2); + background: -webkit-linear-gradient(left, rgba(45, 32, 6, 0.2) 70%, rgba(45, 32, 6, 0)); + background: linear-gradient(to right, rgba(45, 32, 6, 0.2) 70%, rgba(45, 32, 6, 0)); +} + + + +/* 新添加的内容 + ------------------------------------- + --hl-color 代码框字体顔色 【必须】 (把下面 pre[class*="language-"]的 color 复製到这里来) + --hl-bg 代码框背景色 【必须】 (把下面 pre[class*="language-"]的 background复製到这里来) + --hltools-bg: #321a0f 代码框顶部工具栏背景色 【可选】(如果你关掉了 copy、lang 和 shrink,可不用配置这个) + --hltools-color: #fff 代码框顶部工具栏字体顔色 【可选】(如果你关掉了 copy、lang 和 shrink,可不用配置这个) + --hlnumber-bg: #221a0f 代码框行数背景色 【可选】(如果已经关掉 line_number,可以不用配置这个) + --hlnumber-color: #fff 代码框行数字体顔色 【可选】 (如果已经关掉 line_number,可以不用配置这个) + --hlscrollbar-bg: #d3af86 代码框滚动条顔色 【可选】(默认为主题主顔色) + --hlexpand-bg: #d3af86 代码框底部展开背景色 【可选】(如果已经关掉 highlight_height_limit,可以不用配置这个) +*/ + +:root { + --hl-color: #728fcb; + --hl-bg: #faf8f5; + --hltools-bg: xxxxxxx; + --hltools-color: xxxxxxx; + --hlnumber-bg: xxxxxxx; + --hlnumber-color: xxxxxxxx; + --hlscrollbar-bg: xxxxx; + --hlexpand-bg: xxxxxxx +} +code[class*="language-"], +pre[class*="language-"] { + font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace; + font-size: 14px; + line-height: 1.375; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + background: #faf8f5; + color: #728fcb; +} + +pre > code[class*="language-"] { + font-size: 1em; +} + +pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, +code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { + text-shadow: none; + background: #faf8f5; +} + +pre[class*="language-"]::selection, pre[class*="language-"] ::selection, +code[class*="language-"]::selection, code[class*="language-"] ::selection { + text-shadow: none; + background: #faf8f5; +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: .5em 0; + overflow: auto; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: .1em; + border-radius: .3em; +} + +/* ------------------------------------- */ +/* 到这里为止,可以删除 */ + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #b6ad9a; +} + +.token.punctuation { + color: #b6ad9a; +} + +.token.namespace { + opacity: .7; +} + +.token.tag, +.token.operator, +.token.number { + color: #063289; +} + +.token.property, +.token.function { + color: #b29762; +} + +.token.tag-id, +.token.selector, +.token.atrule-id { + color: #2d2006; +} + +code.language-javascript, +.token.attr-name { + color: #896724; +} + +code.language-css, +code.language-scss, +.token.boolean, +.token.string, +.token.entity, +.token.url, +.language-css .token.string, +.language-scss .token.string, +.style .token.string, +.token.attr-value, +.token.keyword, +.token.control, +.token.directive, +.token.unit, +.token.statement, +.token.regex, +.token.atrule { + color: #728fcb; +} + +.token.placeholder, +.token.variable { + color: #93abdc; +} + +.token.deleted { + text-decoration: line-through; +} + +.token.inserted { + border-bottom: 1px dotted #2d2006; + text-decoration: none; +} + +.token.italic { + font-style: italic; +} + +.token.important, +.token.bold { + font-weight: bold; +} + +.token.important { + color: #896724; +} + +.token.entity { + cursor: help; +} + +pre > code.highlight { + outline: .4em solid #896724; + outline-offset: .4em; +} + +/* overrides color-values for the Line Numbers plugin + * http://prismjs.com/plugins/line-numbers/ + */ +.line-numbers .line-numbers-rows { + border-right-color: #ece8de; +} + +.line-numbers-rows > span:before { + color: #cdc4b1; +} + +/* overrides color-values for the Line Highlight plugin + * http://prismjs.com/plugins/line-highlight/ + */ +.line-highlight { + background: rgba(45, 32, 6, 0.2); + background: -webkit-linear-gradient(left, rgba(45, 32, 6, 0.2) 70%, rgba(45, 32, 6, 0)); + background: linear-gradient(to right, rgba(45, 32, 6, 0.2) 70%, rgba(45, 32, 6, 0)); +} diff --git a/tags/C/index.html b/tags/C/index.html index 7e2f6f3..13b8a67 100644 --- a/tags/C/index.html +++ b/tags/C/index.html @@ -1,12 +1,12 @@ -标签: C | Barry +标签: C | Barry - + -
加载中...
标签 - Fun
2021
夏日空调
夏日空调
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/tags/HTML/index.html b/tags/HTML/index.html index 997f9e8..19b03d7 100644 --- a/tags/HTML/index.html +++ b/tags/HTML/index.html @@ -1,12 +1,12 @@ -标签: HTML | Barry +标签: HTML | Barry - + -
加载中...
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/tags/IDEA/index.html b/tags/IDEA/index.html index b819e8b..6ac7400 100644 --- a/tags/IDEA/index.html +++ b/tags/IDEA/index.html @@ -1,12 +1,12 @@ -标签: IDEA | Barry +标签: IDEA | Barry - + -
加载中...
标签 - Java Redis
2022
DelayingQueue
DelayingQueue
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/tags/Java/index.html b/tags/Java/index.html new file mode 100644 index 0000000..d710fd9 --- /dev/null +++ b/tags/Java/index.html @@ -0,0 +1,238 @@ +标签: Java | Barry + + + + + + + +
加载中...
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git a/tags/Javafx/index.html b/tags/Javafx/index.html index efb9f2e..3703dbe 100644 --- a/tags/Javafx/index.html +++ b/tags/Javafx/index.html @@ -1,12 +1,12 @@ -标签: Javafx | Barry +标签: Javafx | Barry - + -
加载中...
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file diff --git "a/tags/\345\276\256\344\277\241/index.html" "b/tags/\345\276\256\344\277\241/index.html" index 8e65329..92eccda 100644 --- "a/tags/\345\276\256\344\277\241/index.html" +++ "b/tags/\345\276\256\344\277\241/index.html" @@ -1,12 +1,12 @@ -标签: 微信 | Barry +标签: 微信 | Barry - + -
加载中...
标签 - 设计模式
2021
行为模式-访问-策略模式
行为模式-访问-策略模式
公告
This is my Blog
最新文章
+ + 分类 + +
+
网站资讯
文章数目 :
22
已运行时间 :
本站总字数 :
23.8k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file