Author Archives: Robins

Solution to the flash back, error report and unexpected exit of idea MAC windows

First of all, let’s talk about the reason why I have this problem
when I use idea, because I am shy in my pocket, I use improper means to crack idea indefinitely, and then because I am stupid and improper operation, idea exits unexpectedly and can’t enter the flash screen
finally, through repeated search on the Internet, the strength of nine cattle and two tigers was wasted, and finally a solution was found. I share it with you here.

The problem is that it appears in the idea. Vmoptions file. For some cracking, you need to add a path to crack the JRE package in this file. The problem appears here.

So the first solution I think of is to find this file, modify it back, or delete it directly
so I found the idea.vmoptions file in the bin directory of the idea installation directory. Then delete it, and the result still doesn’t work.

Then I tried to uninstall the software and reinstall it with another version, which still didn’t work.

This shows that the idea.vmoptions file under the installation package is not the root of the problem

Because every time we start, the file idea.vmoptions in the installation directory is not loaded
instead, the file under C: \ users \ user name \. Intellijidea2018.1 \ config \ plugins
. Mac is located in users/computer user name/library/preferences/intellijidea2019.3
if not, go to if not, go to: application support/JetBrains/intellijidea2020.1 under library /. After finding it, delete it and start the idea again.

How to Solve Nodejs error: cannot find module ‘. /application’

Open the terminal and enter nodemon./index.js. The following error messages appear:

Solution:

After entering the directory where index.js is located
delete node_ Module folder and package lock.json file open the terminal, type NPM clean cache , clear the cache, type NPM I , and type nodemon index. JS  for installation dependency
Run nodemon./index.js again

Perfect solution~

How to Solve using stm32f4 to drive PS2 error

Cause

When porting PS2 code for the project, I thought it was a simple thing. I closed it for several hours. The data I read has been incorrect (the data beat is unstable). I decided to give up, but I still decided to step on the pit to the end! So there is this article

Solution direction

Based on the previous experience of pit drainage, the problems may lie in the following places

    1. hardware problem IO port configuration, clock tree configuration and timer configuration. The underlying driver code is not suitable (the widely circulated code is F103 version)

Problem exploration

      1. hardware problem

 

      1. an F103 board was found and driven normally. The problem of PS2 damage and wire open circuit was eliminated. IO port configuration

 

      1. the IO port configured according to the official routine, tested that the output of each IO port is normal, and tried to modify the speed of the IO port, which is useless. The underlying driver code is not adapted to the

 

      1. PS2 driver code. Only the following lines refer to the underlying
#define DI    HAL_GPIO_ReadPin(PS2_DAT_GPIO_Port,PS2_DAT_Pin) 
#define DO_H  HAL_GPIO_WritePin(PS2_CMD_GPIO_Port,PS2_CMD_Pin,GPIO_PIN_SET)     
#define DO_L  HAL_GPIO_WritePin(PS2_CMD_GPIO_Port,PS2_CMD_Pin,GPIO_PIN_RESET)     
#define CS_H  HAL_GPIO_WritePin(PS2_CS_GPIO_Port,PS2_CS_Pin,GPIO_PIN_SET)      
#define CS_L  HAL_GPIO_WritePin(PS2_CS_GPIO_Port,PS2_CS_Pin,GPIO_PIN_RESET)     
#define CLK_H  HAL_GPIO_WritePin(PS2_CLK_GPIO_Port,PS2_CLK_Pin,GPIO_PIN_SET)   
#define CLK_L  HAL_GPIO_WritePin(PS2_CLK_GPIO_Port,PS2_CLK_Pin,GPIO_PIN_RESET)  

