Author Archives: Robins

Vue Render List Error: Avoid using non-primitive value as key, use string/number value instead.

As soon as you enter the page, an error is reported as follows

As soon as you enter a page, such a long string of errors will appear. This is because the key value may be repeated in the V-for loop, so this error will be reported. After checking the page code, it is found that the key value is duplicate

The key value must be unique. If it is repeated, an error will be reported.
this situation can be avoided by changing the key value to index or ID. (here, ID is best used for key to achieve the principle of unique key value and local reuse, which greatly saves DOM rendering)

VirtualBox: How to Enable Nested VT-x/AMD-V

First, install the VirtualBox on windows. In order to create nested virtual machines on the VirtualBox, you need to turn on the virtualization function of the CPU.

VirtualBox enables nested VT-x/amd-v.

If you open the virtual machine, an error is reported:

Cannot enable nested VT-x/AMD-V without nested-paging and unresricted guest execution

(VERR_CPUM_INVALID_HWVIRT_CONFIG).

Result Code: E_FAIL (0x80004005).....

Refer to this article again.

The specific solutions are as follows:

1. At the command prompt, run: bcdedit /set hypervisorlaunchtype off
2. Reboot

Enter the virtual machine and execute:

egrep -o '(vmx|svm)' /proc/cpuinfo

You can see VMX, indicating OK.

Git pull Error: error: Your local changes to the following files would be overwritten by merge:

In this case, how to keep the local changes while merging the remote ones?

First, it depends on whether you want to save local changes(yes/no)

yes

git stash  
git pull origin master  
git stash pop

git stage will take your local snapshot, and then git pull will not stop you. After the pull, your code does not retain your modifications. Surprised! Don’t worry, what did we seem to have done before

STASH

At this time, execute git stash pop. When you go to the local area, you will find that the conflicting local modifications are still there. At this time, you can commit and push whatever you want.

No

Since you don’t want to keep the local changes, it’s easy to do. Directly restore the local state to the previous commit ID. Then use the remote code to directly overwrite the local code.

git reset --hard 
git pull origin master

Accessors are only available when targeting ECMAScript 5 and higher [Solved]

Coming here shows that you are smart and diligent. You must be learning the super cluster typescript of JavaScript. Fortunately, you have worked hard to write the code: the running results are as follows

- error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.

It generally means that you need to compile to version Es5 or above
that is, you need to specify that you need to compile to version Es5 or above
then you can specify this:

tsc project_name.ts -t es5
// example:
tsc class.ts -t es5

Run successfully, continue to write the set/get method happily

MAC VS Error: SDK package not found “Microsoft.NET.SDK [Solved]

ref: https://developercommunity.visualstudio.com/t/monodevelopcoreuserexception-unable-to-find-sdk-mi/1459162#T-N1460014

This is a problem with the .NET 6 preview 5 – https://github.com/dotnet/core/blob/main/release-notes/6.0/known-issues.md#preview-5
The workload manifest files were renamed in .NET 6 preview 5 which results in duplicate ids and causes the workload resolver to fail. This then results in Visual Studio for Mac showing an error about the WorkloadAutoImportPropsLocator sdk not being found.
A workaround is to remove the sdk-manifests directory /usr/local/share/dotnet/sdk-manifests/6.0.100 and then install the .NET 6 preview sdk again so it adds back the manifest files it needs.

Solution:
Delete all file in the directory of /usr/local/share/dotnet/sdk-manifests/, and reinstall dotnet 6 SDK, this issue will be solved

[Solved] IDEA jar Pack Error: java.lang.NoSuchMethodError: org.yaml.snakeyaml.nodes.ScalarNode.getScalarStyle

It is said on the Internet that it is a jar package conflict, so I intend to open the dense Maven dependency graph through the dependencies of idea to find clues.

As a result, the direct persuasion was too complicated;

17:22:00.943 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
java.lang.NoSuchMethodError: org.yaml.snakeyaml.nodes.ScalarNode.getScalarStyle()Lorg/yaml/snakeyaml/DumperOptions$ScalarStyle;
	at org.springframework.boot.env.OriginTrackedYamlLoader$KeyScalarNode.<init>(OriginTrackedYamlLoader.java:124)
	at org.springframework.boot.env.OriginTrackedYamlLoader$KeyScalarNode.get(OriginTrackedYamlLoader.java:135)
	at org.springframework.boot.env.OriginTrackedYamlLoader$KeyScalarNode.get(OriginTrackedYamlLoader.java:130)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)

Later, by clicking the code link in the console error prompt, you can directly choose to go to the jar package to see the code, and immediately find the two jar packages to do things again.

