Category Archives: How to Fix

Vue warn: duplicate keys detected: ‘1’. This may cause an update error

[VUE WARN]: Duplicate keys detected: ‘1’. This may cause an update error. :

/ font>


Problem description:


Reason analysis:
> Keys value binding problem
My problem is my problem when doing the project binding:

here my page rendering is based on id to apply colours to a drawing


Solution:


br>

2059 error in connecting to database by Navicat premium

Error 2059 in new connection after installing Navicat
Open Doc window Win + D type CMD to open
The input
Mysql -u root -p
Enter the password for root

Select database
The input
use mysql

View the rules for encryption
The input
select Host,User,plugin from mysql.user;

Encryption mode is the new encryption mode
Change back to the original encryption mode
The input
ALTER USER ‘root’@’localhost’ IDENTIFIED WITH ‘mysql_native_password ‘;
The refresh
FLUSH PRIVIEGES;

Check the encryption again
select Host,User,plugin from mysql.user;

Now you can connect to the database

Anaconda installation opencv Python error solution

Error message: PIP _vendor. Urllib3. Exceptions. ReadTimeoutError:
HTTPSConnectionPool (host = “pypi.tuna.tsinghua.edu.cn”, the port = 443) : Read timed out.
directly in the console input PIP install opencv – python error as shown in figure:

May be because I accidentally canceled the cause behind all installation not
behind direct route directly to tsinghua source download and then switch to the installation was successful
tsinghua source: https://pypi.tuna.tsinghua.edu.cn/simple/opencv-python/
small pit: switch plate command is “E:”, rather than the CD disc cutting
reference: https://blog.csdn.net/qq_43766304/article/details/104862174

E: unable to locate package MySQL server error solution

In Ubuntu system, using the apt-get install command to install the program, the following problems occurred.

root@1:~# sudo apt-get install mysql-server -y
sudo: unable to resolve host iZm5ej8y1b74lo14r36fvlZ
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package mysql-server

Solutions:
Sudo apt-get update sudo apt-get update
The software source is not updated, or the software source is modified,

sudo apt-get update

Second method: need to change the software source
Refer to the method of replacing the software source:

http://www.chenxm.cc/post/445.html

E: Unable to locate package mysql-server: Unable to locate package mysql-server: Unable to locate package mysql-server

The use of C + + template function and lambda expression

#include <iostream>

using namespace std;

class Tmp1 {
public:
    int foo() { 
        cout << "Tmp1.foo" << endl;
        return ret;
    }

    string walk() {
        cout << "walk" << endl;
        return "cout walk";
    }

    int ret = 1;
};

class Tmp2 {
public:
    int foo() {
        cout << "Tmp2.foo" << endl;
        return ret;
    }

    string run() {
        cout << "run" << endl;
        return "cout run";
    }

    int ret = 2;
};

struct OutPara {
    int ret = 0;
    string desc;
};

template<typename T, typename F>
void print(T t, const F &f) {
    cout << "test" << endl;
    f(t);
}

int main()
{
    Tmp1 t1;
    OutPara out;
    print(t1, [&](Tmp1 &t)->void{
        out.desc = t.walk();
        out.ret = t.foo();
    });
    cout << out.ret << "\t" << out.desc << endl;
    Tmp2 t2;
    print(t2, [&](Tmp2 &t)->void{
        out.desc = t.run();
        out.ret = t.foo();
    });
    cout << out.ret << "\t" << out.desc << endl;
    return 0;
}

The output

test
walk
Tmp1.foo
1       cout walk
test
run
Tmp2.foo
2       cout run

SSD [failed] failed to mount / sysRoot solution

[Failed] Failed to mount /sysroot [Failed] Failed to mount /sysroot