Check the macro definition of each IO port to correspond to the IO port on the board. Delay is also used in many places in the source code_ms/delay_US function uses a mature timer library to ensure the accuracy of delay, so this problem is also eliminated
4. Timer configuration
unlike F1, which uses TIM4 as the internal clock, F4 uses tim5, but both are ordinary timers and have no essential difference, so the problem is obviously not here
5. Clock tree configuration
finally, the problem is located here
referring to the official routine, change the master clock frequency from 180mhz to 72mhz. It is normal
in other words, PS2 has high requirements for communication timing. The maximum clock frequency of F4 will accelerate the communication frequency, which may lead to the collapse of some protocols, so the data is unstable.

Prospect

Of course, the optimal solution is not to change the clock frequency of the chip, which will affect the execution rate of other programs. Theoretically, the timing can be restored to normal by adding a certain delay operation to the driver code, but I didn’t do it because of time. I hope interested players can have an in-depth study, and it’s best to share the code. (not found on the Internet at present)

Running realsense ROS reports an error, USB cam overflow, hardware error

Run the command roslaunch realsense2_ camera rs_ The following error message appears in camera.launch:

resolvent:

The reason for this problem is not that the driver is not installed properly, but because the realsense is connected to the computer through the USB2.0 interface, the transmission speed is slow, resulting in data overflow and loss. The problem can be solved by connecting through USB3.0.

The python script tool of ArcGIS reports an error: indentationerror: unexpected indent solution

Background

At the beginning, I wrote an ArcGIS Python script, which is an independent script. I ran it in Python and ran it successfully. But if you put this script in the ArcGIS toolbox, it won’t work properly. The following errors are reported.

IndentationError: unexpected indent。

  The above figure is an article from Baidu experience. Because there was no screenshot at that time, I didn’t bother to reproduce this problem again…

Find solutions

Code indentation problem

When searching for this error report on Baidu, most of the answers are to ask you to find the indentation problem and space problem in the code. As in the article from the above figure.

The problem is that my code can run successfully in pycharm, and I checked the code several times and found no problem…

Chinese in code (including Chinese in notes)

I use ArcGIS 10.2 and python version is 2.7. This version of Python doesn’t support Chinese very much, but generally you can run normally by adding # coding = UTF-8 at the beginning of the code in the python environment.

# coding=utf-8

There is a Chinese comment on the last line of the wrong line of my code. So I tried to remove that line of Chinese notes and succeeded

Summary

1. If the python script of ArcGIS does not need Chinese, do not use Chinese

2. If you have to use Chinese, you can consider adding # coding: cp936 at the beginning of the script code

 

Error when creating partitions in Linux: no free sectors available solution

When creating a partition with Linux, an error is reported:

no free sectors available

Chinese translation

No free partitions available

reason:

No free sectors available: your disk space is insufficient and there is no extra space for you to allocate; Sometimes, using various translation tools is not necessarily accurate; Everyone can understand vernacular;

The Linux partition also needs space. If you don’t even have excess disk space, of course, you can’t divide the partition;

Combined with the above figure:

Let’s take a look at all the information on the disk; With command:

fdisk -l

As a result, it is found that VDB already has a partition, which is/dev/vdb1; It happens to be the size of the whole disk, because we can’t partition again; As shown below:

  Therefore, we need to delete the partition first and then re partition it! The entire command is as follows:

fdisk /dev/vdb

d

(select the partition number. Bloggers only have one partition on this disk, and do not need to select. For multiple partitions, you need to select the partition number; if you do not understand the partition number of the disk)

Error in pom.xml file of sub module of Maven aggregation project

Today, when writing a sub module of a project, I found that the pom.xml of the sub module has been reporting errors. I checked that the jar package in the warehouse has been successfully downloaded. Other reasons have been eliminated, but I can’t find the reason. So Baidu searched for a method useful for my project (the development tool is eclipse). First, select the parent project of the aggregation project, right-click – run as – maven clean
then, after running successfully, you can see a build success message on the console
. Then, right-click – run as – Maven install

again, After running successfully, you can see that the console also has a build success message

finally, right click the parent project – maven – update project, and the error of pom.xml of the child project is successfully solved

reference website: https://blog.csdn.net/weixin_ 42428357/article/details/82014472