found a conflict between the selenium-server-standale-3.141.59.jar and the core package in Springboot.

This is still in vue’s node_modules

/Users/dairy/StudioProjects/mogu_blog_v2/vue_mogu_web/node_modules/selenium-server/lib/runner/selenium-server-standale-3.141.59.jar

delete it and this error will be solved.

JAVA package Run Error: Java hotspot (TM) 64 bit server VI warning: Info: OST; The ‘eror’ page file is too small to complete the operation

Run the jar package

Error content: Java hotspot (TM) 64 bit server VI warning: Info: OST; comn it_ memary(Ox10000085800,130023424,0) failed; The ‘eror’ page file is too small to complete the operation. (Dos error 7errno=1455)

Cause: because the memory of the configured JVM is too small or the size is not set

Solution: modify run configurations before packaging in eclipse

Right-click the code and click “run as” -> “Run configurations”, fill in the following values in “VM arguments:” in the arguments parameter.

-Xms64m -Xmx128m

Note: the memory setting can be modified according to the actual situation of the project. If the memory allocation is small, when the applied memory is greater than the set memory (Tomcat maximum memory – Xmx), full GC (STW) will be triggered. When performing full GC, there will be a jam. The memory allocation of each project can be allocated according to the frequency of use of the project

[Solved] Error: TSV flashing service failed (STM32CubeProgrammer)

Burn bearpi HM with stm32cubeprogrammer_Micro_Small development board program exception

1. Exception error message:

09:43:24 : Error: Error while reading the file
09:43:25 : Error: Download partition 0x22 failed
09:43:25 : Error: TSV flashing service failed

2. Abnormal phenomenon

3. Analysis of abnormal causes:

1. Create virtual machine Ubuntu 20.0 using hyper-v.04. The network adopts the internal network mode.

2. The IP address adopts static IP address.

2. The physical host network is bridged.

4. Preliminary cause analysis

Cause: physical host and virtual host cannot use bridged network settings.

5. Solution

Cancel the bridging network setting between physical machine and virtual machine, Hyper-V adopts the default network exchange, and Ubuntu network adopts DHCP mode setting.

6. After setting, burn the original program again and burn it successfully.

10:30:31 : STM32CubeProgrammer API v2.5.0
10:30:35 : USB speed : High Speed (480MBit/s)
10:30:35 : Manuf. ID : STMicroelectronics
10:30:35 : Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x2001, @Name /STM32MP157AAC Rev.Z,
10:30:35 : SN : 003C00343030510B34343437
10:30:35 : FW version : 0x0110
10:30:35 : Device ID : 0x0500
10:30:52 : Read TSV File: M:\BearPi_Micro\bearpi-hm_micro_small\applications\BearPi\BearPi-HM_Micro\tools\download_img\flashlayout\bearpi-hm_micro.tsv
10:30:52 : Number of partitions: 8
10:31:04 : Start Embedded Flashing service
10:31:04 : Memory Programming ...
10:31:04 : Opening and parsing file: rootfs_vfat.img
10:31:04 : File : rootfs_vfat.img
10:31:04 : Size : 18175 KBytes
10:31:04 : Partition ID : 0x22
10:31:04 : Download in Progress:
10:31:16 : File download complete
10:31:16 : Time elapsed during download operation: 00:00:12.118
10:31:16 : RUNNING Program ...
10:31:16 : PartID: :0x22
10:31:16 : Start operation done successfully at partition 0x22
10:31:16 : Memory Programming ...
10:31:16 : Opening and parsing file: userfs_vfat.img
10:31:17 : File : userfs_vfat.img
10:31:17 : Size : 50 MBytes
10:31:17 : Partition ID : 0x23
10:31:17 : Download in Progress:
10:31:50 : File download complete
10:31:

[Solved] servlet jump to Blank Page Error: java.lang.ClassNotFoundException: com.mysql.jdbc.

The problem of page blank after servlet jump

Servlet code

report errors

ava.lang.ClassNotFoundException: com.mysql.jdbc.Driver exception

Reason: it has nothing to do with the above code,

The real reason is that the MySQL jar package was not imported into Tomcat. His grandmother found this problem for a long time and almost died

Now let’s show a wave of operation

1. Open Tomcat configuration,

2. Enter the favorite Guide Package link

Everyone’s lib directory is stored in different locations here. Anyway, you need to import the MySQL package into the Lib directory,

If you find that you don’t have this package, we’ll copy and paste it online or copy it in the Maven project

The main reason is that the MySQL package is not imported into tomcat, which leads to such an error