[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
[8.901016] SGI XFS with ACLs, security attributes, no debug enabled
[8.912417] XFS (nvme0n1p3): Mounting V5 Filesystem
[8.960550] XFS (nvme0n1p3): Starting recovery (logdev: internal)
[8.973696] XFS (nvme0n1p3): Metadata corruption detected at __write_verify+0xfd/0x110 [xfs], xfs_dir3_leaf1 block 0x1900a00
[8.984887] XFS (nvme0n1p3): Unmount and run xfs_repair
[8.990104] XFS (nvme0n1p3): First 64 bytes of corrupted metadata buffer:
[8.996876] ffff9d79d0a6e000: 00 00 00 00 00 00 00 00 3d f1 00 00 17 bf 25 cb  ........=.....%.
[9.005544] ffff9d79d0a6e010: 00 00 00 00 01 90 0a 00 00 00 00 26 00 00 a2 aa  ...........&....
[9.014214] ffff9d79d0a6e020: 11 51 07 ca d1 a4 47 1a a2 a5 c6 99 86 e3 c6 6d  .Q....G........m
[9.022885] ffff9d79d0a6e030: 00 00 00 00 02 00 00 42 01 f0 00 2d 00 00 00 00  .......B...-....
[9.031560] XFS (nvme0n1p3): xfs_do_force_shutdown(0x8) called from line 1391 of file fs/xfs/xfs_buf.c.  Return address = 0xffffffffc063afb7
[9.044120] XFS (nvme0n1p3): Corruption of in-memory data detected.  Shutting down filesystem
[9.052618] XFS (nvme0n1p3): Please umount the filesystem and rectify the problem(s)
[9.060415] XFS (nvme0n1p3): log mount/recovery failed: error -117
[9.066595] XFS (nvme0n1p3): log mount failed
[FAILED] Failed to mount /sysroot.
See 'systemctl status sysroot.mo
Generating "/run/initramfs/rdsosreport.txt"

Baidu the online method under the
# code xfs_repair - v - L/dev/dm - 0
on failure, seemingly equipment is wrong, the dm to nvme0n1p3 0, perform OK, the following figure

:/# xfs_repair -v -L /dev/nvme0n1p3
Phase 1 - find and verify superblock...
        - block cache size set to 3003408 entries
Phase 2 - using internal log
        - zero log...
zero_log: head block 42497 tail block 42014
ALERT: The filesystem has valuable metadata changes in a log which is being
destroyed because the -L option was used.
        - scan filesystem freespace and inode maps...
out-of-order bno btree record 9 (289310 2) block 0/1
block (0,289310-289310) multiply claimed by bno space tree, state - 1
agi unlinked bucket 2 is 1214018 in ag 2 (inode=68322882)
agi unlinked bucket 10 is 1215178 in ag 2 (inode=68324042)
agi unlinked bucket 13 is 1140429 in ag 2 (inode=68249293)
agi unlinked bucket 14 is 1213902 in ag 2 (inode=68322766)
agi unlinked bucket 15 is 1215183 in ag 2 (inode=68324047)
agi unlinked bucket 17 is 1140433 in ag 2 (inode=68249297)
agi unlinked bucket 18 is 1215186 in ag 2 (inode=68324050)
agi unlinked bucket 20 is 1140436 in ag 2 (inode=68249300)
agi unlinked bucket 26 is 157018 in ag 2 (inode=67265882)
agi unlinked bucket 29 is 1214045 in ag 2 (inode=68322909)
agi unlinked bucket 30 is 1214430 in ag 2 (inode=68323294)
agi unlinked bucket 37 is 1213989 in ag 2 (inode=68322853)
agi unlinked bucket 39 is 1213991 in ag 2 (inode=68322855)
agi unlinked bucket 40 is 1213992 in ag 2 (inode=68322856)
agi unlinked bucket 41 is 1213993 in ag 2 (inode=68322857)
agi unlinked bucket 44 is 1213996 in ag 2 (inode=68322860)
agi unlinked bucket 49 is 1214001 in ag 2 (inode=68322865)
agi unlinked bucket 54 is 1214006 in ag 2 (inode=68322870)
sb_ifree 254, counted 228
sb_fdblocks 10399804, counted 10408087
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
data fork in ino 1797907 claims free block 238369
imap claims a free inode 2180228 is in use, correcting imap and clearing inode
cleared inode 2180228
        - agno = 1
imap claims in-use inode 33968729 is free, correcting imap
        - agno = 2
        - agno = 3
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
entry "default.hostsfile" in shortform directory 565517 references free inode 2180236
junking entry "default.hostsfile" in directory inode 565517
Phase 5 - rebuild AG headers and trees...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - traversing filesystem ...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
entry "tmp" in directory inode 100786852 not consistent with .. value (34441335) in inode 2180231,
junking entry
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
disconnected dir inode 2180231, moving to lost+found
disconnected inode 67265882, moving to lost+found
disconnected inode 67313620, moving to lost+found
disconnected inode 68249293, moving to lost+found
disconnected inode 68249297, moving to lost+found
disconnected inode 68249300, moving to lost+found
disconnected inode 68322766, moving to lost+found
disconnected inode 68322853, moving to lost+found
disconnected inode 68322855, moving to lost+found
disconnected inode 68322856, moving to lost+found
disconnected inode 68322857, moving to lost+found
disconnected inode 68322860, moving to lost+found
disconnected inode 68322865, moving to lost+found
disconnected inode 68322870, moving to lost+found
disconnected inode 68322882, moving to lost+found
disconnected inode 68322909, moving to lost+found
disconnected inode 68322910, moving to lost+found
disconnected inode 68323294, moving to lost+found
disconnected inode 68324042, moving to lost+found
disconnected inode 68324047, moving to lost+found
disconnected inode 68324050, moving to lost+found
Phase 7 - verify and correct link counts...
resetting inode 33554498 nlinks from 451 to 452
resetting inode 100786852 nlinks from 3 to 2
resetting inode 2180228 nlinks from 2 to 3
resetting inode 2180237 nlinks from 1 to 2
Maximum metadata LSN (38:42014) is ahead of log (1:2).
Format log to cycle 41.

        XFS_REPAIR Summary    Thu Jan 19 06:06:46 2017

Phase		Start		End		Duration
Phase 1:	01/19 06:06:46	01/19 06:06:46	
Phase 2:	01/19 06:06:46	01/19 06:06:46	
Phase 3:	01/19 06:06:46	01/19 06:06:46	
Phase 4:	01/19 06:06:46	01/19 06:06:46	
Phase 5:	01/19 06:06:46	01/19 06:06:46	
Phase 6:	01/19 06:06:46	01/19 06:06:46	
Phase 7:	01/19 06:06:46	01/19 06:06:46	

Total run time: 
done
:/# 

Then perform

:/# xfs_repair dev/nvme0n1p3

The results are as follows

Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - traversing filesystem ...
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
Phase 7 - verify and correct link counts...
done
:/# 

Mount can succeed, too

:/# mount -o rw dev/nvme0n1p3 /data0
[  853.650067] XFS (nvme0n1p3): Mounting V5 Filesystem
[  853.777152] XFS (nvme0n1p3): Ending clean mount
:/# cd data0/
:/data0# ls
bin   compass  etc   lib    lost+found	mnt  proc  run	 srv  tmp   usr
boot  dev      home  lib64  media	opt  root  sbin  sys  upan  var
:/data0# 

Let’s try that again

CentOS Linux 7 (Core)
Kernel 3.10.0-862.11.6.el7.x86_64 on an x86_64

localhost login: 

done

Failed to mount / cache (no such device)

After fastboot swiped the ROM of CM13, ADB sideload was used to swiped the ROM, but every time there was an error on the phone

E: failed to mount /cache (No such device)

The fastboot-w command can not be used to retrieve the cache from the cache. It can not be used to retrieve the cache from the cache. The fastboot-w command can not be used to retrieve the cache.

-w erase userdata and cache (and format if supported by partition type)

Double-clear operations will also be done, and partitions will be rebuilt

wiping userdata...
Creating filesystem with parameter
    Size: 13610496000
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8160
    Inode size: 256
    Journal blocks: 32768
    Label:
    Blocks: 3322875
    Block groups: 102
    Reserved block group size: 815

Failed to mount /cache error will not be reported again after the adb sideload is executed.
E:Can’t mount /cache/recovery/log